<?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 permissions</h1>
 
    <div class="table-responsive">
        <table id="_table" class="table" cellspacing="0" width="100%">
 
            <thead>
                <tr>
                    <th width='1%' >Id</th>
                    <th width='10%' >Nom</th>
                    <th>Nom affiché</th>
                    <th>Rôles autorisés</th>
                    <?php if($user->HasRole("ADMINISTRATEUR")): ?>
                    <th width='10%'>Date/Heure de création</th>
                    <th width='185px'></th>
                    <?php endif; ?>
                </tr>
            </thead>
 
            <tbody>
                <?php $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo $permission->id; ?></td>
                    <td><?php echo $permission->name; ?></td>
                    <td nowrap><?php echo $permission->display_name; ?></td>
                    <td nowrap><?php echo $permission->getroles(); ?></td>
                    <?php if($user->HasRole("ADMINISTRATEUR")): ?>
                    <td nowrap><?php echo $permission->CreatedAt; ?></td>
                    <td nowrap>
                    
                        <a href="./permissions/<?php echo $permission->id; ?>/edit" class="btn btn-info pull-left" style="margin-right: 3px;">Modifier</a>

                        <?php echo Form::open(['url' => '/acces/permissions/' . $permission->id, 'method' => 'DELETE']); ?>

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

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

                    
                    </td>
                    <?php endif; ?>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
 
        </table>
    </div>
 
<?php if($user->can("PER_AJO")|| $user->hasrole("ADMINISTRATEUR")): ?>
    <div>
        <h4><a href="./permissions/create" class="btn btn-success">Ajouter une permission</a></h4>
    </div> 
<?php endif; ?>


    
 
</div>

</body></html>

<?php echo $__env->make('forms.fdatatables_script', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre\resources\views/acces/permissions/index.blade.php ENDPATH**/ ?>