diff --git a/templates/answers.html.tpl b/templates/answers.html.tpl index 8ceb8985..7e5b805c 100644 --- a/templates/answers.html.tpl +++ b/templates/answers.html.tpl @@ -8,7 +8,7 @@ `}} {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Answer")}} - {{template "search_input"}} + {{template "search_input" .Data}} {{if not .}} {{template "display_no_elements"}} diff --git a/templates/contests.html.tpl b/templates/contests.html.tpl index c57ccd4e..bc10f24c 100644 --- a/templates/contests.html.tpl +++ b/templates/contests.html.tpl @@ -24,7 +24,7 @@ {{if $admin}} {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Contest")}} - {{template "search_input"}} + {{template "search_input" .Data}} {{if not .}} {{template "display_no_elements"}} diff --git a/templates/layout/search_input.html.tpl b/templates/layout/search_input.html.tpl index 1c1c8b48..a7b742ab 100644 --- a/templates/layout/search_input.html.tpl +++ b/templates/layout/search_input.html.tpl @@ -1,7 +1,11 @@ {{define "search_input"}}
+ {{if .}} + {{else}} +

Non รจ stato inserito ancora nessun elemento.

+ {{end}}
{{end}} diff --git a/templates/participants.html.tpl b/templates/participants.html.tpl index ccea069b..3e2c97f7 100644 --- a/templates/participants.html.tpl +++ b/templates/participants.html.tpl @@ -21,8 +21,8 @@ {{end}} {{end}} - {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" $modelPath}} - {{template "search_input"}} + {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" $modelPath}} + {{template "search_input" .Data}} {{if not .}} {{template "display_no_elements"}} diff --git a/templates/questions.html.tpl b/templates/questions.html.tpl index bed5ce39..611b5b8c 100644 --- a/templates/questions.html.tpl +++ b/templates/questions.html.tpl @@ -8,7 +8,7 @@ `}} {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Question")}} - {{template "search_input"}} + {{template "search_input" .Data}} {{if not .}} {{template "display_no_elements"}} diff --git a/templates/responses.html.tpl b/templates/responses.html.tpl index 5a975ced..0e9ef063 100644 --- a/templates/responses.html.tpl +++ b/templates/responses.html.tpl @@ -8,7 +8,7 @@ `}} {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Response")}} - {{template "search_input"}} + {{template "search_input" .Data}} {{if not .}} {{template "display_no_elements"}} diff --git a/templates/schools.html.tpl b/templates/schools.html.tpl index 0c220eec..ab23aa46 100644 --- a/templates/schools.html.tpl +++ b/templates/schools.html.tpl @@ -8,7 +8,7 @@ `}} {{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "School")}} - {{template "search_input"}} + {{template "search_input" .Data}} {{if not .}} {{template "display_no_elements"}}