mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
Permission update
This commit is contained in:
@@ -28,12 +28,12 @@
|
||||
<a href="/admin/article/activity/edit/{{$a->id}}" type="button" class="btn btn-secondary"><i class="fa fa-cog"></i> Modifier l'article</a>
|
||||
@endif
|
||||
@if(\Auth::user()->p('article_edit') == 1 && \Auth::user()->p('picture_add'))
|
||||
<a href="/admin/article/activity/picture/{{$a->id}}" type="button" class="btn btn-secondary"><i class="fa fa-picture-o"></i> Gérer les photos</a>
|
||||
<a href="/admin/article/activity/picture/{{$a->id}}" type="button" class="btn btn-secondary"><i class="fas fa-image"></i> Gérer les photos</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 text-center">
|
||||
<a href="/activity/{{$a->id}}" target="_blank" type="button" class="btn btn-outline-secondary"><i class="fa fa-picture-o"></i> Voir l'article</a>
|
||||
<a href="/activity/{{$a->id}}" target="_blank" type="button" class="btn btn-outline-secondary"><i class="fas fa-image"></i> Voir l'article</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,8 +38,10 @@
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src='/assets/fullcalendar/core/main.js'></script>
|
||||
<script src='/assets/fullcalendar/core/locales/fr-ca.js'></script>
|
||||
<script src='/assets/fullcalendar/daygrid/main.js'></script>
|
||||
<script src='/assets/fullcalendar/interaction/main.js'></script>
|
||||
<script src='/assets/fullcalendar/list/main.js'></script>
|
||||
<script src="/js/calendar.js"></script>
|
||||
<div class="log"></div>
|
||||
<script>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
<div>
|
||||
{!! $job->desc!!}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="row text-right">
|
||||
<div class="col">
|
||||
@if($job->id == 1)
|
||||
<button disabled class="btn btn-primary btn-block">Gérer</button>
|
||||
@else
|
||||
@@ -31,9 +31,9 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
@if($job->id == 1)
|
||||
<button disabled class="btn btn-danger btn-just-icon"><i class="fa fa-close"></i></button>
|
||||
<button disabled class="btn btn-danger btn-just-icon"><i class="fas fa-times"></i></button>
|
||||
@else
|
||||
<button class="btn btn-danger btn-just-icon" onclick="deleteJobs({{$job->id}})"><i class="fa fa-close"></i></button>
|
||||
<button class="btn btn-danger btn-just-icon" onclick="deleteJobs({{$job->id}})"><i class="fas fa-times"></i></button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
<div>
|
||||
{!! $rank->desc!!}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="row text-right">
|
||||
<div class="col">
|
||||
@if($rank->id == 1)
|
||||
<button disabled class="btn btn-primary btn-block">Gérer</button>
|
||||
@else
|
||||
@@ -31,9 +31,9 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
@if($rank->id == 1)
|
||||
<button disabled class="btn btn-danger btn-just-icon"><i class="fa fa-close"></i></button>
|
||||
<button disabled class="btn btn-danger btn-just-icon"><i class="fas fa-trash-alt"></i></button>
|
||||
@else
|
||||
<button class="btn btn-danger btn-just-icon" onclick="deleteRanks({{$rank->id}})"><i class="fa fa-close"></i></button>
|
||||
<button class="btn btn-danger btn-just-icon" onclick="deleteRanks({{$rank->id}})"><i class="fas fa-trash-alt"></i></button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<input class="d-none" type="text" id="{{$r['ckey']}}" name="{{$r['ckey']}}" value="{{$rank->p($r['ckey'])}}">
|
||||
<h5>{{$r['communName']}}</h5>
|
||||
<div class="btn-group">
|
||||
<button type="button" id="{{$r['ckey']}}-close" class="btn btn-just-icon @if($rank->p($r['ckey']) != -1) btn-outline-danger @else btn-danger @endif" onclick="switchPermissionSwitch('{{$r['ckey']}}','close')"><i class="fa fa-close"></i></button>
|
||||
<button type="button" id="{{$r['ckey']}}-close" class="btn btn-just-icon @if($rank->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($rank->p($r['ckey']) == 0) btn-warning @else btn-outline-warning @endif" onclick="switchPermissionSwitch('{{$r['ckey']}}','slash')"><i class="fa fa-slash"></i></button>-->
|
||||
<button type="button" id="{{$r['ckey']}}-plus" class="btn btn-just-icon @if($rank->p($r['ckey']) != 1) btn-outline-success @else btn-success @endif" onclick="switchPermissionSwitch('{{$r['ckey']}}','plus')"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<div class="card-body">
|
||||
<div class="mx-auto d-block">
|
||||
<h5 class="text-sm-center mt-2 mb-1">{{\Auth::User()->fullname()}}</h5>
|
||||
<div class="location text-sm-center"><i class="fa fa-id-card-o" aria-hidden="true"></i> {{\Auth::User()->rank->name}}</div>
|
||||
<div class="location text-sm-center"><i class="fas fa-id-card-alt"></i> {{\Auth::User()->rank->name}}</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="card-text text-sm-center">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<td class="text-left">Nom</td>
|
||||
<td class="text-center">Dernière modification</td>
|
||||
<td class="td-actions text-right">
|
||||
@if(\App\GoogleDriveFile::getPermForAuthUser($currentDir,'p'))
|
||||
@if($permission['p'])
|
||||
<div class="dropdown">
|
||||
<div id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-ellipsis-v fa-2x ml-3 text-gray" style="margin-right: .8rem !important;cursor: pointer;margin-top: -10px;margin-bottom: -6px"></i>
|
||||
@@ -27,19 +27,31 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($directories as $directory)
|
||||
@php
|
||||
$read = \App\GoogleDriveFile::getPermForAuthUser($directory['basename'],'r');
|
||||
$manage = \App\GoogleDriveFile::getPermForAuthUser($directory['basename'],'p');
|
||||
@endphp
|
||||
<tr class="context-menu-one">
|
||||
<td @if(\App\GoogleDriveFile::getPermForAuthUser($directory['basename'],'r')) onclick="loadFolder('{{$directory['basename']}}')" @endif style="cursor: pointer;" ><i class="fas fa-folder fa-2x"></i></td>
|
||||
<td @if(\App\GoogleDriveFile::getPermForAuthUser($directory['basename'],'r')) onclick="loadFolder('{{$directory['basename']}}')" @endif style="cursor: pointer;" >{{$directory['name']}}</td>
|
||||
<td class="text-center" onclick="loadFolder('{{$directory['basename']}}')" style="cursor: pointer;" ><span data-toggle="tooltip" data-placement="bottom" title="{{date('r',$directory['timestamp'])}}">{{strftime('%e %b %Y',$directory['timestamp'])}}</span></td>
|
||||
@if($read)
|
||||
<td onclick="loadFolder('{{$directory['basename']}}')" style="cursor: pointer;" >
|
||||
<i class="fas fa-folder fa-2x"></i>
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
<i class="fas fa-folder fa-2x text-muted"></i>
|
||||
</td>
|
||||
@endif
|
||||
<td @if($read) onclick="loadFolder('{{$directory['basename']}}')" style="cursor: pointer;" @else class="text-muted" @endif>{{$directory['name']}}</td>
|
||||
<td @if($read) class="text-center" onclick="loadFolder('{{$directory['basename']}}')" style="cursor: pointer;" @else class="text-center text-muted" @endif ><span data-toggle="tooltip" data-placement="bottom" title="{{date('r',$directory['timestamp'])}}">{{strftime('%e %b %Y',$directory['timestamp'])}}</span></td>
|
||||
<td class="td-actions text-right">
|
||||
@if(\App\GoogleDriveFile::getPermForAuthUser($directory['basename'],'p'))
|
||||
@if($manage)
|
||||
<div class="dropdown">
|
||||
<div id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-ellipsis-v fa-2x ml-3 text-gray" style="margin-right: .8rem !important;cursor: pointer;"></i>
|
||||
</div>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="/admin/drive/{{$directory['basename']}}/permission">
|
||||
<i class="fas fa-lock mr-2"></i></i>Permission
|
||||
<i class="fas fa-lock mr-2"></i>Permission
|
||||
</a>
|
||||
<a class="dropdown-item text-danger" onclick="deleteFolder('{{ $directory['basename'] }}')">
|
||||
<i class="fas fa-trash-alt mr-2"></i>Supprimer
|
||||
@@ -47,7 +59,9 @@
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<i class="fas fa-lock text-danger mr-2" data-toggle="tooltip" data-placement="left" title="Vous n'avez pas les permissions nécessaires pour modifier ce dossier"></i>
|
||||
@if(!$read)
|
||||
<i class="fas fa-lock text-danger mr-2" data-toggle="tooltip" data-placement="left" title="Vous n'avez pas les permissions nécessaires pour modifier ce dossier"></i>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@@ -94,15 +108,4 @@
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
<small class="float-right mr-4">Dernière mise à jour {{date('r')}}</small>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tables').DataTable({"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
"columnDefs": [
|
||||
{ "orderable": false, "targets": 0 },
|
||||
{ "orderable": false, "targets": 3 },
|
||||
],
|
||||
"order": []
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<small class="float-right mr-4">Dernière mise à jour {{date('r')}}</small>
|
||||
@@ -14,14 +14,14 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Nom</label>
|
||||
<input class="form-control" type="text" name="name">
|
||||
<input class="form-control" type="text" name="name" required>
|
||||
<small class="form-text text-muted">Nom du poste</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<textarea id="desc" name="desc"></textarea>
|
||||
<textarea id="desc" name="desc" required></textarea>
|
||||
<small class="form-text text-muted">Description du poste</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,13 @@
|
||||
<td>{{$item->created_at}}</td>
|
||||
<th><span class="badge badge-pill badge-{{$item->typeColor()}}">{{$item->type}}</span></th>
|
||||
<th><span class="badge badge-pill badge-{{$item->result}} text-uppercase">{{$item->result}}</span></th>
|
||||
<td>{{\App\User::find($item->user_id)->fullname()}}</td>
|
||||
@if($item->user_id == 0)
|
||||
<td>Utilisateur non authentifié</td>
|
||||
@elseif(\App\User::find($item->user_id))
|
||||
<td>{{\App\User::find($item->user_id)->fullname()}}</td>
|
||||
@else
|
||||
<td>Utilisateur inconnu</td>
|
||||
@endif
|
||||
<td><a href="">{{$item->event}}</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@@ -8,21 +8,33 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="content">
|
||||
<form method="post">
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<div class="col-12">
|
||||
<p>Coller l'index de chacun des guides pédagogiques de niveau dans la zone de texte. Générer </p>
|
||||
<p>Sélectionner un fichier .cvs contenant l'index des cours a importer.</p>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Index des cours</label>
|
||||
<textarea class="form-control" id="index" name="text" rows="3"></textarea>
|
||||
<div class="form-group bmd-form-group is-filled">
|
||||
<label class="label-control bmd-label-static" for="file">Fichier .csv de l'index des cours</label>
|
||||
<div class="fileinput fileinput-new input-group" data-provides="fileinput" style="display: flex !important;">
|
||||
<div class="form-control" data-trigger="fileinput">
|
||||
<span class="fileinput-filename"></span>
|
||||
</div>
|
||||
<span class="input-group-append">
|
||||
<span class="input-group-text fileinput-exists cursor" data-dismiss="fileinput">Supprimer</span>
|
||||
<span class="input-group-text btn-file">
|
||||
<span class="fileinput-new cursor">Parcourir</span>
|
||||
<span class="fileinput-exists cursor">Changer</span>
|
||||
<input type="file" name="file" accept="text/csv">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary">Générer</button>
|
||||
<button type="submit" class="btn btn-primary">Importer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -41,6 +41,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
|
||||
<i class="fas fa-plus"></i>
|
||||
</div>
|
||||
<div class="col m-auto text-left">
|
||||
Ajout d'un lien avec Google Drive
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
|
||||
@@ -81,6 +91,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
|
||||
<i class="fas fa-coffee"></i>
|
||||
</div>
|
||||
<div class="col m-auto text-left">
|
||||
Déplacement des plugins JS sur le serveur
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
@@ -94,7 +114,37 @@
|
||||
<i class="fas fa-bug"></i>
|
||||
</div>
|
||||
<div class="col m-auto text-left">
|
||||
Correction de multiples bugs</a>
|
||||
Correction de multiples bugs
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
|
||||
<i class="fas fa-bug"></i>
|
||||
</div>
|
||||
<div class="col m-auto text-left">
|
||||
Correction d'un bug d'affichage des icones
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
|
||||
<i class="fas fa-bug"></i>
|
||||
</div>
|
||||
<div class="col m-auto text-left">
|
||||
Correction de multiples bugs dans la gestion des grades
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
|
||||
<i class="fas fa-bug"></i>
|
||||
</div>
|
||||
<div class="col m-auto text-left">
|
||||
Correction de multiples bugs dans la gestion des postes
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="mx-auto d-block">
|
||||
<img class="rounded-circle mx-auto d-block" src="/assets/admin/images/avatar/user-{{\Auth::User()->avatar}}.jpg" alt="Card image cap" style="height:12rem">
|
||||
<h5 class="text-sm-center mt-2 mb-1">{{\Auth::User()->fullname()}}</h5>
|
||||
<div class="location text-sm-center"><i class="fa fa-id-card-o" aria-hidden="true"></i> {{\Auth::User()->rank->name}}</div>
|
||||
<div class="location text-sm-center"><i class="fas fa-id-card-alt"></i> {{\Auth::User()->rank->name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 text-center">
|
||||
|
||||
Reference in New Issue
Block a user