Commit 387b7f00 authored by Nicolas Delaby's avatar Nicolas Delaby

editable_mode pass in URL take precedence on other statements.

* http://myerp5site.com/module/document_id?editable_mode:int=0 will return a read only Form.
* This patch do not break default behaviour
* Works also for WebSites.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32844 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a3b71066
...@@ -54,8 +54,9 @@ IDEAS:\n ...@@ -54,8 +54,9 @@ IDEAS:\n
layout_form_id request/layout_form_id | here/getApplicableLayout | nothing;\n layout_form_id request/layout_form_id | here/getApplicableLayout | nothing;\n
layout_form python: layout_form_id and getattr(here, layout_form_id, None) or None;\n layout_form python: layout_form_id and getattr(here, layout_form_id, None) or None;\n
is_web_mode python: (layout_form is not None) and (not ignore_layout);\n is_web_mode python: (layout_form is not None) and (not ignore_layout);\n
editable_mode python: (not is_web_mode) or request.get(\'editable_mode\', False);\n editable_mode request/editable_mode | nothing;\n
editable_mode_backup editable_mode;\n dummy python: editable_mode is None and request.set(\'editable_mode\', (not is_web_mode));\n
editable_mode_backup request/editable_mode;\n
dummy python: request.set(\'editable_mode\', editable_mode);\n dummy python: request.set(\'editable_mode\', editable_mode);\n
dummy python: request.set(\'is_web_mode\', is_web_mode);\n dummy python: request.set(\'is_web_mode\', is_web_mode);\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 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
...@@ -64,15 +65,14 @@ IDEAS:\n ...@@ -64,15 +65,14 @@ IDEAS:\n
<tal:block metal:define-slot="context_bar" />\n <tal:block metal:define-slot="context_bar" />\n
</tal:block>\n </tal:block>\n
<tal:block metal:fill-slot="main"\n <tal:block metal:fill-slot="main"\n
tal:define="editable_mode editable_mode_backup;\n tal:define="editable_mode editable_mode_backup;\n
dummy python: request.set(\'editable_mode\', editable_mode);">\n dummy python: request.set(\'editable_mode\', editable_mode);">\n
<tal:block metal:define-slot="main" />\n <tal:block metal:define-slot="main" />\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>
]]></string> </value> ]]></string> </value>
</item> </item>
......
899 901
\ No newline at end of file \ No newline at end of file
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