src/pyams_default_theme/shared/common.py
changeset 15 12e5bc30061a
child 17 5a8888d973b4
equal deleted inserted replaced
14:4e76f8f239c2 15:12e5bc30061a
       
     1 #
       
     2 # Copyright (c) 2008-2015 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 # import interfaces
       
    19 from pyams_content.features.renderer.interfaces import IContentRenderer
       
    20 from pyams_content.shared.common.interfaces import IWfSharedContent
       
    21 from pyams_default_theme.layer import IPyAMSDefaultLayer
       
    22 
       
    23 # import packages
       
    24 from pyams_content.features.renderer.zmi import BaseContentRenderer
       
    25 from pyams_template.template import template_config
       
    26 from pyams_utils.adapter import adapter_config
       
    27 
       
    28 
       
    29 @adapter_config(name='properties-preview', context=(IWfSharedContent, IPyAMSDefaultLayer),
       
    30                 provides=IContentRenderer)
       
    31 @template_config(template='templates/content-preview.pt', layer=IPyAMSDefaultLayer)
       
    32 class SharedContentRenderer(BaseContentRenderer):
       
    33     """Shared content renderer"""
       
    34 
       
    35     weight = 1
       
    36 
       
    37     i18n_context_attrs = ('title', )