From 5ba46d1cdd304a3c3b666c4e821edcdfd065ec5e Mon Sep 17 00:00:00 2001
From: Kevin Deldycke <kevin@nexedi.com>
Date: Mon, 21 Aug 2006 13:40:04 +0000
Subject: [PATCH] Include support for editable_mode parameter in main_template.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9280 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_xhtml_style/main_template.xml        | 30 +++++++++++++++----
 .../bootstrap/erp5_xhtml_style/bt/change_log  |  3 ++
 .../bootstrap/erp5_xhtml_style/bt/description |  1 +
 .../bootstrap/erp5_xhtml_style/bt/revision    |  2 +-
 .../bootstrap/erp5_xhtml_style/bt/version     |  2 +-
 5 files changed, 30 insertions(+), 8 deletions(-)

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 de894840dd..7dc1bba113 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
@@ -44,6 +44,12 @@
               </object>
             </value>
         </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
         <item>
             <key> <string>_text</string> </key>
             <value> <string encoding="cdata"><![CDATA[
@@ -73,19 +79,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
 \n
 IDEAS:\n
  - Add callbacks to ERP5Form object (selection ?) to gather needed fields -> put them in http_parameter_list.\n
+\n
+MISSING:\n
+ (jp) - Support for layout through page template (without form)\n
+ (jp) - hidden parameters (where should they be defined ?) - see layout form\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
-                         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 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
+\n
+<!--\n
+#                         editable_mode  python: layout_form_id and request.get(\'editable_mode\', ignore_layout) or 0;\n
+#                         dummy          python: request.set(\'editable_mode\', editable_mode);-->\n
+\n
+\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
+        <tal:block metal:define-slot="context_bar"/>\n
       </tal:block>\n
       <tal:block metal:fill-slot="main">\n
-        <tal:block metal:define-slot="main" />\n
+        <tal:block metal:define-slot="main"/>\n
       </tal:block>\n
     </tal:block>\n
   </tal:block>\n
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
index aa3bcc2d41..ed28baf65f 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-21 Kevin
+* Include support for editable_mode parameter in main_template.
+
 2006-08-21 Chris
 * Made form_render code a lot lighter with same final result using a loop
 
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/description b/product/ERP5/bootstrap/erp5_xhtml_style/bt/description
index 678263b08e..b3cdee8ac8 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/description
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/description
@@ -1,2 +1,3 @@
 This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
+
 Handles page parameters dynamically.
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
index 615be700b9..9f72858795 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
@@ -1 +1 @@
-85
\ No newline at end of file
+88
\ 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 ea710abb95..cb174d58a5 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/version
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/version
@@ -1 +1 @@
-1.2
\ No newline at end of file
+1.2.1
\ No newline at end of file
-- 
2.30.9