mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-30 17:55:31 +00:00
Abschluss einfache Inhaltsuche
This commit is contained in:
@@ -140,14 +140,15 @@
|
||||
|
||||
{{- template "_fieldscript" -}}
|
||||
{{- if $model.parameters.IsBeitraegeSearch -}}
|
||||
<div class="cotents" id="searchresult">
|
||||
<div class="cotents" id="searchresults">
|
||||
{{- if $model.result.Hits -}}
|
||||
{{ template "_filterlist" $model }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
<div class="container-normal">
|
||||
<div class="container-normal" id="subresults">
|
||||
{{ template "tablehead" $model }}
|
||||
{{ template "pills" $model }}
|
||||
{{- if $model.result.Hits -}}
|
||||
<div class="mt-8" id="almanachcontents">
|
||||
{{- range $_, $hit := $model.result.Hits -}}
|
||||
|
||||
38
views/routes/suche/beitraege/pills.gohtml
Normal file
38
views/routes/suche/beitraege/pills.gohtml
Normal file
@@ -0,0 +1,38 @@
|
||||
{{ $model := . }}
|
||||
|
||||
{{- $isFiltered := or $model.filters.Agent $model.filters.Year $model.filters.Type
|
||||
$model.filters.OnlyScans
|
||||
-}}
|
||||
|
||||
{{- if $isFiltered -}}
|
||||
<div class="flex flex-row gap-x-3" id="searchpills">
|
||||
{{- if $model.filters.Agent -}}
|
||||
<filter-pill
|
||||
data-queryparam="agentfilter"
|
||||
data-value="{{ $model.filters.Agent }}"
|
||||
data-text="Person">
|
||||
</filter-pill>
|
||||
{{- end -}}
|
||||
{{- if $model.filters.Year -}}
|
||||
<filter-pill
|
||||
data-queryparam="yearfilter"
|
||||
data-value="{{ $model.filters.Year }}"
|
||||
data-text="Jahr">
|
||||
</filter-pill>
|
||||
{{- end -}}
|
||||
{{- if $model.filters.Type -}}
|
||||
<filter-pill
|
||||
data-queryparam="typefilter"
|
||||
data-value="{{ $model.filters.Type }}"
|
||||
data-text="Typ">
|
||||
</filter-pill>
|
||||
{{- end -}}
|
||||
{{- if $model.filters.OnlyScans -}}
|
||||
<filter-pill
|
||||
data-queryparam="onlyscans"
|
||||
data-value="{{ $model.filters.OnlyScans }}"
|
||||
data-text="Nur Digitalisate">
|
||||
</filter-pill>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -63,11 +63,12 @@
|
||||
id="onlyscans"
|
||||
name="onlyscans"
|
||||
autocomplete="off"
|
||||
hx-get="{{- $model.parameters.ToQueryParamsBeitraege -}}"
|
||||
hx-get="{{- $model.parameters.ToQueryParamsBeitraege -}} {{- $model.filters.ToQueryParamsWOScans -}}"
|
||||
trigger="change"
|
||||
hx-push-url="true"
|
||||
hx-select="main"
|
||||
hx-target="main"
|
||||
hx-select="#searchresults"
|
||||
hx-target="#searchresults"
|
||||
hx-swap="outerHTML"
|
||||
{{ if $model.filters.OnlyScans -}}checked{{- end -}} />
|
||||
|
||||
<label
|
||||
@@ -82,11 +83,12 @@
|
||||
name="sort"
|
||||
id="sort"
|
||||
autocomplete="off"
|
||||
hx-get="{{- $model.parameters.ToQueryParamsBeitraege -}}"
|
||||
hx-get="{{- $model.parameters.ToQueryParamsBeitraege -}}{{- $model.filters.ToQueryParams -}}"
|
||||
trigger="change"
|
||||
hx-push-url="true"
|
||||
hx-select="main"
|
||||
hx-target="main">
|
||||
hx-select="#subresults"
|
||||
hx-target="#subresults"
|
||||
hx-swap="outerHTML show:window:top">
|
||||
<option
|
||||
value="year"
|
||||
{{ if eq $model.parameters.Sort "year" -}}
|
||||
|
||||
Reference in New Issue
Block a user