src/pyams_default_theme/shared/common/portlet/title.py
changeset 152 7bd4cb30b503
parent 143 200b84aeb72e
child 296 a070719aef84
equal deleted inserted replaced
151:c555624ebbbd 152:7bd4cb30b503
       
     1 
       
     2 # Copyright (c) 2008-2018 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 
       
    16 # import standard library
       
    17 
       
    18 from zope.interface import Interface
       
    19 
       
    20 # import interfaces
       
    21 from pyams_content.shared.common.portlet.interfaces import ISharedContentTitlePortletSettings
       
    22 from pyams_default_theme import _
       
    23 from pyams_portal.interfaces import IPortalContext, IPortletRenderer
       
    24 # import packages
       
    25 from pyams_portal.portlet import PortletRenderer
       
    26 from pyams_skin.layer import IPyAMSLayer
       
    27 from pyams_template.template import template_config
       
    28 from pyams_utils.adapter import adapter_config
       
    29 
       
    30 
       
    31 @adapter_config(context=(IPortalContext, IPyAMSLayer, Interface, ISharedContentTitlePortletSettings),
       
    32                 provides=IPortletRenderer)
       
    33 @template_config(template='templates/title.pt', layer=IPyAMSLayer)
       
    34 class SharedContentTitlePortletRenderer(PortletRenderer):
       
    35     """Shared content title portlet renderer"""
       
    36 
       
    37     label = _("Default title renderer")