diff --git a/CHANGES.rst b/CHANGES.rst index 526e69ce9..56d37c94a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,9 @@ There's a frood who really knows where his towel is. 1.0a13 (unreleased) ^^^^^^^^^^^^^^^^^^^ +- Add RSS tile (closes `#347`_). + [rodfersou] + - Remove Grok dependency for vocabularies. [l34marr] @@ -708,6 +711,7 @@ There's a frood who really knows where his towel is. .. _`#333`: https://github.com/collective/collective.cover/issues/333 .. _`#339`: https://github.com/collective/collective.cover/issues/339 .. _`#342`: https://github.com/collective/collective.cover/issues/342 +.. _`#347`: https://github.com/collective/collective.cover/issues/347 .. _`#348`: https://github.com/collective/collective.cover/issues/348 .. _`#351`: https://github.com/collective/collective.cover/issues/351 .. _`#371`: https://github.com/collective/collective.cover/issues/371 diff --git a/setup.py b/setup.py index a035d24f6..df0f24dc4 100644 --- a/setup.py +++ b/setup.py @@ -53,6 +53,7 @@ 'plone.api', 'plone.app.blocks >=2.2.0', 'plone.app.dexterity [grok, relations]', + 'plone.app.drafts', # if not used, can be removed 'plone.app.iterate', 'plone.app.jquery >=1.7.2', 'plone.app.jquerytools >=1.5.1', @@ -62,10 +63,12 @@ 'plone.app.referenceablebehavior', 'plone.app.registry', 'plone.app.relationfield', + 'plone.app.standardtiles >=1.0b4', 'plone.app.textfield', 'plone.app.tiles', 'plone.app.uuid', 'plone.app.vocabularies', + 'plone.app.widgets >=1.8.0.dev0', 'plone.autoform', 'plone.behavior', 'plone.dexterity', diff --git a/src/collective/cover/profiles/default/registry.xml b/src/collective/cover/profiles/default/registry.xml index 31764a823..85f039d67 100644 --- a/src/collective/cover/profiles/default/registry.xml +++ b/src/collective/cover/profiles/default/registry.xml @@ -49,6 +49,7 @@ collective.cover.list collective.cover.pfg collective.cover.richtext + collective.cover.rss diff --git a/src/collective/cover/tiles/rss.py b/src/collective/cover/tiles/rss.py new file mode 100644 index 000000000..b2952c1d3 --- /dev/null +++ b/src/collective/cover/tiles/rss.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from collective.cover import _ +from collective.cover.tiles.base import IPersistentCoverTile +from collective.cover.tiles.base import PersistentCoverTile +from collective.cover.tiles.configuration_view import IDefaultConfigureForm +from plone.app.standardtiles.rss import IRSSTile as IRSSTileBase +from plone.app.standardtiles.rss import RSSTile as RSSTileBase +from plone.directives import form +from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile +from zope.interface import implements + + +class IRSSTile(IRSSTileBase, IPersistentCoverTile): + + form.omitted(IDefaultConfigureForm, 'portlet_title') + form.omitted(IDefaultConfigureForm, 'count') + form.omitted(IDefaultConfigureForm, 'url') + form.omitted(IDefaultConfigureForm, 'timeout') + + +class RSSTile(RSSTileBase, PersistentCoverTile): + + implements(IRSSTile) + + index = ViewPageTemplateFile('templates/rss.pt') + + is_configurable = True + short_name = _(u'msg_short_name_basic', default=u'RSS') + + def accepted_ct(self): + """Return an empty list as no content types are accepted.""" + return [] diff --git a/src/collective/cover/tiles/templates/rss.pt b/src/collective/cover/tiles/templates/rss.pt new file mode 100644 index 000000000..e47799db4 --- /dev/null +++ b/src/collective/cover/tiles/templates/rss.pt @@ -0,0 +1,51 @@ + + + +
+
+ + Tags + +
+ +
+ + + Title + + + + 19.02.2007 + + + +
+
+ +
+ + diff --git a/src/collective/cover/tiles/tiles.zcml b/src/collective/cover/tiles/tiles.zcml index dcbbc52bf..75f1c30d8 100644 --- a/src/collective/cover/tiles/tiles.zcml +++ b/src/collective/cover/tiles/tiles.zcml @@ -126,4 +126,17 @@ for="*" /> + + diff --git a/versions-4.3.x.cfg b/versions-4.3.x.cfg index b00d7917d..f660964b4 100644 --- a/versions-4.3.x.cfg +++ b/versions-4.3.x.cfg @@ -7,7 +7,7 @@ test-eggs = [versions] collective.js.bootstrap = 2.3.1.1 plone.app.blocks = 2.2.0 -plone.app.tiles = 1.0.1 +plone.app.tiles = 2.2.0 plone.app.widgets = 1.8.0 # for testing compatibility with newer versions of jQuery