From d0e5273560c11ac17b9baeef0bc0a468674e25db Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Tue, 30 Nov 2010 08:19:23 +0000
Subject: [PATCH] Merge WebSection_viewDashboardWidget to default
 KnowledgePad_viewDashboardWidget (they do the same).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40908 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../KnowledgePad_viewDashboardWidget.xml      |  69 +++++-----
 .../erp5_knowledge_box.css.xml                |  21 +--
 .../WebSection_viewDashboardWidget.xml        | 122 ------------------
 .../WebSite_viewHomeAreaFormRenderer.xml      |   2 +-
 bt5/erp5_knowledge_pad/bt/revision            |   2 +-
 5 files changed, 45 insertions(+), 171 deletions(-)
 delete mode 100644 bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSection_viewDashboardWidget.xml

diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml
index 60eb542f9d..a6107f16ca 100644
--- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml
+++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_viewDashboardWidget.xml
@@ -40,46 +40,51 @@
      tal:define="layout here/KnowledgePad_getBoxColumnLayout;\n
                  real_context python: options.get(\'real_context\', None);\n
                  cancel_url python: options.get(\'cancel_url\', None);\n
+                 isAnon python: here.portal_membership.isAnonymousUser();\n
                  is_tab_empty python: (len(layout)==1 and len(layout[0])==0) or\n
                                      (len(layout)==3 and len(layout[0]+layout[1]+layout[2])==0);\n
-                 page_wrapper_id python:  options.get(\'page_wrapper_id\', \'page_wrapper\');"\n
+                 page_wrapper_id python:  options.get(\'page_wrapper_id\', \'page_wrapper\');\n
+                 columns python: options.get(\'columns\', 3);\n
+                 column_css_class python: test(isAnon, \n
+                                            \'portal-column portal-column-undraggable\', \n
+                                            \'portal-column\');"\n
      tal:attributes="id page_wrapper_id">\n
 \n
     <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget_message"/> \n
 \n
-    <table id="table_column_layout">\n
-    <tr>\n
-      <td>\n
-        <div class="portal-column" id="portal-column-0">\n
-          <tal:block tal:condition="python: len(layout)>=1">\n
-            <span tal:replace="structure python: here.KnowledgePad_viewColumnWidget(section_layout=layout[0],\n
-                                               real_context=real_context,\n
-                                               cancel_url=cancel_url)"/>\n
-          </tal:block> \n
-        </div>\n
-      </td>\n
+    <div id="portal-column-0"\n
+         tal:attributes="class column_css_class"\n
+         tal:condition="python: columns>=1">\n
 \n
-      <td>\n
-        <div class="portal-column" id="portal-column-1">\n
-          <tal:block tal:condition="python: len(layout)>=2">\n
-            <span tal:replace="structure python: here.KnowledgePad_viewColumnWidget(section_layout=layout[1],\n
-                                               real_context=real_context,\n
-                                               cancel_url=cancel_url)"/>\n
-          </tal:block>\n
-        </div>\n
-      </td>\n
+      <tal:block tal:condition="python: len(layout)>=1">\n
+        <span tal:replace="structure python:\n
+                             here.KnowledgePad_viewColumnWidget(section_layout=layout[0],\n
+                                                                real_context=real_context,\n
+                                                                cancel_url=cancel_url)"/>\n
+      </tal:block> \n
+    </div>\n
 \n
-    <td>\n
-      <div class="portal-column" id="portal-column-2">\n
-        <tal:block tal:condition="python: len(layout)>=3">\n
-          <span tal:replace="structure python: here.KnowledgePad_viewColumnWidget(section_layout=layout[2],\n
-                                             real_context=real_context,\n
-                                             cancel_url=cancel_url)"/>\n
-        </tal:block>\n
-      </div>\n
-    </td>\n
-    </tr>\n
-    </table>\n
+    <div id="portal-column-1"\n
+         tal:attributes="class column_css_class"\n
+         tal:condition="python: columns>=2">\n
+      <tal:block tal:condition="python: len(layout)>=2">\n
+        <span tal:replace="structure python:\n
+                          here.KnowledgePad_viewColumnWidget(section_layout=layout[1],\n
+                                                             real_context=real_context,\n
+                                                             cancel_url=cancel_url)"/>\n
+      </tal:block>\n
+    </div>\n
+\n
+    <div id="portal-column-2"\n
+         tal:attributes="class column_css_class"\n
+         tal:condition="python: columns>=3">\n
+      <tal:block tal:condition="python: len(layout)>=3">\n
+        <span tal:replace="structure python:\n
+                          here.KnowledgePad_viewColumnWidget(section_layout=layout[2],\n
+                                                             real_context=real_context,\n
+                                                             cancel_url=cancel_url)"/>\n
+      </tal:block>\n
+    </div>\n
 \n
 </div>\n
 
diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.css.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.css.xml
index 69af7a59a6..f5fa371c6f 100644
--- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.css.xml
+++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.css.xml
@@ -12,7 +12,7 @@
         </item>
         <item>
             <key> <string>_EtagSupport__etag</string> </key>
-            <value> <string>ts90514694.89</string> </value>
+            <value> <string>ts91104683.38</string> </value>
         </item>
         <item>
             <key> <string>__name__</string> </key>
@@ -40,23 +40,14 @@
   margin-top: 0.5em;\n
 }\n
 \n
-/* Columns */\n
-.portal-column {\n
+/* 3 columng gadget layout */\n
+div.portal-column {\n
   float: left;\n
-  width: 100%; \n
+  width:32.9%; \n
+  margin-right:3px;\n
   min-height: 200px;\n
 }\n
 \n
-#table_column_layout{\n
-  width: 100%;\n
-  table-layout: fixed;\n
-}\n
-\n
-#table_column_layout td{\n
-  width: 33%;\n
-  vertical-align: top;\n
-}\n
-\n
 /* Boxes */\n
 div.block {\n
   margin:1px 1px 3px;\n
@@ -502,7 +493,7 @@ div.gadget-rss-reader .body {\n
         </item>
         <item>
             <key> <string>size</string> </key>
-            <value> <int>8275</int> </value>
+            <value> <int>8186</int> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSection_viewDashboardWidget.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSection_viewDashboardWidget.xml
deleted file mode 100644
index 725ab50f9c..0000000000
--- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSection_viewDashboardWidget.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_text</string> </key>
-            <value> <unicode encoding="cdata"><![CDATA[
-
-<div id="page_wrapper"  \n
-     tal:define="layout here/KnowledgePad_getBoxColumnLayout;\n
-                 real_context python: options.get(\'real_context\', None);\n
-                 cancel_url python: options.get(\'cancel_url\', None);\n
-                 isAnon python: here.portal_membership.isAnonymousUser();\n
-                 columns python: options.get(\'columns\', 3);\n
-                 is_tab_empty python: (len(layout)==1 and len(layout[0])==0) or\n
-                                      (len(layout)==3 and len(layout[0]+layout[1]+layout[2])==0);\n
-                 column_css_class python: test(isAnon, \n
-                                            \'portal-column portal-column-undraggable\', \n
-                                            \'portal-column\')">\n
-\n
-    <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget_message"/> \n
-\n
-    <div id="portal-column-0"\n
-         tal:attributes="class column_css_class"\n
-         tal:condition="python: columns>=1">\n
-      <tal:block tal:condition="python: columns==1">\n
-        <span   \n
-          metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget"> \n
-          Add Gadgets\n
-        </span>\n
-      </tal:block>\n
-\n
-      <tal:block tal:condition="python: len(layout)>=1">\n
-        <span tal:replace="structure python:\n
-                             here.KnowledgePad_viewColumnWidget(section_layout=layout[0],\n
-                                                                real_context=real_context,\n
-                                                                cancel_url=cancel_url)"/>\n
-      </tal:block> \n
-    </div>\n
-\n
-    <div id="portal-column-1"\n
-         tal:attributes="class column_css_class"\n
-         tal:condition="python: columns>=2">\n
-      <tal:block tal:condition="python: len(layout)>=2">\n
-        <span tal:replace="structure python:\n
-                          here.KnowledgePad_viewColumnWidget(section_layout=layout[1],\n
-                                                             real_context=real_context,\n
-                                                             cancel_url=cancel_url)"/>\n
-      </tal:block>\n
-    </div>\n
-\n
-    <div id="portal-column-2"\n
-         tal:attributes="class column_css_class"\n
-         tal:condition="python: columns>=3">\n
-      <tal:block tal:condition="python: len(layout)>=3">\n
-        <span tal:replace="structure python:\n
-                          here.KnowledgePad_viewColumnWidget(section_layout=layout[2],\n
-                                                             real_context=real_context,\n
-                                                             cancel_url=cancel_url)"/>\n
-      </tal:block>\n
-    </div>\n
-\n
-\n
-</div>\n
-
-
-]]></unicode> </value>
-        </item>
-        <item>
-            <key> <string>content_type</string> </key>
-            <value> <string>text/html</string> </value>
-        </item>
-        <item>
-            <key> <string>expand</string> </key>
-            <value> <int>0</int> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>WebSection_viewDashboardWidget</string> </value>
-        </item>
-        <item>
-            <key> <string>output_encoding</string> </key>
-            <value> <string>utf-8</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <unicode>Render draggable and droppable column structure</unicode> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSite_viewHomeAreaFormRenderer.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSite_viewHomeAreaFormRenderer.xml
index 3531bd603a..e3f9e8529d 100644
--- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSite_viewHomeAreaFormRenderer.xml
+++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad_web/WebSite_viewHomeAreaFormRenderer.xml
@@ -73,7 +73,7 @@
           Dialogs</span>\n
       </tal:block>\n
       <div tal:condition="active_knowledge_pad"\n
-          tal:content="structure python: active_knowledge_pad.WebSection_viewDashboardWidget(columns=columns,\n
+          tal:content="structure python: active_knowledge_pad.KnowledgePad_viewDashboardWidget(columns=columns,\n
                                                               real_context=here,\n
                                                               cancel_url=cancel_url)"/> \n
     </tal:block>\n
diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision
index 53a274896e..e78e423d29 100644
--- a/bt5/erp5_knowledge_pad/bt/revision
+++ b/bt5/erp5_knowledge_pad/bt/revision
@@ -1 +1 @@
-626
\ No newline at end of file
+627
\ No newline at end of file
-- 
2.30.9