oef/templates/questions.html.tpl

34 lines
820 B
Smarty
Raw Permalink Normal View History

2019-11-04 15:00:46 +01:00
{{ define "content" }}
<div class="container">
{{$options := `
title: "Domande"
buttonTitle: "Crea nuova domanda"
2019-11-04 15:00:46 +01:00
`}}
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Question")}}
2020-01-27 15:22:11 +01:00
{{template "search_input" .Data}}
2019-11-04 15:00:46 +01:00
{{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 "Question"}}>
2019-11-13 13:57:41 +01:00
<span class="fa fa-question-circle"></span>
2019-11-04 15:00:46 +01:00
{{$element|string}}
<div class="text-right">
2019-11-14 12:55:22 +01:00
{{$options := `noElements: "nessuna gara"`}}
{{template "small" dict "options" ($options | yaml) "data" $element.Contest}}
2019-11-04 15:00:46 +01:00
</div>
</a>
{{end}}
{{end}}
</div>
</div>
{{ end }}