Ejemplo n.º 1
0
<?php

$this->breadcrumbs = array('Комментарии' => array('index'), 'Управление комментариями');
$this->menu = array();
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('comment-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Управление комментариями</h1>

<p>
Можно использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
или <b>=</b>) в начале запроса.
</p>

<?php 
echo CHtml::link('Расширенный поиск', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
Yii::app()->getClientScript()->registerScript('comments', "\njQuery('#comment-grid a.blockComment, #comment-grid a.approveComment').live('click',function() {\n\t\$.fn.yiiGridView.update('comment-grid', {\n\t\ttype:'POST',\n\t\turl:\$(this).attr('href'),\n\t\tsuccess:function() {\n\t\t\t\$.fn.yiiGridView.update('comment-grid');\n\t\t}\n\t});\n\treturn false;\n});");
$this->widget('zii.widgets.grid.CGridView', array('id' => 'comment-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'object_type', 'type' => 'raw', 'value' => 'CHtml::link(L::ruitem(\'CommentType\', $data->object_type), isset($data->object->url)?$data->object->url:"", array("title"=>$data->object->title));', 'filter' => L::ruitems('CommentType')), 'author', 'text_marked:raw', 'created', 'rating', array('name' => 'status', 'value' => 'L::ruitem(\'CommentStatus\', $data->status)', 'filter' => L::ruitems('CommentStatus')), array('class' => 'CButtonColumn', 'template' => '{approve} {block}', 'buttons' => array('approve' => array('label' => 'Проверен', 'imageUrl' => $this->assets . '/images/accept.png', 'url' => 'CHtml::normalizeUrl(array("approve", "id"=>$data->primaryKey))', 'options' => array('class' => 'approveComment')), 'block' => array('label' => 'Заблокирован', 'imageUrl' => $this->assets . '/images/stop.png', 'url' => 'CHtml::normalizeUrl(array("block", "id"=>$data->primaryKey))', 'options' => array('class' => 'blockComment')))), array('class' => 'CButtonColumn'))));
Ejemplo n.º 2
0
echo $form->labelEx($model, 'rating');
?>
		<?php 
echo $form->textField($model, 'rating');
?>
		<?php 
echo $form->error($model, 'rating');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'status');
?>
		<?php 
echo $form->dropDownList($model, 'status', L::ruitems('CommentStatus'));
?>
		<?php 
echo $form->error($model, 'status');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Добавить' : 'Сохранить');
?>
	</div>

<?php 
$this->endWidget();
?>
Ejemplo n.º 3
0
<?php

$this->breadcrumbs = array('Диски' => array('index'), 'Управление дисками');
$this->menu = array(array('label' => 'Обзор дисков', 'url' => array('index')), array('label' => 'Добавить диск', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('disk-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Управление дисками</h1>

<p>
Можно использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
или <b>=</b>) в начале запроса.
</p>

<?php 
echo CHtml::link('Расширенный поиск', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'disk-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'producer_id', 'value' => '$data->producer->title', 'filter' => CHtml::listData(DiskProducers::model()->findAll(), 'id', 'title')), 'title', 'alias', array('name' => 'new', 'value' => 'L::ruitem(\'boolean\', $data->new)', 'filter' => L::ruitems('boolean')), array('name' => 'sale', 'value' => 'L::ruitem(\'boolean\', $data->sale)', 'filter' => L::ruitems('boolean')), array('name' => 'construction_type', 'value' => 'L::ruitem(\'diskConstructionType\', $data->construction_type)', 'filter' => L::ruitems('diskConstructionType')), array('name' => 'color', 'value' => 'L::item(\'color\', $data->color)', 'filter' => L::items('color')), 'model_id', array('class' => 'CButtonColumn'))));
Ejemplo n.º 4
0
echo $form->labelEx($tyreSelection, 'season');
?>
		<?php 
echo $form->dropDownList($tyreSelection, 'season', L::ruitems('tyreSeason'), array('empty' => 'Неважно'));
?>
		<?php 
echo $form->error($tyreSelection, 'season');
?>
	</div>
	
	<div class="row">
		<?php 
echo $form->labelEx($tyreSelection, 'puncture');
?>
		<?php 
echo $form->dropDownList($tyreSelection, 'puncture', L::ruitems('boolean'), array('empty' => 'Неважно'));
?>
		<?php 
