diff --git a/backend/modules/accesses/controllers/AccessesController.php b/backend/modules/accesses/controllers/AccessesController.php index 63769f8..9f8b4a9 100755 --- a/backend/modules/accesses/controllers/AccessesController.php +++ b/backend/modules/accesses/controllers/AccessesController.php @@ -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']); } diff --git a/backend/modules/accesses/views/accesses/all.php b/backend/modules/accesses/views/accesses/all.php index 6d063d8..16d1948 100644 --- a/backend/modules/accesses/views/accesses/all.php +++ b/backend/modules/accesses/views/accesses/all.php @@ -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("", + ['/accesses/accesses/custom-delete', 'id' => $data]); + }, + ], + ], ], ]); ?>