From 4c5af465cf1e0117944a5d81ebe62c3543919d60 Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Sat, 2 Jan 2021 19:04:06 +0100 Subject: [PATCH] Fix out_of_time error message --- templates/error_out_of_time.html.tpl | 5 ++++- templates/layout/base.html.tpl | 2 +- templates/layout/show_error.html.tpl | 4 ++-- templates/responses_show.html.tpl | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/templates/error_out_of_time.html.tpl b/templates/error_out_of_time.html.tpl index 40082445..149123f6 100644 --- a/templates/error_out_of_time.html.tpl +++ b/templates/error_out_of_time.html.tpl @@ -1,4 +1,7 @@ {{ define "content" }} -{{$options := `title: "Errore nella gestione della prova di gara"`}} +{{$options := ` +title: "Errore nella gestione della prova di gara" +noReferer: true +`}} {{template "show_error" dict "options" ($options|yaml) "data" .Data}} {{end}} diff --git a/templates/layout/base.html.tpl b/templates/layout/base.html.tpl index 2b728375..7a8a29d6 100644 --- a/templates/layout/base.html.tpl +++ b/templates/layout/base.html.tpl @@ -30,7 +30,7 @@ {{- if $isSubscriber}}{{$homeURL = "#"}}{{end}} {{- if $isParticipant}}{{$homeURL = "#"}}{{end}} {{- if $isSchool}}{{$homeURL = "#"}}{{end -}} - + OEF 2020 diff --git a/templates/layout/show_error.html.tpl b/templates/layout/show_error.html.tpl index b0d13906..0fcbc978 100644 --- a/templates/layout/show_error.html.tpl +++ b/templates/layout/show_error.html.tpl @@ -5,8 +5,8 @@ {{.options.title}} {{.data}} - {{if .data.Referer}} - Clicca {{.data.Referer|alertLink "qui"}} per tornare all'azione precedente. + {{if and .data.Referer (not .options.noReferer)}} + Clicca {{.dat0a.Referer|alertLink "qui"}} per tornare all'azione precedente. {{end}}

diff --git a/templates/responses_show.html.tpl b/templates/responses_show.html.tpl index ed9af4c8..82c18aa2 100644 --- a/templates/responses_show.html.tpl +++ b/templates/responses_show.html.tpl @@ -23,7 +23,7 @@

{{if not (.Data.Contest.Date|zeroTime)}} E' possibile visualizzare la prova di gara per la prima volta il giorno {{.Data.Contest.Date|prettyDate}} dalle ore {{.Data.Contest.StartTime|convertTime}} alle ore {{.Data.Contest.EndTime|convertTime}} - {{- if not .Data.IsActive -}} [La gara è scaduta o non ancora attiva]{{- end -}} + {{- if not .Data.IsActive -}} [La gara è scaduta o non è ancora attiva]{{- end -}} {{else}} La gara è sempre attiva. {{end}}