mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
Abstracted some edit components
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -22,15 +22,15 @@ type AlmanachResult struct {
|
|||||||
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
||||||
<div class="flex flex-row w-full justify-between">
|
<div class="flex flex-row w-full justify-between">
|
||||||
<div class="flex flex-col justify-end-safe flex-2/5">
|
<div class="flex flex-col justify-end-safe flex-2/5">
|
||||||
|
<div class="mb-3">
|
||||||
|
<i class="ri-book-line"></i> Almanach
|
||||||
|
</div>
|
||||||
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
||||||
{{- if $model.is_new -}}
|
{{- if $model.is_new -}}
|
||||||
Almanach
|
Neuen Almanach anlegen
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $model.result.Entry.PreferredTitle -}}
|
{{- $model.result.Entry.PreferredTitle -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $model.is_new -}}
|
|
||||||
<span class="ml-2 text-sm font-semibold text-amber-700 bg-amber-100 px-2 py-0.5 rounded-xs align-middle">Neu</span>
|
|
||||||
{{- end -}}
|
|
||||||
</h1>
|
</h1>
|
||||||
{{- if not $model.is_new -}}
|
{{- if not $model.is_new -}}
|
||||||
<div class="flex flex-row gap-x-3">
|
<div class="flex flex-row gap-x-3">
|
||||||
@@ -280,12 +280,7 @@ type AlmanachResult struct {
|
|||||||
<div id="publication"></div>
|
<div id="publication"></div>
|
||||||
|
|
||||||
<!-- Annotationen -->
|
<!-- Annotationen -->
|
||||||
<div class="inputwrapper">
|
{{ template "_annotation_field" (Arr $model.result.Entry.Annotation "Annotationen") }}
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="annotation" class="inputlabel">Annotationen</label>
|
|
||||||
</div>
|
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.Annotation -}}</textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -615,41 +610,7 @@ type AlmanachResult struct {
|
|||||||
<!-- Right Column -->
|
<!-- Right Column -->
|
||||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||||
<div>
|
<div>
|
||||||
<div class="flex flex-col gap-4">
|
{{ template "_status_edit" (Arr $model.result.Entry "type" "type") }}
|
||||||
<!-- Status -->
|
|
||||||
<div class="inputwrapper">
|
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="type" class="inputlabel">Status</label>
|
|
||||||
</div>
|
|
||||||
<select name="type" id="type" autocomplete="off" class="inputselect font-bold">
|
|
||||||
<option value="Unknown" {{ if eq $model.result.Entry.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
|
||||||
<option value="ToDo" {{ if eq $model.result.Entry.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
|
||||||
<option value="Review" {{ if eq $model.result.Entry.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
|
||||||
<option value="Seen" {{ if eq $model.result.Entry.EditState "Seen" }}selected{{ end }}>Autopsiert</option>
|
|
||||||
<option value="Edited" {{ if eq $model.result.Entry.EditState "Edited" }}selected{{ end }}>Vollständig Erfasst</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Bearbeitungsvermerk -->
|
|
||||||
<div id="edit_comment_section"></div>
|
|
||||||
<div-manager dm-target="edit_comment_section">
|
|
||||||
<button class="dm-menu-button text-right cursor-pointer whitespace-nowrap"><i class="ri-add-line"></i>
|
|
||||||
Bearbeitungsvermerk hinzufügen</button>
|
|
||||||
|
|
||||||
<div class="inputwrapper {{ if eq $model.result.Entry.Comment "" }}hidden{{ end }}">
|
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="edit_comment" class="inputlabel menu-label">Bearbeitungsvermerk</label>
|
|
||||||
<div class="pr-2">
|
|
||||||
<button class="dm-close-button font-bold input-label">
|
|
||||||
<i class="ri-close-line"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.Comment -}}</textarea>
|
|
||||||
</div>
|
|
||||||
</div-manager>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
14
views/routes/components/_annotation_field.gohtml
Normal file
14
views/routes/components/_annotation_field.gohtml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{{- $annotation := index . 0 -}}
|
||||||
|
{{- $label := "Annotation" -}}
|
||||||
|
{{- if gt (len .) 1 -}}
|
||||||
|
{{- if index . 1 -}}
|
||||||
|
{{- $label = index . 1 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
|
<label for="annotation" class="inputlabel">{{ $label }}</label>
|
||||||
|
</div>
|
||||||
|
<textarea name="annotation" id="annotation" class="inputinput" placeholder="" autocomplete="off" rows="2">{{- $annotation -}}</textarea>
|
||||||
|
</div>
|
||||||
94
views/routes/components/_linked_items.gohtml
Normal file
94
views/routes/components/_linked_items.gohtml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
{{- $entries := index . 0 -}}
|
||||||
|
{{- $contents := index . 1 -}}
|
||||||
|
{{- $entryTypes := index . 2 -}}
|
||||||
|
{{- $contentTypes := index . 3 -}}
|
||||||
|
{{- $contentEntries := index . 4 -}}
|
||||||
|
|
||||||
|
<tab-list
|
||||||
|
data-default-index="{{ if gt (len $entries) 0 }}0{{ else if $contents }}{{ if gt (len $contents) 0 }}1{{ end }}{{ end }}"
|
||||||
|
data-disabled-indices="{{ if and (eq (len $entries) 0) (or (not $contents) (eq (len $contents) 0)) }}0,1{{ else if eq (len $entries) 0 }}0{{ else if or (not $contents) (eq (len $contents) 0) }}1{{ end }}">
|
||||||
|
<div class="flex items-center gap-3 text-sm font-bold text-gray-700">
|
||||||
|
<div class="tab-list-head flex items-center gap-2">
|
||||||
|
<i class="ri-book-2-line"></i>
|
||||||
|
<span>Verknüpfte Bände</span>
|
||||||
|
<span class="text-xs bg-stone-200 text-gray-800 px-2 py-0.5 rounded-sm">{{ len $entries }}</span>
|
||||||
|
</div>
|
||||||
|
{{- if $contents -}}
|
||||||
|
<div class="tab-list-head flex items-center gap-2">
|
||||||
|
<i class="ri-article-line"></i>
|
||||||
|
<span>Verknüpfte Inhalte</span>
|
||||||
|
<span class="text-xs bg-stone-200 text-gray-800 px-2 py-0.5 rounded-sm">{{ len $contents }}</span>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
<hr class="border-slate-400 mt-2 mb-3" />
|
||||||
|
<div class="tab-list-panel text-sm text-gray-800 max-h-96 overflow-auto pr-1 pl-0 ml-0">
|
||||||
|
{{- if $entries -}}
|
||||||
|
<ul class="flex flex-col gap-3 pl-0 pr-0 m-0 ml-0 list-none">
|
||||||
|
{{- range $entry := $entries -}}
|
||||||
|
{{- $types := "" -}}
|
||||||
|
{{- if $entryTypes -}}
|
||||||
|
{{- $types = index $entryTypes $entry.Id -}}
|
||||||
|
{{- end -}}
|
||||||
|
<li class="flex items-baseline justify-between gap-3 ml-0 px-1 odd:bg-stone-100">
|
||||||
|
<div class="flex flex-col gap-1">
|
||||||
|
<a href="/almanach/{{ $entry.MusenalmID }}" class="font-bold no-underline hover:text-slate-900">
|
||||||
|
{{- $entry.PreferredTitle -}}
|
||||||
|
</a>
|
||||||
|
{{- if $types -}}
|
||||||
|
<div class="text-xs text-gray-800">
|
||||||
|
{{- range $i, $t := $types -}}
|
||||||
|
{{- if $i }}, {{ end -}}{{ $t -}}
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
<span class="text-xs text-gray-500 whitespace-nowrap">Alm {{ $entry.MusenalmID }}</span>
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
{{- else -}}
|
||||||
|
<div class="italic text-gray-500">Keine Bände verknüpft.</div>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
{{- if $contents -}}
|
||||||
|
<div class="tab-list-panel text-sm text-gray-800 max-h-96 overflow-auto pr-1 pl-0 ml-0 self-stretch">
|
||||||
|
{{- if $contents -}}
|
||||||
|
<ul class="flex flex-col gap-3 pl-0 pr-0 m-0 ml-0 list-none">
|
||||||
|
{{- range $content := $contents -}}
|
||||||
|
{{- $entry := "" -}}
|
||||||
|
{{- if $contentEntries -}}
|
||||||
|
{{- $entry = index $contentEntries $content.Entry -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $types := "" -}}
|
||||||
|
{{- if $contentTypes -}}
|
||||||
|
{{- $types = index $contentTypes $content.Id -}}
|
||||||
|
{{- end -}}
|
||||||
|
<li class="flex flex-col gap-1 ml-0 pl-0 odd:bg-stone-100 px-1">
|
||||||
|
<a href="/beitrag/{{ $content.MusenalmID }}" class="no-underline hover:text-slate-900 font-semibold">
|
||||||
|
{{- if $content.PreferredTitle -}}{{ $content.PreferredTitle }}{{- else -}}Inhalt #{{ $content.MusenalmID }}{{- end -}}
|
||||||
|
</a>
|
||||||
|
<div class="text-xs text-gray-800 ">
|
||||||
|
{{- if $types -}}
|
||||||
|
<span>
|
||||||
|
{{- range $i, $t := $types -}}
|
||||||
|
{{- if $i }}, {{ end -}}{{ $t -}}
|
||||||
|
{{- end -}}
|
||||||
|
</span>
|
||||||
|
{{- end -}}
|
||||||
|
{{- if $entry -}}, in:
|
||||||
|
<span><a href="/almanach/{{ $entry.MusenalmID }}" class="no-underline hover:text-slate-900">{{ $entry.PreferredTitle }}</a></span>
|
||||||
|
{{- end -}}
|
||||||
|
{{- if $content.MusenalmPagination -}}
|
||||||
|
<span>Seite: {{ $content.MusenalmPagination }}</span>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
{{- else -}}
|
||||||
|
<div class="italic text-gray-500">Keine Inhalte verknüpft.</div>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
</tab-list>
|
||||||
39
views/routes/components/_status_edit.gohtml
Normal file
39
views/routes/components/_status_edit.gohtml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{{- $entity := index . 0 -}}
|
||||||
|
{{- $fieldName := index . 1 -}}
|
||||||
|
{{- $fieldId := index . 2 -}}
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-4">
|
||||||
|
<!-- Status -->
|
||||||
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
|
<label for="{{ $fieldId }}" class="inputlabel">Status</label>
|
||||||
|
</div>
|
||||||
|
<select name="{{ $fieldName }}" id="{{ $fieldId }}" autocomplete="off" class="inputselect font-bold">
|
||||||
|
<option value="Unknown" {{ if eq $entity.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
||||||
|
<option value="ToDo" {{ if eq $entity.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
||||||
|
<option value="Review" {{ if eq $entity.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
||||||
|
<option value="Seen" {{ if eq $entity.EditState "Seen" }}selected{{ end }}>Autopsiert</option>
|
||||||
|
<option value="Edited" {{ if eq $entity.EditState "Edited" }}selected{{ end }}>Vollständig Erfasst</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Bearbeitungsvermerk -->
|
||||||
|
<div id="edit_comment_section"></div>
|
||||||
|
<div-manager dm-target="edit_comment_section">
|
||||||
|
<button class="dm-menu-button text-right cursor-pointer whitespace-nowrap"><i class="ri-add-line"></i>
|
||||||
|
Bearbeitungsvermerk hinzufügen</button>
|
||||||
|
|
||||||
|
<div class="inputwrapper {{ if eq $entity.Comment "" }}hidden{{ end }}">
|
||||||
|
<div class="inputlabelrow">
|
||||||
|
<label for="edit_comment" class="inputlabel menu-label">Bearbeitungsvermerk</label>
|
||||||
|
<div class="pr-2">
|
||||||
|
<button class="dm-close-button font-bold input-label">
|
||||||
|
<i class="ri-close-line"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<textarea name="edit_comment" id="edit_comment" class="inputinput" placeholder="" autocomplete="off" rows="1">{{- $entity.Comment -}}</textarea>
|
||||||
|
</div>
|
||||||
|
</div-manager>
|
||||||
|
</div>
|
||||||
@@ -5,15 +5,15 @@
|
|||||||
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
||||||
<div class="flex flex-row w-full justify-between">
|
<div class="flex flex-row w-full justify-between">
|
||||||
<div class="flex flex-col justify-end-safe flex-2/5">
|
<div class="flex flex-col justify-end-safe flex-2/5">
|
||||||
|
<div class="mb-3">
|
||||||
|
<i class="ri-map-pin-line"></i> Ort
|
||||||
|
</div>
|
||||||
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
||||||
{{- if $model.is_new -}}
|
{{- if $model.is_new -}}
|
||||||
Ort
|
Neuen Ort anlegen
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $place.Name -}}
|
{{- $place.Name -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $model.is_new -}}
|
|
||||||
<span class="ml-2 text-sm font-semibold text-amber-700 bg-amber-100 px-2 py-0.5 rounded-xs align-middle">Neu</span>
|
|
||||||
{{- end -}}
|
|
||||||
</h1>
|
</h1>
|
||||||
{{- if not $model.is_new -}}
|
{{- if not $model.is_new -}}
|
||||||
<div class="flex flex-row gap-x-3">
|
<div class="flex flex-row gap-x-3">
|
||||||
@@ -123,12 +123,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $place.Pseudonyms -}}</textarea>
|
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $place.Pseudonyms -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
{{ template "_annotation_field" (Arr $place.Annotation "Annotation") }}
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="annotation" class="inputlabel">Annotation</label>
|
|
||||||
</div>
|
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $place.Annotation -}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="inputlabelrow">
|
<div class="inputlabelrow">
|
||||||
<label for="uri" class="inputlabel">URI</label>
|
<label for="uri" class="inputlabel">URI</label>
|
||||||
@@ -145,53 +140,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||||
<div class="inputwrapper">
|
{{ template "_status_edit" (Arr $place "status" "status") }}
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="status" class="inputlabel">Status</label>
|
|
||||||
</div>
|
|
||||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
|
||||||
<option value="Unknown" {{ if eq $place.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
|
||||||
<option value="ToDo" {{ if eq $place.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
|
||||||
<option value="Review" {{ if eq $place.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
|
||||||
<option value="Seen" {{ if eq $place.EditState "Seen" }}selected{{ end }}>Autopsiert</option>
|
|
||||||
<option value="Edited" {{ if eq $place.EditState "Edited" }}selected{{ end }}>Vollständig Erfasst</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="inputwrapper">
|
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
|
||||||
</div>
|
|
||||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $place.Comment -}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<tab-list
|
{{ template "_linked_items" (Arr $model.result.Entries nil nil nil nil) }}
|
||||||
data-default-index="{{ if gt (len $model.result.Entries) 0 }}0{{ end }}"
|
|
||||||
data-disabled-indices="{{ if eq (len $model.result.Entries) 0 }}0{{ end }}">
|
|
||||||
<div class="flex items-center gap-3 text-sm font-bold text-gray-700">
|
|
||||||
<div class="tab-list-head flex items-center gap-2">
|
|
||||||
<i class="ri-book-2-line"></i>
|
|
||||||
<span>Verknüpfte Bände</span>
|
|
||||||
<span class="text-xs bg-stone-200 text-gray-700 px-2 py-0.5 rounded-sm">{{ len $model.result.Entries }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr class="border-slate-400 mt-2 mb-3" />
|
|
||||||
<div class="tab-list-panel text-sm text-gray-700 max-h-96 overflow-auto pr-1 pl-0 ml-0">
|
|
||||||
{{- if $model.result.Entries -}}
|
|
||||||
<ul class="flex flex-col gap-2 pl-0 pr-0 m-0 ml-0 list-none">
|
|
||||||
{{- range $entry := $model.result.Entries -}}
|
|
||||||
<li class="flex items-baseline justify-between gap-3 ml-0 pl-0">
|
|
||||||
<a href="/almanach/{{ $entry.MusenalmID }}" class="no-underline hover:text-slate-900">
|
|
||||||
{{- $entry.PreferredTitle -}}
|
|
||||||
</a>
|
|
||||||
<span class="text-xs text-gray-500">{{ $entry.Year }}</span>
|
|
||||||
</li>
|
|
||||||
{{- end -}}
|
|
||||||
</ul>
|
|
||||||
{{- else -}}
|
|
||||||
<div class="italic text-gray-500">Keine Bände verknüpft.</div>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
</tab-list>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,15 +5,15 @@
|
|||||||
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
||||||
<div class="flex flex-row w-full justify-between">
|
<div class="flex flex-row w-full justify-between">
|
||||||
<div class="flex flex-col justify-end-safe flex-2/5">
|
<div class="flex flex-col justify-end-safe flex-2/5">
|
||||||
|
<div class="mb-3">
|
||||||
|
<i class="ri-user-line"></i> Person
|
||||||
|
</div>
|
||||||
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
||||||
{{- if $model.is_new -}}
|
{{- if $model.is_new -}}
|
||||||
Person
|
Neue Person anlegen
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $agent.Name -}}
|
{{- $agent.Name -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $model.is_new -}}
|
|
||||||
<span class="ml-2 text-sm font-semibold text-amber-700 bg-amber-100 px-2 py-0.5 rounded-xs align-middle">Neu</span>
|
|
||||||
{{- end -}}
|
|
||||||
</h1>
|
</h1>
|
||||||
{{- if not $model.is_new -}}
|
{{- if not $model.is_new -}}
|
||||||
<div class="flex flex-row gap-x-3">
|
<div class="flex flex-row gap-x-3">
|
||||||
@@ -122,14 +122,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $agent.Pseudonyms -}}</textarea>
|
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $agent.Pseudonyms -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-row gap-2">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="px-3 py-2 flex flex-row gap-2 font-bold">
|
<div class="px-3 py-2 flex flex-row gap-2 font-bold">
|
||||||
<input type="checkbox" name="corporate_body" id="corporate_body" {{ if
|
<input type="checkbox" name="corporate_body" id="corporate_body" {{ if
|
||||||
$agent.CorporateBody }}checked{{ end }} data-boolean-checkbox />
|
$agent.CorporateBody }}checked{{ end }} data-boolean-checkbox />
|
||||||
<label class="flex items-center gap-2 text-gray-700"
|
<label class="flex items-center gap-2 text-gray-700"
|
||||||
for="corporate_body">Körperschaft (Verlag/Vertrieb)</label>
|
for="corporate_body">Körperschaft (Verlag od. Vertrieb)</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="inputwrapper">
|
||||||
|
<div class="px-3 py-2 flex flex-row gap-2 font-bold">
|
||||||
|
<input type="checkbox" name="fictional" id="fictional" {{ if $agent.Fictional }}checked{{ end }} data-boolean-checkbox />
|
||||||
|
<label class="flex items-center gap-2 text-gray-700"
|
||||||
|
for="fictional">Fiktional</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="inputlabelrow">
|
<div class="inputlabelrow">
|
||||||
<label for="biographical_data" class="inputlabel">Biografische Angaben</label>
|
<label for="biographical_data" class="inputlabel">Biografische Angaben</label>
|
||||||
@@ -154,117 +163,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.References -}}</textarea>
|
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.References -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
{{ template "_annotation_field" (Arr $agent.Annotation "Annotation") }}
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="annotation" class="inputlabel">Annotation</label>
|
|
||||||
</div>
|
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $agent.Annotation -}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="inputwrapper">
|
|
||||||
<div class="px-3 py-2 flex flex-row gap-2 font-bold">
|
|
||||||
<input type="checkbox" name="fictional" id="fictional" {{ if $agent.Fictional }}checked{{ end }} data-boolean-checkbox />
|
|
||||||
<label class="flex items-center gap-2 text-gray-700"
|
|
||||||
for="fictional">Fiktional</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||||
<div class="inputwrapper">
|
{{ template "_status_edit" (Arr $agent "status" "status") }}
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="status" class="inputlabel">Status</label>
|
|
||||||
</div>
|
|
||||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
|
||||||
<option value="Unknown" {{ if eq $agent.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
|
||||||
<option value="ToDo" {{ if eq $agent.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
|
||||||
<option value="Review" {{ if eq $agent.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
|
||||||
<option value="Seen" {{ if eq $agent.EditState "Seen" }}selected{{ end }}>Autopsiert</option>
|
|
||||||
<option value="Edited" {{ if eq $agent.EditState "Edited" }}selected{{ end }}>Vollständig Erfasst</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="inputwrapper">
|
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
|
||||||
</div>
|
|
||||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $agent.Comment -}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<tab-list
|
{{ template "_linked_items" (Arr $model.result.Entries $model.result.Contents $model.result.EntryTypes $model.result.ContentTypes $model.result.ContentEntries) }}
|
||||||
data-default-index="{{ if gt (len $model.result.Entries) 0 }}0{{ else if gt (len $model.result.Contents) 0 }}1{{ end }}"
|
|
||||||
data-disabled-indices="{{ if and (eq (len $model.result.Entries) 0) (eq (len $model.result.Contents) 0) }}0,1{{ else if eq (len $model.result.Entries) 0 }}0{{ else if eq (len $model.result.Contents) 0 }}1{{ end }}">
|
|
||||||
<div class="flex items-center gap-3 text-sm font-bold text-gray-700">
|
|
||||||
<div class="tab-list-head flex items-center gap-2">
|
|
||||||
<i class="ri-book-2-line"></i>
|
|
||||||
<span>Verknüpfte Bände</span>
|
|
||||||
<span class="text-xs bg-stone-200 text-gray-800 px-2 py-0.5 rounded-sm">{{ len $model.result.Entries }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="tab-list-head flex items-center gap-2">
|
|
||||||
<i class="ri-article-line"></i>
|
|
||||||
<span>Verknüpfte Inhalte</span>
|
|
||||||
<span class="text-xs bg-stone-200 text-gray-800 px-2 py-0.5 rounded-sm">{{ len $model.result.Contents }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr class="border-slate-400 mt-2 mb-3" />
|
|
||||||
<div class="tab-list-panel text-sm text-gray-800 max-h-96 overflow-auto pr-1 pl-0 ml-0">
|
|
||||||
{{- if $model.result.Entries -}}
|
|
||||||
<ul class="flex flex-col gap-3 pl-0 pr-0 m-0 ml-0 list-none">
|
|
||||||
{{- range $entry := $model.result.Entries -}}
|
|
||||||
{{- $entryTypes := index $model.result.EntryTypes $entry.Id -}}
|
|
||||||
<li class="flex items-baseline justify-between gap-3 ml-0 px-1 odd:bg-stone-100">
|
|
||||||
<div class="flex flex-col gap-1">
|
|
||||||
<a href="/almanach/{{ $entry.MusenalmID }}" class="font-bold no-underline hover:text-slate-900">
|
|
||||||
{{- $entry.PreferredTitle -}}
|
|
||||||
</a>
|
|
||||||
{{- if $entryTypes -}}
|
|
||||||
<div class="text-xs text-gray-800">
|
|
||||||
{{- range $i, $t := $entryTypes -}}
|
|
||||||
{{- if $i }}, {{ end -}}{{ $t -}}
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
<span class="text-xs text-gray-500">{{ $entry.Year }}</span>
|
|
||||||
</li>
|
|
||||||
{{- end -}}
|
|
||||||
</ul>
|
|
||||||
{{- else -}}
|
|
||||||
<div class="italic text-gray-500">Keine Bände verknüpft.</div>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
<div class="tab-list-panel text-sm text-gray-800 max-h-96 overflow-auto pr-1 pl-0 ml-0
|
|
||||||
self-stretch">
|
|
||||||
{{- if $model.result.Contents -}}
|
|
||||||
<ul class="flex flex-col gap-3 pl-0 pr-0 m-0 ml-0 list-none">
|
|
||||||
{{- range $content := $model.result.Contents -}}
|
|
||||||
{{- $entry := index $model.result.ContentEntries $content.Entry -}}
|
|
||||||
{{- $types := index $model.result.ContentTypes $content.Id -}}
|
|
||||||
<li class="flex flex-col gap-1 ml-0 pl-0 odd:bg-stone-100 px-1">
|
|
||||||
<a href="/beitrag/{{ $content.MusenalmID }}" class="no-underline hover:text-slate-900 font-semibold">
|
|
||||||
{{- if $content.PreferredTitle -}}{{ $content.PreferredTitle }}{{- else -}}Inhalt #{{ $content.MusenalmID }}{{- end -}}
|
|
||||||
</a>
|
|
||||||
<div class="text-xs text-gray-800 ">
|
|
||||||
{{- if $types -}}
|
|
||||||
<span>
|
|
||||||
{{- range $i, $t := $types -}}
|
|
||||||
{{- if $i }}, {{ end -}}{{ $t -}}
|
|
||||||
{{- end -}}
|
|
||||||
</span>
|
|
||||||
{{- end -}}
|
|
||||||
{{- if $entry -}}, in:
|
|
||||||
<span><a href="/almanach/{{ $entry.MusenalmID }}" class="no-underline hover:text-slate-900">{{ $entry.PreferredTitle }}</a></span>
|
|
||||||
{{- end -}}
|
|
||||||
{{- if $content.MusenalmPagination -}}
|
|
||||||
<span>Seite: {{ $content.MusenalmPagination }}</span>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{- end -}}
|
|
||||||
</ul>
|
|
||||||
{{- else -}}
|
|
||||||
<div class="italic text-gray-500">Keine Inhalte verknüpft.</div>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
</tab-list>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,15 +5,15 @@
|
|||||||
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
<div class="flex container-normal bg-slate-100 mx-auto px-8">
|
||||||
<div class="flex flex-row w-full justify-between">
|
<div class="flex flex-row w-full justify-between">
|
||||||
<div class="flex flex-col justify-end-safe flex-2/5">
|
<div class="flex flex-col justify-end-safe flex-2/5">
|
||||||
|
<div class="mb-3">
|
||||||
|
<i class="ri-book-shelf-fill"></i> Reihe
|
||||||
|
</div>
|
||||||
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
<h1 class="text-2xl w-full font-bold text-slate-900 mb-4">
|
||||||
{{- if $model.is_new -}}
|
{{- if $model.is_new -}}
|
||||||
Reihe
|
Neue Reihe anlegen
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $series.Title -}}
|
{{- $series.Title -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $model.is_new -}}
|
|
||||||
<span class="ml-2 text-sm font-semibold text-amber-700 bg-amber-100 px-2 py-0.5 rounded-xs align-middle">Neu</span>
|
|
||||||
{{- end -}}
|
|
||||||
</h1>
|
</h1>
|
||||||
{{- if not $model.is_new -}}
|
{{- if not $model.is_new -}}
|
||||||
<div class="flex flex-row gap-x-3">
|
<div class="flex flex-row gap-x-3">
|
||||||
@@ -125,12 +125,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $series.Pseudonyms -}}</textarea>
|
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $series.Pseudonyms -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
{{ template "_annotation_field" (Arr $series.Annotation "Annotation") }}
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="annotation" class="inputlabel">Annotation</label>
|
|
||||||
</div>
|
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $series.Annotation -}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="inputlabelrow">
|
<div class="inputlabelrow">
|
||||||
<label for="references" class="inputlabel">Nachweise</label>
|
<label for="references" class="inputlabel">Nachweise</label>
|
||||||
@@ -146,91 +141,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||||
<div class="inputwrapper">
|
{{ template "_status_edit" (Arr $series "status" "status") }}
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="status" class="inputlabel">Status</label>
|
|
||||||
</div>
|
|
||||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
|
||||||
<option value="Unknown" {{ if eq $series.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
|
||||||
<option value="ToDo" {{ if eq $series.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
|
||||||
<option value="Review" {{ if eq $series.EditState "Review" }}selected{{ end }}>Überprüfen</option>
|
|
||||||
<option value="Seen" {{ if eq $series.EditState "Seen" }}selected{{ end }}>Autopsiert</option>
|
|
||||||
<option value="Edited" {{ if eq $series.EditState "Edited" }}selected{{ end }}>Vollständig Erfasst</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="inputwrapper">
|
|
||||||
<div class="inputlabelrow">
|
|
||||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
|
||||||
</div>
|
|
||||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $series.Comment -}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<tab-list
|
{{ template "_linked_items" (Arr $model.result.Entries $model.result.Contents nil $model.result.ContentTypes $model.result.ContentEntries) }}
|
||||||
data-default-index="{{ if gt (len $model.result.Entries) 0 }}0{{ else if gt (len $model.result.Contents) 0 }}1{{ end }}"
|
|
||||||
data-disabled-indices="{{ if and (eq (len $model.result.Entries) 0) (eq (len $model.result.Contents) 0) }}0,1{{ else if eq (len $model.result.Entries) 0 }}0{{ else if eq (len $model.result.Contents) 0 }}1{{ end }}">
|
|
||||||
<div class="flex items-center gap-3 text-sm font-bold text-gray-700">
|
|
||||||
<div class="tab-list-head flex items-center gap-2">
|
|
||||||
<i class="ri-book-2-line"></i>
|
|
||||||
<span>Verknüpfte Bände</span>
|
|
||||||
<span class="text-xs bg-stone-200 text-gray-700 px-2 py-0.5 rounded-sm">{{ len $model.result.Entries }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="tab-list-head flex items-center gap-2">
|
|
||||||
<i class="ri-article-line"></i>
|
|
||||||
<span>Verknüpfte Inhalte</span>
|
|
||||||
<span class="text-xs bg-stone-200 text-gray-700 px-2 py-0.5 rounded-sm">{{ len $model.result.Contents }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr class="border-slate-400 mt-2 mb-3" />
|
|
||||||
<div class="tab-list-panel text-sm text-gray-700 max-h-96 overflow-auto pr-1 pl-0 ml-0">
|
|
||||||
{{- if $model.result.Entries -}}
|
|
||||||
<ul class="flex flex-col gap-2 pl-0 pr-0 m-0 ml-0 list-none">
|
|
||||||
{{- range $entry := $model.result.Entries -}}
|
|
||||||
<li class="flex items-baseline justify-between gap-3 ml-0 pl-0">
|
|
||||||
<a href="/almanach/{{ $entry.MusenalmID }}" class="no-underline hover:text-slate-900">
|
|
||||||
{{- $entry.PreferredTitle -}}
|
|
||||||
</a>
|
|
||||||
<span class="text-xs text-gray-500">{{ $entry.Year }}</span>
|
|
||||||
</li>
|
|
||||||
{{- end -}}
|
|
||||||
</ul>
|
|
||||||
{{- else -}}
|
|
||||||
<div class="italic text-gray-500">Keine Bände verknüpft.</div>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
<div class="tab-list-panel text-sm text-gray-700 max-h-96 overflow-auto pr-1 pl-0 ml-0">
|
|
||||||
{{- if $model.result.Contents -}}
|
|
||||||
<ul class="flex flex-col gap-3 pl-0 pr-0 m-0 ml-0 list-none">
|
|
||||||
{{- range $content := $model.result.Contents -}}
|
|
||||||
{{- $entry := index $model.result.ContentEntries $content.Entry -}}
|
|
||||||
{{- $types := index $model.result.ContentTypes $content.Id -}}
|
|
||||||
<li class="flex flex-col gap-1 ml-0 pl-0">
|
|
||||||
<a href="/beitrag/{{ $content.MusenalmID }}" class="no-underline hover:text-slate-900 font-semibold">
|
|
||||||
{{- if $content.PreferredTitle -}}{{ $content.PreferredTitle }}{{- else -}}Inhalt #{{ $content.MusenalmID }}{{- end -}}
|
|
||||||
</a>
|
|
||||||
<div class="text-xs text-gray-600 flex flex-wrap gap-3">
|
|
||||||
{{- if $entry -}}
|
|
||||||
<span>Band: <a href="/almanach/{{ $entry.MusenalmID }}" class="no-underline hover:text-slate-900">{{ $entry.PreferredTitle }}</a></span>
|
|
||||||
{{- end -}}
|
|
||||||
{{- if $types -}}
|
|
||||||
<span>
|
|
||||||
Typ:
|
|
||||||
{{- range $i, $t := $types -}}
|
|
||||||
{{- if $i }}, {{ end -}}{{ $t -}}
|
|
||||||
{{- end -}}
|
|
||||||
</span>
|
|
||||||
{{- end -}}
|
|
||||||
{{- if $content.MusenalmPagination -}}
|
|
||||||
<span>Seite: {{ $content.MusenalmPagination }}</span>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{- end -}}
|
|
||||||
</ul>
|
|
||||||
{{- else -}}
|
|
||||||
<div class="italic text-gray-500">Keine Inhalte verknüpft.</div>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
|
||||||
</tab-list>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user