You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

74 lines
2.1 KiB

<?php
use yii\helpers\Html;
use blobt\grid\GridView;
//use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel common\models\CategorySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Categories';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="row">
<div class="col-xs-12">
<?php
echo GridView::widget([
'dataProvider' => $dataProvider,
'filter' => $this->render("_search", ['model' => $searchModel]),
'batch' => [
[
"label" => "删除",
"url" => "/category/deletes"
],
[
"label" => "其它操作",
"url" => "/category/others"
],
],
'columns' => [
[
'class' => 'blobt\grid\CheckboxColumn',
'width' => '2%',
'align' => 'center'
],
[
'attribute' => 'id',
'width' => '5%',
'align' => 'center'
],
[
'attribute' => 'created_at',
'width' => '7%',
'format' => 'date'
],
[
'attribute' => 'cat_name',
'width' => '13%',
],
[
'attribute' => 'icon',
'width' => '5%',
],
[
'attribute' => 'icon_type',
'width' => '7%',
'showConstText' => true
],
[
'attribute' => 'description',
'enableSorting' => false,
'format' => 'ntext',
'width' => '55%',
],
[
'class' => 'blobt\grid\ActionColumn',
'align' => 'center'
],
],
]);
?>
</div>
</div>