2019-11-13 13:57:41 +01:00
|
|
|
{{ define "content" }}
|
|
|
|
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
{{$options := `
|
|
|
|
title: "Risposte"
|
|
|
|
buttonTitle: "Crea nuova risposta"
|
|
|
|
`}}
|
|
|
|
|
|
|
|
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Answer")}}
|
|
|
|
{{template "search_input"}}
|
|
|
|
|
|
|
|
{{if not .}}
|
|
|
|
{{template "display_no_elements"}}
|
|
|
|
{{else}}
|
|
|
|
<div class="list-group" id="myUL">
|
|
|
|
{{range $element := .Data}}
|
|
|
|
<a class="list-group-item list-group-item-action" href={{$element.ID|show "Answer"}}>
|
2019-11-13 15:54:17 +01:00
|
|
|
<span class="fa fa-reply"></span>
|
2019-11-13 13:57:41 +01:00
|
|
|
{{$element|string}}
|
|
|
|
<div class="text-right">
|
2019-11-14 12:55:22 +01:00
|
|
|
{{$options := `noElements: "nessuna domanda"`}}
|
|
|
|
{{template "small" dict "options" ($options | yaml) "data" $element.Question}}
|
|
|
|
{{if $element.Correct}}
|
|
|
|
{{template "small" dict "options" ($options | yaml) "data" "corretta"}}
|
|
|
|
{{end}}
|
2019-11-13 13:57:41 +01:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{{ end }}
|