Fix participant template
This commit is contained in:
parent
a3be8fe8db
commit
ab683dca42
3 changed files with 19 additions and 3 deletions
|
@ -27,7 +27,7 @@ var (
|
|||
|
||||
"participant": map[string][]int{
|
||||
"Participant": []int{PermissionRead},
|
||||
"Response": []int{PermissionUpdate},
|
||||
"Response": []int{PermissionUpdate, PermissionRead},
|
||||
},
|
||||
|
||||
"subscriber": map[string][]int{
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
{{$checked = true}}
|
||||
{{end}}
|
||||
<input class="form-check-input" type="radio" name="SingleResponses.{{$id}}" id="answer_{{$answer.ID}}" value="{{$answer.ID}}" required {{if $checked}}checked{{end}}>
|
||||
<label class="form-check-label {{if $answer.Correct}}text-success{{end}}" for="answer_{{$answer.ID}}">
|
||||
<label class="form-check-label {{if and $isAdmin $answer.Correct}}text-success{{end}}" for="answer_{{$answer.ID}}">
|
||||
{{$answer}}
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -5,11 +5,25 @@
|
|||
|
||||
<div class="container">
|
||||
|
||||
{{if $isAdmin}}
|
||||
{{template "breadcrumb" toSlice "Prove dei partecipanti" (all "Response") (.Data|string) "current"}}
|
||||
{{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Response") "deletePath" (.Data.ID|delete "Response")}}
|
||||
{{end}}
|
||||
|
||||
{{if $isParticipant}}
|
||||
{{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Response")}}
|
||||
{{end}}
|
||||
|
||||
<h2 class="karmen-relation-header">Informazioni generali</h2>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-3">Periodo di attività</dt>
|
||||
<dd class="col-sm-9">
|
||||
{{if not (.Data.Contest.Date|zeroTime)}}
|
||||
La gara si svolgerà il giorno {{.Data.Contest.Date|prettyDate}} dalle ore {{.Data.Contest.StartTime|convertTime}} alle ore {{.Data.Contest.EndTime|convertTime}}
|
||||
{{else}}
|
||||
La gara è sempre attiva.
|
||||
{{end}}
|
||||
</dd>
|
||||
{{if $isAdmin}}
|
||||
<dt class="col-sm-3">Ordine delle domande</dt>
|
||||
<dd class="col-sm-9">{{.Data.QuestionsOrder}}</dd>
|
||||
|
@ -32,6 +46,7 @@
|
|||
{{end}}
|
||||
</dl>
|
||||
|
||||
{{if $isAdmin}}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
@ -46,6 +61,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue