Commit 81fa78ab authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлена функция удаления записи из таблицы bids

parent 25b9279e
...@@ -20,6 +20,7 @@ class BidAdminController extends AdminController ...@@ -20,6 +20,7 @@ class BidAdminController extends AdminController
'Create' => 'Добавление заявки', 'Create' => 'Добавление заявки',
'Update' => 'Редактирование заявки', 'Update' => 'Редактирование заявки',
'View' => 'Просмотр заявки', 'View' => 'Просмотр заявки',
'Delete' => 'Удаление заявки',
]; ];
} }
...@@ -102,6 +103,11 @@ class BidAdminController extends AdminController ...@@ -102,6 +103,11 @@ class BidAdminController extends AdminController
} }
} }
public function actionDelete($id){
$this->findModel($id)->delete();
return $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : ['/bids/bid-admin/manage']);
}
/** /**
* Finds the Bid model based on its primary key value. * Finds the Bid model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown. * If the model is not found, a 404 HTTP exception will be thrown.
......
...@@ -57,7 +57,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -57,7 +57,7 @@ $this->params['breadcrumbs'][] = $this->title;
[ [
'class' => 'common\components\ColorActionColumn', 'class' => 'common\components\ColorActionColumn',
'template' => '{view} {update}', 'template' => '{view} {update}{delete}',
] ]
], ],
]); ?> ]); ?>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment