Browse Source

调整评论首页列表显示字段,隐藏修改和删除按钮,开发显示和隐藏按钮

antshop
linyaostalker 5 years ago
parent
commit
c9e2c8ebda
  1. 40
      backend/modules/shop/models/searchs/CommentSearch.php

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

@ -47,11 +47,6 @@ class CommentSearch extends Comment
public function columns()
{
return [
[
'class' => 'blobt\grid\CheckboxColumn',
'width' => '2%',
'align' => 'center'
],
'id',
'user_id',
[
@ -70,10 +65,43 @@ class CommentSearch extends Comment
},
'label' => '状态'
],
'created_at',
'created_at:datetime',
[
'class' => 'iron\grid\ActionColumn',
'align' => 'center',
'config' => [
[
'name' => 'view',
'icon' => 'list',
'title' => '详情',
],
[
'name' => 'display',
'icon' => 'eye',
'title' => '显示',
'hide' => [
'attributes' => [
'status'
],
'values' => [
Comment::STATUS_DISPLAY
]
]
],
[
'name' => 'hide',
'icon' => 'eye',
'title' => '隐藏',
'hide' => [
'attributes' => [
'status'
],
'values' => [
Comment::STATUS_HIDE
]
]
],
]
],
];
}

Loading…
Cancel
Save