You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
3.7 KiB
100 lines
3.7 KiB
|
|
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1>
|
|
Gérer les
|
|
<small>Rôles</small>
|
|
</h1>
|
|
<ol class="breadcrumb">
|
|
<li><a href="#"><i class="fa fa-dashboard"></i> Accueil</a></li>
|
|
<li class="active">Rôles</li>
|
|
</ol>
|
|
</section>
|
|
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<!-- Small boxes (Stat box) -->
|
|
<div class="row">
|
|
<div class="col-md-12 col-xs-12">
|
|
|
|
<?php if(session()->getFlashdata('success')): ?>
|
|
<div class="alert alert-success alert-dismissible" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<?php echo session()->getFlashdata('success'); ?>
|
|
</div>
|
|
<?php elseif(session()->getFlashdata('error')): ?>
|
|
<div class="alert alert-error alert-dismissible" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<?php echo session()->getFlashdata('error'); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(in_array('createGroup', $user_permission)): ?>
|
|
<a href="<?php echo base_url('groups/create') ?>" class="btn btn-primary">Ajouter un Rôle</a>
|
|
<br /> <br />
|
|
<?php endif; ?>
|
|
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<h3 class="box-title">Gérer les Rôles</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<table id="groupTable" class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Désignation</th>
|
|
<?php if(in_array('updateGroup', $user_permission) || in_array('deleteGroup', $user_permission)): ?>
|
|
<th>Action</th>
|
|
<?php endif; ?>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php if($groups_data): ?>
|
|
<?php foreach ($groups_data as $k => $v): ?>
|
|
<tr>
|
|
<td><?php echo $v['group_name']; ?></td>
|
|
|
|
<?php if(in_array('updateGroup', $user_permission) || in_array('deleteGroup', $user_permission)): ?>
|
|
<td>
|
|
<?php if(in_array('updateGroup', $user_permission)): ?>
|
|
<a href="<?php echo base_url('groups/edit/'.$v['id']) ?>" class="btn btn-default"><i class="fa fa-edit"></i></a>
|
|
<?php endif; ?>
|
|
<?php if(in_array('deleteGroup', $user_permission)): ?>
|
|
<a href="<?php echo base_url('groups/delete/'.$v['id']) ?>" class="btn btn-danger"><i class="fa fa-trash"></i></a>
|
|
<?php endif; ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach ?>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
<!-- col-md-12 -->
|
|
</div>
|
|
<!-- /.row -->
|
|
|
|
|
|
</section>
|
|
<!-- /.content -->
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('#groupTable').DataTable();
|
|
|
|
$("#mainUserNav").addClass('active');
|
|
$("#manageGroupNav").addClass('active');
|
|
});
|
|
</script>
|
|
|