src/pyams_content/shared/imagemap/zmi/render.py
branchdoc-dc
changeset 651 26a58877d1aa
parent 650 927afb26b1ce
parent 553 781e3958f6bf
child 652 b438528e5bb3
equal deleted inserted replaced
650:927afb26b1ce 651:26a58877d1aa
     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.component.association.interfaces import IAssociationInfo
       
    20 from pyams_content.features.renderer.interfaces import IContentRenderer
       
    21 from pyams_content.shared.imagemap.interfaces import IWfImageMap
       
    22 from pyams_skin.layer import IPyAMSLayer
       
    23 
       
    24 # import packages
       
    25 from pyams_content.features.renderer.zmi import BaseContentRenderer
       
    26 from pyams_template.template import template_config
       
    27 from pyams_utils.adapter import adapter_config
       
    28 
       
    29 
       
    30 @adapter_config(name='imagemap-render', context=(IWfImageMap, IPyAMSLayer), provides=IContentRenderer)
       
    31 @template_config(template='templates/render.pt', layer=IPyAMSLayer)
       
    32 class ImagemapRenderer(BaseContentRenderer):
       
    33     """Image map renderer"""
       
    34 
       
    35     weight = 20
       
    36 
       
    37     def get_item_info(self, item):
       
    38         return IAssociationInfo(item, None)