title = 'Заявки'; $this->params[ 'breadcrumbs' ][] = $this->title; ?>
title ?>
[ 'class' => 'style admin-all-pages-wr fix_last_td_' ], 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ [ 'class' => SerialColumn::className() ], [ 'attribute' => 'date_add', 'filter' => "
" . DatePicker::widget([ 'model' => $searchModel, 'attribute' => 'date_add_from', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => [ 'changeYear' => true, 'changeMonth' => true, 'maxDate' => ($searchModel->date_add_to?:date('Y-m-d')), ], ]) . " " . DatePicker::widget([ 'model' => $searchModel, 'attribute' => 'date_add_to', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => [ 'changeYear' => true, 'changeMonth' => true, 'minDate' => $searchModel->date_add_from, 'maxDate' => date('Y-m-d'), ], ]) . "
", 'value' => function($model, $key) { return date('Y-m-d H:i:s', $model->date_add); }, ], [ 'attribute' => 'name', 'label' => 'Имя и фамилия', ], 'phone', [ 'attribute' => 'status', 'filter' => [ 1 => 'Только непрочитанные', ], 'filterInputOptions' => [ 'prompt' => 'Все записи', 'class' => 'form-control', ], ], [ '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, ]); }, 'read' => function($url, $model, $key) { if($model->status == $model::STATUS_NEW) { return Html::a(Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-ok', ]), [ 'accounts/feedback-read', 'id' => $model->feedback_company_id, ], [ 'title' => 'Прочесть', 'aria-label' => 'Прочесть', 'data-confirm' => 'Вы уверены, что хотите отметить заявку прочтенной?', 'data-method' => 'post', 'data-pjax' => 0, ]); } else { return false; } }, ], 'template' => '{read}{delete}', ], ], ]); ?>