src/pyams_content/component/gallery/interfaces/__init__.py
changeset 363 86d1a240d4dc
parent 362 8fc21a7ef206
child 366 9daa8a31a58d
equal deleted inserted replaced
362:8fc21a7ef206 363:86d1a240d4dc
    41 
    41 
    42     title = I18nTextLineField(title=_("Legend"),
    42     title = I18nTextLineField(title=_("Legend"),
    43                               required=False)
    43                               required=False)
    44 
    44 
    45     alt_title = I18nTextLineField(title=_("Accessibility title"),
    45     alt_title = I18nTextLineField(title=_("Accessibility title"),
    46                                   description=_("Alternate title used to describe image content"),
    46                                   description=_("Alternate title used to describe media content"),
    47                                   required=False)
    47                                   required=False)
    48 
    48 
    49     data = MediaField(title=_("Image or video data"),
    49     data = MediaField(title=_("Image or video data"),
    50                       description=_("Image or video content"),
    50                       description=_("Image or video content"),
    51                       required=True)
    51                       required=True)
    75 
    75 
    76     sound_description = I18nTextField(title=_("Sound description"),
    76     sound_description = I18nTextField(title=_("Sound description"),
    77                                       description=_("Short description of associated sound file"),
    77                                       description=_("Short description of associated sound file"),
    78                                       required=False)
    78                                       required=False)
    79 
    79 
    80     visible = Bool(title=_("Visible image?"),
    80     visible = Bool(title=_("Visible media?"),
    81                    description=_("If 'no', this image won't be displayed in front office"),
    81                    description=_("If 'no', this media won't be displayed in front office"),
    82                    required=True,
    82                    required=True,
    83                    default=True)
    83                    default=True)
    84 
    84 
    85 
    85 
    86 class IBaseGallery(IOrderedContainer, IAttributeAnnotatable):
    86 class IBaseGallery(IOrderedContainer, IAttributeAnnotatable):
    92 
    92 
    93     description = I18nTextField(title=_("Description"),
    93     description = I18nTextField(title=_("Description"),
    94                                 description=_("Gallery description displayed by front-office template"),
    94                                 description=_("Gallery description displayed by front-office template"),
    95                                 required=False)
    95                                 required=False)
    96 
    96 
    97     renderer = Choice(title=_("Gallery style"),
    97     renderer = Choice(title=_("Gallery template"),
       
    98                       description=_("Presentation template used for this gallery"),
    98                       vocabulary='PyAMS gallery renderers')
    99                       vocabulary='PyAMS gallery renderers')
    99 
   100 
   100     def append(self, value, notify=True):
   101     def append(self, value, notify=True):
   101         """Append new file to gallery"""
   102         """Append new file to gallery"""
   102 
   103 
   103     def get_visible_images(self):
   104     def get_visible_medias(self):
   104         """Get iterator over visible images"""
   105         """Get iterator over visible medias"""
   105 
   106 
   106 
   107 
   107 class IGallery(IBaseGallery):
   108 class IGallery(IBaseGallery):
   108     """Gallery interface"""
   109     """Gallery interface"""
   109 
   110