Pass data to search template
This commit is contained in:
parent
57e26e351e
commit
605e79e65a
7 changed files with 11 additions and 7 deletions
|
@ -8,7 +8,7 @@
|
||||||
`}}
|
`}}
|
||||||
|
|
||||||
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Answer")}}
|
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Answer")}}
|
||||||
{{template "search_input"}}
|
{{template "search_input" .Data}}
|
||||||
|
|
||||||
{{if not .}}
|
{{if not .}}
|
||||||
{{template "display_no_elements"}}
|
{{template "display_no_elements"}}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{{if $admin}}
|
{{if $admin}}
|
||||||
|
|
||||||
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Contest")}}
|
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Contest")}}
|
||||||
{{template "search_input"}}
|
{{template "search_input" .Data}}
|
||||||
|
|
||||||
{{if not .}}
|
{{if not .}}
|
||||||
{{template "display_no_elements"}}
|
{{template "display_no_elements"}}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
{{define "search_input"}}
|
{{define "search_input"}}
|
||||||
<div class="input-group" style="margin-bottom: 20px">
|
<div class="input-group" style="margin-bottom: 20px">
|
||||||
|
{{if .}}
|
||||||
<span class="input-group-addon" id="search-query"><span class="glyphicon glyphicon-search"></span></span>
|
<span class="input-group-addon" id="search-query"><span class="glyphicon glyphicon-search"></span></span>
|
||||||
<input type="text" id="myInput" class="form-control" aria-describedby="search-query">
|
<input type="text" id="myInput" class="form-control" aria-describedby="search-query">
|
||||||
|
{{else}}
|
||||||
|
<p>Non è stato inserito ancora nessun elemento.</p>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" $modelPath}}
|
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" $modelPath}}
|
||||||
{{template "search_input"}}
|
{{template "search_input" .Data}}
|
||||||
|
|
||||||
{{if not .}}
|
{{if not .}}
|
||||||
{{template "display_no_elements"}}
|
{{template "display_no_elements"}}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
`}}
|
`}}
|
||||||
|
|
||||||
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Question")}}
|
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Question")}}
|
||||||
{{template "search_input"}}
|
{{template "search_input" .Data}}
|
||||||
|
|
||||||
{{if not .}}
|
{{if not .}}
|
||||||
{{template "display_no_elements"}}
|
{{template "display_no_elements"}}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
`}}
|
`}}
|
||||||
|
|
||||||
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Response")}}
|
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Response")}}
|
||||||
{{template "search_input"}}
|
{{template "search_input" .Data}}
|
||||||
|
|
||||||
{{if not .}}
|
{{if not .}}
|
||||||
{{template "display_no_elements"}}
|
{{template "display_no_elements"}}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
`}}
|
`}}
|
||||||
|
|
||||||
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "School")}}
|
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "School")}}
|
||||||
{{template "search_input"}}
|
{{template "search_input" .Data}}
|
||||||
|
|
||||||
{{if not .}}
|
{{if not .}}
|
||||||
{{template "display_no_elements"}}
|
{{template "display_no_elements"}}
|
||||||
|
|
Loading…
Reference in a new issue