[Erp5-report] r9651 - /erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widge...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 4 19:43:14 CEST 2006


Author: kevin
Date: Mon Sep  4 19:43:13 2006
New Revision: 9651

URL: http://svn.erp5.org?rev=9651&view=rev
Log:
Move to web_widget_library

Added:
    erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getVerboseTitle.xml

Added: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getVerboseTitle.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getVerboseTitle.xml?rev=9651&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getVerboseTitle.xml (added)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getVerboseTitle.xml Mon Sep  4 19:43:13 2006
@@ -1,0 +1,187 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <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_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <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>_body</string> </key>
+            <value> <string>"""\n
+  This method return short or long title. If both are available, priority is given to one of\n
+    them via the \'priority\' parameter (long title is chosen by default, for verbosity).\n
+\n
+  If both of them are empty, we return a generic string containing the id. The previous behaviour\n
+    can be de-activated via \'pure_id\' parameters.\n
+\n
+  ERP5 Web rule:\n
+    Short title is diplayed in any navigation widget (breadrumb, navigation menu, section list, ...)\n
+    with a higher priority than long title, except in Site Map.\n
+"""\n
+\n
+portal_type = context.getPortalType()\n
+\n
+property_list = [\'title\', \'short_title\', \'id\']\n
+if priority == \'short_title\':\n
+  property_list = [\'short_title\', \'title\', \'id\']\n
+\n
+for property in property_list:\n
+  if hasattr(context, property):\n
+    value = getattr(context, property)\n
+    if value not in (None, \'\'):\n
+      if property == \'id\' and pure_id == False:\n
+        return "Untitled %s (id: %s)" % (context.getPortalType(), value)\n
+      return value\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>priority=\'long_title\', pure_id=False</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>priority</string>
+                            <string>pure_id</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>portal_type</string>
+                            <string>property_list</string>
+                            <string>_getiter_</string>
+                            <string>property</string>
+                            <string>hasattr</string>
+                            <string>getattr</string>
+                            <string>value</string>
+                            <string>None</string>
+                            <string>False</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <string>long_title</string>
+                <int>0</int>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>ERP5Web_getVerboseTitle</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>




More information about the Erp5-report mailing list