|
- <?php
-
-
-
- $this->setTitle('Producteurs') ;
- $this->setMeta('description', 'Retrouvez les producteurs présents sur Opendistrib.') ;
-
- ?>
-
- <h1 class="title-system-order"><span class="glyphicon glyphicon-search"></span> <?= Html::encode($this->title) ?></h1>
-
- <?=
-
- GridView::widget([
- 'dataProvider' => $dataProviderProducers,
- 'summary' => '',
- 'columns' => [
- [
- 'attribute' => 'name',
- ],
- [
- 'attribute' => 'type',
- ],
- [
- 'label' => 'Localisation',
- 'value' => function($model) {
- return $model->city. ' ('.$model->postcode.')' ;
- }
- ],
- [
- 'label' => 'Lien',
- 'format' => 'raw',
- 'value' => function($model) {
- $iconLock = (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 .= $iconLock ;
- return $html ;
- }
- ],
- ]
- ]);
-
- ?>
|