|
|
@@ -69,8 +69,18 @@ else |
|
|
|
'dataProvider' => $dataProviderPointsSale, |
|
|
|
'summary' => '', |
|
|
|
'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', |
|
|
|
'value' => function($model) { |
|
|
@@ -91,7 +101,7 @@ else |
|
|
|
[ |
|
|
|
'attribute' => 'photo', |
|
|
|
'format' => 'raw', |
|
|
|
'headerOptions' => ['class' => 'td-photo'], |
|
|
|
'contentOptions' => ['class' => 'photo'], |
|
|
|
'value' => function($model) { |
|
|
|
if(strlen($model->photo)) { |
|
|
|
return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ; |
|
|
@@ -99,13 +109,35 @@ else |
|
|
|
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', |
|
|
|
'value' => function($model) { |
|
|
|
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 '' ; |
|
|
|
} |