|
|
|
|
|
|
|
|
], |
|
|
], |
|
|
[ |
|
|
[ |
|
|
'attribute' => 'date_begin', |
|
|
'attribute' => 'date_begin', |
|
|
'label' => 'Date de début', |
|
|
|
|
|
|
|
|
'label' => 'Période', |
|
|
'format' => 'raw', |
|
|
'format' => 'raw', |
|
|
'value' => function($model) { |
|
|
'value' => function($model) { |
|
|
$html = date('d/m/Y',strtotime($model->date_begin)) ; |
|
|
|
|
|
|
|
|
$html = '<small>' ; |
|
|
|
|
|
if($model->date_end) { |
|
|
|
|
|
$html .= 'Du ' ; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
$html .= 'À partir du ' ; |
|
|
|
|
|
} |
|
|
|
|
|
$html .= '</small>' ; |
|
|
|
|
|
$html .= date('d/m/Y',strtotime($model->date_begin)) ; |
|
|
|
|
|
if($model->date_end) { |
|
|
|
|
|
$html .= '<br />au '.date('d/m/Y',strtotime($model->date_end)) ; |
|
|
|
|
|
if(date('Y-m-d') > $model->date_end) { |
|
|
|
|
|
$html .= ' <span class="label label-danger">Terminé</span>' ; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return $html ; |
|
|
return $html ; |
|
|
} |
|
|
} |
|
|
], |
|
|
], |