瀏覽代碼

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

dev
Guillaume 4 年之前
父節點
當前提交
654bb3adf9
共有 3 個文件被更改,包括 42 次插入5 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

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

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

Loading…
取消
儲存