src/pyams_content/shared/common/portlet/content/skin/__init__.py
changeset 930 814f7c5e04d1
parent 929 1440d627e103
child 934 437971f8a969
child 936 2b31cde8c028
--- a/src/pyams_content/shared/common/portlet/content/skin/__init__.py	Thu Sep 06 14:01:08 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2008-2018 Thierry Florac <tflorac AT ulthar.net>
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-
-__docformat__ = 'restructuredtext'
-
-
-# import standard library
-
-# import interfaces
-from pyams_content.shared.common.portlet.content.interfaces import ISharedContentPortletSettings
-from pyams_content.features.renderer.interfaces import ISharedContentRenderer
-from pyams_portal.interfaces import IPortalContext, IPortletRenderer
-from pyams_skin.layer import IPyAMSLayer
-
-# import packages
-from pyams_portal.portlet import PortletRenderer
-from pyams_template.template import template_config
-from pyams_utils.adapter import adapter_config
-from zope.interface import Interface
-
-from pyams_content import _
-
-
-@adapter_config(context=(IPortalContext, IPyAMSLayer, Interface, ISharedContentPortletSettings),
-                provides=IPortletRenderer)
-@template_config(template='templates/content.pt', layer=IPyAMSLayer)
-class SharedContentPortletRenderer(PortletRenderer):
-    """Shared content portlet renderer"""
-
-    label = _("Default content renderer")
-
-    def __init__(self, context, request, view, settings):
-        super(SharedContentPortletRenderer, self).__init__(context, request, view, settings)
-        registry = self.request.registry
-        self.renderers = [adapter for name, adapter in sorted(registry.getAdapters((self.context, self.request),
-                                                                                   ISharedContentRenderer),
-                                                              key=lambda x: x[1].weight)]
-
-    def update(self):
-        super(SharedContentPortletRenderer, self).update()
-        [renderer.update() for renderer in self.renderers]