Skip to content

Commit

Permalink
[fc] Repository: plone.app.portlets
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2015-11-03T16:43:53+01:00
Author: Gagaro (Gagaro) <gagaro42@gmail.com>
Commit: plone/plone.app.portlets@2f99af2

fix: links in RSS portlets when using special characters.

Files changed:
M CHANGES.rst
M plone/app/portlets/portlets/rss.pt
Repository: plone.app.portlets
Branch: refs/heads/master
Date: 2015-11-04T17:40:09+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.portlets@98efbca

Merge pull request #60 from plone/fix-rss-links

fix: links in RSS portlets when using special characters.

Files changed:
M CHANGES.rst
M plone/app/portlets/portlets/rss.pt
  • Loading branch information
jensens committed Nov 4, 2015
1 parent bf69398 commit fcecded
Showing 1 changed file with 52 additions and 186 deletions.
238 changes: 52 additions & 186 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,222 +1,88 @@
Repository: plone.app.contenttypes
Repository: plone.app.portlets


Branch: refs/heads/master
Date: 2015-11-04T12:34:14-02:00
Author: hvelarde (hvelarde) <hector.velarde@gmail.com>
Commit: https://github.com/plone/plone.app.contenttypes/commit/1edc9fe3182867c1b2398676c64cc9fb939b03c7
Date: 2015-11-03T16:43:53+01:00
Author: Gagaro (Gagaro) <gagaro42@gmail.com>
Commit: https://github.com/plone/plone.app.portlets/commit/2f99af207d655d27ede4e4573324685718708765

Add getRawQuery method to Collection content type for backward compatibility with Archetypes API
fix: links in RSS portlets when using special characters.

Files changed:
M CHANGES.rst
M docs/README.rst
M plone/app/contenttypes/content.py
M plone/app/contenttypes/tests/test_collection.py
M setup.py
M plone/app/portlets/portlets/rss.pt

diff --git a/CHANGES.rst b/CHANGES.rst
index 2357e38..a4a4094 100644
index 15e83a9..3f61e23 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,7 +10,9 @@ New:
@@ -10,7 +10,8 @@ New:

Fixes:

-- *add item here*
+- Add ``getRawQuery`` method to Collection content type for backward compatibility with Archetypes API.
+ Fixes (partially) https://github.com/plone/plone.app.contenttypes/issues/283.
+ [hvelarde]


1.2.5 (2015-10-28)
diff --git a/docs/README.rst b/docs/README.rst
index 4896c87..8aa6d85 100644
--- a/docs/README.rst
+++ b/docs/README.rst
@@ -430,6 +430,8 @@ Differences to Products.ATContentTypes
- There is no more field ``Location``. If you need georeferenceable consider using ``collective.geo.behaviour``
- The link on the image of the newsitem triggers an overlay
- The link-type now allows the of the variables ``${navigation_root_url}`` and ``${portal_url}`` to construct relative urls.
+- The ``getQuery()`` function now returns a list of dict instead of a list of CatalogContentListingObject;
+ use of ``getRawQuery()`` is deprecated.
- The views for Folders and Collections changed their names and now share a common implementation (since version 1.2a8):

- ``folder_listing_view`` (Folders) and ``collection_view`` (Collections) -> ``listing_view`` (Folders and Collections)
@@ -506,3 +508,4 @@ Contributors
* Bogdan Girman <bogdan.girman@gmail.com>
* Martin Opstad Reistadbakk <martin@blaastolen.com>
* Florent Michon <fmichon@atreal.fr>
+* Héctor Velarde <hector.velarde@gmail.com>
diff --git a/plone/app/contenttypes/content.py b/plone/app/contenttypes/content.py
index faeb33b..5a71fcd 100644
--- a/plone/app/contenttypes/content.py
+++ b/plone/app/contenttypes/content.py
@@ -9,6 +9,7 @@
from plone.app.contenttypes.interfaces import INewsItem
from plone.dexterity.content import Container
from plone.dexterity.content import Item
+from zope.deprecation import deprecation
from zope.interface import implementer


