|
|
@@ -77,12 +77,37 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ; |
|
|
|
[ |
|
|
|
'label' => 'Jours de livraison', |
|
|
|
'format' => 'raw', |
|
|
|
'contentOptions' => ['class' => 'days'], |
|
|
|
'value' => function($model) { |
|
|
|
|
|
|
|
$producer = \Yii::$app->controller->getProducer() ; |
|
|
|
|
|
|
|
if($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK) { |
|
|
|
return $model->getStrDeliveryDays() ; |
|
|
|
$arrayDays = [ |
|
|
|
'monday' => 'Lundi', |
|
|
|
'tuesday' => 'Mardi', |
|
|
|
'wednesday' => 'Mercredi', |
|
|
|
'thursday' => 'Jeudi', |
|
|
|
'friday' => 'Vendredi', |
|
|
|
'saturday' => 'Samedi', |
|
|
|
'sunday' => 'Dimanche' |
|
|
|
] ; |
|
|
|
|
|
|
|
$html = '' ; |
|
|
|
foreach($arrayDays as $dayEn => $dayFr) { |
|
|
|
$fieldDelivery = 'delivery_'.$dayEn ; |
|
|
|
$fieldInfos = 'infos_'.$dayEn ; |
|
|
|
|
|
|
|
if ($model->$fieldDelivery) { |
|
|
|
$html .= '<strong>'.$dayFr.'</strong>'; |
|
|
|
if(strlen($model->$fieldInfos)) { |
|
|
|
$html .= ' / <small>'.nl2br(str_replace(['[select_previous_day]', '[/select_previous_day]'], '', $model->$fieldInfos)).'</small>' ; |
|
|
|
} |
|
|
|
$html .= '<br />' ; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return $html ; |
|
|
|
} |
|
|
|
elseif($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS) { |
|
|
|
$html = '' ; |