Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

44 lines
1.5KB

  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 = 'Utilisateurs';
  7. $this->params['breadcrumbs'][] = $this->title;
  8. ?>
  9. <div class="user-index">
  10. <h1><?= Html::encode($this->title) ?> <?= Html::a('Ajouter', ['create'], ['class' => 'btn btn-success']) ?> <?= Html::a('<span class="glyphicon glyphicon-envelope"></span> Liste des emails', ['mail'], ['class' => 'btn btn-default']) ?></h1>
  11. <?= GridView::widget([
  12. 'dataProvider' => $dataProvider,
  13. 'columns' => [
  14. 'nom',
  15. 'prenom',
  16. 'telephone',
  17. 'email',
  18. [
  19. 'class' => 'yii\grid\ActionColumn',
  20. 'template' => '{update} {delete}',
  21. 'headerOptions' => ['class' => 'actions'],
  22. 'buttons' => [
  23. 'update' => function ($url, $model) {
  24. return Html::a('<span class="glyphicon glyphicon-pencil"></span> Modifier', $url, [
  25. 'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default'
  26. ]);
  27. },
  28. 'delete' => function ($url, $model) {
  29. return Html::a('<span class="glyphicon glyphicon-trash"></span> Suprimer', $url, [
  30. 'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default'
  31. ]);
  32. }
  33. ],
  34. ],
  35. ],
  36. ]); ?>
  37. </div>