'contentOptions' => ['class' => 'column-actions'], | 'contentOptions' => ['class' => 'column-actions'], | ||||
'buttons' => [ | 'buttons' => [ | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | 'title' => 'Envoyer', 'class' => 'btn btn-default' | ||||
]) : ''); | ]) : ''); | ||||
}, | }, |
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | 'title' => 'Envoyer', 'class' => 'btn btn-default' | ||||
]) : ''); | ]) : ''); | ||||
}, | }, |
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | 'title' => 'Envoyer', 'class' => 'btn btn-default' | ||||
]) : ''); | ]) : ''); | ||||
}, | }, |