src/pyams_content/component/paragraph/interfaces/milestone.py
changeset 1353 5940373ec65c
parent 1125 7f0cb6e407fc
equal deleted inserted replaced
1352:8242968d86b1 1353:5940373ec65c
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
    10 # FOR A PARTICULAR PURPOSE.
    10 # FOR A PARTICULAR PURPOSE.
    11 #
    11 #
    12 
    12 
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 from zope.annotation.interfaces import IAttributeAnnotatable
    13 from zope.annotation.interfaces import IAttributeAnnotatable
    16 from zope.container.constraints import containers, contains
    14 from zope.container.constraints import containers, contains
    17 from zope.interface import Attribute, Interface
    15 from zope.interface import Attribute, Interface
    18 from zope.schema import Bool, Choice
    16 from zope.schema import Bool, Choice
    19 
    17 
    20 from pyams_content.component.paragraph import CONTENT_PARAGRAPHS_VOCABULARY, IBaseParagraph
    18 from pyams_content.component.paragraph import CONTENT_PARAGRAPHS_VOCABULARY, IBaseParagraph
    21 from pyams_content.interfaces.container import IOrderedContainer
    19 from pyams_content.interfaces.container import IOrderedContainer
       
    20 from pyams_content.reference.pictograms.interfaces import SELECTED_PICTOGRAM_VOCABULARY
    22 from pyams_i18n.schema import I18nTextField, I18nTextLineField
    21 from pyams_i18n.schema import I18nTextField, I18nTextLineField
       
    22 
       
    23 
       
    24 __docformat__ = 'restructuredtext'
    23 
    25 
    24 from pyams_content import _
    26 from pyams_content import _
    25 
    27 
    26 
    28 
    27 MILESTONE_CONTAINER_KEY = 'pyams_content.milestones'
    29 MILESTONE_CONTAINER_KEY = 'pyams_content.milestones'
    40     title = I18nTextLineField(title=_("Title"),
    42     title = I18nTextLineField(title=_("Title"),
    41                               description=_("Milestone title"),
    43                               description=_("Milestone title"),
    42                               required=True)
    44                               required=True)
    43 
    45 
    44     label = I18nTextField(title=_("Associated label"),
    46     label = I18nTextField(title=_("Associated label"),
    45                           description=_("The way this label will be rendered depends on presentation template"),
    47                           description=_("The way this label will be rendered depends on "
       
    48                                         "presentation template"),
    46                           required=False)
    49                           required=False)
       
    50 
       
    51     pictogram_name = Choice(title=_("Pictogram"),
       
    52                             description=_("Name of the pictogram associated with this milestone"),
       
    53                             required=False,
       
    54                             vocabulary=SELECTED_PICTOGRAM_VOCABULARY)
       
    55 
       
    56     pictogram = Attribute("Selected pictogram object")
    47 
    57 
    48     anchor = Choice(title=_("Anchor"),
    58     anchor = Choice(title=_("Anchor"),
    49                     description=_("Paragraph to which this milestone should lead"),
    59                     description=_("Paragraph to which this milestone should lead"),
    50                     vocabulary=CONTENT_PARAGRAPHS_VOCABULARY,
    60                     vocabulary=CONTENT_PARAGRAPHS_VOCABULARY,
    51                     required=False)
    61                     required=False)