Exemple #1
0
<?php

$this->breadcrumbs = array(Yii::t('main', 'List Item') => array('admin'), Yii::t('main', 'Manage'));
$this->menu = array(array('label' => Yii::t('frontend', 'Create Item'), 'icon' => 'plus', 'url' => array('create')));
?>

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'item-form', 'action' => 'bulk', 'htmlOptions' => array('enctype' => 'multipart/form-data'), 'enableAjaxValidation' => false));
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'item-grid', 'type' => 'striped bordered condensed', 'dataProvider' => $model->search(), 'selectableRows' => 2, 'enableHistory' => 'true', 'columns' => array(array('class' => 'CCheckBoxColumn', 'name' => 'item_id', 'value' => '$data->item_id'), array('name' => 'category.name', 'header' => Yii::t('backend', 'Item Categories')), array('name' => 'title', 'header' => '商品名字'), array('name' => 'stock', 'header' => '库存'), array('name' => 'min_number', 'header' => '最小数量'), array('name' => 'price', 'header' => '价格'), array('name' => 'is_show', 'header' => '上架', 'value' => 'Tbfunction::showYesOrNo($data->is_show)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_promote', 'header' => '热销', 'value' => 'Tbfunction::showYesOrNo($data->is_promote)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_new', 'header' => '新品', 'value' => 'Tbfunction::showYesOrNo($data->is_new)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_hot', 'header' => '热卖', 'value' => 'Tbfunction::showYesOrNo($data->is_hot)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_best', 'header' => '精品', 'value' => 'Tbfunction::showYesOrNo($data->is_best)', 'filter' => Tbfunction::ReturnYesOrNo()), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
<div class="span12">
<div class="bulk-action span10">
    <?php 
echo CHtml::radioButtonList('act', '', array('delete' => '删除产品', 'is_show' => '上架', 'un_show' => '下架', 'is_promote' => '促销', 'un_promote' => '取消促销', 'is_new' => '新品', 'un_new' => '取消新品', 'hot' => '热卖', 'un_hot' => '取消热卖', 'best' => '精品', 'un_best' => '取消精品'), array('separator' => '&nbsp;'));
?>
</div>
<div class="bulk-action span2">
<?php 
echo CHtml::submitButton('提交', array('class' => 'btn btn-primary'));
?>
</div>
    </div>
<?php 
$this->endWidget();
Exemple #2
0
<?php

$this->breadcrumbs = array(Yii::t('main', 'Shipping Methods') => array('index'), Yii::t('main', 'Manage'));
$this->menu = array(array('label' => Yii::t('main', 'List ShippingMethod'), 'icon' => 'list', 'url' => array('index')), array('label' => Yii::t('main', 'Create ShippingMethod'), 'icon' => 'plus', 'url' => array('create')));
?>



<h1><?php 
echo Yii::t('main', 'Manage ShippingMethod');
?>
</h1>

<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>


<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'shipping-method-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('shipping_method_id', 'code', 'name', 'desc', array('name' => 'enabled', 'value' => 'Tbfunction::showYesOrNo($data->enabled)', 'filter' => Tbfunction::ReturnYesOrNo()), array('name' => 'is_cod', 'value' => 'Tbfunction::showYesOrNo($data->is_cod)', 'filter' => Tbfunction::ReturnYesOrNo()), array('class' => 'bootstrap.widgets.TbButtonColumn'))));