2024-12-28 01:10:25 +01:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block title %}Dashboard{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<div class="container mx-auto px-16">
|
2024-12-28 13:10:57 +01:00
|
|
|
<h1 class="text-center text-2xl font-bold mt-4">Liste des fichiers</h1>
|
2024-12-29 16:00:42 +01:00
|
|
|
<div class="mt-4">
|
|
|
|
{{ include('partials/alerts.html.twig') }}
|
|
|
|
</div>
|
2025-01-11 19:25:42 +01:00
|
|
|
<div class="flex justify-end">
|
|
|
|
<a href="{{ path('app_files_create_directory', {
|
|
|
|
base: path
|
|
|
|
}) }}" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800">Créer un dossier</a>
|
2025-01-11 19:52:25 +01:00
|
|
|
<a href="{{ path('app_files_upload', {
|
|
|
|
path: path
|
|
|
|
}) }}" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800">Ajouter des fichiers</a>
|
2025-01-11 19:25:42 +01:00
|
|
|
</div>
|
2024-12-28 13:10:57 +01:00
|
|
|
<div class="mt-4">
|
|
|
|
{% include 'partials/breadbrumb.html.twig' %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="relative overflow-x-auto mt-4">
|
|
|
|
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
|
|
|
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
|
|
|
<tr>
|
|
|
|
<th scope="col" class="px-6 py-3">
|
|
|
|
Nom
|
|
|
|
</th>
|
|
|
|
<th scope="col" class="px-6 py-3">
|
|
|
|
Taille
|
|
|
|
</th>
|
|
|
|
<th scope="col" class="px-6 py-3">
|
|
|
|
Modifié le
|
|
|
|
</th>
|
|
|
|
<th scope="col" class="px-6 py-3">
|
|
|
|
Action
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for file in files %}
|
|
|
|
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
|
|
|
|
<th class="px-6 py-4 font-medium light:text-gray-900 whitespace-nowrap flex gap-2">
|
|
|
|
{% if file.type == 'file' %}
|
|
|
|
<twig:ux:icon name="line-md:file-filled" class="w-6 h-6" />
|
|
|
|
{% else %}
|
|
|
|
<twig:ux:icon name="line-md:folder-filled" class="w-6 h-6" />
|
|
|
|
{% endif %}
|
|
|
|
<a class="text-blue-700 dark:text-blue-500 hover:text-blue-900 dark:hover:text-blue-700" href="{{ file.url }}">{{ file.path|basename }}</a>
|
|
|
|
</th>
|
|
|
|
<td class="px-6 py-4">
|
|
|
|
{% if file.type == 'file' %}
|
|
|
|
{{ file.size|show_size }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4">
|
|
|
|
{{ file.last_modified|time_diff }}
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 flex gap-2 light:text-black">
|
|
|
|
{% if file.type == 'file' %}
|
2025-01-11 19:25:42 +01:00
|
|
|
<a title="Permet de télécharger le fichier" href="{{ file.url }}" class="hover:text-blue-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:download" /></a>
|
|
|
|
<a title="Permet de renommer le fichier" href="{{ path('app_files_rename', {
|
|
|
|
path: file.path
|
|
|
|
}) }}" class="hover:text-blue-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:pencil" /></a>
|
|
|
|
<a title="Permet de supprimer le fichier" href="{{
|
2025-01-11 18:23:21 +01:00
|
|
|
path('app_files_delete', {
|
|
|
|
filename: file.path
|
|
|
|
})
|
|
|
|
}}" class="hover:text-red-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:trash-can" /></a>
|
2024-12-28 13:10:57 +01:00
|
|
|
{% else %}
|
2025-01-11 19:25:42 +01:00
|
|
|
<a href="{{ path('app_files_rename-directory', {
|
|
|
|
path: file.path
|
|
|
|
}) }}" class="hover:text-blue-700 duration-300" title="Permet de renommer le dossier"><twig:ux:icon class="w-6 h-6" name="fa6-solid:pencil" /></a>
|
2025-01-11 18:23:21 +01:00
|
|
|
<a href="{{ path('app_files_delete_directory', {
|
|
|
|
path: file.path
|
2025-01-11 19:25:42 +01:00
|
|
|
}) }}" class="hover:text-red-700 duration-300" title="Permet de supprimer le dossier"><twig:ux:icon class="w-6 h-6" name="fa6-solid:trash-can" /></a>
|
2024-12-28 13:10:57 +01:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2024-12-28 01:10:25 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|