From 560ba79ab8c9d4c75cfc014b5bea38a35d784d3f Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Thu, 19 Dec 2019 07:38:10 +0100 Subject: [PATCH] Improve participant contest view --- templates/layout/show_header.html.tpl | 2 +- templates/layout/update_button.html.tpl | 2 +- templates/responses_add_update.html.tpl | 8 ++++++-- templates/responses_show.html.tpl | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/templates/layout/show_header.html.tpl b/templates/layout/show_header.html.tpl index 00b3f311..006b236a 100644 --- a/templates/layout/show_header.html.tpl +++ b/templates/layout/show_header.html.tpl @@ -6,7 +6,7 @@
- {{template "update_button" dict "modelPath" .updatePath}} + {{template "update_button" dict "updateButtonTitle" .options.updateButtonTitle "modelPath" .updatePath}} {{if .deletePath}} {{template "delete_button" dict "modelPath" .deletePath}} {{end}} diff --git a/templates/layout/update_button.html.tpl b/templates/layout/update_button.html.tpl index 0af6b93e..120b90ae 100644 --- a/templates/layout/update_button.html.tpl +++ b/templates/layout/update_button.html.tpl @@ -1,6 +1,6 @@ {{define "update_button"}} - Modifica + {{if .updateButtonTitle}}{{.updateButtonTitle}}{{else}}Modifica{{end}} {{end}} diff --git a/templates/responses_add_update.html.tpl b/templates/responses_add_update.html.tpl index 78d3d42c..d6cdfedc 100644 --- a/templates/responses_add_update.html.tpl +++ b/templates/responses_add_update.html.tpl @@ -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"}}
Informazioni generali