Abschluss Personen & Startseite. Viele BUGFIXes

This commit is contained in:
Simon Martens
2025-02-28 16:54:49 +01:00
parent db8c08a0fc
commit 4581f34dd9
132 changed files with 333 additions and 86 deletions

View File

@@ -34,7 +34,8 @@
{{- range $i, $s := $model.result.Series -}}
<div>
<div class="{{ if $i -}}opacity-0 pointer-events-none select-none{{- end -}}">
Reihentitel <i class="ri-arrow-right-wide-line"></i>
<a href="/reihen/?letter={{- First $s.Title -}}" class="">Reihen</a>
<i class="ri-arrow-right-wide-line"></i>
</div>
<div>
<a href="/reihe/{{- $s.MusenalmID -}}">{{ $s.Title }}</a>

View File

@@ -22,8 +22,10 @@
{{- end -}}
<div class="content flex flex-row font-serif" id="{{- $content.Id -}}">
{{- if not $singleView -}}
<div
class="content flex flex-row font-serif {{ if or $entrySubView $singleView -}}text-lg{{- end -}}"
id="{{- $content.MusenalmID -}}">
{{- if and (not $singleView) (not $entrySubView) -}}
<div class="w-36 shrink-0 grow-0 flex flex-col items-end columnone">
{{- if $content.Extent -}}
<div>
@@ -126,16 +128,27 @@
{{- end -}}
</div>
<div class="w-24 shrink-0 grow-0 items-end flex flex-col columnfour">
<div class="w-24 shrink-0 grow-0 items-end flex flex-col gap-y-1 columnfour">
<div class="font-sans text-sm bg-stone-100 px-2 font-bold py-0.5 rounded w-max">
<span class="text-xs font-normal pr-1">NR</span>
{{ $content.MusenalmID -}}
</div>
<div class="font-sans py-0.5 text-xs">
{{- if $entrySubView -}}
{{- if $content.MusenalmType -}}
<div class="flex flex-col gap-y-1 items-end">
{{- range $_, $t := $content.MusenalmType -}}
<div class="font-sans text-sm bg-stone-100 px-1 py-0.5 rounded w-max font-bold">
{{- $t -}}
</div>
{{- end -}}
</div>
{{- end -}}
{{- end -}}
<div class="font-sans py-0.5 text-sm">
<a
href="/beitrag/{{ $content.MusenalmID }}"
class="no-underline rounded bg-stone-100 px-1.5">
Einzelansicht <i class="ri-links-line"></i>
Link <i class="ri-links-line"></i>
</a>
</div>
</div>

View File

@@ -27,9 +27,9 @@
</div>
{{ end }}
{{ end }}
<div class="font-sans py-0.5 text-xs">
<div class="font-sans py-0.5 text-sm">
<a href="/reihe/{{ $r.MusenalmID }}" class="no-underline rounded bg-stone-100 px-1.5">
<i class="ri-links-line"></i> Permalink
<i class="ri-links-line"></i> Link
</a>
</div>
</div>

View File

@@ -19,6 +19,23 @@
{{- else -}}
[o.J.]
{{- end -}}
{{- if not $bd.TitleStmt -}}
<tool-tip position="right" class="inline">
<i class="ri-forbid-2-line"></i>
<div class="data-tip">Keine nähere Erfassung</div>
</tool-tip>
{{- else if eq $bd.EditState "Edited" -}}
<tool-tip position="right" class="inline">
<i class="ri-checkbox-circle-line"></i>
<div class="data-tip">Mit erfassten Beiträgen</div>
</tool-tip>
{{- else -}}
<tool-tip position="right" class="inline">
<i class="ri-information-line"></i>
<div class="data-tip">Mit genaueren Titelangaben</div>
</tool-tip>
{{- end -}}
</div>
{{- if not (eq $rel.Type "Bevorzugter Reihentitel") -}}
<div class="text-xs whitespace-nowrap">

View File

