oef/templates/questions_show.html.tpl
2019-11-13 15:54:17 +01:00

28 lines
789 B
Smarty

{{ define "content" }}
<div class="container">
{{template "breadcrumb" toSlice "Domande" (all "Question") (.Data|string|trim) "current"}}
{{template "show_header" dict "title" (.Data|string|trim) "updatePath" (.Data.ID|update "Question") "deletePath" (.Data.ID|delete "Question")}}
<h2 class="karmen-relation-header">Testo della domanda</h2>
<p>{{.Data.Text}}</p>
<div class="row">
<div class="col-md-12">
{{$options := `
title: "Risposte alla domanda"
model: "Answer"
icon: "fa fa-reply"
`}}
{{$noElements := "Alla domanda non è associata alcuna risposta."}}
{{template "relation_list" dict "options" ($options|yaml) "data" .Data.Answers "noElements" $noElements}}
</div>
</div>
</div>
{{ end }}