|
- <?php
-
- use yii\helpers\Html;
- use yii\grid\GridView;
-
- /* @var $this yii\web\View */
- /* @var $dataProvider yii\data\ActiveDataProvider */
-
- $this->title = 'Utilisateurs';
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div class="user-index">
-
- <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>
-
- <?= GridView::widget([
- 'dataProvider' => $dataProvider,
- 'columns' => [
- 'nom',
- 'prenom',
- 'telephone',
- 'email',
- [
- 'class' => 'yii\grid\ActionColumn',
- 'template' => '{update} {delete}',
- 'headerOptions' => ['class' => 'actions'],
- 'buttons' => [
- 'update' => function ($url, $model) {
- return Html::a('<span class="glyphicon glyphicon-pencil"></span> Modifier', $url, [
- 'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default'
- ]);
- },
- 'delete' => function ($url, $model) {
- return Html::a('<span class="glyphicon glyphicon-trash"></span> Suprimer', $url, [
- 'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default'
- ]);
- }
- ],
- ],
- ],
- ]); ?>
-
- </div>
|