Projet

Général

Profil

0001-templates-allow-evolution-s-author-hide-in-form-s-fr.patch

Serghei Mihai (congés, retour 15/05), 26 novembre 2018 13:30

Télécharger (1,8 ko)

Voir les différences:

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(-)
wcs/forms/common.py
273 273
        if not self.formdef.is_user_allowed_read_status_and_history(get_request().user, self.filled):
274 274
            return
275 275

  
276
        display_author = get_request().is_in_backoffice() or not get_publisher().has_site_option('hide_author_in_form_history')
276 277
        return template.render(
277 278
                list(self.get_formdef_template_variants(self.history_templates)),
278
                {'formdata': self.filled})
279
                {'formdata': self.filled, 'display_author': display_author})
279 280

  
280 281
    def check_receiver(self):
281 282
        session = get_session()
wcs/templates/wcs/formdata_history.html
20 20
           </span>
21 21
         </div>
22 22
       {% endif %}
23
       <div class="msg">
24
         {% if evolution.who %}
23
         <div class="msg">
24
         {% if evolution.who and display_author %}
25 25
         <span class="user">{{evolution.get_author_name|default_if_none:""}}
26 26
                 <span>{% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %}</span>
27 27
         </span>
28
-