Kaynağa Gözat

Page mes commandes

- amélioration format date
- affichage de tous les boutons d'action dans une colonne séparée
- localité en gris
- label livrée, en préparation, à venir
refactoring
Guillaume Bourgeois 5 yıl önce
ebeveyn
işleme
b55655105a
15 değiştirilmiş dosya ile 112 ekleme ve 57 silme
  1. +0
    -25
      backend/web/sass/screen.scss
  2. +14
    -0
      common/models/Order.php
  3. BIN
      common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/_common.scssc
  4. BIN
      common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/_fonts.scssc
  5. BIN
      common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/ie.scssc
  6. BIN
      common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/print.scssc
  7. BIN
      common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/screen.scssc
  8. +2
    -2
      common/web/css/ie.css
  9. +2
    -2
      common/web/css/print.css
  10. +30
    -4
      common/web/css/screen.css
  11. +26
    -0
      common/web/sass/_common.scss
  12. +3
    -1
      common/web/sass/screen.scss
  13. +24
    -22
      producer/views/order/history.php
  14. +4
    -0
      producer/web/css/screen.css
  15. +7
    -1
      producer/web/sass/order/_history.scss

+ 0
- 25
backend/web/sass/screen.scss Dosyayı Görüntüle

@@ -314,31 +314,6 @@ a {

.date {
text-align: center ;

.block-date {
width: 50% ;
margin: 0px auto ;
padding-top: 0px ;
}

.day {
text-transform: capitalize ;
line-height: 13px ;
font-size: 10px ;
text-transform: uppercase ;
}

.num {
font-size: 23px ;
line-height: 28px ;
font-weight: bold ;
}

.month {
text-transform: uppercase ;
line-height: 13px ;
font-size: 15px ;
}
}
}
}

+ 14
- 0
common/models/Order.php Dosyayı Görüntüle

@@ -640,4 +640,18 @@ class Order extends ActiveRecordCommon
return $count ;
}
/**
* Retourne un bloc html présentant une date.
*
* @return string
*/
public function getBlockDate()
{
return '<div class="block-date">
<div class="day">'.strftime('%A', strtotime($this->distribution->date)).'</div>
<div class="num">'.date('d', strtotime($this->distribution->date)).'</div>
<div class="month">'.strftime('%B', strtotime($this->distribution->date)).'</div>
</div>' ;
}
}

BIN
common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/_common.scssc Dosyayı Görüntüle


BIN
common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/_fonts.scssc Dosyayı Görüntüle


BIN
common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/ie.scssc Dosyayı Görüntüle


BIN
common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/print.scssc Dosyayı Görüntüle


BIN
common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/screen.scssc Dosyayı Görüntüle


+ 2
- 2
common/web/css/ie.css Dosyayı Görüntüle

@@ -1,8 +1,8 @@
@charset "UTF-8";
/**
Copyright La boîte à pain (2018)
Copyright distrib (2018)

contact@laboiteapain.net
contact@opendistrib.net

Ce logiciel est un programme informatique servant à aider les producteurs
à distribuer leur production en circuits courts.

+ 2
- 2
common/web/css/print.css Dosyayı Görüntüle

@@ -1,8 +1,8 @@
@charset "UTF-8";
/**
Copyright La boîte à pain (2018)
Copyright distrib (2018)

contact@laboiteapain.net
contact@opendistrib.net

Ce logiciel est un programme informatique servant à aider les producteurs
à distribuer leur production en circuits courts.

+ 30
- 4
common/web/css/screen.css Dosyayı Görüntüle

@@ -1,8 +1,8 @@
@charset "UTF-8";
/**
Copyright La boîte à pain (2018)
Copyright distrib (2018)

contact@laboiteapain.net
contact@opendistrib.net

Ce logiciel est un programme informatique servant à aider les producteurs
à distribuer leur production en circuits courts.
@@ -35,9 +35,9 @@ pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/
/**
Copyright La boîte à pain (2018)
Copyright distrib (2018)

contact@laboiteapain.net
contact@opendistrib.net

Ce logiciel est un programme informatique servant à aider les producteurs
à distribuer leur production en circuits courts.
@@ -83,3 +83,29 @@ termes.
font-weight: normal;
font-style: normal;
}
/* line 2, ../sass/_common.scss */
.block-date {
margin: 0px auto;
padding-top: 0px;
text-align: center;
}
/* line 7, ../sass/_common.scss */
.block-date .day {
text-transform: capitalize;
line-height: 15px;
font-size: 13px;
text-transform: uppercase;
}
/* line 14, ../sass/_common.scss */
.block-date .num {
font-size: 30px;
line-height: 35px;
font-weight: bold;
}
/* line 20, ../sass/_common.scss */
.block-date .month {
text-transform: uppercase;
line-height: 15px;
font-size: 13px;
color: #e67200;
}

