Commit cec36e4f authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлено отображение для таблицы с расписанием рассылок по кейсам

parent 320a9a1d
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
/** @var $model common\modules\triggers\models\CasesSchedule */
?>
<div class="trigger-trigger-index">
<h1><?= Html::encode($this->title) ?></h1>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
[
'attribute' => 'actual',
'value' => function($model) {
return ($model->actual==1) ? 'Активен' : 'Не активен';
}
],
[
'attribute' => 'sended',
'value' => function($model) {
return ($model->sended==1) ? 'Отправлено' : 'Не отправлено';
}
],
[
'attribute' => 'user_id',
'value' => function($model) {
return $model->user->fio;
}
],
[
'attribute' => 'case_id',
'value' => function($model) {
/** @var $model common\modules\triggers\models\CasesSchedule */
return $model->case->name;
}
],
[
'attribute' => 'template_id',
'value' => function($model) {
/** @var $model common\modules\triggers\models\CasesSchedule */
return $model->template->name;
}
],
[
'attribute' => 'sended_date',
'value' => function($model) {
/** @var $model common\modules\triggers\models\CasesSchedule */
return (!is_null($model->sended_date)) ? date('Y.m.d H:i:s', strtotime($model->sended_date)) : 'Не отправлено';
}
],
// [
// 'class' => 'yii\grid\ActionColumn',
// 'template' => '{update}{delete}',
// ],
],
]); ?>
</div>
\ No newline at end of file
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