|
12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
-
- $this->setTitle('Producteurs') ;
-
- ?>
-
- <h1 class="title-systeme-commande"><span class="glyphicon glyphicon-grain"></span> <?= Html::encode($this->title) ?></h1>
-
- <?=
-
- GridView::widget([
- 'dataProvider' => $data_provider_producers,
- 'summary' => '',
- 'columns' => [
- [
- 'attribute' => 'nom',
- ],
- [
- 'attribute' => 'type',
- ],
- [
- 'label' => 'Localisation',
- 'value' => function($model) {
- return $model->ville. ' ('.$model->code_postal.')' ;
- }
- ],
- [
- 'label' => 'Lien',
- 'format' => 'raw',
- 'value' => function($model) {
- $icon_lock = (strlen($model->code)) ? ' <span class="glyphicon glyphicon-lock"></span>' : '' ;
- $html = Html::a('Visiter',Yii::$app->urlManagerProducer->createAbsoluteUrl(['site/index', 'slug_producer' => $model->slug]), ['class'=>'btn btn-primary']) ;
- $html .= $icon_lock ;
- return $html ;
- }
- ],
- ]
- ]);
-
- ?>
|