echo $form->error($tyreSelection, 'puncture');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton('Найти');
?>
	</div>

<?php 
$this->endWidget();
?>
Ejemplo n.º 5
0
<?php

$this->breadcrumbs = array('Шины' => array('index'), 'Управление шинами');
$this->menu = array(array('label' => 'Обзор шин', 'url' => array('index')), array('label' => 'Добавить шину', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('tyre-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Управление шинами</h1>

<p>
Можно использовать операторы сравнения (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
или <b>=</b>) в начале запроса.
</p>

<?php 
echo CHtml::link('Расширенный поиск', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'tyre-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'producer_id', 'value' => '$data->producer->title', 'filter' => CHtml::listData(TyreProducers::model()->findAll(), 'id', 'title')), 'title', 'alias', array('name' => 'new', 'value' => 'L::ruitem(\'boolean\', $data->new)', 'filter' => L::ruitems('boolean')), array('name' => 'sale', 'value' => 'L::ruitem(\'boolean\', $data->sale)', 'filter' => L::ruitems('boolean')), array('name' => 'currency', 'value' => 'L::item(\'tyreCurrency\', $data->currency)', 'filter' => L::items('tyreCurrency')), array('name' => 'season', 'value' => 'L::item(\'tyreSeason\', $data->season)', 'filter' => L::items('tyreSeason')), array('name' => 'stud', 'value' => 'L::ruitem(\'boolean\', $data->stud)', 'filter' => L::ruitems('boolean')), array('name' => 'construction_type', 'value' => 'EString::substr(L::item(\'tyreConstructionType\', $data->construction_type), 0, 1)', 'filter' => L::items('tyreConstructionType')), array('name' => 'runflat_type', 'value' => 'L::ruitem(\'boolean\', $data->runflat_type)', 'filter' => L::ruitems('boolean')), array('class' => 'CButtonColumn'))));
Ejemplo n.º 6
0
?>
		<?php 
$this->widget('admin.widgets.timepicker.timepicker', array('model' => $model, 'name' => 'birthday', 'select' => 'date'));
?>
		<?php 
echo $form->error($model, 'birthday');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'gender');
?>
		<div class='input'>
			<?php 
echo $form->radioButtonList($model, 'gender', L::ruitems('gender'));
?>
		</div>
		<?php 
echo $form->error($model, 'gender');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'country');
?>
		<?php 
echo $form->textField($model, 'country', array('size' => 45, 'maxlength' => 45));
?>
		<?php 
Ejemplo n.º 7
0
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'construction_type');
?>
		<?php 
echo $form->dropDownList($model, 'construction_type', L::items('tyreConstructionType'), array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'runflat_type');
?>
		<?php 
echo $form->dropDownList($model, 'runflat_type', L::ruitems('boolean'), array('empty' => ''));
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton('Искать');
?>
	</div>

<?php 
$this->endWidget();
?>

</div><!-- search-form -->
Ejemplo n.º 8
0
echo $form->labelEx($model, 'manager');
?>
		<?php 
$this->widget('CAutoComplete', array('name' => get_class($model) . '[manager]', 'url' => array('managers/ajaxManagers'), 'max' => 10, 'minChars' => 1, 'delay' => 500, 'matchCase' => false, 'htmlOptions' => array('size' => 60, 'maxlength' => 64), 'mustMatch' => true, 'autoFill' => true, 'multiple' => false, 'value' => $model->manager ? $model->manager : Yii::app()->user->name));
?>
		<?php 
echo $form->error($model, 'manager');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'status');
?>
		<?php 
echo $form->dropDownList($model, 'status', L::ruitems('orderStatus'));
?>
		<?php 
echo $form->error($model, 'status');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'order');
?>
		<div class='input'>
			<?php 
$this->renderPartial('_order', array('model' => $model, 'order' => CJSON::decode($model->order)));
?>
		</div>
Ejemplo n.º 9
0
echo $form->labelEx($model, 'sale');
?>
		<?php 
echo $form->checkBox($model, 'sale');
?>
		<?php 
echo $form->error($model, 'sale');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'construction_type');
?>
		<?php 
echo $form->dropDownList($model, 'construction_type', L::ruitems('diskConstructionType'));
?>
		<?php 
echo $form->error($model, 'construction_type');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'color');
?>
		<?php 
echo $form->dropDownList($model, 'color', L::items('color'));
?>
		<?php 
echo $form->error($model, 'color');