src/pyams_content/shared/imagemap/zmi/paragraph.py
changeset 487 093f201e3168
parent 417 f09842eb4ada
child 507 7320a5522ee1
equal deleted inserted replaced
486:cb67e71dafff 487:093f201e3168
    16 # import standard library
    16 # import standard library
    17 
    17 
    18 # import interfaces
    18 # import interfaces
    19 from pyams_content.component.association.interfaces import IAssociationInfo
    19 from pyams_content.component.association.interfaces import IAssociationInfo
    20 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
    20 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
    21     IParagraphPreview
    21     IParagraphRenderer
    22 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    22 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    23 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    23 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    24 from pyams_content.shared.common.interfaces import IWfSharedContent
    24 from pyams_content.shared.common.interfaces import IWfSharedContent
    25 from pyams_content.shared.imagemap.interfaces import IImageMapParagraph, IMAGEMAP_PARAGRAPH_TYPE
    25 from pyams_content.shared.imagemap.interfaces import IImageMapParagraph, IMAGEMAP_PARAGRAPH_TYPE
    26 from pyams_form.interfaces.form import IInnerForm, IEditFormButtons, IWidgetsSuffixViewletsManager
    26 from pyams_form.interfaces.form import IInnerForm, IEditFormButtons, IWidgetsSuffixViewletsManager
   152 class ImagemapParagraphPreviewWidgetsSuffix(Viewlet):
   152 class ImagemapParagraphPreviewWidgetsSuffix(Viewlet):
   153     """Image map paragraph preview widgets suffix"""
   153     """Image map paragraph preview widgets suffix"""
   154 
   154 
   155 
   155 
   156 #
   156 #
   157 # Image map paragraph preview
   157 # Image map paragraph renderer
   158 #
   158 #
   159 
   159 
   160 @adapter_config(context=(IImageMapParagraph, IPyAMSLayer), provides=IParagraphPreview)
   160 @adapter_config(context=(IImageMapParagraph, IPyAMSLayer), provides=IParagraphRenderer)
   161 @template_config(template='templates/paragraph-preview.pt', layer=IPyAMSLayer)
   161 @template_config(template='templates/paragraph-render.pt', layer=IPyAMSLayer)
   162 class ImagemapParagraphPreview(BaseContentProvider):
   162 class ImagemapParagraphRenderer(BaseContentProvider):
   163     """Image map paragraph preview"""
   163     """Image map paragraph renderer"""
   164 
   164 
   165     language = None
   165     language = None
   166 
   166 
   167     def update(self):
   167     def update(self):
   168         i18n = II18n(self.context)
   168         i18n = II18n(self.context)