Browse Source

Merge branch 'dev'

master
Guillaume Bourgeois 5 years ago
parent
commit
d137fe1acd
4 changed files with 20 additions and 5 deletions
  1. +17
    -2
      backend/views/subscription/index.php
  2. +1
    -1
      common/models/Subscription.php
  3. +1
    -1
      producer/web/css/screen.css
  4. +1
    -1
      producer/web/sass/order/_order.scss

+ 17
- 2
backend/views/subscription/index.php View File

], ],
[ [
'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&nbsp;' ;
}
else {
$html .= 'À partir du ' ;
}
$html .= '</small>' ;
$html .= date('d/m/Y',strtotime($model->date_begin)) ;
if($model->date_end) {
$html .= '<br />au&nbsp;'.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 ;
} }
], ],

+ 1
- 1
common/models/Subscription.php View File

] ; ] ;
$nbDays = (strtotime($date) - strtotime($this->date_begin)) / (24 * 60 * 60); $nbDays = (strtotime($date) - strtotime($this->date_begin)) / (24 * 60 * 60);
if ($nbDays % ($this->week_frequency * 7) < 7) {
if (round($nbDays) % ($this->week_frequency * 7) < 7) {
$numDay = date('N', strtotime($date)); $numDay = date('N', strtotime($date));
$day = $arrayDays[$numDay] ; $day = $arrayDays[$numDay] ;
if ($this->$day) { if ($this->$day) {

+ 1
- 1
producer/web/css/screen.css View File

display: block; display: block;
} }
/* line 11, ../sass/order/_order.scss */ /* line 11, ../sass/order/_order.scss */
.order-order #app-order-order #order-distribution-date {
.order-order #app-order-order #distribution-date {
display: none; display: none;
} }
/* line 15, ../sass/order/_order.scss */ /* line 15, ../sass/order/_order.scss */

+ 1
- 1
producer/web/sass/order/_order.scss View File

display: block ; display: block ;
} }
#order-distribution-date {
#distribution-date {
display: none ; display: none ;
} }

Loading…
Cancel
Save