title = '评论'; $this->params['breadcrumbs'][] = $this->title; ?>
render('_search', ['model' => $searchModel]) ?>
$dataProvider, 'columns' => [ 'id', [ 'attribute' => 'user_id', 'value' => function($model) { return $model->user->username; } ], 'user_ip', [ 'label' => '源', 'value' => function ($model) { return \common\helpers\Util::getEntityName($model->entity) . ':' . $model->entity_id; } ], [ 'attribute' => 'content', 'options' => ['width' => '40%'], 'value' => function($model) { return \yii\helpers\Markdown::process($model->content); }, 'format' => 'html' ], 'created_at:datetime', [ 'class' => 'common\helpers\DiyActionColumn', 'template' => '{update} {delete} {ban}', 'buttons' => [ 'ban' => function($url, $model, $key) { return Html::a(Html::icon('ban'), ['/user/admin/block', 'id' => $model->user_id], [ 'class' => 'btn btn-default btn-xs', 'title' => '封禁用户', 'data-confirm' => '确定要封禁用户吗?', 'data-ajax' => '1', 'data-method' => 'post' ] ); } ] ], ], ]); ?>
beginBlock('js') ?> endBlock() ?>