Selaa lähdekoodia

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

dev
Guillaume 4 vuotta sitten
vanhempi
commit
654bb3adf9
3 muutettua tiedostoa jossa 42 lisäystä ja 5 poistoa
  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 Näytä tiedosto

@@ -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 = '' ;

+ 7
- 3
producer/web/css/screen.css Näytä tiedosto

@@ -634,19 +634,23 @@ termes.
color: black;
}
/* 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 {
width: 100px;
}
/* line 69, ../sass/site/_index.scss */
/* line 77, ../sass/site/_index.scss */
.site-index #products td.photo img.photo-product {
width: 120px;
height: auto;
}
/* line 75, ../sass/site/_index.scss */
/* line 83, ../sass/site/_index.scss */
.site-index #products .name {
color: #333;
}
/* line 77, ../sass/site/_index.scss */
/* line 85, ../sass/site/_index.scss */
.site-index #products .name .the-name {
font-family: "capsuularegular";
font-size: 20px;

+ 9
- 1
producer/web/sass/site/_index.scss Näytä tiedosto

@@ -60,7 +60,15 @@ termes.
color: black ;
}
}
.days {
strong {

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

Loading…
Peruuta
Tallenna