Projet

Général

Profil

0001-templates-hide-receiver-in-form-s-front-office-histo.patch

Serghei Mihai (congés, retour 15/05), 12 novembre 2018 17:00

Télécharger (1,69 ko)

Voir les différences:

Subject: [PATCH] templates: hide receiver in form's front-office history
 (#27119)

 wcs/forms/common.py                     | 3 ++-
 wcs/templates/wcs/formdata_history.html | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
wcs/forms/common.py
273 273

  
274 274
        return template.render(
275 275
                list(self.get_formdef_template_variants(self.history_templates)),
276
                {'formdata': self.filled})
276
                {'formdata': self.filled,
277
                 'is_in_backoffice': get_request().is_in_backoffice()})
277 278

  
278 279
    def check_receiver(self):
279 280
        session = get_session()
wcs/templates/wcs/formdata_history.html
22 22
       {% endif %}
23 23
       <div class="msg">
24 24
         {% if evolution.who %}
25
         {% if evolution.who == '_submitter' or is_in_backoffice %}
25 26
         <span class="user">{{evolution.get_author_name|default_if_none:""}}
26 27
                 <span>{% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %}</span>
27 28
         </span>
28 29
         {% endif %}
30
         {% endif %}
29 31
         {% if not evolution.status %}
30 32
           <span class="time">{{evolution.datetime}}</span>
31 33
         {% endif %}
32
-