Project

General

Profile

0001-misc-add-a-is_in_backoffice-substitution-variable-97.patch

Frédéric Péters, 25 January 2016 07:05 PM

Download (1.51 KB)

View differences:

Subject: [PATCH] misc: add a is_in_backoffice substitution variable (#9752)

 help/fr/misc-substvars.page | 4 ++++
 wcs/qommon/publisher.py     | 1 +
 2 files changed, 5 insertions(+)
help/fr/misc-substvars.page
70 70
      <td><p><code>session_user_email</code></p></td>
71 71
      <td><p>L'adresse électronique de l'utilisateur connecté</p></td>
72 72
    </tr>
73
    <tr>
74
      <td><p><code>is_in_backoffice</code></p></td>
75
      <td><p>Vrai si la requête en cours a lieu dans le backoffice</p></td>
76
    </tr>
73 77
  </table>
74 78

  
75 79
  <p>
wcs/qommon/publisher.py
967 967
            'site_lang': (get_request() and hasattr(get_request(), 'language') and get_request().language) or 'en',
968 968
            'today': strftime.strftime(misc.date_format(), time.localtime()),
969 969
            'now': misc.localstrftime(time.localtime()),
970
            'is_in_backoffice': (self.get_request() and self.get_request().is_in_backoffice()),
970 971
        }
971 972
        if self.site_options is None:
972 973
            self.load_site_options()
973
-