Upload files to "frontend/templates/partials"
This commit is contained in:
parent
c9685c4ce2
commit
c4b3c41718
4 changed files with 331 additions and 21 deletions
|
|
@ -6,22 +6,26 @@
|
|||
type="button"
|
||||
class="btn btn-ghost"
|
||||
hx-get="/viewer/list"
|
||||
hx-target="#viewer-panel"
|
||||
hx-trigger="click"
|
||||
hx-target="#cloud-list-body"
|
||||
hx-swap="innerHTML"
|
||||
hx-indicator="#cloud-list-spinner"
|
||||
>
|
||||
🔄 Actualiser
|
||||
</button>
|
||||
<span id="cloud-list-spinner" class="loading loading-spinner loading-sm htmx-indicator"></span>
|
||||
</div>
|
||||
|
||||
{% if error %}
|
||||
<!-- ✅ CORRECTION BUG 1 : cible séparée du bouton -->
|
||||
<div id="cloud-list-body">
|
||||
{% if error %}
|
||||
<div class="alert alert-error">
|
||||
<span>{{ error }}</span>
|
||||
</div>
|
||||
{% elif not pointclouds %}
|
||||
{% elif not pointclouds %}
|
||||
<p class="text-base-content/40 text-sm text-center py-8">
|
||||
Aucun nuage disponible sur le serveur.
|
||||
</p>
|
||||
{% else %}
|
||||
{% 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">
|
||||
|
|
@ -36,25 +40,42 @@
|
|||
</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>
|
||||
<tr>
|
||||
<td class="font-mono text-xs">{{ pc.id }}</td>
|
||||
<td>{{ pc.size_mb }} MB</td>
|
||||
<td>{{ pc.file_count }}</td>
|
||||
<td>{{ pc.created|datetimeformat }}</td>
|
||||
<td class="flex gap-1 flex-wrap">
|
||||
<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>
|
||||
<!-- ✅ NOUVEAU : bouton Crop qui charge la section crop dans #crop-panel -->
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-warning"
|
||||
hx-get="/crop?pc_id={{ pc.id }}"
|
||||
hx-target="#crop-panel"
|
||||
hx-swap="innerHTML"
|
||||
onclick="document.getElementById('crop-panel').scrollIntoView({behavior:'smooth'})"
|
||||
>✂️</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-error"
|
||||
hx-delete="/admin/delete/{{ pc.id }}"
|
||||
hx-target="#cloud-list-body"
|
||||
hx-swap="innerHTML"
|
||||
hx-confirm="Supprimer le nuage {{ pc.id }} ?"
|
||||
>🗑️</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ✅ NOUVEAU : section crop injectée dynamiquement ici -->
|
||||
<div id="crop-panel" class="mt-4"></div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue