From 0bfbc9c70a1aae5ba91d48cc4a1f1dbf3e3371d4 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 24 Oct 2018 12:10:14 +0200 Subject: [PATCH] templates: hide evolution author in form's front-office history (#27119) --- wcs/forms/common.py | 4 +++- wcs/templates/wcs/formdata_history.html | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wcs/forms/common.py b/wcs/forms/common.py index 4d9fe3fa..0e977d27 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -272,9 +272,11 @@ class FormStatusPage(Directory, FormTemplateMixin): if not self.formdef.is_user_allowed_read_status_and_history(get_request().user, self.filled): return + hide_author = get_publisher().get_site_option('hide_author_in_form_history', 'variables') return template.render( list(self.get_formdef_template_variants(self.history_templates)), - {'formdata': self.filled}) + {'formdata': self.filled, 'hide_author': hide_author, + 'is_in_backoffice': get_request().is_in_backoffice()}) def check_receiver(self): session = get_session() diff --git a/wcs/templates/wcs/formdata_history.html b/wcs/templates/wcs/formdata_history.html index 58f6c594..86ae5f52 100644 --- a/wcs/templates/wcs/formdata_history.html +++ b/wcs/templates/wcs/formdata_history.html @@ -22,10 +22,12 @@ {% endif %}
{% if evolution.who %} + {% if is_in_backoffice or not hide_author %} {{evolution.get_author_name|default_if_none:""}} {% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %} {% endif %} + {% endif %} {% if not evolution.status %} {{evolution.datetime}} {% endif %} -- 2.19.1