mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 09:15:33 +00:00
Nach Typ suchen
This commit is contained in:
@@ -64,6 +64,7 @@ func (p *SuchePage) Setup(router *router.Router[*core.RequestEvent], app core.Ap
|
|||||||
|
|
||||||
data := make(map[string]interface{})
|
data := make(map[string]interface{})
|
||||||
data["parameters"] = allparas
|
data["parameters"] = allparas
|
||||||
|
data["types"] = dbmodels.MUSENALM_TYPE_VALUES
|
||||||
return engine.Response200(e, p.Template+paras.Collection+"/", data, p.Layout)
|
return engine.Response200(e, p.Template+paras.Collection+"/", data, p.Layout)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -85,6 +86,7 @@ func (p *SuchePage) SearchBeitraegeRequest(app core.App, engine *templating.Engi
|
|||||||
data["filters"] = filterparams
|
data["filters"] = filterparams
|
||||||
data["parameters"] = params
|
data["parameters"] = params
|
||||||
data["result"] = result
|
data["result"] = result
|
||||||
|
data["types"] = dbmodels.MUSENALM_TYPE_VALUES
|
||||||
return engine.Response200(e, p.Template+params.Collection+"/", data, p.Layout)
|
return engine.Response200(e, p.Template+params.Collection+"/", data, p.Layout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func NewSearchParameters(e *core.RequestEvent, p Parameters) (*SearchParameters,
|
|||||||
year := e.Request.URL.Query().Get(SEARCH_PARAM_YEAR) == "on"
|
year := e.Request.URL.Query().Get(SEARCH_PARAM_YEAR) == "on"
|
||||||
|
|
||||||
yearstring := e.Request.URL.Query().Get(SEARCH_PARAM_YEAR + "string")
|
yearstring := e.Request.URL.Query().Get(SEARCH_PARAM_YEAR + "string")
|
||||||
typestring := e.Request.URL.Query().Get(BEITRAEGE_PARAM_TYPE)
|
typestring := e.Request.URL.Query().Get(BEITRAEGE_PARAM_TYPE + "string")
|
||||||
|
|
||||||
series := e.Request.URL.Query().Get(BAENDE_PARAM_SERIES) == "on"
|
series := e.Request.URL.Query().Get(BAENDE_PARAM_SERIES) == "on"
|
||||||
seriesstring := e.Request.URL.Query().Get(BAENDE_PARAM_SERIES + "string")
|
seriesstring := e.Request.URL.Query().Get(BAENDE_PARAM_SERIES + "string")
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -57,7 +57,7 @@
|
|||||||
{{ $model.result.Agent.BiographicalData }}
|
{{ $model.result.Agent.BiographicalData }}
|
||||||
</span>
|
</span>
|
||||||
{{- if $model.result.Agent.References }}
|
{{- if $model.result.Agent.References }}
|
||||||
<span class="inline-block bg-stone-200 px-2 mx-1 font-sans text-base rounded ">
|
<span class="inline-block bg-stone-200 px-2 mx-1 font-sans text-sm rounded align-middle">
|
||||||
{{ $model.result.Agent.References }}
|
{{ $model.result.Agent.References }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
{{- range $i, $p := $arr -}}
|
{{- range $i, $p := $arr -}}
|
||||||
<a
|
<a
|
||||||
href="/personen/?letter={{- Upper (First $model.result.Agent.Name) -}}&filter={{ Lower $p }}#{{- $model.result.Agent.Id -}}"
|
href="/personen/?letter={{- Upper (First $model.result.Agent.Name) -}}&filter={{ Lower $p }}#{{- $model.result.Agent.Id -}}"
|
||||||
class="inline-block bg-slate-200 px-2 text-base font-sans rounded mx-1
|
class="inline-block bg-slate-200 px-2 text-sm font-sans rounded mx-1 align-middle
|
||||||
hover:text-slate-900 no-underline">
|
hover:text-slate-900 no-underline">
|
||||||
{{- $p -}}
|
{{- $p -}}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -45,6 +45,8 @@
|
|||||||
Year string
|
Year string
|
||||||
OnlyScans bool
|
OnlyScans bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.types []string
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{ $isAlm := false }}
|
{{ $isAlm := false }}
|
||||||
@@ -109,7 +111,7 @@
|
|||||||
name="persons"
|
name="persons"
|
||||||
id="persons"
|
id="persons"
|
||||||
{{ if or $isBase $isPerson -}}checked{{- end -}} />
|
{{ if or $isBase $isPerson -}}checked{{- end -}} />
|
||||||
<label for="person">Personen & Pseudonyme</label>
|
<label for="persons">Personen & Pseudonyme</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="selectgroup-option">
|
<div class="selectgroup-option">
|
||||||
<input
|
<input
|
||||||
@@ -177,6 +179,17 @@
|
|||||||
name="annotationsstring"
|
name="annotationsstring"
|
||||||
id="annotationsstring"
|
id="annotationsstring"
|
||||||
value="{{ $model.parameters.AnnotationsString }}" />
|
value="{{ $model.parameters.AnnotationsString }}" />
|
||||||
|
<label for="typestring">Kategorie</label>
|
||||||
|
<select name="typestring" id="typestring" class="w-full">
|
||||||
|
<option value="">Alle</option>
|
||||||
|
{{- range $i, $t := $model.types -}}
|
||||||
|
<option
|
||||||
|
value="{{ $t }}"
|
||||||
|
{{ if eq $t $model.parameters.TypeString -}}selected{{- end -}}>
|
||||||
|
{{ $t }}
|
||||||
|
</option>
|
||||||
|
{{- end -}}
|
||||||
|
</select>
|
||||||
<button id="submitbutton" type="submit" class="">Suchen</button>
|
<button id="submitbutton" type="submit" class="">Suchen</button>
|
||||||
<a href="/suche/beitraege" class="whitespace-nowrap"
|
<a href="/suche/beitraege" class="whitespace-nowrap"
|
||||||
><i class="ri-arrow-left-long-line"></i> Zurück zur einfachen Suche</a
|
><i class="ri-arrow-left-long-line"></i> Zurück zur einfachen Suche</a
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
let fieldset = document.querySelector("fieldset.selectgroup");
|
let fieldset = document.querySelector("fieldset.selectgroup");
|
||||||
|
if (fieldset) {
|
||||||
let checkboxes = Array.from(fieldset.querySelectorAll('input[type="checkbox"]'));
|
let checkboxes = Array.from(fieldset.querySelectorAll('input[type="checkbox"]'));
|
||||||
fieldset.addEventListener("change", (event) => {
|
fieldset.addEventListener("change", (event) => {
|
||||||
let target = event.target;
|
let target = event.target;
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const form = document.getElementById("simplesearchform");
|
const form = document.getElementById("simplesearchform");
|
||||||
let submitBtn = null;
|
let submitBtn = null;
|
||||||
|
|||||||
@@ -447,6 +447,10 @@
|
|||||||
@apply w-full px-2 py-1 border-zinc-600 border col-span-9;
|
@apply w-full px-2 py-1 border-zinc-600 border col-span-9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#extendedsearchcolumn select {
|
||||||
|
@apply w-full px-2 py-1 border-zinc-600 border col-span-9;
|
||||||
|
}
|
||||||
|
|
||||||
#extendedsearchcolumn button {
|
#extendedsearchcolumn button {
|
||||||
@apply col-start-4 col-span-4 py-2;
|
@apply col-start-4 col-span-4 py-2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user