|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
-
-
-
- use yii\helpers\Html ;
- use yii\widgets\ActiveForm;
- use yii\helpers\ArrayHelper ;
-
- $userModule = $this->getUserModule();
-
- $this->setTitle('Accès') ;
-
- ?>
-
- <div class="alert alert-info">Sont listés ici les comptes utilisateurs ayant accès à l'administration.</div>
-
- <div class="col-md-4">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">Ajouter un utilisateur</h3>
- </div>
- <div class="panel-body">
- <?php $form = ActiveForm::begin(); ?>
- <?= $form->field($modelAccessUserProducerForm, 'id_user')->dropDownList( $userModule->populateUserDropdownList(), ['class' => 'select2'])->label(''); ?>
- <?= Html::submitButton('Ajouter', ['class' => 'btn btn-success']) ?>
- <?php ActiveForm::end(); ?>
- </div>
- </div>
- </div>
-
- <div class="col-md-8">
- <?php if(!count($usersAccessArray)): ?>
- <div class="alert alert-warning">Aucun utilisateur n'est défini en tant que producteur.</div>
- <?php else: ?>
- <table class="table table-bordered">
- <tr>
- <th>Nom</th>
- <th>Actions</th>
- </tr>
- <?php foreach($usersAccessArray as $user): ?>
- <tr>
- <td><?= Html::encode($user->lastname.' '.$user->name) ?></td>
- <td><?= Html::a('<span class="glyphicon glyphicon-trash"></span>',['access/delete','idUser' => $user->id], ['class' => 'btn btn-default']); ?></td>
- </tr>
- <?php endforeach; ?>
- </table>
- <?php endif; ?>
- </div>
|