mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-30 01:35:32 +00:00
Notfifications /reihen
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
{{ $model := . }}
|
||||
|
||||
{{ if $model.letters }}
|
||||
<div
|
||||
class="flex flex-row border-b px-3 border-zinc-300 items-end min-h-14"
|
||||
x-data="{ search : '{{ $model.search }}' }">
|
||||
<div class="flex flex-row border-b px-3 border-zinc-300 items-end min-h-14">
|
||||
<div id="alphabet" class="alphabet flex flex-row items-end text-xl">
|
||||
{{ range $id, $r := .letters }}
|
||||
<a
|
||||
@@ -23,10 +21,7 @@
|
||||
|
||||
<div class="flex-grow"></div>
|
||||
|
||||
<div
|
||||
class="min-w-[22.5rem] max-w-96 flex flex-row bg-stone-50 relative"
|
||||
:class="search ?
|
||||
'activesearch' : ''">
|
||||
<div class="min-w-[22.5rem] max-w-96 flex flex-row bg-stone-50 relative">
|
||||
<div class="pb-0">
|
||||
<i class="ri-search-line"></i><i class="-ml-0.5 inline-block ri-arrow-right-s-line"></i>
|
||||
</div>
|
||||
@@ -36,14 +31,16 @@
|
||||
type="search"
|
||||
name="search"
|
||||
value="{{ $model.search }}"
|
||||
x-model="search"
|
||||
placeholder="Almanach-Nr oder Suchbegriff"
|
||||
x-model="search"
|
||||
hx-get=""
|
||||
hx-trigger="input changed delay=1000ms, keyup[key=='Enter']"
|
||||
hx-trigger="input changed delay=500ms, keyup[key=='Enter']"
|
||||
hx-sync="this:replace"
|
||||
hx-select="#searchcontent"
|
||||
hx-target="#searchcontent"
|
||||
autocomplete="off" />
|
||||
autocomplete="off"
|
||||
{{ if $model.active }}autofocus="true"{{ end }}
|
||||
{{ if $model.search }}disabled="true"{{ end }} />
|
||||
</div>
|
||||
<div id="permalink" class="font-serif ml-3 min-w-7 pb-1">
|
||||
<a
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{{ $model := index . 0 }}
|
||||
{{ $r := index . 1 }}
|
||||
{{ $showidseries := index . 2 }}
|
||||
{{ $markar := index . 3 }}
|
||||
{{ $r := index . 0 }}
|
||||
{{ $entries := index . 1 }}
|
||||
{{ $relations := index . 2 }}
|
||||
{{ $showidseries := index . 3 }}
|
||||
{{ $markar := index . 4 }}
|
||||
|
||||
{{ $bds := index $model.relations $r.Id }}
|
||||
{{ $bds := index $relations $r.Id }}
|
||||
|
||||
|
||||
<div class="flex flex-row mb-1.5">
|
||||
@@ -18,7 +19,7 @@
|
||||
<div class="font-sans text-sm px-2 py-1 bg-stone-100 searchable my-0.5">
|
||||
Almanach-Nr.
|
||||
<span class="reihen-text">
|
||||
{{ (index $model.entries
|
||||
{{ (index $entries
|
||||
$rel.Entry).MusenalmID
|
||||
}}
|
||||
</span>
|
||||
@@ -41,20 +42,7 @@
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="ml-3">
|
||||
{{ if $bds }}
|
||||
{{ range $_, $rel := $bds }}
|
||||
{{ $bd := index $model.entries $rel.Entry }}
|
||||
{{ if $bd }}
|
||||
<a href="/almanach/{{ $bd.MusenalmID }}">
|
||||
{{ if ne $bd.Year 0 }}
|
||||
{{ $bd.Year }}
|
||||
{{ else }}
|
||||
[o.J.]
|
||||
{{ end }} </a
|
||||
> 
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ template "_reiherelations" (Arr $r $bds $entries false) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
22
views/routes/components/_reiherelations.gohtml
Normal file
22
views/routes/components/_reiherelations.gohtml
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ $reihe := index . 0 }}
|
||||
{{ $rels := index . 1 }}
|
||||
{{ $entries := index . 2 }}
|
||||
{{ $shownos := index . 3 }}
|
||||
|
||||
{{ if $rels }}
|
||||
{{ range $_, $rel := $rels }}
|
||||
{{ $bd := index $entries $rel.Entry }}
|
||||
{{ if $bd }}
|
||||
<a href="/almanach/{{ $bd.MusenalmID }}">
|
||||
{{ if ne $bd.Year 0 }}
|
||||
{{ $bd.Year }}
|
||||
{{ else }}
|
||||
[o.J.]
|
||||
{{ end }} </a
|
||||
> 
|
||||
{{ if $shownos }}
|
||||
{{ $bd.MusenalmID }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user