Commit 135ed1b3 authored by Fabien Morin's avatar Fabien Morin

* use box_id instead of box.getId

* if the KnowledgeBox have expand_links_content_by_default set to True, don't hide text related to rss links
* add KnowledgeBox PropertySheet to KnowledgeBox portal_type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31192 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d6229ae2
<property_sheet_list>
<portal_type id="Knowledge Box">
<item>KnowledgeBox</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
......@@ -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
......
......@@ -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>
......
<?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>
428
\ No newline at end of file
430
\ No newline at end of file
5.4.4
\ No newline at end of file
5.4.3
\ 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