= yii::t('backend','Activity Log') ?>
$dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => \yii\grid\SerialColumn::className()],
[
'attribute' => 'username',
'filterInputOptions' => ['class' => 'form-control'],
'value' => function (ActivityLog $model) {
return $model->username;
}
],
'log',
'client_ip',
'client_agent',
'client_platform',
'created_at',
[
'class' => \yii\grid\ActionColumn::className(),
'header' => Yii::t('backend', 'Actions'),
'template' => '{delete}',
'buttons' => [
'delete' => function ($url, $model, $key) {
$html = Html::tag('span', '', ['class' => 'fa fa-trash-o']);
return Html::a($html, $url, [
'data-pjax' => '0',
'data-confirm' => yii::t('backend', 'Are you sure you want to delete this record?'),
'data-method' => 'post'
]);
},
],
],
],
]); ?>