+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

@@ -34,7 +34,7 @@
</div>
<div class="container-normal mt-12 flex flex-col font-serif">
<div class="font-sans"><i class="ri-article-line"></i> Einzelbeitrag</div>
<div class="font-sans mb-1"><i class="ri-article-line"></i> Einzelbeitrag</div>
<h1 class="text-3xl font-bold">
{{ $model.result.Entry.PreferredTitle }},
{{ if $model.result.Content.Extent -}}
@@ -45,13 +45,13 @@
{{ $model.result.Content.MusenalmID }}
{{- end -}}
</h1>
<span class="">
<span class="mt-1">
{{- $arr := $model.result.Content.MusenalmType -}}
{{- if $arr -}}
{{- range $i, $p := $arr -}}
<span
class="inline-block align-middle bg-slate-200 px-2 font-sans text-sm py-0.5
rounded mx-1 mt-1.5 hover:text-slate-900 no-underline">
rounded not-first:ml-1 mr-1 mt-1.5 hover:text-slate-900 no-underline">
{{- $p -}}
</span>
{{- end -}}

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>

View File

@@ -30,7 +30,7 @@
</div>
<div class="container-normal font-serif mt-12">
<div class="flex inline-flex flex-inline gap-x-3">
<div class="flex inline-flex flex-inline gap-x-3 mb-1">
{{ if $model.result.Agent.CorporateBody }}
<div class="font-sans">
<i class="ri-team-line"></i>

View File

@@ -104,7 +104,10 @@
class="w-full dbform"
id="changepersonform"
method="POST"
action="{{ if $model.is_new }}/personen/new/{{ else }}/person/{{ $agent.Id }}/edit{{ end }}">
action="{{ if $model.is_new }}/personen/new/{{ else }}/person/{{ $agent.Id }}/edit{{ end }}"
{{- if not $model.is_new -}}
data-delete-endpoint="/person/{{ $agent.Id }}/edit/delete"
{{- end -}}>
<input type="hidden" name="csrf_token" value="{{ $model.csrf_token }}" />
<input type="hidden" name="last_edited" value="{{ if not $model.is_new }}{{ $agent.Updated }}{{ end }}" />
@@ -186,6 +189,13 @@
<i class="ri-loop-left-line"></i>
<span>Reset</span>
</a>
<button
type="button"
class="resetbutton w-40 flex items-center gap-2 justify-center bg-red-50 text-red-800 hover:bg-red-100 hover:text-red-900"
data-role="edit-delete">
<i class="ri-delete-bin-line"></i>
<span>Person löschen</span>
</button>
{{- end -}}
<button type="submit" class="submitbutton w-40 flex items-center gap-2 justify-center">
<i class="ri-save-line"></i>
@@ -193,6 +203,26 @@
</button>
</div>
</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-[22rem]">
<div class="text-base font-bold text-gray-900">Person löschen?</div>
<div class="text-sm font-bold text-gray-900 mt-1">{{ $agent.Name }}</div>
<p class="text-sm text-gray-700 mt-2">
Die Person wird dauerhaft gelöscht. Verknüpfungen zu Bänden und Beiträgen werden entfernt.
</p>
<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>
</dialog>
{{- end -}}
</form>
</div>
</edit-page>

View File

@@ -17,7 +17,7 @@
</div>
<div class="container-normal flex flex-col font-serif mt-12">
<div class="flex inline-flex flex-inline gap-x-3">
<div class="flex inline-flex flex-inline gap-x-3 mb-1">
<div class="font-sans">
{{/* <svg
class="w-[0.9rem] h-[0.9rem] relative bottom-[0.04rem] inline-block"

View File

@@ -174,41 +174,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">Reihe löschen?</div>
<div class="text-sm font-bold text-gray-900 mt-1">{{ $series.Title }}</div>
<p class="text-sm text-gray-700 mt-2">
Alle Bände, Inhalte und Verknüpfungen der bevorzugten Reihentitel werden gelöscht.
</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.PreferredEntries -}}
<ul class="flex flex-col gap-2 pl-0 pr-0 m-0 list-none">
{{- range $entry := $model.result.PreferredEntries -}}
<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">Reihe löschen?</div>
<div class="text-sm font-bold text-gray-900 mt-1">{{ $series.Title }}</div>
<p class="text-sm text-gray-700 mt-2">
Alle Bände, Inhalte und Verknüpfungen der bevorzugten Reihentitel werden gelöscht.
</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.PreferredEntries -}}
<ul class="flex flex-col gap-2 pl-0 pr-0 m-0 list-none">
{{- range $entry := $model.result.PreferredEntries -}}
<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-white" data-role="edit-delete-confirm">
Löschen
</button>
</div>
</div>
</dialog>
{{- end -}}
</dialog>
{{- end -}}
</form>
</div>
</edit-page>