Merge branch dev-dc
authorThierry Florac <thierry.florac@onf.fr>
Mon, 08 Oct 2018 11:55:14 +0200
changeset 168 71aeef3a5432
parent 165 0dc27358bff1 (current diff)
parent 167 83facaf2246a (diff)
child 169 b7a85fd478c5
Merge branch dev-dc
buildout.cfg
docs/HISTORY.txt
setup.py
src/pyams_default_theme/component/paragraph/pictogram.py
--- a/buildout.cfg	Fri Oct 05 15:15:08 2018 +0200
+++ b/buildout.cfg	Mon Oct 08 11:55:14 2018 +0200
@@ -79,4 +79,4 @@
 eggs = pyams_default_theme [test]
 
 [versions]
-pyams_default_theme = 0.1.10
+pyams_default_theme = 0.1.11
--- a/docs/HISTORY.txt	Fri Oct 05 15:15:08 2018 +0200
+++ b/docs/HISTORY.txt	Mon Oct 08 11:55:14 2018 +0200
@@ -1,6 +1,10 @@
 History
 =======
 
+0.1.11
+------
+ - added method to pictograms paragraph renderer
+
 0.1.10
 ------
  - added base alerts content provider
--- a/setup.py	Fri Oct 05 15:15:08 2018 +0200
+++ b/setup.py	Mon Oct 08 11:55:14 2018 +0200
@@ -22,7 +22,7 @@
 README = os.path.join(DOCS, 'README.txt')
 HISTORY = os.path.join(DOCS, 'HISTORY.txt')
 
-version = '0.1.10'
+version = '0.1.11'
 long_description = open(README).read() + '\n\n' + open(HISTORY).read()
 
 tests_require = []
--- a/src/pyams_default_theme/component/paragraph/pictogram.py	Fri Oct 05 15:15:08 2018 +0200
+++ b/src/pyams_default_theme/component/paragraph/pictogram.py	Mon Oct 08 11:55:14 2018 +0200
@@ -12,16 +12,10 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
-
-# import interfaces
-from pyams_content.component.paragraph.interfaces.pictogram import IPictogramParagraph
+from pyams_content.component.paragraph.interfaces.pictogram import IPictogramContainer, IPictogramParagraph
 from pyams_content.features.renderer.interfaces import IContentRenderer
+from pyams_content.features.renderer.skin import BaseContentRenderer
 from pyams_skin.layer import IPyAMSLayer
-
-# import packages
-from pyams_content.features.renderer.skin import BaseContentRenderer
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
 
@@ -39,3 +33,7 @@
 
     label = _("Default pictograms renderer")
     weight = 1
+
+    @property
+    def pictograms(self):
+        yield from IPictogramContainer(self.context).get_visible_items()