@@ -20,7 +20,9 @@
<div id="breadcrumbs">
<div>
<div>
Personen und Körperschaften <i class="ri-arrow-right-wide-line"></i> Einzelansicht
<a href="/personen?letter={{- First $model.result.Agent.Name -}}"
>Personen &amp; Körperschaften</a
>
<i class="ri-arrow-right-wide-line"></i> <b>{{ $model.result.Agent.Name }}</b>
</div>
<div class="backbutton">
@@ -72,21 +74,34 @@
{{- if .result.BResult -}}
<div class="container-normal flex flex-col font-serif mt-7 gap-y-6">
<h2 class="font-bold">
<i class="ri-information-2-line"></i>
{{ if eq $model.result.LenEntries 1 }}
Ein Band
{{- else }}
{{- $model.result.LenEntries }}
Bände
{{- end }}
in
{{- if eq $model.result.LenSeries 1 }}
einer Reihe
{{- else }}
{{ $model.result.LenSeries }} Reihen
{{- end }}
gefunden:
<h2 class="border-b font-sans flex flex-row justify-between items-end">
<div>
<i class="ri-book-line"></i>
{{ if eq $model.result.LenEntries 1 }}
<b>Ein Band</b>
{{- else }}
<b>{{- $model.result.LenEntries }}</b>
Bände
{{- end }}
in
{{- if eq $model.result.LenSeries 1 }}
<b>einer Reihe</b>
{{- else }}
<b>{{ $model.result.LenSeries }}</b> Reihen
{{- end }}
</div>
{{- if len $model.result.CResult -}}
<div class="flex flex-row bg-stone-100 px-2 py-1 items-center">
<a class="" href="#almanachcontents"> Zu den Beiträgen</a>
<div
class="inline-block mx-2 text-xs bg-slate-800 text-white font-bold px-1.5 py-0.5
rounded">
{{- $model.result.LenContents -}}
</div>
<i class="ri-arrow-down-double-line"></i>
</div>
{{- end -}}
</h2>
{{ range $id, $r := .result.BResult }}
<div class="grow-0 max-w-[48rem]">
@@ -110,18 +125,47 @@
{{ end }}
{{- if len $model.result.CResult -}}
<div class="container-normal mt-0 pt-0" id="almanachcontents">
<div class="container-normal mt-16 pt-0" id="almanachcontents">
<div class="font-sans border-b">
<i class="ri-article-line"></i>
{{ if eq $model.result.LenContents 1 }}
<b>Ein Beitrag</b>
{{- else }}
<b>{{- $model.result.LenContents }}</b>
Beiträge
{{- end }}
in
{{- if eq (len $model.result.CResult) 1 }}
<b>einem Band</b>
{{- else }}
<b>{{ len $model.result.CResult }}</b> Bänden
{{- end }}
</div>
<div class="mt-8">
{{- range $_, $e := $model.result.CResult -}}
<div class="font-serif font-bold border-b pb-0.5 mb-2">{{ $e.PreferredTitle }}</div>
{{- $contents := index $model.result.Contents $e.Id -}}
<div class="mb-7">
{{- range $i, $c := $contents -}}
{{- $rels := index $model.result.ContentsAgents $c.Id -}}
{{- template "_content" Arr $c $e $rels $model.result.Agents false true -}}
{{- end -}}
</div>
{{- end -}}
<tab-list>
{{- range $_, $e := $model.result.CResult -}}
{{- $contents := index $model.result.Contents $e.Id -}}
<div
class="font-serif flex flex-row justify-between hover:text-slate-800 text-stone-600
font-bold border-b pb-0.5 mb-2 tab-list-head items-end">
<div>
{{ $e.PreferredTitle }}
<i class="ri-arrow-right-s-fill show-closed"></i>
<i class="ri-arrow-down-s-fill show-opened"></i>
</div>
<div
class="inline-block font-sans bg-slate-800 text-white h-max text-sm px-1.5 rounded">
{{- len $contents -}}
</div>
</div>
<div class="mb-7 hidden tab-list-panel">
{{- range $i, $c := $contents -}}
{{- $rels := index $model.result.ContentsAgents $c.Id -}}
{{- template "_content" Arr $c $e $rels $model.result.Agents false true -}}
{{- end -}}
</div>
{{- end -}}
</tab-list>
</div>
</div>
{{- end -}}

