76 lines
3.9 KiB
Twig
Executable File
76 lines
3.9 KiB
Twig
Executable File
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Dashboard{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="container mx-auto px-16">
|
|
<h1 class="text-center text-2xl font-bold mt-4">Liste des fichiers</h1>
|
|
<div class="mt-4">
|
|
{{ include('partials/alerts.html.twig') }}
|
|
</div>
|
|
<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' %}
|
|
<a href="{{ file.url }}" class="hover:text-blue-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:download" /></a>
|
|
<a href="#" class="hover:text-blue-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:pencil" /></a>
|
|
<a href="{{
|
|
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>
|
|
{% else %}
|
|
<a href="{{ file.url }}" class="hover:text-blue-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:link" /></a>
|
|
<a href="#" class="hover:text-blue-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:pencil" /></a>
|
|
<a href="{{ path('app_files_delete_directory', {
|
|
path: file.path
|
|
}) }}" class="hover:text-red-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:trash-can" /></a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|