oef/templates/responses_show.html.tpl

43 lines
1.3 KiB
Smarty
Raw Normal View History

2019-11-18 17:04:07 +01:00
{{ define "content" }}
2019-12-13 12:55:11 +01:00
{{$isAdmin := .Claims|isAdmin}}
{{$isParticipant := .Claims|isParticipant}}
2019-11-18 17:04:07 +01:00
<div class="container">
2019-12-13 12:55:11 +01:00
{{template "breadcrumb" toSlice "Prove dei partecipanti" (all "Response") (.Data|string) "current"}}
2019-11-18 17:04:07 +01:00
{{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Response") "deletePath" (.Data.ID|delete "Response")}}
2019-12-13 12:55:11 +01:00
<h2 class="karmen-relation-header">Informazioni generali</h2>
<dl class="row">
{{if $isAdmin}}
{{if $creatorUser:=.Data.CreatedBy}}
<dt class="col-sm-3">Creato da</dt>
<dd class="col-sm-9">{{$creatorUser.Username}}[{{$creatorUser.Role}}] {{$.Data.CreatedAt|prettyDateTime}} da {{.Data.CreatorIP}}</dd>
{{end}}
{{if $updaterUser:=.Data.UpdatedBy}}
<dt class="col-sm-3">Modificato da</dt>
<dd class="col-sm-9">{{$updaterUser.Username}}[{{$updaterUser.Role}}] {{$.Data.UpdatedAt|prettyDateTime}} da {{.Data.UpdaterIP}}</dd>
{{end}}
{{end}}
</dl>
2019-11-18 17:04:07 +01:00
<div class="row">
<div class="col-md-12">
{{$options := `
2019-12-13 12:55:11 +01:00
title: "Domande"
model: "Question"
icon: "fa fa-question-circle"
2019-11-18 17:04:07 +01:00
`}}
2019-12-13 12:55:11 +01:00
{{$noElements := "La prova del partecipante non contiene alcuna domanda."}}
{{template "relation_list" dict "options" ($options|yaml) "data" .Data.Questions "noElements" $noElements}}
2019-11-18 17:04:07 +01:00
</div>
</div>
</div>
{{ end }}