mirror of
				https://github.com/Theodor-Springmann-Stiftung/musenalm.git
				synced 2025-10-31 02:05:32 +00:00 
			
		
		
		
	hot reload, search refactor begin
This commit is contained in:
		
							
								
								
									
										115
									
								
								views/routes/suche/components/_searchform.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										115
									
								
								views/routes/suche/components/_searchform.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,115 @@ | ||||
| {{ $model := . }} | ||||
| {{- $includeReferences := true -}} | ||||
| {{- $includeAnnotations := true -}} | ||||
| {{- $includeTitle := true -}} | ||||
|  | ||||
| {{- if eq $model.type "reihen" -}} | ||||
| 	{{- if $model.options -}} | ||||
| 		{{- $includeReferences = not (and $model.q (not (index $model.options "references"))) -}} | ||||
| 		{{- $includeAnnotations = not (and $model.q (not (index $model.options "annotations"))) -}} | ||||
| 		{{- $includeTitle = not (and $model.q (not (index $model.options "title"))) -}} | ||||
| 	{{- end -}} | ||||
| {{- end -}} | ||||
|  | ||||
|  | ||||
| <form | ||||
| 	id="searchform" | ||||
| 	class="w-full font-serif" | ||||
| 	method="get" | ||||
| 	action="/suche/{{- $model.type -}}" | ||||
| 	autocomplete="off"> | ||||
| 	{{- if eq $model.type "reihen" -}} | ||||
| 		<!-- INFO: Reihen --> | ||||
| 		{{- if not $model.extended -}} | ||||
| 			<div class="grid grid-cols-12 gap-y-3 w-full gap-x-4"> | ||||
| 				{{ template "searchboxsimple" Arr . false }} | ||||
| 				<fieldset class="selectgroup"> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input | ||||
| 							type="checkbox" | ||||
| 							name="title" | ||||
| 							id="title" | ||||
| 							{{ if $includeTitle -}} | ||||
| 								checked | ||||
| 							{{- end -}} /> | ||||
| 						<label for="title">Titel</label> | ||||
| 					</div> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input | ||||
| 							type="checkbox" | ||||
| 							name="references" | ||||
| 							id="references" | ||||
| 							{{ if $includeReferences -}} | ||||
| 								checked | ||||
| 							{{- end -}} /> | ||||
| 						<label for="references">Nachweise</label> | ||||
| 					</div> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input | ||||
| 							type="checkbox" | ||||
| 							name="annotations" | ||||
| 							id="annotations" | ||||
| 							{{ if $includeAnnotations -}} | ||||
| 								checked | ||||
| 							{{- end -}} /> | ||||
| 						<label for="annotations">Anmerkungen</label> | ||||
| 					</div> | ||||
| 				</fieldset> | ||||
| 				{{ template "infotextsimple" false }} | ||||
| 			</div> | ||||
| 		{{- else -}} | ||||
| 			Extended search Reihen | ||||
| 		{{- end -}} | ||||
| 		<!-- INFO: Ende Reihen --> | ||||
| 	{{- else if eq $model.type "personen" -}} | ||||
| 		<!-- INFO: Personen --> | ||||
| 		{{- if not $model.extended -}} | ||||
| 			<div class="grid grid-cols-12 gap-y-3 w-full gap-x-4"> | ||||
| 				{{ template "searchboxsimple" Arr . false }} | ||||
| 				<fieldset class="selectgroup"> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input type="checkbox" name="names" id="names" checked /> | ||||
| 						<label for="names">Namen & Pseudonyme</label> | ||||
| 					</div> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input type="checkbox" name="biographical" id="biographical" checked /> | ||||
| 						<label for="biographical">Lebensdaten</label> | ||||
| 					</div> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input type="checkbox" name="profession" id="profession" checked /> | ||||
| 						<label for="profession">Beruf(e)</label> | ||||
| 					</div> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input type="checkbox" name="references" id="references" checked /> | ||||
| 						<label for="references">Nachweise</label> | ||||
| 					</div> | ||||
| 					<div class="selectgroup-option"> | ||||
| 						<input type="checkbox" name="annotations" id="annotations" checked /> | ||||
| 						<label for="annotations">Anmerkungen</label> | ||||
| 					</div> | ||||
| 				</fieldset> | ||||
| 				{{ template "infotextsimple" false }} | ||||
| 			</div> | ||||
| 		{{- else -}} | ||||
| 			Extended search Personen | ||||
| 		{{- end -}} | ||||
| 		<!-- INFO: Ende Personen --> | ||||
| 	{{- else if eq $model.type "baende" -}} | ||||
| 		<!-- INFO: Bände --> | ||||
| 		{{- if not $model.extended -}} | ||||
| 		{{- else -}} | ||||
| 			Extended search Bände | ||||
| 		{{- end -}} | ||||
| 		<!-- INFO: Ende Bände --> | ||||
| 	{{- else if eq $model.type "beitraege" -}} | ||||
| 		<!-- INFO: Beiträge --> | ||||
| 		{{- if not $model.extended -}} | ||||
| 			<div class="grid grid-cols-12 gap-y-3 w-full gap-x-4"> | ||||
| 				{{ template "searchboxsimple" Arr . true }} | ||||
| 				{{ template "infotextsimple" true }} | ||||
| 			</div> | ||||
| 		{{- else -}} | ||||
| 			Extended search Beiträge | ||||
| 		{{- end -}} | ||||
| 	{{- end -}} | ||||
| </form> | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens