Exemple #1
0
								<div class="col-md-9">
									<?php 
echo CHtml::textField('price_to', array_key_exists('price_to', $filter) ? $filter['price_to'] : (string) FALSE, ['id' => 'amount_to', 'class' => 'form-control input-inline input-small']);
?>
								</div>
							</div>
						</div>
					</div>
					<div class="col-md-6">
						<h4 class="form-section"><?php 
echo Yii::t('app', 'Валюта');
?>
</h4>
						<div class="form-group" style="margin-left: 0; margin-right: 0;">
							<?php 
echo CHtml::dropDownList('currency__id', array_key_exists('currency__id', $filter) ? $filter['currency__id'] : (string) FALSE, Products::gridCurrencyItems(TRUE), ['class' => 'input-inline input-large form-control']);
?>
						</div>					
					</div>
				</div>

				<div class="row">
					<div class="col-md-6">
						<h4 class="form-section"> <?php 
echo Yii::t('app', 'Статус');
?>
</h4>
						<div class="form-group" style="margin-left: 0; margin-right: 0;">
							<?php 
echo CHtml::dropDownList('status', array_key_exists('status', $filter) ? $filter['status'] : (string) FALSE, Products::gridStatusItems(TRUE), ['class' => 'input-inline input-large form-control']);
?>
Exemple #2
0
<?php

$this->widget('zii.widgets.grid.CGridView', array('id' => 'products-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'ajaxUpdate' => true, 'ajaxUrl' => Yii::app()->createUrl('/admin/catalog/products/index'), 'pager' => array('class' => 'CLinkPager', 'header' => '', 'maxButtonCount' => 10, 'htmlOptions' => array('class' => 'pagination')), 'htmlOptions' => array('class' => 'table table-hover'), 'columns' => array(array('name' => 'id', 'value' => '$data->id'), 'article', array('name' => 'productName', 'value' => '$data->lang->name'), array('name' => 'currency__id', 'value' => 'Products::gridCurrencyItem($data->currency__id)', 'filter' => Products::gridCurrencyItems()), 'price', 'points', array('name' => 'status', 'value' => 'Products::gridStatusItem($data->status)', 'filter' => Products::gridStatusItems()), array('name' => 'available', 'value' => 'Products::gridAvailableItem($data->available)', 'filter' => Products::gridAvailableItems()), array('header' => 'Операции', 'class' => 'CButtonColumn', 'template' => '{view} {update} {delete}', 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("ajaxproducts/delete", array("id" => $data->primaryKey))'))));