feedback-company.php
2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
use common\models\FeedbackCompanySearch;
use yii\data\ActiveDataProvider;
use yii\grid\ActionColumn;
use yii\grid\GridView;
use yii\grid\SerialColumn;
use yii\helpers\Html;
use yii\web\View;
/**
* @var View $this
* @var FeedbackCompanySearch $searchModel
* @var ActiveDataProvider $dataProvider
*/
$this->title = 'Заявки';
$this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div class="login-left-column-title fix"><?= $this->title ?></div>
<div class="admin-table-portfolio">
<?= GridView::widget([
'options' => [ 'class' => 'style admin-all-pages-wr fix_last_td_' ],
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[ 'class' => SerialColumn::className() ],
[
'attribute' => 'date_add',
'value' => function($model, $key) {
return date('Y-m-d H:i:s', $model->date_add);
}
],
[
'attribute' => 'name',
'label' => 'Имя и фамилия',
],
'phone',
[
'attribute' => 'status',
],
[
'class' => ActionColumn::className(),
'buttons' => [
'delete' => function($url, $model, $key) {
return Html::a(Html::tag('span', '', [
'class' => 'glyphicon glyphicon-trash',
]), [
'accounts/feedback-delete',
'id' => $model->feedback_company_id,
], [
'title' => 'Удалить',
'aria-label' => 'Удалить',
'data-confirm' => 'Вы уверены, что хотите удалить данную заявку?',
'data-method' => 'post',
'data-pjax' => 0,
]);
},
],
'template' => '{delete}',
],
],
]); ?>
</div>