setTitle('Emails automatiques');
$this->addBreadcrumb($this->getTitle());
$this->addButton(['label' => 'Nouvel email automatique ', 'url' => 'automatic-email/create', 'class' => 'btn btn-primary']);
?>
L'heure d'envoi des emails automatiques est programmée à 7h
= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'day',
'value' => function(AutomaticEmail $automaticEmail) {
return $automaticEmail->getDayAsString();
}
],
[
'attribute' => 'delay_before_distribution',
'value' => function(AutomaticEmail $automaticEmail) {
return $automaticEmail->getDelayBeforeDistributionAsString();
}
],
'subject',
[
'attribute' => 'message',
'format' => 'raw',
],
[
'attribute' => 'status',
'format' => 'raw',
'value' => function(AutomaticEmail $automaticEmail) {
return $automaticEmail->getStatusAsHtml();
}
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{update} {delete}',
'headerOptions' => ['class' => 'column-actions'],
'contentOptions' => ['class' => 'column-actions'],
'buttons' => [
'update' => function ($url, $model) {
return Html::a('', $url, [
'title' => 'Modifier', 'class' => 'btn btn-default'
]);
},
'delete' => function ($url, $model) {
return Html::a('', $url, [
'title' => 'Supprimer', 'class' => 'btn btn-default'
]);
}
],
],
],
]); ?>