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.

42 lines
1.4KB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. /* @var $this yii\web\View */
  5. /* @var $dataProvider yii\data\ActiveDataProvider */
  6. $this->title = 'Points de vente';
  7. $this->params['breadcrumbs'][] = $this->title;
  8. ?>
  9. <div class="point-vente-index">
  10. <h1><?= Html::encode($this->title) ?> <?= Html::a('Ajouter', ['create'], ['class' => 'btn btn-success']) ?></h1>
  11. <?= GridView::widget([
  12. 'dataProvider' => $dataProvider,
  13. 'columns' => [
  14. 'nom',
  15. 'localite',
  16. [
  17. 'class' => 'yii\grid\ActionColumn',
  18. 'template' => '{update} {delete}',
  19. 'headerOptions' => ['class' => 'actions'],
  20. 'buttons' => [
  21. 'update' => function ($url, $model) {
  22. return Html::a('<span class="glyphicon glyphicon-pencil"></span> Modifier', $url, [
  23. 'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default'
  24. ]);
  25. },
  26. 'delete' => function ($url, $model) {
  27. return Html::a('<span class="glyphicon glyphicon-trash"></span> Suprimer', $url, [
  28. 'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default'
  29. ]);
  30. }
  31. ],
  32. ],
  33. ],
  34. ]); ?>
  35. </div>