Commit 2dbe9839 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* add a News Widget.

* do not display Subsection Widget on Web Site level.
* display Subsection Widget only when visible subsections exist.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27396 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 409d9e16
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>web_section_ram_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block replace="nothing">\n
<!--\n
This widget displays the list of News.\n
\n
TODO:\n
- maximum number of items should be configurable.\n
- excerpt support is required?\n
-->\n
</tal:block>\n
\n
<tal:block tal:define="web_site python:here.getWebSiteValue();\n
news_area_section_id python:here.getLayoutProperty(\'news_area_section_id\', \'\');\n
news_area_section python:web_site.restrictedTraverse(news_area_section_id)">\n
<ul>\n
<tal:block tal:repeat="item python:news_area_section.getDocumentValueList(limit=10, sort_on=[(\'modification_date\',\'descending\')])">\n
<li><a href="#"\n
tal:attributes="href python:news_area_section.getPermanentURL(item)"\n
tal:content="item/getTitle" /> (<tal:block tal:replace="python:item.getModificationDate().Date()"/>)</li>\n
</tal:block>\n
</ul>\n
</tal:block>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_viewNewsWidget</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -59,7 +59,7 @@
<ul tal:define="current_web_section python:request.get(\'current_web_section\', here)"\n
i18n:translate="" i18n:domain="ui" i18n:attributes="title"\n
title="Sections accessible from here.">\n
<li tal:repeat="subsection python:current_web_section.WebSection_getSiteMapTree(depth=1)">\n
<li tal:repeat="subsection python:current_web_section.getSiteMapTree(depth=1)">\n
<a href="#" tal:content="subsection/translated_title"\n
tal:attributes="href subsection/url">Menu item</a>\n
</li>\n
......
......@@ -67,9 +67,11 @@
<string>navbar navbar-left</string>
<string>headline</string>
<string>footer</string>
<string>subcontent subcontent-box sidemenu1 (Subsections)</string>
<string>subcontent subcontent-box sidemenu3 (News)</string>
<string>subcontent subcontent-box adminToolbox (Toolbox)</string>
<string>subcontent subcontent-box sidemenu1 (4-01a. Side menu 1)</string>
<string>subcontent subcontent-box sidemenu2 (4-01b. Side menu 2)</string>
<string>subcontent subcontent-box sidemenu1 (Subsections)</string>
<string>subcontent subcontent-box sidemenu3 (4-01c. Side menu 3)</string>
<string>subcontent subcontent-box headbox1 (4-02. Box head h1 (with icon))</string>
<string>subcontent subcontent-box headbox1noicon (4-03. Box head h1 (no icon))</string>
......@@ -86,7 +88,6 @@
<string>subcontent subcontent-box documentbox (4-13b. Document)</string>
<string>subcontent subcontent-box blogbox (4-13c. Blog)</string>
<string>subcontent subcontent-box forumbox (4.13d Forum)</string>
<string>subcontent subcontent-box adminToolbox (Toolbox)</string>
</list>
</value>
</item>
......@@ -274,6 +275,14 @@
</list>
</value>
</item>
<item>
<key> <string>subcontent subcontent-box sidemenu3 (News)</string> </key>
<value>
<list>
<string>news_box</string>
</list>
</value>
</item>
<item>
<key> <string>subcontent subcontent-box tablebox (4-07. Table)</string> </key>
<value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>news_box</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>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>editable</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>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>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_editor_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </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>News</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/WebSection_viewNewsWidget</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -68,6 +68,7 @@
<string>headline</string>
<string>footer</string>
<string>subcontent subcontent-box sidemenu1 (Subsections)</string>
<string>subcontent subcontent-box sidemenu3 (News)</string>
<string>subcontent subcontent-box adminToolbox (Toolbox)</string>
</list>
</value>
......@@ -136,6 +137,14 @@
</list>
</value>
</item>
<item>
<key> <string>subcontent subcontent-box sidemenu3 (News)</string> </key>
<value>
<list>
<string>news_box</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>news_box</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>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>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>news_box</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>erp5_web_multiflex5_demo_layout</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
jps
vincentd
\ No newline at end of file
vincentd
kazuhiko
\ No newline at end of file
101
\ No newline at end of file
102
\ 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