From 36a2f92c89642fccef1ee46c4028b3f08d60ebd8 Mon Sep 17 00:00:00 2001 From: Kevin Deldycke <kevin@nexedi.com> Date: Tue, 22 Aug 2006 09:04:22 +0000 Subject: [PATCH] Unset editable_mode when viewing an object through Web Site object. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9305 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_xhtml_style/main_template.xml | 14 ++++++++------ .../ERP5/bootstrap/erp5_xhtml_style/bt/change_log | 3 +++ .../bootstrap/erp5_xhtml_style/bt/id_generator | 0 .../ERP5/bootstrap/erp5_xhtml_style/bt/revision | 2 +- product/ERP5/bootstrap/erp5_xhtml_style/bt/version | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 product/ERP5/bootstrap/erp5_xhtml_style/bt/id_generator diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml index dd18f99a92..1022e52353 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml @@ -86,12 +86,14 @@ MISSING:\n -->\n </tal:block>\n <tal:block metal:define-macro="master">\n - <tal:block tal:define="ignore_layout request/ignore_layout | nothing;\n - layout_form_id here/getApplicableLayout | nothing;\n - editable_mode python: layout_form_id and request.get(\'editable_mode\', ignore_layout) or 1;\n - dummy python: request.set(\'editable_mode\', editable_mode);\n - layout_form python: layout_form_id and getattr(here, layout_form_id, None) or None;\n - page_template python: (layout_form and not(ignore_layout)) and getattr(layout_form, \'pt\', None) or \'template_erp5_xhtml_style\';">\n + <tal:block\n + tal:define="ignore_layout request/ignore_layout | nothing;\n + layout_form_id here/getApplicableLayout | nothing;\n + is_edit_mode python: not (not(hasattr(context.REQUEST, \'editable_mode\')) or not(context.REQUEST[\'editable_mode\']));\n + editable_mode python: layout_form_id in (\'\', None) and True or (is_edit_mode or ignore_layout);\n + dummy python: request.set(\'editable_mode\', editable_mode);\n + layout_form python: layout_form_id and getattr(here, layout_form_id, None) or None;\n + page_template python: (layout_form and not(ignore_layout)) and 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 diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log index 83371a8a42..c63c86acdd 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log @@ -1,3 +1,6 @@ +2006-08-22 Kevin +* Unset editable_mode when viewing an object through Web Site object. + 2006-08-21 Kevin * Include support for editable_mode parameter in main_template. * Remove default value (by jp). diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/id_generator b/product/ERP5/bootstrap/erp5_xhtml_style/bt/id_generator new file mode 100644 index 0000000000..e69de29bb2 diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index d97edbb29f..105d7d9ad3 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -99 \ No newline at end of file +100 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/version b/product/ERP5/bootstrap/erp5_xhtml_style/bt/version index 7e099ec5d7..a77d7d9272 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/version +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/version @@ -1 +1 @@ -1.2.6 \ No newline at end of file +1.2.7 \ No newline at end of file -- 2.30.9