[Erp5-report] r41189 gabriel - in /erp5/trunk/bt5/erp5_web_ung_theme: SkinTemplateItem/port...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 7 09:53:39 CET 2010
Author: gabriel
Date: Tue Dec 7 09:53:38 2010
New Revision: 41189
URL: http://svn.erp5.org?rev=41189&view=rev
Log:
2010-12-07 gabriel
* Added feature to be possible filter the Listbox according to the Portal Type
Added:
erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebIllustrationListFiltered.xml
erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebPageListFiltered.xml
erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebTableListFiltered.xml
Modified:
erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_generateDomain.xml
erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getDocumentListFiltered.xml
erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml
erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log
erp5/trunk/bt5/erp5_web_ung_theme/bt/revision
Modified: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_generateDomain.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_generateDomain.xml?rev=41189&r1=41188&r2=41189&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_generateDomain.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_generateDomain.xml [utf8] Tue Dec 7 09:53:38 2010
@@ -50,14 +50,19 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>domain_list = []\n
+ <value> <string>"""\n
+ This script generates a sections list to filter the document on UNG Docs.\n
+ XXX - The generation of domains should be more dynamic because some domains is create manually.\n
+"""\n
+domain_list = []\n
\n
if depth == 0:\n
url = \'publication_section\'\n
context.log(script.id, \'parent = %r, context = %r, url = %r, depth = %r\' % (parent, context, url, depth))\n
domain = parent.generateTempDomain(id=\'all_document_list\')\n
domain.edit(title=\'All Documents\',\n
- list_method=\'WebPageModule_getDocumentListFiltered\',)\n
+ list_method=\'WebPageModule_getDocumentListFiltered\',\n
+ domain_generator_method_id = script.id)\n
domain_list.append(domain)\n
\n
category_list = context.portal_categories.getCategoryValue(url).contentValues()\n
@@ -73,9 +78,26 @@ if depth == 0:\n
\n
domain = parent.generateTempDomain(id=\'webpage_module_list\')\n
domain.edit(title=\'Document by Type\',\n
- list_method=\'WebPageModule_getDocumentListFiltered\',)\n
+ list_method=\'WebPageModule_getDocumentListFiltered\',\n
+ domain_generator_method_id = script.id)\n
domain_list.append(domain)\n
\n
+ # XXX - Review code to be more dynamic\n
+ webpage_subdomain = domain.generateTempDomain(id=\'subWebPage\')\n
+ webpage_subdomain.edit(title="Web Page",\n
+ list_method=\'WebPageModule_getWebPageListFiltered\',\n
+ domain_generator_method_id=script.id)\n
+\n
+ webtable_subdomain = domain.generateTempDomain(id=\'subWebTable\')\n
+ webtable_subdomain.edit(title="Web Table",\n
+ list_method=\'WebPageModule_getWebTableListFiltered\',\n
+ domain_generator_method_id=script.id)\n
+\n
+ webillustration_subdomain = domain.generateTempDomain(id=\'subWebIllustraion\')\n
+ webillustration_subdomain.edit(title="Web Illustration",\n
+ list_method=\'WebPageModule_getWebIllustrationListFiltered\',\n
+ domain_generator_method_id=script.id)\n
+\n
return domain_list\n
</string> </value>
</item>
@@ -125,6 +147,9 @@ return domain_list\n
<string>category_list</string>
<string>_getiter_</string>
<string>category</string>
+ <string>webpage_subdomain</string>
+ <string>webtable_subdomain</string>
+ <string>webillustration_subdomain</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getDocumentListFiltered.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getDocumentListFiltered.xml?rev=41189&r1=41188&r2=41189&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getDocumentListFiltered.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getDocumentListFiltered.xml [utf8] Tue Dec 7 09:53:38 2010
@@ -50,7 +50,13 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>return context.portal_catalog(portal_type=["Web Page", "Web Illustration", "Web Table"], \n
+ <value> <string>"""\n
+ This script is used by domain to filter all objects from Web Page Module except objects \n
+ with validation state == \'deleted\'.\n
+"""\n
+# XXX - the query should returns all object except validation_state == "deleted". \n
+# Try use Query or ComplexQuery object for it\n
+return context.portal_catalog(portal_type=["Web Page", "Web Illustration", "Web Table"], \n
validation_state=["draft"])\n
</string> </value>
</item>
Added: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebIllustrationListFiltered.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebIllustrationListFiltered.xml?rev=41189&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebIllustrationListFiltered.xml (added)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebIllustrationListFiltered.xml [utf8] Tue Dec 7 09:53:38 2010
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </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 script is used by domain to filter all Web Illustration objects except objects \n
+ with validation state == \'deleted\'.\n
+"""\n
+# XXX - the query should returns Web Illustration objects except validation_state == "deleted". \n
+# Try use Query or ComplexQuery object for it\n
+return context.portal_catalog(portal_type=["Web Illustration"], \n
+ validation_state=["draft"])\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>**kw</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>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>kw</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>WebPageModule_getWebIllustrationListFiltered</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebPageListFiltered.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebPageListFiltered.xml?rev=41189&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebPageListFiltered.xml (added)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebPageListFiltered.xml [utf8] Tue Dec 7 09:53:38 2010
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </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 script is used by domain to filter all Web Page objects except objects \n
+ with validation state == \'deleted\'.\n
+"""\n
+# XXX - the query should returns Web Page objects except validation_state == "deleted". \n
+# Try use Query or ComplexQuery object for it\n
+return context.portal_catalog(portal_type=["Web Page"], \n
+ validation_state=["draft"])\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>**kw</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>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>kw</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>WebPageModule_getWebPageListFiltered</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebTableListFiltered.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebTableListFiltered.xml?rev=41189&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebTableListFiltered.xml (added)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebPageModule_getWebTableListFiltered.xml [utf8] Tue Dec 7 09:53:38 2010
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </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 script is used by domain to filter all Web Table objects except objects \n
+ with validation state == \'deleted\'.\n
+"""\n
+# XXX - the query should returns Web Table objects except validation_state == "deleted". \n
+# Try use Query or ComplexQuery object for it\n
+return context.portal_catalog(portal_type=["Web Table"], \n
+ validation_state=["draft"])\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>**kw</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>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>kw</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>WebPageModule_getWebTableListFiltered</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml?rev=41189&r1=41188&r2=41189&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml [utf8] Tue Dec 7 09:53:38 2010
@@ -66,7 +66,7 @@ if uid_list is not None:\n
object.setPublicationSection("trash")\n
object.delete()\n
\n
-return context.ERP5Site_redirect(website_url, keep_items={"reset": 1})\n
+return context.ERP5Site_redirect(context.REQUEST.get("HTTP_REFERER"))\n
</string> </value>
</item>
<item>
Modified: erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log?rev=41189&r1=41188&r2=41189&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log [utf8] Tue Dec 7 09:53:38 2010
@@ -1,3 +1,6 @@
+2010-12-07 gabriel
+* Added feature to be possible filter the Listbox according to the Portal Type
+
2010-12-06 gabriel
* refactor the script WebSection_deleteObjectList to remove completely the objects with state 'deleted'.
Modified: erp5/trunk/bt5/erp5_web_ung_theme/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/bt/revision?rev=41189&r1=41188&r2=41189&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/bt/revision [utf8] Tue Dec 7 09:53:38 2010
@@ -1 +1 @@
-104
\ No newline at end of file
+105
\ No newline at end of file
More information about the Erp5-report
mailing list