Erweiterte Suche Inhalte

This commit is contained in:
Simon Martens
2025-03-02 00:39:21 +01:00
parent 0a86833a9f
commit c954afb4a1

View File

@@ -76,64 +76,110 @@
method="get" method="get"
action="/suche/beitraege" action="/suche/beitraege"
autocomplete="off"> autocomplete="off">
<div class="searchformcolumn"> {{- if not $model.parameters.Extended -}}
{{- $q := "" }} <div class="searchformcolumn">
{{- if $model.parameters.Query -}} {{- $q := "" }}
{{- $q = $model.parameters.Query -}} {{- if $model.parameters.Query -}}
{{- end -}} {{- $q = $model.parameters.Query -}}
{{ template "_searchboxsimple" Arr $model.parameters true $q }} {{- end -}}
<fieldset class="selectgroup"> {{ template "_searchboxsimple" Arr $model.parameters true $q }}
<div class="selectgroup-option"> <fieldset class="selectgroup">
<input <div class="selectgroup-option">
type="checkbox" <input
name="title" type="checkbox"
id="title" name="title"
{{ if or $isBase $isTitle -}}checked{{- end -}} /> id="title"
<label for="title">Titel</label> {{ if or $isBase $isTitle -}}checked{{- end -}} />
</div> <label for="title">Titel</label>
<div class="selectgroup-option"> </div>
<input <div class="selectgroup-option">
type="checkbox" <input
name="incipit" type="checkbox"
id="incipit" name="incipit"
{{ if or $isBase $isIncipit -}}checked{{- end -}} /> id="incipit"
<label for="incipit">Incipit</label> {{ if or $isBase $isIncipit -}}checked{{- end -}} />
</div> <label for="incipit">Incipit</label>
<div class="selectgroup-option"> </div>
<input <div class="selectgroup-option">
type="checkbox" <input
name="persons" type="checkbox"
id="persons" name="persons"
{{ if or $isBase $isPerson -}}checked{{- end -}} /> id="persons"
<label for="person">Personen &amp; Pseudonyme</label> {{ if or $isBase $isPerson -}}checked{{- end -}} />
</div> <label for="person">Personen &amp; Pseudonyme</label>
<div class="selectgroup-option"> </div>
<input <div class="selectgroup-option">
type="checkbox" <input
name="entry" type="checkbox"
id="entry" name="entry"
{{ if or $isBase $isEntry -}}checked{{- end -}} /> id="entry"
<label for="entry">Bandtitel</label> {{ if or $isBase $isEntry -}}checked{{- end -}} />
</div> <label for="entry">Bandtitel</label>
<div class="selectgroup-option"> </div>
<input <div class="selectgroup-option">
type="checkbox" <input
name="year" type="checkbox"
id="year" name="year"
{{ if or $isBase $isYear -}}checked{{- end -}} /> id="year"
<label for="year">Jahr</label> {{ if or $isBase $isYear -}}checked{{- end -}} />
</div> <label for="year">Jahr</label>
<div class="selectgroup-option"> </div>
<input <div class="selectgroup-option">
type="checkbox" <input
name="annotations" type="checkbox"
id="annotations" name="annotations"
{{ if or $isBase $isAnnotation -}}checked{{- end -}} /> id="annotations"
<label for="annotations">Anmerkungen</label> {{ if or $isBase $isAnnotation -}}checked{{- end -}} />
</div> <label for="annotations">Anmerkungen</label>
</fieldset> </div>
{{ template "_infotextsimple" true }} </fieldset>
</div> {{ template "_infotextsimple" true }}
</div>
{{- else -}}
<div id="extendedsearchcolumn" class="">
<input type="hidden" name="extended" value="true" />
<label for="titlestring">Titel</label>
<input
type="search"
name="titlestring"
id="titlestring"
value="{{ $model.parameters.TitleString }}" />
<label for="incipitstring">Incipit</label>
<input
type="search"
name="incipitstring"
id="incipitstring"
value="{{ $model.parameters.IncipitString }}" />
<label for="personsstring">Personen &amp; Verlage</label>
<input
type="search"
name="personsstring"
id="personsstring"
value="{{ $model.parameters.PersonsString }}" />
<label for="entrystring">Bandtitel</label>
<input
type="search"
name="entrystring"
id="entrystring"
value="{{ $model.parameters.PlacesString }}" />
<label for="yearstring">Jahr</label>
<input
type="search"
name="yearstring"
id="yearstring"
value="{{ $model.parameters.YearString }}" />
<label for="annotationsstring">Anmerkungen</label>
<input
type="search"
name="annotationsstring"
id="annotationsstring"
value="{{ $model.parameters.AnnotationsString }}" />
<button id="submitbutton" type="submit" class="">Suchen</button>
<a href="/suche/beitraege" class="whitespace-nowrap"
><i class="ri-arrow-left-long-line"></i> Zurück zur einfachen Suche</a
>
</div>
{{- end -}}
</form> </form>
</div> </div>
</div> </div>
@@ -191,7 +237,7 @@
let mark_instance = new Mark(elements); let mark_instance = new Mark(elements);
// INFO: we wait a little bit before marking, to settle everything // INFO: we wait a little bit before marking, to settle everything
setTimeout(() => { setTimeout(() => {
mark_instance.mark('{{ $model.parameters.AllSearchTermsBaende }}', { mark_instance.mark('{{ $model.parameters.AllSearchTermsBeitraege }}', {
"seperateWordSearch": true, "seperateWordSearch": true,
}); });
}, 200); }, 200);