src/pyams_content/component/illustration/zmi/paragraph.py
changeset 406 5527bc086216
parent 395 2a39b333a585
child 407 0ef5de2d5674
equal deleted inserted replaced
405:9c147733c02e 406:5527bc086216
    15 
    15 
    16 # import standard library
    16 # import standard library
    17 
    17 
    18 # import interfaces
    18 # import interfaces
    19 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, \
    19 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, \
    20     IParagraphContainer, IParagraphSummary
    20     IParagraphContainer, IParagraphPreview
    21 from pyams_content.component.illustration.interfaces import IIllustration, IIllustrationParagraph
    21 from pyams_content.component.illustration.interfaces import IIllustration, IIllustrationParagraph
    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_form.interfaces.form import IInnerForm, IEditFormButtons
    24 from pyams_form.interfaces.form import IInnerForm, IEditFormButtons
    25 from pyams_i18n.interfaces import II18n
    25 from pyams_i18n.interfaces import II18n
   186 
   186 
   187 #
   187 #
   188 # Illustration summary
   188 # Illustration summary
   189 #
   189 #
   190 
   190 
   191 @adapter_config(context=(IIllustrationParagraph, IPyAMSLayer), provides=IParagraphSummary)
   191 @adapter_config(context=(IIllustrationParagraph, IPyAMSLayer), provides=IParagraphPreview)
   192 class IllustrationSummary(BaseContentProvider):
   192 class IllustrationPreview(BaseContentProvider):
   193     """Illustration renderer"""
   193     """Illustration preview"""
   194 
   194 
   195     def __init__(self, context, request):
   195     def __init__(self, context, request):
   196         super(IllustrationSummary, self).__init__(context, request)
   196         super(IllustrationPreview, self).__init__(context, request)
   197         self.renderer = self.context.get_renderer()
   197         self.renderer = self.context.get_renderer()
   198 
   198 
   199     language = None
   199     language = None
   200 
   200 
   201     def update(self):
   201     def update(self):