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