Browse Source

[producer] Affichage des horaires des points de vente sur la page d'accueil

dev
Guillaume 4 years ago
parent
commit
654bb3adf9
3 changed files with 42 additions and 5 deletions
  1. +26
    -1
      producer/views/site/index.php
  2. +7
    -3
      producer/web/css/screen.css
  3. +9
    -1
      producer/web/sass/site/_index.scss

+ 26
- 1
producer/views/site/index.php View File

[ [
'label' => 'Jours de livraison', 'label' => 'Jours de livraison',
'format' => 'raw', 'format' => 'raw',
'contentOptions' => ['class' => 'days'],
'value' => function($model) { 'value' => function($model) {


$producer = \Yii::$app->controller->getProducer() ; $producer = \Yii::$app->controller->getProducer() ;


if($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK) { 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) { elseif($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS) {
$html = '' ; $html = '' ;

+ 7
- 3
producer/web/css/screen.css View File

color: black; color: black;
} }
/* line 67, ../sass/site/_index.scss */ /* line 67, ../sass/site/_index.scss */
.site-index #points-sale .days small {
color: gray;
}
/* line 75, ../sass/site/_index.scss */
.site-index #products td.photo { .site-index #products td.photo {
width: 100px; width: 100px;
} }
/* line 69, ../sass/site/_index.scss */
/* line 77, ../sass/site/_index.scss */
.site-index #products td.photo img.photo-product { .site-index #products td.photo img.photo-product {
width: 120px; width: 120px;
height: auto; height: auto;
} }
/* line 75, ../sass/site/_index.scss */
/* line 83, ../sass/site/_index.scss */
.site-index #products .name { .site-index #products .name {
color: #333; color: #333;
} }
/* line 77, ../sass/site/_index.scss */
/* line 85, ../sass/site/_index.scss */
.site-index #products .name .the-name { .site-index #products .name .the-name {
font-family: "capsuularegular"; font-family: "capsuularegular";
font-size: 20px; font-size: 20px;

+ 9
- 1
producer/web/sass/site/_index.scss View File

color: black ; color: black ;
} }
} }
.days {
strong {

}
small {
color: gray ;
//font-size: 14px ;
}
}
} }
#products { #products {

Loading…
Cancel
Save