您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

producers.php 1.1KB

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. ?>