src/pyams_content/component/paragraph/zmi/milestone.py
changeset 487 093f201e3168
parent 456 07646760c1b5
child 489 dcdb0ce828f8
equal deleted inserted replaced
486:cb67e71dafff 487:093f201e3168
    16 # import standard library
    16 # import standard library
    17 import json
    17 import json
    18 
    18 
    19 # import interfaces
    19 # import interfaces
    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.interfaces.milestone import MILESTONE_PARAGRAPH_TYPE, IMilestoneParagraph, \
    22 from pyams_content.component.paragraph.interfaces.milestone import MILESTONE_PARAGRAPH_TYPE, IMilestoneParagraph, \
    23     IMilestoneContainer, IMilestoneContainerTarget, IMilestone
    23     IMilestoneContainer, IMilestoneContainerTarget, IMilestone
    24 from pyams_content.component.paragraph.zmi import IParagraphContainerView
    24 from pyams_content.component.paragraph.zmi import IParagraphContainerView
    25 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
    25 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
    26 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    26 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    35 
    35 
    36 # import packages
    36 # import packages
    37 from pyams_content.component.paragraph.milestone import MilestoneParagraph, Milestone
    37 from pyams_content.component.paragraph.milestone import MilestoneParagraph, Milestone
    38 from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
    38 from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
    39     BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
    39     BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
    40 from pyams_content.features.renderer.zmi import BaseRenderedContentPreview
    40 from pyams_content.features.renderer.zmi import BaseRenderedContentRenderer
    41 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    41 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    42 from pyams_content.skin import pyams_content
    42 from pyams_content.skin import pyams_content
    43 from pyams_form.form import AJAXAddForm, AJAXEditForm
    43 from pyams_form.form import AJAXAddForm, AJAXEditForm
    44 from pyams_form.security import ProtectedFormObjectMixin
    44 from pyams_form.security import ProtectedFormObjectMixin
    45 from pyams_i18n.column import I18nAttrColumn
    45 from pyams_i18n.column import I18nAttrColumn
   172             })
   172             })
   173         return output
   173         return output
   174 
   174 
   175 
   175 
   176 #
   176 #
   177 # Milestone paragraph preview
   177 # Milestone paragraph renderer
   178 #
   178 #
   179 
   179 
   180 @adapter_config(context=(IMilestoneParagraph, IPyAMSLayer), provides=IParagraphPreview)
   180 @adapter_config(context=(IMilestoneParagraph, IPyAMSLayer), provides=IParagraphRenderer)
   181 class MilestoneParagraphPreview(BaseRenderedContentPreview):
   181 class MilestoneParagraphRenderer(BaseRenderedContentRenderer):
   182     """Milestone paragraph preview"""
   182     """Milestone paragraph renderer"""
   183 
   183 
   184 
   184 
   185 #
   185 #
   186 # Milestone items table view
   186 # Milestone items table view
   187 #
   187 #