No beiträge endpoint

This commit is contained in:
Simon Martens
2026-01-22 18:54:22 +01:00
parent 26b7a9dd9b
commit e0339205cb
2 changed files with 76 additions and 57 deletions

File diff suppressed because one or more lines are too long

View File

@@ -165,6 +165,8 @@
{{ len $model.result.Contents }} Einträge {{ len $model.result.Contents }} Einträge
</span> </span>
</div> </div>
{{- $hasContents := gt (len $model.result.Contents) 0 -}}
{{- if $hasContents -}}
<hr class="mx-4 mt-2 mb-1 border-slate-300" /> <hr class="mx-4 mt-2 mb-1 border-slate-300" />
<div class="px-4 py-2 flex flex-wrap items-center gap-3"> <div class="px-4 py-2 flex flex-wrap items-center gap-3">
<input <input
@@ -229,6 +231,23 @@
</button> </button>
</div> </div>
</div> </div>
{{- else -}}
<div class="mx-4 mt-2">
<div class="min-h-[18rem] flex items-center justify-center text-center px-6 py-12">
<div class="text-lg text-gray-700 font-semibold flex flex-col items-center gap-4">
<i class="ri-information-line text-3xl text-gray-600"></i>
<span>Keine Beiträge verzeichnet.</span>
<button
type="button"
class="content-action-button"
onclick="window.location.assign('/almanach/{{ $model.result.Entry.MusenalmID }}/contents/new')">
<i class="ri-add-line"></i>
<span>Neuen Beitrag anlegen</span>
</button>
</div>
</div>
</div>
{{- end -}}
</div> </div>
<dialog id="content-delete-dialog" class="dbform fixed inset-0 m-auto rounded-md border border-slate-200 p-0 shadow-xl backdrop:bg-black/40"> <dialog id="content-delete-dialog" class="dbform fixed inset-0 m-auto rounded-md border border-slate-200 p-0 shadow-xl backdrop:bg-black/40">