custom delete accesses
This commit is contained in:
parent
e4febd6cb3
commit
966003adb0
@ -147,6 +147,8 @@ class AccessesController extends Controller
|
||||
UserCardAccesses::deleteAll(['accesses_id' => $clean_id]);
|
||||
Accesses::deleteAll(['id' => $clean_id]);
|
||||
|
||||
Yii::$app->session->setFlash('success', "Доступ удален");
|
||||
|
||||
return $this->redirect(['index']);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,16 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'link',
|
||||
'project',
|
||||
'info',
|
||||
['class' => 'yii\grid\ActionColumn']
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {update} {delete}',
|
||||
'buttons' => [
|
||||
'delete' => function ($data) {
|
||||
return Html::a("<span class='glyphicon glyphicon-trash' aria-hidden='true'></span>",
|
||||
['/accesses/accesses/custom-delete', 'id' => $data]);
|
||||
},
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user