src/pyams_content/component/paragraph/interfaces/milestone.py
changeset 1093 f95d237cbd68
parent 1092 350cc7104175
child 1094 465b273c312b
equal deleted inserted replaced
1090:d6d041577ae0 1093:f95d237cbd68
    10 # FOR A PARTICULAR PURPOSE.
    10 # FOR A PARTICULAR PURPOSE.
    11 #
    11 #
    12 
    12 
    13 __docformat__ = 'restructuredtext'
    13 __docformat__ = 'restructuredtext'
    14 
    14 
    15 
       
    16 # import standard library
       
    17 
       
    18 from zope.annotation.interfaces import IAttributeAnnotatable
    15 from zope.annotation.interfaces import IAttributeAnnotatable
    19 from zope.container.constraints import containers, contains
    16 from zope.container.constraints import containers, contains
    20 from zope.interface import Interface
    17 from zope.interface import Interface
    21 from zope.schema import Bool, Choice
    18 from zope.schema import Bool, Choice
    22 
    19 
    23 from pyams_content import _
       
    24 # import interfaces
       
    25 from pyams_content.component.paragraph import IBaseParagraph
    20 from pyams_content.component.paragraph import IBaseParagraph
    26 from pyams_content.interfaces.container import IOrderedContainer
    21 from pyams_content.interfaces.container import IOrderedContainer
    27 # import packages
    22 from pyams_i18n.schema import I18nTextField, I18nTextLineField
    28 from pyams_i18n.schema import I18nTextLineField, I18nTextField
    23 
       
    24 from pyams_content import _
       
    25 
    29 
    26 
    30 MILESTONE_CONTAINER_KEY = 'pyams_content.milestones'
    27 MILESTONE_CONTAINER_KEY = 'pyams_content.milestones'
    31 
    28 
    32 
    29 
    33 class IMilestone(IAttributeAnnotatable):
    30 class IMilestone(IAttributeAnnotatable):
    42 
    39 
    43     title = I18nTextLineField(title=_("Title"),
    40     title = I18nTextLineField(title=_("Title"),
    44                               description=_("Milestone title"),
    41                               description=_("Milestone title"),
    45                               required=True)
    42                               required=True)
    46 
    43 
    47     label = I18nTextLineField(title=_("Associated label"),
    44     label = I18nTextField(title=_("Associated label"),
    48                               description=_("The way this label will be rendered depends on presentation template"),
    45                           description=_("The way this label will be rendered depends on presentation template"),
    49                               required=False)
    46                           required=False)
    50 
    47 
    51     anchor = Choice(title=_("Anchor"),
    48     anchor = Choice(title=_("Anchor"),
    52                     description=_("Paragraph to which this milestone should lead"),
    49                     description=_("Paragraph to which this milestone should lead"),
    53                     vocabulary='PyAMS content paragraphs',
    50                     vocabulary='PyAMS content paragraphs',
    54                     required=False)
    51                     required=False)