Improve participant contest view
This commit is contained in:
parent
ab683dca42
commit
560ba79ab8
4 changed files with 10 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="btn-group float-right" role="group">
|
||||
{{template "update_button" dict "modelPath" .updatePath}}
|
||||
{{template "update_button" dict "updateButtonTitle" .options.updateButtonTitle "modelPath" .updatePath}}
|
||||
{{if .deletePath}}
|
||||
{{template "delete_button" dict "modelPath" .deletePath}}
|
||||
{{end}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{define "update_button"}}
|
||||
<a href="{{.modelPath}}" class="btn btn-primary">
|
||||
<span class="fa fa-edit" aria-hidden="true"></span>
|
||||
Modifica
|
||||
{{if .updateButtonTitle}}{{.updateButtonTitle}}{{else}}Modifica{{end}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
|
|
@ -15,8 +15,12 @@
|
|||
{{end}}
|
||||
|
||||
{{end}}
|
||||
|
||||
{{template "add_update_header" dict "update" $update "addTitle" "Rispondi al questionario" "updateTitle" (printf "Aggiorna le tue risposte %s" (.Data|string))}}
|
||||
|
||||
{{if $isAdmin}}
|
||||
{{template "add_update_header" dict "update" $update "addTitle" "Rispondi al questionario" "updateTitle" (printf "Aggiorna %s" (.Data|string))}}
|
||||
{{else}}
|
||||
{{template "add_update_header" dict "update" $update "addTitle" "Rispondi al questionario" "updateTitle" (.Data|string)}}
|
||||
{{end}}
|
||||
{{$form := "form_add_update"}}
|
||||
<form
|
||||
class="needs-validation"
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
{{end}}
|
||||
|
||||
{{if $isParticipant}}
|
||||
{{template "show_header" dict "title" (.Data|string) "updatePath" (.Data.ID|update "Response")}}
|
||||
{{$options := `{updateButtonTitle: "Vai alla gara!"}`}}
|
||||
{{template "show_header" dict "options" ($options|yaml) "title" (.Data|string) "updatePath" (.Data.ID|update "Response")}}
|
||||
{{end}}
|
||||
|
||||
<h2 class="karmen-relation-header">Informazioni generali</h2>
|
||||
|
|
Loading…
Reference in a new issue