From a288a28e1efeb8251b9729b14be46e9a13dff2c6 Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Wed, 23 Mar 2011 15:04:25 +0000
Subject: [PATCH] Extend base "Gadget Type" (instances may contain images).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44540 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../Gadget%20Type/gadget_view.xml             | 85 +++++++++++++++++++
 .../allowed_content_types.xml                 |  4 +
 .../property_sheet_list.xml                   |  1 +
 bt5/erp5_knowledge_pad/bt/revision            |  2 +-
 .../bt/template_action_path_list              |  1 +
 ...late_portal_type_allowed_content_type_list |  4 +-
 .../template_portal_type_property_sheet_list  |  1 +
 7 files changed, 96 insertions(+), 2 deletions(-)
 create mode 100644 bt5/erp5_knowledge_pad/ActionTemplateItem/portal_types/Gadget%20Type/gadget_view.xml

diff --git a/bt5/erp5_knowledge_pad/ActionTemplateItem/portal_types/Gadget%20Type/gadget_view.xml b/bt5/erp5_knowledge_pad/ActionTemplateItem/portal_types/Gadget%20Type/gadget_view.xml
new file mode 100644
index 0000000000..4b6ddacf9b
--- /dev/null
+++ b/bt5/erp5_knowledge_pad/ActionTemplateItem/portal_types/Gadget%20Type/gadget_view.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>action_type/object_view</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>object_view</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>gadget_view</string> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Action Information</string> </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>3.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Gadget</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Expression" module="Products.CMFCore.Expression"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/Gadget_view</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_knowledge_pad/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_knowledge_pad/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
index 206c4d6fb8..fbfc0d8f52 100644
--- a/bt5/erp5_knowledge_pad/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
+++ b/bt5/erp5_knowledge_pad/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
@@ -7,6 +7,7 @@
  </portal_type>
  <portal_type id="Gadget Type">
   <item>Action Information</item>
+  <item>Embedded File</item>
  </portal_type>
  <portal_type id="Knowledge Pad">
   <item>Knowledge Box</item>
@@ -17,4 +18,7 @@
  <portal_type id="Preference">
   <item>Knowledge Pad</item>
  </portal_type>
+ <portal_type id="Types Tool">
+  <item>Gadget Type</item>
+ </portal_type>
 </allowed_content_type_list>
\ No newline at end of file
diff --git a/bt5/erp5_knowledge_pad/PortalTypePropertySheetTemplateItem/property_sheet_list.xml b/bt5/erp5_knowledge_pad/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
index 8a77e5c11f..dfae23e098 100644
--- a/bt5/erp5_knowledge_pad/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
+++ b/bt5/erp5_knowledge_pad/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
@@ -3,6 +3,7 @@
   <item>Gadget</item>
  </portal_type>
  <portal_type id="Gadget Type">
+  <item>DefaultImage</item>
   <item>Gadget</item>
  </portal_type>
 </property_sheet_list>
\ No newline at end of file
diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision
index 50ae88076a..b63db6b258 100644
--- a/bt5/erp5_knowledge_pad/bt/revision
+++ b/bt5/erp5_knowledge_pad/bt/revision
@@ -1 +1 @@
-714
\ No newline at end of file
+715
\ No newline at end of file
diff --git a/bt5/erp5_knowledge_pad/bt/template_action_path_list b/bt5/erp5_knowledge_pad/bt/template_action_path_list
index 3626ba90a5..e3d8c8064a 100644
--- a/bt5/erp5_knowledge_pad/bt/template_action_path_list
+++ b/bt5/erp5_knowledge_pad/bt/template_action_path_list
@@ -1,5 +1,6 @@
 Gadget Tool | view
 Gadget Type | action_view
+Gadget Type | gadget_view
 Gadget Type | view
 Gadget | preferences
 Gadget | view
diff --git a/bt5/erp5_knowledge_pad/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_knowledge_pad/bt/template_portal_type_allowed_content_type_list
index 0f9fa6b8d5..4c8562fd05 100644
--- a/bt5/erp5_knowledge_pad/bt/template_portal_type_allowed_content_type_list
+++ b/bt5/erp5_knowledge_pad/bt/template_portal_type_allowed_content_type_list
@@ -1,6 +1,8 @@
 Gadget Tool | Gadget
 Gadget Type | Action Information
+Gadget Type | Embedded File
 Gadget | Embedded File
 Knowledge Pad Module | Knowledge Pad
 Knowledge Pad | Knowledge Box
-Preference | Knowledge Pad
\ No newline at end of file
+Preference | Knowledge Pad
+Types Tool | Gadget Type
\ No newline at end of file
diff --git a/bt5/erp5_knowledge_pad/bt/template_portal_type_property_sheet_list b/bt5/erp5_knowledge_pad/bt/template_portal_type_property_sheet_list
index 04dddbd4cc..ac3a1b5f6a 100644
--- a/bt5/erp5_knowledge_pad/bt/template_portal_type_property_sheet_list
+++ b/bt5/erp5_knowledge_pad/bt/template_portal_type_property_sheet_list
@@ -1,2 +1,3 @@
+Gadget Type | DefaultImage
 Gadget Type | Gadget
 Gadget | Gadget
\ No newline at end of file
-- 
2.30.9