From 20f7af2e213d9c2ca17e69b8962ad2be1f8b5877 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 24 Oct 2018 12:10:14 +0200 Subject: [PATCH] templates: allow evolution's author hide in form's front-office history (#27119) --- wcs/forms/common.py | 3 ++- wcs/templates/wcs/formdata_history.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wcs/forms/common.py b/wcs/forms/common.py index f70aee19..c166bb77 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -273,9 +273,10 @@ class FormStatusPage(Directory, FormTemplateMixin): if not self.formdef.is_user_allowed_read_status_and_history(get_request().user, self.filled): return + display_author = get_request().is_in_backoffice() or not get_publisher().has_site_option('hide_author_in_form_history') return template.render( list(self.get_formdef_template_variants(self.history_templates)), - {'formdata': self.filled}) + {'formdata': self.filled, 'display_author': display_author}) 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..850e197c 100644 --- a/wcs/templates/wcs/formdata_history.html +++ b/wcs/templates/wcs/formdata_history.html @@ -20,8 +20,8 @@ {% endif %} -
- {% if evolution.who %} +
+ {% if evolution.who and display_author %} {{evolution.get_author_name|default_if_none:""}} {% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %} -- 2.20.0.rc1