mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
hide event
This commit is contained in:
@@ -31,7 +31,35 @@
|
||||
<p>
|
||||
Choisissez quels permissions doivent être associé avec ce poste.
|
||||
</p>
|
||||
<div id="accordion" role="tablist">
|
||||
<table id="permission-table" class="table table-bordered" style="width:100%">
|
||||
<thead class="d-none">
|
||||
<th class="d-none">Cat</th>
|
||||
<th>Nom</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(\App\Permission::allToArray() as $key => $cat)
|
||||
@foreach($cat as $r)
|
||||
<tr>
|
||||
<td class="d-none">{{$key}}</td>
|
||||
<td>
|
||||
<input class="d-none" type="text" id="{{$r['ckey']}}" name="{{$r['ckey']}}" value="{{$job->p($r['ckey'])}}">
|
||||
{{$r['communName']}}<br>
|
||||
<small>{{$r['desc']}}</small>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button type="button" id="{{$r['ckey']}}-close" class="btn btn-just-icon @if($job->p($r['ckey']) != -1) btn-outline-danger @else btn-danger @endif" onclick="switchPermissionSwitch('{{$r['ckey']}}','close')"><i class="fas fa-times"></i></button>
|
||||
<button type="button" id="{{$r['ckey']}}-slash" class="btn btn-just-icon @if($job->p($r['ckey']) == 0) btn-warning @else btn-outline-warning @endif" onclick="switchPermissionSwitch('{{$r['ckey']}}','slash')"><i class="fas fa-slash"></i></button>
|
||||
<button type="button" id="{{$r['ckey']}}-plus" class="btn btn-just-icon @if($job->p($r['ckey']) != 1) btn-outline-success @else btn-success @endif" onclick="switchPermissionSwitch('{{$r['ckey']}}','plus')"><i class="fas fa-plus"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{-- <div id="accordion" role="tablist">
|
||||
@foreach(\App\Permission::allToArray() as $key => $cat)
|
||||
<div class="card card-collapse">
|
||||
<div class="card-header" role="tab" id="headingOne">
|
||||
@@ -65,7 +93,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>--}}
|
||||
</div>
|
||||
<div class="col-md-12 mt-5">
|
||||
<button type="submit" class="btn btn-primary">Sauvegarder</button>
|
||||
@@ -83,5 +111,17 @@
|
||||
$('#desc').trumbowyg({
|
||||
lang: 'fr'
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('#permission-table').DataTable({
|
||||
rowGroup: {
|
||||
dataSrc: 0
|
||||
},
|
||||
pageLength: 100,
|
||||
lengthChange: false,
|
||||
columnDefs: [
|
||||
{ "visible": false, "targets": [0] }
|
||||
]
|
||||
});
|
||||
} );
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user