From ed3e5222fe4dc311c1a0ee955071dc739bb790fb Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Fri, 14 Dec 2012 11:12:12 +0100 Subject: [PATCH] Knowledge Pad can have several publication_section relations. also fix a bug in getting real context logic where url is like web_site/lang/referefnce. --- .../Base_viewKnowledgePadMacroLibrary.xml | 2 +- ...e_createDefaultKnowledgePadListForUser.xml | 2 +- .../ERP5Site_getActiveKnowledgePadForUser.xml | 17 +- .../ERP5Site_getKnowledgePadListForUser.xml | 12 +- .../KnowledgePad_view/my_group.xml | 200 +------- .../my_publication_section_title.xml | 448 +----------------- .../KnowledgePad_view/my_title.xml | 206 +------- .../my_translated_validation_state_title.xml | 208 +------- .../KnowledgePad_view/my_user_layout.xml | 200 +------- bt5/erp5_knowledge_pad/bt/change_log | 3 + bt5/erp5_knowledge_pad/bt/revision | 2 +- 11 files changed, 131 insertions(+), 1169 deletions(-) diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml index 808dc270f3..aef099c6e6 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml @@ -100,7 +100,7 @@ <tal:block\n tal:condition="not: isKnowledgePadTemplateUsed"\n tal:define="is_customized_pad python:\n - active_knowledge_pad.getPublicationSectionValue()==context and\n + context in active_knowledge_pad.getPublicationSectionValueList() and\n active_knowledge_pad.getGroup()==default_pad_group">\n \n <a tal:condition="not: is_customized_pad"\n diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_createDefaultKnowledgePadListForUser.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_createDefaultKnowledgePadListForUser.xml index 3086eb30f7..d367c93828 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_createDefaultKnowledgePadListForUser.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_createDefaultKnowledgePadListForUser.xml @@ -76,7 +76,7 @@ for pref in (system_pref, user_pref):\n else:\n if default_pad_group in (\'\', None):\n # find from preferences for the same context(site, section, page)\n - pref_pads = filter(lambda x: x.getPublicationSectionValue()==context, \n + pref_pads = filter(lambda x: context in x.getPublicationSectionValueList(), \n pref_pads)\n else:\n pref_pads = filter(lambda x: x.getGroup()==default_pad_group, \n diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getActiveKnowledgePadForUser.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getActiveKnowledgePadForUser.xml index 66cb0f934e..ac4ad49aad 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getActiveKnowledgePadForUser.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getActiveKnowledgePadForUser.xml @@ -69,23 +69,24 @@ active_knowledge_pad, knowledge_pads = \\\n if active_knowledge_pad is not None:\n return active_knowledge_pad, knowledge_pads\n \n -# in Web Mode we can have a temporary Web Site objects created based on current language\n +# in Web Mode we can have a temporary object created based on current language, document by reference\n real_context = context\n -if context.isTempObject():\n - real_context = context.getParentValue()\n +while real_context.isTempObject():\n + real_context = real_context.getParentValue()\n +real_context_url = real_context.getRelativeUrl()\n \n # first filter if we have a custom Pad for the context\n for knowledge_pad in knowledge_pads:\n pad_state = knowledge_pad.getValidationState()\n - publication_section = knowledge_pad.getPublicationSectionValue()\n - if publication_section == real_context and pad_state in visible_state_list:\n - if publication_section.getPortalType() == \'Web Site\' and default_pad_group in MARKER:\n + publication_section_list = knowledge_pad.getPublicationSectionList()\n + if real_context_url in publication_section_list and pad_state in visible_state_list:\n + if real_context.getPortalType() == \'Web Site\' and default_pad_group in MARKER:\n # ERP5 Web Site front gadget\n return knowledge_pad, knowledge_pads\n - elif publication_section == real_context and knowledge_pad.getGroup() == default_pad_group:\n + elif real_context_url in publication_section_list and knowledge_pad.getGroup() == default_pad_group:\n # some Web Section can have a customized EXPLICILY "sticked" Pad\n return knowledge_pad, knowledge_pads\n - elif publication_section == None and default_pad_group in MARKER and pad_state in visible_state_list:\n + elif len(publication_section_list) == 0 and default_pad_group in MARKER and pad_state in visible_state_list:\n # ERP5 Site front gadget \n return knowledge_pad, knowledge_pads \n \n diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getKnowledgePadListForUser.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getKnowledgePadListForUser.xml index 73f454c18c..cfd3d32650 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getKnowledgePadListForUser.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getKnowledgePadListForUser.xml @@ -57,12 +57,10 @@ from zExceptions import Unauthorized\n \n def filterKnowledgePadListForContext(results, mode, \n default_pad_group):\n - # when we use URL as a way to determine site\'s language do not\n - # use (especially for Web Site\'s root) current context which is the language\n - # code. Instead we use its parent value which is the real context \n + # in Web Mode we can have a temporary object created based on current language, document by reference\n real_context = context\n - if context.getId() in context.Localizer.get_supported_languages():\n - real_context = context.getParentValue() \n + while real_context.isTempObject():\n + real_context = real_context.getParentValue()\n real_context_url = real_context.getRelativeUrl()\n \n if mode == \'erp5_front\':\n @@ -72,11 +70,11 @@ def filterKnowledgePadListForContext(results, mode, \n x.getGroup() is None, results)\n elif mode == \'web_front\':\n # Web Site must at least one Pad referenced by context\n - results = filter(lambda x: x.getPublicationSection() == real_context_url and \\\n + results = filter(lambda x: real_context_url in x.getPublicationSectionList() and \\\n x.getGroup() is None, results)\n elif mode == \'web_section\':\n # Web Sections, Web Pages can "reuse" tabs\n - results = filter(lambda x: x.getPublicationSection() == real_context_url or \\\n + results = filter(lambda x: real_context_url in x.getPublicationSectionList() or \\\n x.getGroup() == default_pad_group, results)\n return results\n \n diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_group.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_group.xml index 3431c1eec5..9ab7c50104 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_group.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_group.xml @@ -2,10 +2,20 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="StringField" module="Products.Formulator.StandardFields"/> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> </pickle> <pickle> <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>display_width</string> + <string>description</string> + <string>title</string> + </list> + </value> + </item> <item> <key> <string>id</string> </key> <value> <string>my_group</string> </value> @@ -18,14 +28,6 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> - <item> - <key> <string>required_not_found</string> </key> - <value> <string>Input is required but no input given.</string> </value> - </item> - <item> - <key> <string>too_long</string> </key> - <value> <string>Too much input was given.</string> </value> - </item> </dictionary> </value> </item> @@ -34,71 +36,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>unicode</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -109,71 +55,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>default</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -183,74 +73,30 @@ <key> <string>values</string> </key> <value> <dictionary> - <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>description</string> </key> <value> <string>Pad Group is used to specify defaut pads</string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>display_width</string> </key> <value> <int>20</int> </value> </item> <item> - <key> <string>editable</string> </key> - <value> <int>1</int> </value> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> </item> <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> </item> <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <int>0</int> </value> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> </item> <item> <key> <string>title</string> </key> <value> <string>Pad Group</string> </value> </item> - <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> - <value> <int>0</int> </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_publication_section_title.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_publication_section_title.xml index 77d5519d14..6c0f0bb658 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_publication_section_title.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_publication_section_title.xml @@ -2,10 +2,22 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="RelationStringField" module="Products.ERP5Form.RelationField"/> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> </pickle> <pickle> <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>base_category</string> + <string>catalog_index</string> + <string>columns</string> + <string>portal_type</string> + <string>title</string> + </list> + </value> + </item> <item> <key> <string>id</string> </key> <value> <string>my_publication_section_title</string> </value> @@ -18,34 +30,6 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> - <item> - <key> <string>line_too_long</string> </key> - <value> <string>A line was too long.</string> </value> - </item> - <item> - <key> <string>relation_result_ambiguous</string> </key> - <value> <string>Select appropriate document in the list.</string> </value> - </item> - <item> - <key> <string>relation_result_empty</string> </key> - <value> <string>No such document was found.</string> </value> - </item> - <item> - <key> <string>relation_result_too_long</string> </key> - <value> <string>Too many documents were found.</string> </value> - </item> - <item> - <key> <string>required_not_found</string> </key> - <value> <string>Input is required but no input given.</string> </value> - </item> - <item> - <key> <string>too_long</string> </key> - <value> <string>You entered too many characters.</string> </value> - </item> - <item> - <key> <string>too_many_lines</string> </key> - <value> <string>You entered too many lines.</string> </value> - </item> </dictionary> </value> </item> @@ -54,147 +38,15 @@ <value> <dictionary> <item> - <key> <string>allow_creation</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>allow_jump</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>base_category</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>catalog_index</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>columns</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>container_getter_id</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>enabled</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra_item</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>first_item</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>items</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>jump_method</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>list_method</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_linelength</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_lines</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>parameter_list</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>portal_type</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>relation_setter_id</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>size</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>sort</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>update_method</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -205,147 +57,15 @@ <value> <dictionary> <item> - <key> <string>allow_creation</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>allow_jump</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>base_category</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>catalog_index</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>columns</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>container_getter_id</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra_item</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>first_item</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>items</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>jump_method</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>list_method</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_linelength</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_lines</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>parameter_list</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>portal_type</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>relation_setter_id</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>size</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>sort</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>update_method</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -355,18 +75,6 @@ <key> <string>values</string> </key> <value> <dictionary> - <item> - <key> <string>allow_creation</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>allow_jump</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>base_category</string> </key> <value> <string>publication_section</string> </value> @@ -391,88 +99,12 @@ </value> </item> <item> - <key> <string>container_getter_id</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <int>20</int> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> + <key> <string>field_id</string> </key> + <value> <string>my_multi_relation_field</string> </value> </item> <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra_item</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>first_item</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>items</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>jump_method</string> </key> - <value> <string>Base_jumpToRelatedDocument</string> </value> - </item> - <item> - <key> <string>list_method</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_linelength</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_lines</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>parameter_list</string> </key> - <value> - <list/> - </value> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> </item> <item> <key> <string>portal_type</string> </key> @@ -490,43 +122,13 @@ </value> </item> <item> - <key> <string>relation_setter_id</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>size</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>sort</string> </key> - <value> - <list/> - </value> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> </item> <item> <key> <string>title</string> </key> <value> <string>Publication Section</string> </value> </item> - <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>update_method</string> </key> - <value> <string>Base_validateRelation</string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> - <value> <int>0</int> </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_title.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_title.xml index d619932135..7c41be3de1 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_title.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_title.xml @@ -2,10 +2,18 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="StringField" module="Products.Formulator.StandardFields"/> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> </pickle> <pickle> <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>display_width</string> + </list> + </value> + </item> <item> <key> <string>id</string> </key> <value> <string>my_title</string> </value> @@ -18,14 +26,6 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> - <item> - <key> <string>required_not_found</string> </key> - <value> <string>Input is required but no input given.</string> </value> - </item> - <item> - <key> <string>too_long</string> </key> - <value> <string>Too much input was given.</string> </value> - </item> </dictionary> </value> </item> @@ -34,71 +34,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -109,71 +53,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -183,73 +71,21 @@ <key> <string>values</string> </key> <value> <dictionary> - <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>display_width</string> </key> <value> <int>20</int> </value> </item> <item> - <key> <string>editable</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string>Title</string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> + <key> <string>field_id</string> </key> + <value> <string>my_view_mode_title</string> </value> </item> <item> - <key> <string>unicode</string> </key> - <value> <int>0</int> </value> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> </item> <item> - <key> <string>whitespace_preserve</string> </key> - <value> <int>0</int> </value> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> </item> </dictionary> </value> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_translated_validation_state_title.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_translated_validation_state_title.xml index 2df1792813..f8bf5216b5 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_translated_validation_state_title.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_translated_validation_state_title.xml @@ -2,10 +2,16 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="StringField" module="Products.Formulator.StandardFields"/> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> </pickle> <pickle> <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list/> + </value> + </item> <item> <key> <string>id</string> </key> <value> <string>my_translated_validation_state_title</string> </value> @@ -18,14 +24,6 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> - <item> - <key> <string>required_not_found</string> </key> - <value> <string>Input is required but no input given.</string> </value> - </item> - <item> - <key> <string>too_long</string> </key> - <value> <string>Too much input was given.</string> </value> - </item> </dictionary> </value> </item> @@ -34,71 +32,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>extra</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -109,71 +51,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>max_length</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -184,72 +70,16 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <int>20</int> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string>State</string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> + <key> <string>field_id</string> </key> + <value> <string>my_view_mode_translated_workflow_state_title</string> </value> </item> <item> - <key> <string>unicode</string> </key> - <value> <int>0</int> </value> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> </item> <item> - <key> <string>whitespace_preserve</string> </key> - <value> <int>0</int> </value> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> </item> </dictionary> </value> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_user_layout.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_user_layout.xml index 4c05ee6fe3..9acd182d26 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_user_layout.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_view/my_user_layout.xml @@ -2,10 +2,20 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="StringField" module="Products.Formulator.StandardFields"/> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> </pickle> <pickle> <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>display_width</string> + <string>description</string> + <string>title</string> + </list> + </value> + </item> <item> <key> <string>id</string> </key> <value> <string>my_user_layout</string> </value> @@ -18,14 +28,6 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> - <item> - <key> <string>required_not_found</string> </key> - <value> <string>Input is required but no input given.</string> </value> - </item> - <item> - <key> <string>too_long</string> </key> - <value> <string>Too much input was given.</string> </value> - </item> </dictionary> </value> </item> @@ -34,71 +36,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>unicode</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -109,71 +55,15 @@ <value> <dictionary> <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>default</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>editable</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>truncate</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> + <key> <string>target</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -183,74 +73,30 @@ <key> <string>values</string> </key> <value> <dictionary> - <item> - <key> <string>alternate_name</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>css_class</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>default</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>description</string> </key> <value> <string>This field contains layout of contained boxes. It should not (generally) be altered manually but by the system itself</string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>display_width</string> </key> <value> <int>20</int> </value> </item> <item> - <key> <string>editable</string> </key> - <value> <int>1</int> </value> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> </item> <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> </item> <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <int>0</int> </value> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> </item> <item> <key> <string>title</string> </key> <value> <string>Layout of contained boxes</string> </value> </item> - <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> - <value> <int>0</int> </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_knowledge_pad/bt/change_log b/bt5/erp5_knowledge_pad/bt/change_log index 1d3dd6a0f4..20f14982a2 100644 --- a/bt5/erp5_knowledge_pad/bt/change_log +++ b/bt5/erp5_knowledge_pad/bt/change_log @@ -1,3 +1,6 @@ +2012-12-14 Kazuhiko +* Knowledge Pad can have several publication_section relations. + 2012-12-10 Kazuhiko * support predicate in Knowled Box for more flexibility. diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index 3879e48b52..827de6e933 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -753 \ No newline at end of file +754 \ No newline at end of file -- 2.30.9