oef/templates/participants.html.tpl

37 lines
956 B
Smarty
Raw Normal View History

2019-11-14 15:04:11 +01:00
{{ define "content" }}
<div class="container">
{{$options := `
2019-11-15 10:41:32 +01:00
title: "Participanti"
buttonTitle: "Crea nuovo partecipante"
2019-11-14 15:04:11 +01:00
`}}
{{template "read_all_header" dict "options" ($options | yaml) "lengthData" (len .Data) "modelPath" (create "Participant")}}
{{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 "Participant"}}>
<span class="fa fa-user"></span>
{{$element|string}}
<div class="text-right">
2019-11-15 10:41:32 +01:00
{{$options := `noElements: "nessuna gara"`}}
2019-12-03 15:24:01 +01:00
{{template "small" dict "options" ($options | yaml) "data" $element.Contests}}
{{$options := `noElements: "nessuna scuola"`}}
{{template "small" dict "options" ($options | yaml) "data" $element.School}}
2019-11-14 15:04:11 +01:00
</div>
</a>
{{end}}
{{end}}
</div>
</div>
{{ end }}