Move "slot_configuration" property to base portlet previewer
authorThierry Florac <thierry.florac@onf.fr>
Wed, 28 Jun 2017 10:15:38 +0200
changeset 32 f9daa4fe49ce
parent 31 aa6d07b1fab1
child 33 24c6db8d13f1
Move "slot_configuration" property to base portlet previewer
src/pyams_portal/zmi/portlets/image.py
--- a/src/pyams_portal/zmi/portlets/image.py	Wed Jun 28 10:14:47 2017 +0200
+++ b/src/pyams_portal/zmi/portlets/image.py	Wed Jun 28 10:15:38 2017 +0200
@@ -49,13 +49,3 @@
 @template_config(template='templates/image-preview.pt', layer=IPyAMSLayer)
 class ImagePortletPreviewer(PortletPreviewer):
     """Image portlet previewer"""
-
-    @property
-    def slot_configuration(self):
-        if IPortalTemplate.providedBy(self.context):
-            template = self.context
-        else:
-            template = IPortalPage(self.context).template
-        config = IPortalTemplateConfiguration(template)
-        slot_id, slot_name = config.get_portlet_slot(self.settings.configuration.portlet_id)
-        return config.get_slot_configuration(slot_name)