Integrate htmx and dropzone for file Section

This commit is contained in:
2026-01-13 01:53:13 +01:00
parent 0e79fdcb36
commit 5abbf367ab
15 changed files with 248 additions and 225 deletions

54
templates/list_files.html Normal file
View File

@@ -0,0 +1,54 @@
{% if listFiles %}
<table class="table">
<thead>
<tr>
<th></th>
<th>Fichier(s) <span class="badge">{{ nb_files }}</span></th>
<th>Taille (en Megaoctect)</th>
<th></th>
</tr>
</thead>
<tbody>
{% for file in listFiles %}
<tr>
<td>{{ file[0] }}</td>
<td><a href="/myfiles/{{ username }}/{{ file[1] }}">{{ file[1] }}</a></td>
<td>{{ file[2] }}</td>
<td>
{% if status == "public" %}
<td>
<a href="{{ url_for('filesupload.remove_publicFile', filename=file[1]) }}">
<button type="button" title="Supprimer"> <span class="icons delete"></span></button>
</a>
<a href="{{ url_for('filesupload.move_private', filename=file[1]) }}">
<button type="button" title="Passer ce fichier en status privé"><span class="icons share"></span></button>
</a>
<button type="button" onclick="navigator.clipboard.writeText('{{BASE_URL}}{{ url_for('filesupload.publicfiles', username=username, filename=file[1]) }}');" title="Copier le lien du fichier">
<span class="icons copy-link"> </span>
</button>
</td>
{% else %}
<td>
<a href="{{ url_for('filesupload.remove_privateFile', filename=file[1]) }}">
<button type="button" title="Supprimer"> <span class="icons delete"></span></button>
</a>
<a href="{{ url_for('filesupload.move_public', filename=file[1]) }}">
<button type="button" title="Passer ce fichier en status public"><span class="icons share"></span></button>
</a>
<button type="button" onclick="navigator.clipboard.writeText('{{BASE_URL}}{{ url_for('filesupload.publicfiles', username=username, filename=file[1]) }}');" title="Copier le lien du fichier">
<span class="icons copy-link"> </span>
</button>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h5> Aucun fichier ici </h5>
{% endif %}