diff --git a/bt5/erp5_knowledge_pad/PortalTypePropertySheetTemplateItem/property_sheet_list.xml b/bt5/erp5_knowledge_pad/PortalTypePropertySheetTemplateItem/property_sheet_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..692022e464744685c629cf2305d867ecfb5bc53e --- /dev/null +++ b/bt5/erp5_knowledge_pad/PortalTypePropertySheetTemplateItem/property_sheet_list.xml @@ -0,0 +1,5 @@ +<property_sheet_list> + <portal_type id="Knowledge Box"> + <item>KnowledgeBox</item> + </portal_type> +</property_sheet_list> \ No newline at end of file diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ListBox_asListStyleHTML.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ListBox_asListStyleHTML.xml index 21e185904290da0cd54abfeccc104195169e66bc..d855c7fe36e6f70c1c5443e83c5ca5dc575ce472 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ListBox_asListStyleHTML.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ListBox_asListStyleHTML.xml @@ -75,6 +75,7 @@ box python: real_context.restrictedTraverse(box_relative_url); \n box_id python: \'visual_\'+box.getId();\n dom_id python: request.get(\'dom_id\',None) or box_id;\n + display_links_content box/isExpandLinksContentByDefault;\n is_gadget_mode request/is_gadget_mode | nothing;\n list_style python:request.get(\'list_style\', None);\n value_dict python: {\'field_title\':None, \'field_date\': None, \'field_content\':None,\'field_img\':None,\'field_link\':None,\'field_others_links\':None,\'field_md5\':None,\'field_sender\':None};\n @@ -129,18 +130,18 @@ \n <!-- Refresh -->\n \n - <a class="right" tal:attributes="onclick python:real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,box_id, {}, 1)"><img alt="" tal:attributes="onload python:\'if(\\\'\'+rss_title.replace(\'\\\'\',\'\')+\'\\\'==\\\'Please enter a valid Rss or Atom url in the edit form\\\'){showElement(\\\'edit_form_\'+box.getId()+\'\\\');;}\'" src="refresh.png"/></a>\n + <a class="right" tal:attributes="onclick python:real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,box_id, {}, 1)"><img alt="" tal:attributes="onload python:\'if(\\\'\'+rss_title.replace(\'\\\'\',\'\')+\'\\\'==\\\'Please enter a valid Rss or Atom url in the edit form\\\'){showElement(\\\'edit_form_\'+box_id+\'\\\');;}\'" src="refresh.png"/></a>\n \n <!-- Feed Title -->\n \n <tal:block tal:condition="anonymous">\n <a class="title"\n - tal:attributes="href rss_link; target string:_blank; id python:\'rss_title_\'+box.getId()"\n + tal:attributes="href rss_link; target string:_blank; id python:\'rss_title_\'+box_id"\n tal:content="rss_title"/>\n </tal:block>\n <tal:block tal:condition="not: anonymous">\n <a class="title"\n - tal:attributes="href rss_link; target string:_blank; id python:\'rss_title_\'+box.getId()"\n + tal:attributes="href rss_link; target string:_blank; id python:\'rss_title_\'+box_id"\n tal:content="python:real_context.Base_formatRssTitleWithUnreadItemCount(rss_title=rss_title,selection_name=selection_name,total_line=total_line)"/>\n </tal:block>\n \n @@ -162,7 +163,7 @@ onmouseout="this.style.backgroundColor=\'inherit\';"\n tal:attributes="class python:value_dict[\'field_md5\'] in read_item_list and \'read\' or \'\';\n title python:value_dict[\'field_sender\'];\n - onclick python:\'if(this.className!=\\\'read\\\')toggle(\\\'description_\'+box.getId()+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n + onclick python:\'toggle(\\\'description_\'+box_id+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n <tal:block tal:condition="python:value_dict[\'field_img\']"\n tal:content="structure python:html_dict[\'field_img\']">image</tal:block>\n <a><span tal:content="python:value_dict[\'field_title\']">title</span>\n @@ -176,7 +177,7 @@ onmouseout="this.style.backgroundColor=\'inherit\';"\n tal:attributes="class python:value_dict[\'field_md5\'] in read_item_list and \'read\' or \'\';\n title python:value_dict[\'field_sender\'];\n - onclick python:\'if(this.className!=\\\'read\\\'){MochiKit.Async.doSimpleXMLHttpRequest(\\\'Base_setRssItemReadInSelection\\\', {\\\'selection_name\\\':\\\'\'+selection_name+\'\\\',\\\'item\\\':\\\'\'+ \'%s\' % value_dict[\'field_md5\']+\'\\\'});;this.className=\\\'read\\\';;\'+real_context.KnowledgePad_generateAjaxCall(\'%s/Base_formatRssTitleWithUnreadItemCount\' % context_url,box,\'rss_title_\'+box.getId(),{\'rss_title\':rss_title,\'total_line\':total_line,\'selection_name\':selection_name}, 1)+\'}toggle(\\\'description_\'+box.getId()+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n + onclick python:\'if(this.className!=\\\'read\\\'){MochiKit.Async.doSimpleXMLHttpRequest(\\\'Base_setRssItemReadInSelection\\\', {\\\'selection_name\\\':\\\'\'+selection_name+\'\\\',\\\'item\\\':\\\'\'+ \'%s\' % value_dict[\'field_md5\']+\'\\\'});;this.className=\\\'read\\\';;\'+real_context.KnowledgePad_generateAjaxCall(\'%s/Base_formatRssTitleWithUnreadItemCount\' % context_url,box,\'rss_title_\'+box_id,{\'rss_title\':rss_title,\'total_line\':total_line,\'selection_name\':selection_name}, 1)+\'}toggle(\\\'description_\'+box_id+\'_\'+str(repeat[\'line\'].index)+\'\\\');;\'">\n <tal:block tal:condition="python:value_dict[\'field_img\']"\n tal:content="structure python:html_dict[\'field_img\']">image</tal:block>\n <a><span tal:content="python:value_dict[\'field_title\']">title</span>\n @@ -186,9 +187,9 @@ </div>\n </tal:block>\n <p class="clear"></p>\n - <div tal:attributes="id python:\'description_\'+box.getId()+\'_\'+str(repeat[\'line\'].index)"\n - class="content"\n - style="display:none;">\n + <div tal:attributes="id python:\'description_\'+box_id+\'_\'+str(repeat[\'line\'].index);\n + style python: display_links_content and \'display:block\' or \'display:none\';"\n + class="content">\n <p tal:condition="python:value_dict[\'field_content\']"\n tal:content="structure python:value_dict[\'field_content\']"/>\n <div id="others_links">\n diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_view.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_view.xml index c908833ed103dd388116c13ab51c8303b913da1f..3062c93f29a9ca6bac0248d14ccd38a454b90b73 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_view.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_view.xml @@ -92,6 +92,7 @@ <list> <string>my_title</string> <string>my_specialise_title</string> + <string>my_expand_links_content_by_default</string> <string>my_translated_validation_state_title</string> </list> </value> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_view/my_expand_links_content_by_default.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_view/my_expand_links_content_by_default.xml new file mode 100644 index 0000000000000000000000000000000000000000..7115dd0f03779a930fbc751b065e6caf932841bd --- /dev/null +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgeBox_view/my_expand_links_content_by_default.xml @@ -0,0 +1,171 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="CheckBoxField" module="Products.Formulator.StandardFields"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>my_expand_links_content_by_default</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>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>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>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</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>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>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <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> <int>0</int> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </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>title</string> </key> + <value> <string>Expand Links Content By Default</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index fb8a210573a155254893b7e53ff3612be28795d7..a71e551f35edb03dbd4c0d17cb4a7221b10d7c56 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -428 \ No newline at end of file +430 \ 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..dd28dd1e2383239578e5bd0c4a81673f7664ca34 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 @@ -0,0 +1 @@ +Knowledge Box | KnowledgeBox \ No newline at end of file diff --git a/bt5/erp5_knowledge_pad/bt/version b/bt5/erp5_knowledge_pad/bt/version index 3238344b3b0de09b6db92e0cee393c124925aaac..b5db1702f35f10465e68432309648ad4cf0d2a9a 100644 --- a/bt5/erp5_knowledge_pad/bt/version +++ b/bt5/erp5_knowledge_pad/bt/version @@ -1 +1 @@ -5.4.4 \ No newline at end of file +5.4.3 \ No newline at end of file