= $this->title ?>
= Html::a(''.' '. Yii::t('backend', 'Send Notification'), ['/push-notification/create'],
['class' => 'btn btn-info d-none d-lg-block m-l-15 pull-right']) ?>
$dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => \yii\grid\SerialColumn::className()],
[
'attribute' => 'notification_title',
'filterInputOptions' => ['class' => 'form-control col-md-6'],
'value' => function (Notification $model) {
return $model->notification_title;
}
],
[
'attribute' => 'notification_description',
'filterInputOptions' => ['class' => 'form-control col-md-8'],
'value' => function (Notification $model) {
return utf8_decode($model->notification_description);
}
],
[
'attribute' => 'app_type',
'filter' => [
1 => yii::t('backend','Android'),
2 => yii::t('backend','Ios'),
3 => yii::t('backend','Both'),
],
'filterInputOptions' => ['class' => 'form-control col-md-8 select2', 'prompt' => yii::t('backend','All')],
'value' => function (Notification $model) {
if($model->app_type == 1) {
return 'Android';
}
if($model->app_type == 2) {
return 'Ios';
}
return 'Both';
}
],
[
'attribute' => 'created_at',
'filterInputOptions' => ['class' => 'form-control col-md-8'],
'value' => function (Notification $model) {
return $model->created_at;
}
],
],
]); ?>