mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
File Explorer update + Permission update
This commit is contained in:
@@ -1,32 +1,53 @@
|
||||
<table class="table table-hover dt-responsive material-datatables w-100" id="table">
|
||||
<table class="table table-hover table-responsive dt-responsive material-datatables w-100 d-sm-table" id="table">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<td class="text-center explorerType"><strong>#</strong></td>
|
||||
<td class="text-left">Nom</td>
|
||||
<td class="text-center">Dernière modification</td>
|
||||
<td></td>
|
||||
<td class="td-actions text-right">
|
||||
@if(\App\GoogleDriveFile::getPermForAuthUser($currentDir,'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>
|
||||
</div>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="/admin/drive/{{$currentDir}}/permission">
|
||||
<i class="fas fa-lock mr-2"></i></i>Permission
|
||||
</a>
|
||||
<a class="dropdown-item text-danger" onclick="deleteFolder('{{ $currentDir }}')">
|
||||
<i class="fas fa-trash-alt mr-2"></i>Supprimer
|
||||
</a>
|
||||
</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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($directories as $directory)
|
||||
<tr class="context-menu-one">
|
||||
<td onclick="loadFolder('{{$directory['basename']}}')" style="cursor: pointer;" ><i class="fas fa-folder fa-2x"></i></td>
|
||||
<td onclick="loadFolder('{{$directory['basename']}}')" style="cursor: pointer;" >{{$directory['name']}}</td>
|
||||
<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>
|
||||
<td class="td-actions text-right">
|
||||
@if($directory['filename'] != '🔒')
|
||||
@if(\App\GoogleDriveFile::getPermForAuthUser($directory['basename'],'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;"></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
|
||||
</a>
|
||||
<a class="dropdown-item text-danger" onclick="deleteFolder('{{ $directory['basename'] }}')">
|
||||
<i class="fas fa-trash-alt mr-2"></i>Supprimer
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<i class="fas fa-lock text-danger mr-2"></i>
|
||||
<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
|
||||
</td>
|
||||
</tr>
|
||||
@@ -49,7 +70,10 @@
|
||||
<div class="col-md-2">
|
||||
Taille : {{GetSizeName($file['size'])}}
|
||||
</div>
|
||||
<div class="col-md-4 offset-md-4 text-right">
|
||||
<div class="col-md-4">
|
||||
Permission : rw
|
||||
</div>
|
||||
<div class="col-md-4 text-right">
|
||||
<a href="/file/get?f={{urlencode($file['name'])}}&d={{$file['dirname']}}" rel="tooltip" class="btn btn-info">
|
||||
<i class="material-icons">cloud_download</i>
|
||||
</a>
|
||||
@@ -61,6 +85,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if(count($directories) == 0 && count($files) == 0)
|
||||
<tr>
|
||||
<td colspan="4" class="text-center m-2">
|
||||
Le dossier est vide
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
<small class="float-right mr-4">Dernière mise à jour {{date('r')}}</small>
|
||||
|
||||
Reference in New Issue
Block a user