mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 09:15:33 +00:00
106 lines
2.9 KiB
Plaintext
106 lines
2.9 KiB
Plaintext
{{ $model := . }}
|
|
|
|
{{ $isAlm := false }}
|
|
{{ $isTitle := false }}
|
|
{{ $isYear := false }}
|
|
{{ $isPerson := false }}
|
|
{{ $isAnnotation := false }}
|
|
{{ $isIncipit := false }}
|
|
{{ $isEntry := false }}
|
|
|
|
{{- $isAlm = $model.parameters.AlmString -}}
|
|
{{- $isTitle = or $model.parameters.Title $model.parameters.TitleString -}}
|
|
{{- $isYear = or $model.parameters.Year $model.parameters.YearString -}}
|
|
{{- $isPerson = or $model.parameters.Persons $model.parameters.PersonsString -}}
|
|
{{- $isAnnotation = or $model.parameters.Annotations $model.parameters.AnnotationsString -}}
|
|
{{- $isIncipit = or $model.parameters.Incipit $model.parameters.IncipitString -}}
|
|
{{- $isEntry = or $model.parameters.Entry $model.parameters.EntryString -}}
|
|
|
|
{{- $isBase := not (or $isTitle $isYear $isPerson $isAnnotation $isIncipit $isEntry) -}}
|
|
|
|
|
|
<div class="border-b border-zinc-300 flex flex-row justify-between">
|
|
<div class="flex flex-row gap-x-2">
|
|
{{ if $model.parameters.Query -}}
|
|
<div>Suche nach <b>»{{ $model.parameters.Query }}«</b></div>
|
|
<div>·</div>
|
|
{{- end -}}
|
|
{{- if $isAlm -}}
|
|
<div>Inhaltsnummer <b>»{{ $model.parameters.AlmString }}«</b></div>
|
|
<div>·</div>
|
|
{{- end -}}
|
|
<div>
|
|
<i class="ri-book-line"></i>
|
|
{{ if eq $model.result.Count 1 -}}
|
|
Ein Beitrag
|
|
{{ else -}}
|
|
{{ $model.result.Count }} Beiträge
|
|
{{- end }}
|
|
in
|
|
{{ if eq ($model.result.Entries | len) 1 -}}
|
|
einem Band
|
|
{{ else -}}
|
|
{{ $model.result.Entries | len }} Bänden
|
|
{{- end -}}
|
|
</div>
|
|
|
|
{{- if gt (len $model.result.Pages) 1 }}
|
|
<div>·</div>
|
|
{{- end -}}
|
|
{{ template "pagination" $model }}
|
|
</div>
|
|
|
|
{{- if not $isAlm -}}
|
|
<div>
|
|
<label
|
|
for="onlyscans"
|
|
class="align-baseline h-min self-end pb-1 mr-1 text-sm font-sans text-stone-700">
|
|
Nur Digitalisate
|
|
</label>
|
|
<input
|
|
class="mr-4"
|
|
type="checkbox"
|
|
id="onlyscans"
|
|
name="onlyscans"
|
|
autocomplete="off"
|
|
hx-get="{{- $model.parameters.ToQueryParamsBeitraege -}} {{- $model.filters.ToQueryParamsWOScans -}}"
|
|
trigger="change"
|
|
hx-push-url="true"
|
|
hx-select="#searchresults"
|
|
hx-target="#searchresults"
|
|
hx-swap="outerHTML"
|
|
{{ if $model.filters.OnlyScans -}}checked{{- end -}} />
|
|
|
|
<label
|
|
for="sort"
|
|
class="align-baseline h-min self-end pb-1 mr-2 text-sm font-sans
|
|
text-stone-700"
|
|
>Sortierung</label
|
|
>
|
|
|
|
<select
|
|
class="h-min pb-1 border-b-4 border-zinc-300 px-1.5"
|
|
name="sort"
|
|
id="sort"
|
|
autocomplete="off"
|
|
hx-get="{{- $model.parameters.ToQueryParamsBeitraege -}}{{- $model.filters.ToQueryParams -}}"
|
|
trigger="change"
|
|
hx-push-url="true"
|
|
hx-select="#subresults"
|
|
hx-target="#subresults"
|
|
hx-swap="outerHTML show:window:top">
|
|
<option
|
|
value="year"
|
|
{{ if eq $model.parameters.Sort "year" -}}
|
|
selected
|
|
{{- end -}}>
|
|
Jahr
|
|
</option>
|
|
<option value="entry" {{ if eq $model.parameters.Sort "entry" -}}selected{{- end -}}>
|
|
Bände A-Z
|
|
</option>
|
|
</select>
|
|
</div>
|
|
{{- end -}}
|
|
</div>
|