Add possibility to define a default portal type.

So update search portal type list widget

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42007 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 88a19a6e
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
<string>my_layout_display_toolbar_widget</string> <string>my_layout_display_toolbar_widget</string>
<string>my_layout_display_search_widget</string> <string>my_layout_display_search_widget</string>
<string>my_layout_search_portal_type_list</string> <string>my_layout_search_portal_type_list</string>
<string>my_layout_search_default_portal_type</string>
<string>my_layout_display_anonymous_user_registration</string> <string>my_layout_display_anonymous_user_registration</string>
</list> </list>
</value> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_layout_search_default_portal_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Force the fast search to a defined portal type. Else we display a list of portal type.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Default Search Portal Type</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [["",""],[context.Base_translateString(\'All Documents\'), \'all\'],] + [[context.Base_translateString(x), x] for x in context.getPortalDocumentTypeList()]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>Force the fast search to a defined portal type. Else we display a list of portal type.</string> </value> <value> <string>Define list of available portal type</string> </value>
</item> </item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: [[x, x] for x in context.getPortalDocumentTypeList()]</string> </value> <value> <string>python: [[context.Base_translateString(x), x] for x in context.getPortalDocumentTypeList()]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -118,7 +118,9 @@ ...@@ -118,7 +118,9 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -131,7 +133,7 @@ ...@@ -131,7 +133,7 @@
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -152,12 +154,14 @@ ...@@ -152,12 +154,14 @@
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -271,7 +275,7 @@ ...@@ -271,7 +275,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: here.getLayoutProperty(\'layout_display_search_widget\',True)</string> </value> <value> <string>python: here.getLayoutProperty(\'layout_search_default_portal_type\',"all")</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -284,7 +288,33 @@ ...@@ -284,7 +288,33 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:[[ context.Base_translateString(\'All Documents\'), \'all\'], [context.Base_translateString(\'Everything\'), \'\']] + [[context.Base_translateString(x), x] for x in context.getLayoutProperty(\'layout_search_portal_type_list\', [])]</string> </value> <value> <string>python: here.getLayoutProperty(\'layout_display_search_widget\',True)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getLayoutProperty(\'layout_search_default_portal_type\',"") != ""</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:[[context.Base_translateString(\'All Documents\'), \'all\'], [context.Base_translateString(\'Everything\'), \'\']] + [[context.Base_translateString(x), x] for x in context.getLayoutProperty(\'layout_search_portal_type_list\', [])]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
1730 1731
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment