<?php echo $__env->make('forms.fbncheader', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('forms.fdatatables', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>


<div class="col-lg-10 col-lg-offset-1">
    <h1><i class="fa fa-users"></i>Administration des utilisateurs</h1>
 
    <div class="table-responsive">
        <table id="_table" class="table">
 
            <thead>
                <tr>
                    <th >Nom</th>
                    <th width='10%'>Identifiant</th>
                    <th width='10%'>Rôles</th>
                    <th width='10%'>Dernière connexion</th>
                    <th width='185px'></th>
                </tr>
            </thead>
 
            <tbody>
                <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td>
                        <a href="<?php echo url('/acces/users/'.$user->id); ?>" ><?php echo $user->full_name; ?></a></td>
                    <td nowrap><?php echo $user->login; ?></td>
                    <td nowrap><?php echo $user->getroles(); ?></td>
                    <td nowrap><?php echo $user->last_connection; ?></td>
                    <td nowrap>
                        <?php if($user_actif->can("USR_MAJ") || $user_actif->hasrole("ADMINISTRATEUR")): ?>
                        <a href="./users/<?php echo $user->id; ?>/edit" class="btn btn-info pull-left" style="margin-right: 3px;">Modifier</a>
                        <?php endif; ?>
                        <?php if( 
                            ($user_actif->can("USR_SUP") || $user_actif->hasrole("ADMINISTRATEUR")) 
                            &&
                            (!$user->hasrole("ADMINISTRATEUR")) && ($user->getroles()=="")
                        ): ?>
                        <?php echo Form::open(['url' => '/acces/users/delete/' . $user->id, 'method' => 'DELETE']); ?>

                        <?php echo Form::submit('Supprimer', ['class' => 'btn btn-danger']); ?>

                        <?php echo Form::close(); ?>

                        <?php endif; ?>
                    </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
 
        </table>
    </div>
 
 <?php if($user_actif->can("USR_AJO") || $user_actif->hasrole("ADMINISTRATEUR")): ?>
    <a href="./users/create" class="btn btn-success">Ajouter un utilisateur</a>
 <?php endif; ?>
</div>


<?php echo $__env->make('forms.fdatatables_script', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>



</body></html><?php /**PATH C:\xampp7422\htdocs\sysinfo\cpswf\sipre9\resources\views/acces/users/index.blade.php ENDPATH**/ ?>