Upload files to "frontend/templates/partials"

This commit is contained in:
Thierry 2026-04-01 21:33:59 +02:00
parent d0c29f3c50
commit 0bce1a25c7
5 changed files with 351 additions and 0 deletions

View file

@ -0,0 +1,60 @@
<div class="card bg-base-100 shadow">
<div class="card-body">
<h2 class="card-title text-base mb-2">🗂️ Nuages de points</h2>
<div class="flex justify-between items-center mb-4">
<button
type="button"
class="btn btn-ghost"
hx-get="/viewer/list"
hx-target="#viewer-panel"
hx-trigger="click"
>
🔄 Actualiser
</button>
</div>
{% if error %}
<div class="alert alert-error">
<span>{{ error }}</span>
</div>
{% elif not pointclouds %}
<p class="text-base-content/40 text-sm text-center py-8">
Aucun nuage disponible sur le serveur.
</p>
{% else %}
<p class="text-xs text-base-content/40 mb-3">{{ pointclouds|length }} nuage(s)</p>
<div class="overflow-x-auto">
<table class="table table-sm">
<thead>
<tr>
<th>ID</th>
<th>Taille</th>
<th>Fichiers</th>
<th>Créé le</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="cloud-table-body">
{% for pc in pointclouds %}
<tr>
<td>{{ pc.id }}</td>
<td>{{ pc.size_mb }} MB</td>
<td>{{ pc.file_count }}</td>
<td>{{ pc.created|datetimeformat }}</td>
<td>
<a href="/admin/debug/{{ pc.id }}" class="btn btn-sm btn-ghost">🔍</a>
<a href="/viewer/{{ pc.id }}" class="btn btn-sm" target="_blank">👁️</a>
<button
type="button"
class="btn btn-sm btn-error"
onclick="if(confirm('Supprimer ce nuage ?')) window.location.href='/admin/delete/{{ pc.id }}'"
>🗑️</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
</div>