Browse Source

Page index

- style points de vente / produits
- prix produits
dev
Guillaume Bourgeois 5 years ago
parent
commit
6e89086e7b
3 changed files with 96 additions and 10 deletions
  1. +38
    -6
      producer/views/site/index.php
  2. +26
    -2
      producer/web/css/screen.css
  3. +32
    -2
      producer/web/sass/site/_index.scss

+ 38
- 6
producer/views/site/index.php View File

'dataProvider' => $dataProviderPointsSale, 'dataProvider' => $dataProviderPointsSale,
'summary' => '', 'summary' => '',
'columns' => [ 'columns' => [
'name',
'locality',
[
'attribute' => 'name',
'format' => 'raw',
'contentOptions' => ['class' => 'name'],
'value' => function($model) {
$html = '<span class="the-name">'.Html::encode($model->name).'</span>' ;
if(strlen($model->locality)) {
$html .= '<br />à '.Html::encode($model->locality) ;
}
return $html ;
}
],
[ [
'label' => 'Jours de livraison', 'label' => 'Jours de livraison',
'value' => function($model) { 'value' => function($model) {
[ [
'attribute' => 'photo', 'attribute' => 'photo',
'format' => 'raw', 'format' => 'raw',
'headerOptions' => ['class' => 'td-photo'],
'contentOptions' => ['class' => 'photo'],
'value' => function($model) { 'value' => function($model) {
if(strlen($model->photo)) { if(strlen($model->photo)) {
return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ; return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ;
return '' ; return '' ;
} }
], ],
'name',
'description',
[
'attribute' => 'name',
'format' => 'raw',
'contentOptions' => ['class' => 'name'],
'value' => function($model) {
$html = '<span class="the-name">'.Html::encode($model->name).'</span>' ;
if(strlen($model->description)) {
$html .= ' / '.Html::encode($model->description) ;
}
if(strlen($model->recipe)) {
$html .= '<br />'.Html::encode($model->recipe) ;
}
return $html ;
}
],
[ [
'attribute' => 'weight', 'attribute' => 'weight',
'value' => function($model) { 'value' => function($model) {
if(strlen($model->weight)) { if(strlen($model->weight)) {
return $model->weight.'g' ;
return $model->weight.' g' ;
}
return '' ;
}
],
[
'attribute' => 'price',
'value' => function($model) {
if($model->price) {
return Price::format($model->price) ;
} }
return '' ; return '' ;
} }

+ 26
- 2
producer/web/css/screen.css View File

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


/* line 4, ../sass/site/_credit_history.scss */ /* line 4, ../sass/site/_credit_history.scss */
.site-credit-history #credit-user { .site-credit-history #credit-user {

+ 32
- 2
producer/web/sass/site/_index.scss View File

} }
} }
} }
#points-sale {
.name {
color: #333 ;
.the-name {
font-family: 'capsuularegular' ;
font-size: 20px ;
color: black ;
}
}
}
#products { #products {
img.photo-product {
td.photo {
width: 100px ; width: 100px ;
height: auto ;
img.photo-product {
width: 120px ;
height: auto ;
}
}
.name {
color: #333 ;
.the-name {
font-family: 'capsuularegular' ;
font-size: 20px ;
color: black ;
}
.recipe {
}
} }
} }
} }

Loading…
Cancel
Save