Added Managing and viewing of ProgramUpdates
This commit is contained in:
@@ -42,15 +42,15 @@ $this->breadcrumbs =
|
||||
); ?>
|
||||
</div>
|
||||
|
||||
<div class="span3" style="display: none">
|
||||
<div class="span3">
|
||||
<?php
|
||||
echo MsHtml::lead('Programs');
|
||||
echo MsHtml::lead('ProgramUpdates');
|
||||
|
||||
echo MsHtml::stackedTabs(
|
||||
[
|
||||
['label' => 'Home', 'url' => '#'],
|
||||
['label' => 'Profile', 'url' => '#'],
|
||||
['label' => 'Messages', 'url' => '#'],
|
||||
['label' => 'Show', 'url' => '/programupdates'],
|
||||
['label' => 'Manage', 'url' => '/programupdates/admin'],
|
||||
['label' => 'Create', 'url' => '/programupdates/create'],
|
||||
]
|
||||
); ?>
|
||||
</div>
|
||||
|
||||
37
www/protected/views/programupdates/_form.php
Normal file
37
www/protected/views/programupdates/_form.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $model ProgramUpdates */
|
||||
/* @var $form TbActiveForm */
|
||||
?>
|
||||
|
||||
<div class="form">
|
||||
|
||||
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
|
||||
'id'=>'program-updates-form',
|
||||
// Please note: When you enable ajax validation, make sure the corresponding
|
||||
// controller action is handling ajax validation correctly.
|
||||
// There is a call to performAjaxValidation() commented in generated controller code.
|
||||
// See class documentation of CActiveForm for details on this.
|
||||
'enableAjaxValidation'=>false,
|
||||
)); ?>
|
||||
|
||||
<p class="help-block">Fields with <span class="required">*</span> are required.</p>
|
||||
|
||||
<?php echo $form->errorSummary($model); ?>
|
||||
|
||||
<?php echo $form->textFieldControlGroup($model,'Name',array('span'=>5,'maxlength'=>64)); ?>
|
||||
|
||||
<?php echo $form->textAreaControlGroup($model,'Version',array('rows'=>6,'span'=>8)); ?>
|
||||
|
||||
<?php echo $form->textAreaControlGroup($model,'Link',array('rows'=>6,'span'=>8)); ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<?php echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array(
|
||||
'color'=>TbHtml::BUTTON_COLOR_PRIMARY,
|
||||
'size'=>TbHtml::BUTTON_SIZE_LARGE,
|
||||
)); ?>
|
||||
</div>
|
||||
|
||||
<?php $this->endWidget(); ?>
|
||||
|
||||
</div><!-- form -->
|
||||
26
www/protected/views/programupdates/_search.php
Normal file
26
www/protected/views/programupdates/_search.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $model ProgramUpdates */
|
||||
/* @var $form CActiveForm */
|
||||
?>
|
||||
|
||||
<div class="wide form">
|
||||
|
||||
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
|
||||
'action'=>Yii::app()->createUrl($this->route),
|
||||
'method'=>'get',
|
||||
)); ?>
|
||||
|
||||
<?php echo $form->textFieldControlGroup($model,'Name',array('span'=>5,'maxlength'=>64)); ?>
|
||||
|
||||
<?php echo $form->textAreaControlGroup($model,'Version',array('rows'=>6,'span'=>8)); ?>
|
||||
|
||||
<?php echo $form->textAreaControlGroup($model,'Link',array('rows'=>6,'span'=>8)); ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<?php echo TbHtml::submitButton('Search', array('color' => TbHtml::BUTTON_COLOR_PRIMARY,));?>
|
||||
</div>
|
||||
|
||||
<?php $this->endWidget(); ?>
|
||||
|
||||
</div><!-- search-form -->
|
||||
21
www/protected/views/programupdates/_view.php
Normal file
21
www/protected/views/programupdates/_view.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $data ProgramUpdates */
|
||||
?>
|
||||
|
||||
<div class="view">
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('Name')); ?>:</b>
|
||||
<?php echo CHtml::link(CHtml::encode($data->Name),array('view','id'=>$data->Name)); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('Version')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->Version); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('Link')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->Link); ?>
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
57
www/protected/views/programupdates/admin.php
Normal file
57
www/protected/views/programupdates/admin.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $model ProgramUpdates */
|
||||
|
||||
|
||||
$this->breadcrumbs=array(
|
||||
'Program Updates'=>array('index'),
|
||||
'Manage',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List ProgramUpdates', 'url'=>array('index')),
|
||||
array('label'=>'Create ProgramUpdates', 'url'=>array('create')),
|
||||
);
|
||||
|
||||
Yii::app()->clientScript->registerScript('search', "
|
||||
$('.search-button').click(function(){
|
||||
$('.search-form').toggle();
|
||||
return false;
|
||||
});
|
||||
$('.search-form form').submit(function(){
|
||||
$('#program-updates-grid').yiiGridView('update', {
|
||||
data: $(this).serialize()
|
||||
});
|
||||
return false;
|
||||
});
|
||||
");
|
||||
?>
|
||||
|
||||
<h1>Manage Program Updates</h1>
|
||||
|
||||
<p>
|
||||
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b>
|
||||
<></b>
|
||||
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
|
||||
</p>
|
||||
|
||||
<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button btn')); ?>
|
||||
<div class="search-form" style="display:none">
|
||||
<?php $this->renderPartial('_search',array(
|
||||
'model'=>$model,
|
||||
)); ?>
|
||||
</div><!-- search-form -->
|
||||
|
||||
<?php $this->widget('bootstrap.widgets.TbGridView',array(
|
||||
'id'=>'program-updates-grid',
|
||||
'dataProvider'=>$model->search(),
|
||||
'filter'=>$model,
|
||||
'columns'=>array(
|
||||
'Name',
|
||||
'Version',
|
||||
'Link',
|
||||
array(
|
||||
'class'=>'bootstrap.widgets.TbButtonColumn',
|
||||
),
|
||||
),
|
||||
)); ?>
|
||||
20
www/protected/views/programupdates/create.php
Normal file
20
www/protected/views/programupdates/create.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $model ProgramUpdates */
|
||||
?>
|
||||
|
||||
<?php
|
||||
$this->breadcrumbs=array(
|
||||
'Program Updates'=>array('index'),
|
||||
'Create',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List ProgramUpdates', 'url'=>array('index')),
|
||||
array('label'=>'Manage ProgramUpdates', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Create ProgramUpdates</h1>
|
||||
|
||||
<?php $this->renderPartial('_form', array('model'=>$model)); ?>
|
||||
33
www/protected/views/programupdates/index.php
Normal file
33
www/protected/views/programupdates/index.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $dataProvider CActiveDataProvider */
|
||||
?>
|
||||
|
||||
<?php
|
||||
$this->breadcrumbs=array(
|
||||
'Program Updates',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'Create ProgramUpdates','url'=>array('create')),
|
||||
array('label'=>'Manage ProgramUpdates','url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Program Updates</h1>
|
||||
|
||||
<?php $this->widget('bootstrap.widgets.TbGridView',array(
|
||||
'type'=>'striped bordered condensed',
|
||||
|
||||
'dataProvider'=>$dataProvider,
|
||||
|
||||
'columns'=>array(
|
||||
array(
|
||||
'name' => 'Name',
|
||||
'value' => 'CHtml::link($data->Name, Yii::app()->createUrl("/programupdates/view",array("id"=>$data->primaryKey)))',
|
||||
'type' => 'raw',
|
||||
),
|
||||
'Version',
|
||||
'Link',
|
||||
),
|
||||
)); ?>
|
||||
23
www/protected/views/programupdates/update.php
Normal file
23
www/protected/views/programupdates/update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $model ProgramUpdates */
|
||||
?>
|
||||
|
||||
<?php
|
||||
$this->breadcrumbs=array(
|
||||
'Program Updates'=>array('index'),
|
||||
$model->Name=>array('view','id'=>$model->Name),
|
||||
'Update',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List ProgramUpdates', 'url'=>array('index')),
|
||||
array('label'=>'Create ProgramUpdates', 'url'=>array('create')),
|
||||
array('label'=>'View ProgramUpdates', 'url'=>array('view', 'id'=>$model->Name)),
|
||||
array('label'=>'Manage ProgramUpdates', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Update ProgramUpdates <?php echo $model->Name; ?></h1>
|
||||
|
||||
<?php $this->renderPartial('_form', array('model'=>$model)); ?>
|
||||
67
www/protected/views/programupdates/view.php
Normal file
67
www/protected/views/programupdates/view.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/* @var $this ProgramUpdatesController */
|
||||
/* @var $model ProgramUpdates */
|
||||
?>
|
||||
|
||||
<?php
|
||||
$this->breadcrumbs = array(
|
||||
'Program Updates' => array('index'),
|
||||
$model->Name,
|
||||
);
|
||||
|
||||
$this->menu = array(
|
||||
array('label' => 'List ProgramUpdates', 'url' => array('index')),
|
||||
array('label' => 'Create ProgramUpdates', 'url' => array('create')),
|
||||
array('label' => 'Update ProgramUpdates', 'url' => array('update', 'id' => $model->Name)),
|
||||
array('label' => 'Delete ProgramUpdates', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->Name), 'confirm' => 'Are you sure you want to delete this item?')),
|
||||
array('label' => 'Manage ProgramUpdates', 'url' => array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1><?php echo $model->Name; ?></h1>
|
||||
|
||||
<?php $this->widget('zii.widgets.CDetailView', array(
|
||||
'htmlOptions' => array(
|
||||
'class' => 'table table-striped table-condensed table-hover',
|
||||
),
|
||||
'data' => $model,
|
||||
'attributes' => array(
|
||||
'Name',
|
||||
'Version',
|
||||
'Link',
|
||||
),
|
||||
)); ?>
|
||||
|
||||
<h3>Request-Log</h3>
|
||||
|
||||
<?php
|
||||
|
||||
$this->widget('bootstrap.widgets.TbGridView', array(
|
||||
'type' => TbHtml::GRID_TYPE_CONDENSED,
|
||||
'dataProvider' => new CArrayDataProvider($model->log, ['keyField' => 'ID','Pagination' => ['PageSize' => 100]]),
|
||||
|
||||
'columns' => array(
|
||||
[
|
||||
'header' => 'ID',
|
||||
'value' => '$data->ID',
|
||||
],
|
||||
[
|
||||
'header' => 'Programname',
|
||||
'value' => '$data->programname',
|
||||
],
|
||||
[
|
||||
'header' => 'IP',
|
||||
'value' => '$data->ip',
|
||||
],
|
||||
[
|
||||
'header' => 'Version',
|
||||
'value' => '$data->version',
|
||||
],
|
||||
[
|
||||
'header' => 'Date',
|
||||
'value' => '$data->date',
|
||||
],
|
||||
),
|
||||
|
||||
));
|
||||
?>
|
||||
Reference in New Issue
Block a user