Browse Source

feat:隐藏批量操作和添加按钮,修改评论列表字段显示

antshop
linyaostalker 5 years ago
parent
commit
0bd18c2ffa
  1. 19
      backend/modules/shop/models/searchs/CommentSearch.php
  2. 7
      backend/modules/shop/views/comment/index.php

19
backend/modules/shop/models/searchs/CommentSearch.php

@ -54,12 +54,23 @@ class CommentSearch extends Comment
], ],
'id', 'id',
'user_id', 'user_id',
'order_goods_id',
[
'attribute' => 'order_goods_id',
'value' => function ($model) {
return $model->orderGoods->goods_name;
},
'label' => '商品名称'
],
'star', 'star',
'content', 'content',
//'status',
//'updated_at',
//'created_at',
[
'attribute' => 'status',
'value' => function ($model) {
return Comment::$commentStatus[$model->status];
},
'label' => '状态'
],
'created_at',
[ [
'class' => 'iron\grid\ActionColumn', 'class' => 'iron\grid\ActionColumn',
'align' => 'center', 'align' => 'center',

7
backend/modules/shop/views/comment/index.php

@ -7,7 +7,7 @@ use iron\grid\GridView;
/* @var $searchModel backend\modules\shop\models\searchs\CommentSearch */ /* @var $searchModel backend\modules\shop\models\searchs\CommentSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Comments';
$this->title = '评论';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="row"> <div class="row">
@ -21,7 +21,10 @@ $this->params['breadcrumbs'][] = $this->title;
"url" => "comment/deletes" "url" => "comment/deletes"
], ],
], ],
'columns' => $columns
'columns' => $columns,
'batchTemplate' => '',
'create' => '',
'export' => '',
]); ]);
?> ?>
</div> </div>
Loading…
Cancel
Save