+ 26
- 0
common/web/sass/_common.scss Dosyayı Görüntüle

@@ -0,0 +1,26 @@

.block-date {
margin: 0px auto ;
padding-top: 0px ;
text-align: center ;
.day {
text-transform: capitalize ;
line-height: 15px ;
font-size: 13px ;
text-transform: uppercase ;
}

.num {
font-size: 30px ;
line-height: 35px ;
font-weight: bold ;
}

.month {
text-transform: uppercase ;
line-height: 15px ;
font-size: 13px ;
color: darken($color1, 5) ;
}
}

+ 3
- 1
common/web/sass/screen.scss Dosyayı Görüntüle

@@ -34,5 +34,7 @@ pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

$color1: #FF7F00 ;
$dir-fonts: '../fonts/' ;
@import "_fonts.scss" ;
@import "_fonts.scss" ;
@import "_common.scss" ;

+ 24
- 22
producer/views/order/history.php Dosyayı Görüntüle

@@ -83,22 +83,23 @@ GridView::widget([
[
'attribute' => 'distribution.date',
'label' => 'Date de livraison',
'format' => 'raw',
'value' => function($model) {
return date('d/m/Y', strtotime($model->distribution->date)) ;
return $model->getBlockDate() ;
}
],
[
'label' => 'Résumé',
'label' => 'Point de vente',
'format' => 'raw',
'value' => function($model) {
return $model->getCartSummary();
return $model->getPointSaleSummary();
}
],
[
'label' => 'Point de vente',
'label' => 'Résumé',
'format' => 'raw',
'value' => function($model) {
return $model->getPointSaleSummary();
return $model->getCartSummary();
}
],
[
@@ -122,33 +123,34 @@ GridView::widget([
}
else {
if($c->getState() == Order::STATE_DELIVERED) {
$html .= 'Livrée' ;
$html .= '<span class="label label-success">Livrée</span>' ;
}
elseif($c->getState() == Order::STATE_PREPARATION) {
$html .= 'En préparation' ;
$html .= '<span class="label label-warning">En préparation</span>' ;
}
elseif($c->getState() == Order::STATE_OPEN) {
$link_subscription = ($c->id_subscription) ? '<li><a href="'.Yii::$app->urlManagerProducer->createUrl(['subscription/form','id'=>$c->id_subscription]).'"><span class="glyphicon glyphicon-repeat"></span> Modifier mon abonnement</a></li>' : '' ;
$html .= '<div class="btn-group">
<a href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</a>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
'.$link_subscription.'
<li><a href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$c->id]).'"><span class="glyphicon glyphicon-trash"></span> Annuler la commande</a></li>
</ul>
</div>' ;
$html .= '<span class="label label-default">À venir</span>' ;
}
}
return $html ;
}
],
[
'label' => 'Actions',
'format' => 'raw',
'value' => function($c) {
$html = '' ;
if($c->getState() == Order::STATE_OPEN) {

$html .= '<a href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span></a> '.
'<a href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-trash"></span></a> '.
(($c->id_subscription) ? '<a href="'.Yii::$app->urlManagerProducer->createUrl(['subscription/form','id'=>$c->id_subscription]).'" class="btn btn-default"><span class="glyphicon glyphicon-repeat"></span></a>' : '') ;
}
return $html ;
}
]
]
]);

+ 4
- 0
producer/web/css/screen.css Dosyayı Görüntüle

@@ -1188,6 +1188,10 @@ termes.
.order-history #tabs-orders-history li.active a {
color: #333;
}
/* line 59, ../sass/order/_history.scss */
.order-history table .locality {
color: gray;
}

/* line 3, ../sass/order/_order.scss */
.order-order #app-order-order {

+ 7
- 1
producer/web/sass/order/_history.scss Dosyayı Görüntüle

@@ -52,7 +52,13 @@ termes.
&.active a {
color: #333 ;
}
}
}
}
table {
.locality {
color: gray ;
}
}
}

Yükleniyor…
İptal
Kaydet