View File

@@ -77,12 +77,18 @@
<div class="w-28 ml-4 shrink-0 font-sans text-sm text-right flex flex-row mt-1">
{{- if (index $model.bcount $agent.Id) -}}
<div class="mr-2">
<i class="ri-book-line"></i> {{ index $model.bcount $agent.Id }}
<tool-tip position="top">
<i class="ri-book-line"></i> {{ index $model.bcount $agent.Id }}
<div class="data-tip">Bände</div>
</tool-tip>
</div>
{{- end -}}
{{- if index $model.ccount $agent.Id -}}
<div class="">
<i class="ri-article-line"></i> {{ index $model.ccount $agent.Id }}
<tool-tip position="top">
<i class="ri-article-line"></i> {{ index $model.ccount $agent.Id }}
<div class="data-tip">Beiträge</div>
</tool-tip>
</div>
{{- end -}}
</div>

View File

@@ -5,7 +5,7 @@
<div id="breadcrumbs">
<div>
<div>
Reihen <i class="ri-arrow-right-wide-line"></i> Einzelansicht
<a href="/reihen/?letter={{- First $r.Title -}}" class="">Reihen</a>
<i class="ri-arrow-right-wide-line"></i> <b>{{ $r.Title }}</b>
</div>
<div class="backbutton">

View File

@@ -77,6 +77,8 @@
<label for="almstring" class="col-span-3 align-middle hidden">Almanach-Nummer:</label>
<input
autocomplete="off"
minlength="1"
required="true"
type="search"
name="almstring"
id="almstring"
@@ -324,3 +326,40 @@
<div class="container-normal">Keine Bände gefunden.</div>
{{- end -}}
{{- end -}}
<script type="module">
const form = document.getElementById("simplesearchform");
let submitBtn = null;
if (form) {
submitBtn = form.querySelector("#submitbutton");
}
function checkValidity(f, btn) {
if (f.checkValidity()) {
btn.disabled = false;
} else {
btn.disabled = true;
}
}
if (form && submitBtn) {
checkValidity(form, submitBtn);
form.addEventListener("input", (event) => {
checkValidity(form, submitBtn);
});
}
const lookupform = document.getElementById("lookupform");
let lookupsubmitBtn = null;
if (lookupform) {
lookupsubmitBtn = lookupform.querySelector("#submitbutton");
}
if (lookupform && lookupsubmitBtn) {
checkValidity(lookupform, lookupsubmitBtn);
lookupform.addEventListener("input", (event) => {
checkValidity(lookupform, lookupsubmitBtn);
});
}
</script>

View File

@@ -4,7 +4,6 @@
<div id="searchcontrol" class="container-normal">
{{- template "_heading" $model.parameters -}}
<div id="" class="border-l border-zinc-300 px-8 py-10 relative">
{{- if not $model.parameters.Extended -}}
<form
id="searchform"
class="w-full font-serif"
@@ -38,6 +37,10 @@
<input type="checkbox" name="annotations" id="annotations" checked />
<label for="annotations">Anmerkungen</label>
</div>
<div class="selectgroup-option">
<input type="checkbox" name="year" id="year" checked />
<label for="year">Jahr</label>
</div>
</fieldset>
{{ template "_infotextsimple" true }}
</div>

View File

@@ -22,26 +22,3 @@
<i class="ri-arrow-right-long-line"></i> Erweiterte Suche
</a>
{{ end }}
<script type="module">
const form = document.getElementById("simplesearchform");
if (form) {
const submitBtn = form.getElementById("submitbutton");
}
function checkValidity() {
if (form.checkValidity()) {
submitBtn.disabled = false;
} else {
submitBtn.disabled = true;
}
}
checkValidity();
if (form && submitBtn) {
form.addEventListener("input", (event) => {
checkValidity();
});
}
</script>