src/pyams_content/component/paragraph/zmi/milestone.py
changeset 555 8e8a14452567
parent 550 9658debb49a3
child 574 1c2320ddd9c6
equal deleted inserted replaced
554:120ce09ade94 555:8e8a14452567
    15 
    15 
    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     IParagraphRenderer
       
    22 from pyams_content.component.paragraph.interfaces.milestone import MILESTONE_PARAGRAPH_TYPE, IMilestoneParagraph, \
    21 from pyams_content.component.paragraph.interfaces.milestone import MILESTONE_PARAGRAPH_TYPE, IMilestoneParagraph, \
    23     IMilestoneContainer, IMilestoneContainerTarget, IMilestone
    22     IMilestoneContainer, IMilestoneContainerTarget, IMilestone
    24 from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
    23 from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
    25 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
    24 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
    26 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    25 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    34 
    33 
    35 # import packages
    34 # import packages
    36 from pyams_content.component.paragraph.milestone import MilestoneParagraph, Milestone
    35 from pyams_content.component.paragraph.milestone import MilestoneParagraph, Milestone
    37 from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
    36 from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
    38     BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
    37     BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
    39 from pyams_content.features.renderer.zmi import BaseRenderedContentRenderer
       
    40 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    38 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    41 from pyams_form.form import AJAXAddForm, AJAXEditForm
    39 from pyams_form.form import AJAXAddForm, AJAXEditForm
    42 from pyams_form.security import ProtectedFormObjectMixin
    40 from pyams_form.security import ProtectedFormObjectMixin
    43 from pyams_i18n.column import I18nAttrColumn
    41 from pyams_i18n.column import I18nAttrColumn
    44 from pyams_pagelet.pagelet import pagelet_config
    42 from pyams_pagelet.pagelet import pagelet_config
   167                                                         MilestoneParagraphInnerEditForm, 'renderer'))
   165                                                         MilestoneParagraphInnerEditForm, 'renderer'))
   168         return output
   166         return output
   169 
   167 
   170 
   168 
   171 #
   169 #
   172 # Milestone paragraph renderer
       
   173 #
       
   174 
       
   175 @adapter_config(context=(IMilestoneParagraph, IPyAMSLayer), provides=IParagraphRenderer)
       
   176 class MilestoneParagraphRenderer(BaseRenderedContentRenderer):
       
   177     """Milestone paragraph renderer"""
       
   178 
       
   179 
       
   180 #
       
   181 # Milestone items table view
   170 # Milestone items table view
   182 #
   171 #
   183 
   172 
   184 class MilestonesTable(ProtectedFormObjectMixin, BaseTable):
   173 class MilestonesTable(ProtectedFormObjectMixin, BaseTable):
   185     """Milestones view inner table"""
   174     """Milestones view inner table"""