[Erp5-report] r9470 - /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Aug 25 18:48:39 CEST 2006


Author: kevin
Date: Fri Aug 25 18:48:37 2006
New Revision: 9470

URL: http://svn.erp5.org?rev=9470&view=rev
Log:
Add new is_web_mode variable to differentiate web mode and standard erp5_mode.
Always return default erp5 xhtml_style template if not in web_mode.
One liner editable_mode setter.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml?rev=9470&r1=9469&r2=9470&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml Fri Aug 25 18:48:37 2006
@@ -61,7 +61,7 @@
 <!--\n
 Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.\n
                    Vincent Pelletier <vincent at nexedi.com>\n
-                   Christophe Dumez <christophe at nexedi.com>\n
+                   Christophe Dumez  <christophe at nexedi.com>\n
 \n
 This program is Free Software; you can redistribute it and/or\n
 modify it under the terms of the GNU General Public License\n
@@ -90,10 +90,10 @@
    tal:define="ignore_layout          request/ignore_layout | nothing;\n
                layout_form_id         here/getApplicableLayout | nothing;\n
                layout_form    python: layout_form_id and getattr(here, layout_form_id, None) or None;\n
-               is_edit_mode   python: not (not(hasattr(context.REQUEST, \'editable_mode\')) or not(context.REQUEST[\'editable_mode\']));\n
-               editable_mode  python: not layout_form and True or (is_edit_mode or ignore_layout);\n
+               is_web_mode    python: (layout_form and not ignore_layout) and True or False;\n
+               editable_mode  python: not layout_form and True or ((not (not(hasattr(context.REQUEST, \'editable_mode\')) or not(context.REQUEST[\'editable_mode\']))) or ignore_layout);\n
                dummy          python: request.set(\'editable_mode\', editable_mode);\n
-               page_template  python: (layout_form and not(ignore_layout)) and (layout_form.meta_type==\'Page Template\' and layout_form.id) or getattr(layout_form, \'pt\', None) or \'template_erp5_xhtml_style\';">\n
+               page_template  python: is_web_mode and ((layout_form.meta_type==\'Page Template\' and layout_form.id) or getattr(layout_form, \'pt\', None)) or \'template_erp5_xhtml_style\';">\n
     <tal:block metal:use-macro="python: getattr(here, page_template).macros[\'master\']">\n
       <tal:block metal:fill-slot="context_bar">\n
         <tal:block metal:define-slot="context_bar"/>\n




More information about the Erp5-report mailing list