+person delete endpond, BUGFIX: some visual inconistencies

This commit is contained in:
Simon Martens
2026-01-11 09:27:57 +01:00
parent 4c2fcb991f
commit 5ac7042c8d
10 changed files with 241 additions and 86 deletions

View File

@@ -173,42 +173,43 @@
</button>
</div>
</div>
</form>
</div>
{{- if not $model.is_new -}}
<dialog data-role="edit-delete-dialog" class="fixed inset-0 m-auto rounded-md border border-slate-200 p-0 shadow-xl backdrop:bg-black/40">
<div class="p-5 w-[26rem]">
<div class="text-base font-bold text-gray-900">Ort löschen?</div>
<div class="text-sm font-bold text-gray-900 mt-1">{{ $place.Name }}</div>
<p class="text-sm text-gray-700 mt-2">
Der Ort wird gelöscht und aus allen verknüpften Bänden entfernt.
</p>
<div class="mt-3">
<div class="text-sm font-semibold text-gray-700">Betroffene Bände</div>
<div class="mt-2 max-h-40 overflow-auto pr-1">
{{- if $model.result.Entries -}}
<ul class="flex flex-col gap-2 pl-0 pr-0 m-0 list-none">
{{- range $entry := $model.result.Entries -}}
<li class="flex items-baseline justify-between gap-3 ml-0 pl-0 text-sm text-gray-700">
<span>{{ $entry.PreferredTitle }}</span>
<span class="text-xs text-gray-500">{{ $entry.Year }}</span>
</li>
{{- end -}}
</ul>
{{- else -}}
<div class="italic text-gray-500">Keine Bände betroffen.</div>
{{- end -}}
{{- if not $model.is_new -}}
<dialog data-role="edit-delete-dialog" class="fixed inset-0 m-auto rounded-md border border-slate-200 p-0 shadow-xl backdrop:bg-black/40">
<div class="p-5 w-[22rem]">
<div class="text-base font-bold text-gray-900">Ort löschen?</div>
<div class="text-sm font-bold text-gray-900 mt-1">{{ $place.Name }}</div>
<p class="text-sm text-gray-700 mt-2">
Der Ort wird gelöscht und aus allen verknüpften Bänden entfernt.
</p>
<div class="mt-3">
<div class="text-sm font-semibold text-gray-700">Betroffene Bände</div>
<div class="mt-2 max-h-40 overflow-auto pr-1">
{{- if $model.result.Entries -}}
<ul class="flex flex-col gap-2 pl-0 pr-0 m-0 list-none">
{{- range $entry := $model.result.Entries -}}
<li class="flex items-baseline justify-between gap-3 ml-0 pl-0 text-sm text-gray-700">
<span>{{ $entry.PreferredTitle }}</span>
<span class="text-xs text-gray-500">{{ $entry.Year }}</span>
</li>
{{- end -}}
</ul>
{{- else -}}
<div class="italic text-gray-500">Keine Bände betroffen.</div>
{{- end -}}
</div>
</div>
<div class="flex items-center justify-end gap-3 mt-4">
<button type="button" class="resetbutton w-auto px-3 py-1 text-sm" data-role="edit-delete-cancel">Abbrechen</button>
<button
type="button"
class="submitbutton w-auto bg-red-700 hover:bg-red-800 px-3 py-1 text-sm"
data-role="edit-delete-confirm">
Löschen
</button>
</div>
</div>
<div class="flex items-center justify-end gap-3 mt-4">
<button type="button" class="resetbutton w-auto px-3 py-1 text-sm" data-role="edit-delete-cancel">Abbrechen</button>
<button type="button" class="submitbutton w-auto bg-red-700 hover:bg-red-800 px-3 py-1
text-sm text-slate-50" data-role="edit-delete-confirm">
Löschen
</button>
</div>
</div>
</dialog>
{{- end -}}
</dialog>
{{- end -}}
</form>
</div>
</edit-page>