You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

producers.php 1.1KB

6 vuotta sitten
6 vuotta sitten
12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. $this->setTitle('Producteurs') ;
  3. ?>
  4. <h1 class="title-systeme-commande"><span class="glyphicon glyphicon-grain"></span>&nbsp;&nbsp;<?= Html::encode($this->title) ?></h1>
  5. <?=
  6. GridView::widget([
  7. 'dataProvider' => $data_provider_producers,
  8. 'summary' => '',
  9. 'columns' => [
  10. [
  11. 'attribute' => 'nom',
  12. ],
  13. [
  14. 'attribute' => 'type',
  15. ],
  16. [
  17. 'label' => 'Localisation',
  18. 'value' => function($model) {
  19. return $model->ville. ' ('.$model->code_postal.')' ;
  20. }
  21. ],
  22. [
  23. 'label' => 'Lien',
  24. 'format' => 'raw',
  25. 'value' => function($model) {
  26. $icon_lock = (strlen($model->code)) ? ' <span class="glyphicon glyphicon-lock"></span>' : '' ;
  27. $html = Html::a('Visiter',Yii::$app->urlManagerProducer->createAbsoluteUrl(['site/index', 'slug_producer' => $model->slug]), ['class'=>'btn btn-primary']) ;
  28. $html .= $icon_lock ;
  29. return $html ;
  30. }
  31. ],
  32. ]
  33. ]);
  34. ?>