'buttons' => [ | 'buttons' => [ | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Envoyer'), 'class' => 'btn btn-default' | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'download' => function($url, $model) { | 'download' => function($url, $model) { | ||||
return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ | return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Télécharger'), 'class' => 'btn btn-default' | |||||
'title' => 'Télécharger', 'class' => 'btn btn-default' | |||||
]); | ]); | ||||
}, | }, | ||||
'validate' => function ($url, $model) { | 'validate' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Valider'), 'class' => 'btn btn-default' | |||||
'title' => 'Valider', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'update' => function ($url, $model) { | 'update' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default' | |||||
'title' => 'Modifier', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'delete' => function ($url, $model) { | 'delete' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default' | |||||
'title' => 'Supprimer', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
} | } | ||||
], | ], |
'buttons' => [ | 'buttons' => [ | ||||
'validate' => function ($url, $model) { | 'validate' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Valider'), 'class' => 'btn btn-default' | |||||
'title' => 'Valider', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Envoyer'), 'class' => 'btn btn-default' | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'download' => function($url, $model) { | 'download' => function($url, $model) { | ||||
return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ | return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Télécharger'), 'class' => 'btn btn-default' | |||||
'title' => 'Télécharger', 'class' => 'btn btn-default' | |||||
]); | ]); | ||||
}, | }, | ||||
'update' => function ($url, $model) { | 'update' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default' | |||||
'title' => 'Modifier', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'delete' => function ($url, $model) { | 'delete' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default' | |||||
'title' => 'Supprimer', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
} | } | ||||
], | ], |
'buttons' => [ | 'buttons' => [ | ||||
'validate' => function ($url, $model) { | 'validate' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Valider'), 'class' => 'btn btn-default' | |||||
'title' => 'Valider', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Envoyer'), 'class' => 'btn btn-default' | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'download' => function($url, $model) { | 'download' => function($url, $model) { | ||||
return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ | return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Télécharger'), 'class' => 'btn btn-default' | |||||
'title' => 'Télécharger', 'class' => 'btn btn-default' | |||||
]); | ]); | ||||
}, | }, | ||||
'update' => function ($url, $model) { | 'update' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default' | |||||
'title' => 'Modifier', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'delete' => function ($url, $model) { | 'delete' => function ($url, $model) { | ||||
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ | return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ | ||||
'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default' | |||||
'title' => 'Supprimer', 'class' => 'btn btn-default' | |||||
]) : ''); | ]) : ''); | ||||
} | } | ||||
], | ], |