FIX: delete button and layout in baende vendpoint

This commit is contained in:
Simon Martens
2026-01-28 21:31:59 +01:00
parent 26f2e30d72
commit ff85e83dc7
9 changed files with 379 additions and 96 deletions

View File

@@ -157,15 +157,19 @@
</a>
<div class="data-tip">Bearbeiten</div>
</tool-tip>
<form method="POST" action="/almanach/{{ $entry.MusenalmID }}/edit/delete" class="inline" onsubmit="event.stopPropagation(); return confirm('Band wirklich löschen?');">
<input type="hidden" name="csrf_token" value="{{ $model.csrf_token }}" />
<tool-tip position="top" class="inline">
<button type="submit" onclick="event.stopPropagation();" class="inline-flex items-center gap-1 rounded-xs bg-red-50 px-2 py-1 text-xs font-semibold text-red-700 hover:bg-red-100 hover:text-red-900">
<i class="ri-delete-bin-line"></i>
</button>
<div class="data-tip">Löschen</div>
</tool-tip>
</form>
<tool-tip position="top" class="inline">
<button
type="button"
onclick="event.stopPropagation();"
data-role="baende-delete"
data-entry-id="{{ $entry.MusenalmID }}"
data-entry-title="{{- if $entry.PreferredTitle -}}{{ $entry.PreferredTitle }}{{- else if ne $entry.Year 0 -}}{{ $entry.Year }}{{- else -}}[o.J.]{{- end -}}"
data-delete-endpoint="/almanach/{{ $entry.MusenalmID }}/edit/delete"
class="inline-flex items-center gap-1 rounded-xs bg-red-50 px-2 py-1 text-xs font-semibold text-red-700 hover:bg-red-100 hover:text-red-900">
<i class="ri-delete-bin-line"></i>
</button>
<div class="data-tip">Löschen</div>
</tool-tip>
{{- end -}}
</div>
</div>