oef/templates/contests.html.tpl
2019-11-15 10:41:32 +01:00

33 lines
816 B
Smarty

{{ define "content" }}
<div class="container">
{{$options := `
title: "Gare"
buttonTitle: "Crea nuova gara"
`}}
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Contest")}}
{{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 "Contest"}}>
<span class="fa fa-hourglass-start"></span>
{{$element|string}}
<div class="text-right">
{{$options := `noElements: "nessuna data"`}}
{{template "small" dict "options" ($options | yaml) "data" ($element.Date|prettyDate)}}
</div>
</a>
{{end}}
{{end}}
</div>
</div>
{{ end }}