Commit ffd2253b authored by Kevin Deldycke's avatar Kevin Deldycke

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.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9470 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 43f542b9
......@@ -90,10 +90,10 @@ MISSING:\n
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment