src/pyams_content/component/paragraph/zmi/keynumber.py
changeset 555 8e8a14452567
parent 550 9658debb49a3
child 573 7bb069888657
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.keynumber import KEYNUMBER_PARAGRAPH_TYPE, IKeyNumberParagraph, \
    21 from pyams_content.component.paragraph.interfaces.keynumber import KEYNUMBER_PARAGRAPH_TYPE, IKeyNumberParagraph, \
    23     IKeyNumberContainer, IKeyNumberContainerTarget, IKeyNumber
    22     IKeyNumberContainer, IKeyNumberContainerTarget, IKeyNumber
    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.keynumber import KeyNumberParagraph, KeyNumber
    35 from pyams_content.component.paragraph.keynumber import KeyNumberParagraph, KeyNumber
    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
   163                 get_json_widget_refresh_event(self.context, self.request, KeyNumberParagraphInnerEditForm, 'renderer'))
   161                 get_json_widget_refresh_event(self.context, self.request, KeyNumberParagraphInnerEditForm, 'renderer'))
   164         return output
   162         return output
   165 
   163 
   166 
   164 
   167 #
   165 #
   168 # Key number paragraph renderer
       
   169 #
       
   170 
       
   171 @adapter_config(context=(IKeyNumberParagraph, IPyAMSLayer), provides=IParagraphRenderer)
       
   172 class KeyNumberParagraphRenderer(BaseRenderedContentRenderer):
       
   173     """Key number paragraph renderer"""
       
   174 
       
   175 
       
   176 #
       
   177 # Key number items table view
   166 # Key number items table view
   178 #
   167 #
   179 
   168 
   180 class KeyNumbersTable(ProtectedFormObjectMixin, BaseTable):
   169 class KeyNumbersTable(ProtectedFormObjectMixin, BaseTable):
   181     """Key numbers view inner table"""
   170     """Key numbers view inner table"""