@@ -37,8 +38,16 @@ def setQuery(self, query):
self.query = query

def getQuery(self):
+ """Return the query as a list of dict; note that this method
+ returns a list of CatalogContentListingObject in
+ Products.ATContentTypes.
+ """
return self.query

+ @deprecation.deprecate('getRawQuery() is deprecated; use getQuery().')
+ def getRawQuery(self):
+ return self.getQuery()
+
def setSort_on(self, sort_on):
self.sort_on = sort_on

diff --git a/plone/app/contenttypes/tests/test_collection.py b/plone/app/contenttypes/tests/test_collection.py
index 30e0f1d..5319c46 100644
--- a/plone/app/contenttypes/tests/test_collection.py
+++ b/plone/app/contenttypes/tests/test_collection.py
@@ -75,6 +75,10 @@ def test_bbb_getQuery(self):
self.collection.query = query
self.assertEqual(self.collection.getQuery(), query)

+ def test_bbb_getRawQuery(self):
+ self.collection.query = query
+ self.assertEqual(self.collection.getRawQuery(), query)
+
def test_bbb_setSort_on(self):
self.collection.setSort_on('start')
self.assertEqual(self.collection.sort_on, 'start')
diff --git a/setup.py b/setup.py
index 30319fa..ab07c6e 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,8 @@ def read(*rnames):
'plone.app.versioningbehavior',
'plone.app.lockingbehavior',
'pytz',
- 'plone.app.z3cform>=1.1.0.dev0'
+ 'plone.app.z3cform>=1.1.0.dev0',
+ 'zope.deprecation',
],
extras_require={
'test': [
+- Fix links in RSS portlets when using special characters.
+ [Gagaro]


3.1.2 (2015-09-27)
diff --git a/plone/app/portlets/portlets/rss.pt b/plone/app/portlets/portlets/rss.pt
index 26ad891..48a362b 100644
--- a/plone/app/portlets/portlets/rss.pt
+++ b/plone/app/portlets/portlets/rss.pt
@@ -25,7 +25,7 @@
tal:attributes="class python:oddrow and 'portletItem even' or 'portletItem odd'">

<a href="#"
- tal:attributes="href string:${item/url}"
+ tal:attributes="href item/url"
class="tile">
<span tal:replace="item/title">
Title


Repository: plone.app.contenttypes
Repository: plone.app.portlets


Branch: refs/heads/master
Date: 2015-11-04T17:30:01+01:00
Date: 2015-11-04T17:40:09+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/plone.app.contenttypes/commit/3fe1b2dcf03c8d64f7829c02489a9bdd47aab5a7
Commit: https://github.com/plone/plone.app.portlets/commit/98efbcafa0de62594ae7be568bb68261b9341d71

Merge pull request #289 from plone/issue_283
Merge pull request #60 from plone/fix-rss-links

Add getRawQuery method to Collection content type for backward compatibility with Archetypes API
fix: links in RSS portlets when using special characters.

Files changed:
M CHANGES.rst
M docs/README.rst
M plone/app/contenttypes/content.py
M plone/app/contenttypes/tests/test_collection.py
M setup.py
M plone/app/portlets/portlets/rss.pt

diff --git a/CHANGES.rst b/CHANGES.rst
index 2357e38..a4a4094 100644
index 15e83a9..3f61e23 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,7 +10,9 @@ New:
@@ -10,7 +10,8 @@ New:

Fixes:

-- *add item here*
+- Add ``getRawQuery`` method to Collection content type for backward compatibility with Archetypes API.
+ Fixes (partially) https://github.com/plone/plone.app.contenttypes/issues/283.
+ [hvelarde]


1.2.5 (2015-10-28)
diff --git a/docs/README.rst b/docs/README.rst
index 4896c87..8aa6d85 100644
--- a/docs/README.rst
+++ b/docs/README.rst
@@ -430,6 +430,8 @@ Differences to Products.ATContentTypes
- There is no more field ``Location``. If you need georeferenceable consider using ``collective.geo.behaviour``
- The link on the image of the newsitem triggers an overlay
- The link-type now allows the of the variables ``${navigation_root_url}`` and ``${portal_url}`` to construct relative urls.
+- The ``getQuery()`` function now returns a list of dict instead of a list of CatalogContentListingObject;
+ use of ``getRawQuery()`` is deprecated.
- The views for Folders and Collections changed their names and now share a common implementation (since version 1.2a8):

- ``folder_listing_view`` (Folders) and ``collection_view`` (Collections) -> ``listing_view`` (Folders and Collections)
@@ -506,3 +508,4 @@ Contributors
* Bogdan Girman <bogdan.girman@gmail.com>
* Martin Opstad Reistadbakk <martin@blaastolen.com>
* Florent Michon <fmichon@atreal.fr>
+* Héctor Velarde <hector.velarde@gmail.com>
diff --git a/plone/app/contenttypes/content.py b/plone/app/contenttypes/content.py
index faeb33b..5a71fcd 100644
--- a/plone/app/contenttypes/content.py
+++ b/plone/app/contenttypes/content.py
@@ -9,6 +9,7 @@
from plone.app.contenttypes.interfaces import INewsItem
from plone.dexterity.content import Container
from plone.dexterity.content import Item
+from zope.deprecation import deprecation
from zope.interface import implementer


@@ -37,8 +38,16 @@ def setQuery(self, query):
self.query = query

def getQuery(self):
+ """Return the query as a list of dict; note that this method
+ returns a list of CatalogContentListingObject in
+ Products.ATContentTypes.
+ """
return self.query

+ @deprecation.deprecate('getRawQuery() is deprecated; use getQuery().')
+ def getRawQuery(self):
+ return self.getQuery()
+
def setSort_on(self, sort_on):
self.sort_on = sort_on

diff --git a/plone/app/contenttypes/tests/test_collection.py b/plone/app/contenttypes/tests/test_collection.py
index 30e0f1d..5319c46 100644
--- a/plone/app/contenttypes/tests/test_collection.py
+++ b/plone/app/contenttypes/tests/test_collection.py
@@ -75,6 +75,10 @@ def test_bbb_getQuery(self):
self.collection.query = query
self.assertEqual(self.collection.getQuery(), query)

+ def test_bbb_getRawQuery(self):
+ self.collection.query = query
+ self.assertEqual(self.collection.getRawQuery(), query)
+
def test_bbb_setSort_on(self):
self.collection.setSort_on('start')
self.assertEqual(self.collection.sort_on, 'start')
diff --git a/setup.py b/setup.py
index 30319fa..ab07c6e 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,8 @@ def read(*rnames):
'plone.app.versioningbehavior',
'plone.app.lockingbehavior',
'pytz',
- 'plone.app.z3cform>=1.1.0.dev0'
+ 'plone.app.z3cform>=1.1.0.dev0',
+ 'zope.deprecation',
],
extras_require={
'test': [
+- Fix links in RSS portlets when using special characters.
+ [Gagaro]


3.1.2 (2015-09-27)
diff --git a/plone/app/portlets/portlets/rss.pt b/plone/app/portlets/portlets/rss.pt
index 26ad891..48a362b 100644
--- a/plone/app/portlets/portlets/rss.pt
+++ b/plone/app/portlets/portlets/rss.pt
@@ -25,7 +25,7 @@
tal:attributes="class python:oddrow and 'portletItem even' or 'portletItem odd'">

<a href="#"
- tal:attributes="href string:${item/url}"
+ tal:attributes="href item/url"
class="tile">
<span tal:replace="item/title">
Title


0 comments on commit fcecded

Please sign in to comment.