Exemple #1
0
class IVideoPortlet(IPortletDataProvider):
    """A portlet which can display videos
    """

    header = schema.TextLine(title=_(u"Portlet header"),
                             description=_(u"Title of the rendered portlet"),
                             required=True)

    target = schema.Choice(
        title=_(u"Target object"),
        description=
        _(u"This can be a file containing an FLV file, or a folder or collection containing FLV files"
          ),
        required=True,
        source=SearchableTextSourceBinder(
            {
                'object_provides': [
                    IATTopic.__identifier__, IATFolder.__identifier__,
                    IFlowPlayable.__identifier__
                ]
            },
            default_query='path:'))

    splash = schema.Choice(
        title=_(u"Splash image"),
        description=_(u"An image file to use as a splash image"),
        required=False,
        source=SearchableTextSourceBinder(
            {
                'object_provides': [
                    IATImage.__identifier__,
                    IATFolder.__identifier__,
                ]
            },
            default_query='path:'))

    limit = schema.Int(
        title=_(u"Number of videos to show"),
        description=
        _(u"Enter a number greater than 0 to limit the number of items displayed"
          ),
        required=False)

    random = schema.Bool(
        title=_(u"Randomise the playlist"),
        description=_(
            u"If enabled, a random video from the selection will be played."),
        required=True,
        default=False)

    show_more = schema.Bool(
        title=_(u"Show more... link"),
        description=_(
            u"If enabled, a more... link will appear in the footer of the portlet, "
            "linking to the underlying data."),
        required=True,
        default=True)
Exemple #2
0
class ICallToActionPortlet(IPortletDataProvider):
    """A schema for the call to action portlet.
    """

    header = schema.TextLine(title=_(u"Portlet header"),
                             description=_(u"Title of the rendered portlet"),
                             constraint=re.compile("[^\s]").match,
                             required=False)

    image_ref = schema.Choice(title=_(u"Image"),
                              required=False,
                              source=SearchableTextSourceBinder(
                                  {'object_provides': IMAGE_IFACES},
                                  default_query='path:'))

    image_size = schema.Int(
        title=_(u'Image size'),
        description=_(
            u'The height and width in pixels. The image will be scaled '
            u'to fit within the given height and width.'),
        default=200,
        required=True)

    image_show_tilted = schema.Bool(
        title=_(u"Show image tilted"),
        description=_(
            u'When checked the image will be displayed titled 7 degrees'),
        default=True)

    form_ref = schema.Choice(title=_(u"Form"),
                             required=False,
                             source=SearchableTextSourceBinder(
                                 {'portal_type': 'FormFolder'},
                                 default_query='path:'))

    text = schema.Text(title=_(u"Text"),
                       description=_(u"The text to render"),
                       required=True)

    milli_seconds_until_overlay = schema.Int(
        title=_(u'Milliseconds until overlay'),
        description=_(
            u'The number of milliseconds we wait before showing the overlay.'),
        default=0,
        required=True)

    new_version = schema.Bool(
        title=_(u'This is a new call to action'),
        description=_(
            u'Checking this option means everyone will get to see the new '
            u'overlay. When not checked, visitors who have already seen '
            u'the overlay will not see it again.'),
        default=False,
        required=False)
class IRegionMapPortlet(IPortletDataProvider):
    """
    Define your portlet schema here
    """
    africa = schema.Choice(
        title=_(u"Africa"),
        description=_(u'Region content to link the Africa region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )

    north_america = schema.Choice(
        title=_(u"North America"),
        description=_(u'Region content to link the North America region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )

    south_america = schema.Choice(
        title=_(u"South America"),
        description=_(u'Region content to link the South America region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )

    pacific = schema.Choice(
        title=_(u"Pacific"),
        description=_(u'Region content to link the Pacific region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )

    caribbean = schema.Choice(
        title=_(u"Caribbean"),
        description=_(u'Region content to link the Caribbean region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )

    asia = schema.Choice(
        title=_(u"Asia"),
        description=_(u'Region content to link the Asia region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )

    europe = schema.Choice(
        title=_(u"Europe"),
        description=_(u'Region content to link the Europe region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )

    middle_east = schema.Choice(
        title=_(u"Middle East"),
        description=_(u'Region content to link the Middle East region to'),
        source=SearchableTextSourceBinder({'portal_type': 'wcc.churches.region'}, default_query='path:'),
        required=False
    )
Exemple #4
0
class ISeccioPortlet(IPortletDataProvider):

    name = schema.TextLine(
        title=_(u"label_navigation_title", default=u"Title"),
        description=_(u"help_navigation_title",
                      default=u"The title of the navigation tree."),
        default=u"",
        required=False)

    count = schema.Int(title=_(u'Number of items to display'),
                       description=_(u'How many items to list.'),
                       required=True,
                       default=5)

    state = schema.Tuple(
        title=_(u"Workflow state"),
        description=_(u"Items in which workflow state to show."),
        default=('published', ),
        required=True,
        value_type=schema.Choice(
            vocabulary="plone.app.vocabularies.WorkflowStates"))

    content = schema.Choice(
        title=_(u"label_navigation_root_path", default=u"Root node"),
        description=_(u'help_navigation_root',
                      default=u"You may search for and choose a folder "
                      "to act as the root of the navigation tree. "
                      "Leave blank to use the Plone site root."),
        required=False,
        source=SearchableTextSourceBinder({'portal_type': 'Folder'},
                                          default_query='path:'))
class IVideoPortlet(IPortletDataProvider):
    '''Portal Padrão: Portlet de vídeo.
    '''

    show_header = schema.Bool(title=_(u'show_title', default=u'Show title'),
                              description=_(
                                  u'show_title_description',
                                  default=u'If enabled, shows the title.'),
                              required=False,
                              default=False)

    header = schema.TextLine(title=_(u'title_text', default=u'Title text'),
                             description=_(
                                 u'title_text_description',
                                 default=u'Portlet text of the title.'),
                             required=True,
                             default=_(u'title_portlet_video',
                                       default=u'Portal Padrão Video'))

    video = schema.Choice(
        title=_(u'Video'),
        description=_(u'Search the video used into the portlet.'),
        required=True,
        source=SearchableTextSourceBinder({'portal_type': ('sc.embedder')},
                                          default_query='path:'))
class IEventsPortlet(IPortletDataProvider):

    count = schema.Int(title=_(u'Number of items to display'),
                       description=_(u'How many items to list.'),
                       required=True,
                       default=5)

    state = schema.Tuple(
        title=_(u"Workflow state"),
        description=_(u"Items in which workflow state to show."),
        default=None,
        required=False,
        value_type=schema.Choice(
            vocabulary="plone.app.vocabularies.WorkflowStates"))

    search_base = schema.Choice(
        title=_(u'portlet_label_search_base', default=u'Search base'),
        description=_(
            u'portlet_help_search_base',
            default=u'Select search base folder to search for events. This '
            u'folder will also be used to link to in calendar '
            u'searches. If empty, the whole site will be searched and '
            u'the event listing view will be called on the site root.'),
        required=False,
        source=SearchableTextSourceBinder({'is_folderish': True},
                                          default_query='path:'),
    )
class ICalendarPortlet(IPortletDataProvider):
    """A portlet displaying a calendar
    """

    state = schema.Tuple(
        title=_(u"Workflow state"),
        description=_(u"Items in which workflow state to show."),
        default=None,
        required=False,
        value_type=schema.Choice(
            vocabulary="plone.app.vocabularies.WorkflowStates"))

    search_base = schema.Choice(
        title=_(u'portlet_label_search_base', default=u'Search base'),
        description=_(u'portlet_help_search_base',
                      default=u'Select search base folder to search for '
                      u'events. This folder will also be used to link '
                      u'to in calendar searches. If empty, the '
                      u'whole site will be searched and the event '
                      u'listing view will be called on the site '
                      u'root.'),
        required=False,
        source=SearchableTextSourceBinder({'is_folderish': True},
                                          default_query='path:'),
    )
Exemple #8
0
class ILatestSectionableNITFPortlet(IPortletDataProvider):
    """
    A portlet which shows the latest NITF created and can be filtered
    by section.
    """

    header = schema.TextLine(
        title=_(u'Header'),
        description=_(u'The header for the portlet. Leave empty for none.'),
        required=False)

    limit = schema.Int(
        title=_(u'Limit'),
        description=_(u'Specify the maximum number of items to show in the '
                      u'portlet. Leave this blank to show all items.'),
        default=10,
        required=False)

    pretty_date = schema.Bool(
        title=_(u'Pretty dates'),
        description=_(u'Show dates in a pretty format (ie. "4 hours ago").'),
        default=True,
        required=False)

    filter_collection = schema.Choice(
        title=_(u'Filter collection'),
        description=_(u'Use the criteria from this collection to modify the '
                      u'search results and order.'),
        required=False,
        source=SearchableTextSourceBinder(
            {'portal_type': ('Topic', 'Collection')}, default_query='path:'))
Exemple #9
0
class INavPortlet(IPortletDataProvider):
    """A portlet which renders the results of a folder object.
    """

    header = schema.TextLine(
            title=_(u"Portlet header"),
            description=_(u"Title of the rendered portlet. \
            If none the header won't be rendered at all"),
            required=True)

    show_header = schema.Bool(
                title=_(u"Show portlet header"),
                description=_(u""),
                default=True,
                required=False)

    target_folder = schema.Choice(
        title=_(u"Target folder"),
        description=_(u"Find the folder which provides the links to list"),
        required=True,
        source=SearchableTextSourceBinder(
            {'portal_type': 'Link'},
            default_query='path:'
        )
    )

    limit = schema.Int(
        title=_(u"Limit"),
        description=_(u"Specify the maximum number of items to show in the "
                      u"portlet. Leave this blank to show all items."),
        required=False)
class INavigationFixedPortlet(IPortletDataProvider):
    """A portlet which can render the navigation tree
    """

    name = schema.TextLine(
        title=_(u"label_navigation_title", default=u"Title"),
        description=_(u"help_navigation_title",
                      default=u"The title of the navigation tree."),
        default=u"",
        required=False)

    root = schema.Choice(
        title=_(u"label_navigation_root_path", default=u"Root node"),
        description=_(u'help_navigation_root',
                      default=u"You may search for and choose a folder "
                      "to act as the root of the navigation tree. "
                      "Leave blank to use the Plone site root."),
        required=False,
        source=SearchableTextSourceBinder({'is_folderish': True},
                                          default_query='path:'))

    currentFolderOnly = schema.Bool(
        title=_(u"label_current_folder_only",
                default=u"Only show the contents of the current folder."),
        description=_(u"help_current_folder_only",
                      default=u"If selected, the navigation tree will "
                      "only show the current folder and its "
                      "children at all times."),
        default=False,
        required=False)
class ICollectionMultiView(IPortletDataProvider):

    header = schema.TextLine(
        title=_(u"Portlet header"),
        description=_(u"Title of the rendered portlet"),
        required=True)

    target_collection = schema.Choice(
        title=_(u"Target collection"),
        description=_(u"Find the collection which provides the items to list"),
        required=True,
        source=SearchableTextSourceBinder(
            {'portal_type': ['Topic', 'Collection']},
            default_query='path:'))

    limit = schema.Int(
        title=_(u"Limit"),
        description=_(u"Specify the maximum number of items to show in the "
                      u"portlet. Leave this blank to show all items."),
        required=False)

    random = schema.Bool(
        title=_(u"Select random items"),
        description=_(u"If enabled, items will be selected randomly from the "
                      u"collection, rather than based on its sort order."),
        default=False)

    renderer = schema.Choice(title=_(u'Renderer'),
        description=_(u"The name of the Renderer for this portlet."),
        default='default',
        required=True,
        vocabulary='collective.portlet.collectionmultiview.RendererVocabulary')
Exemple #12
0
class ISlide(Interface):

    configuration = schema.Choice(
        source="slide_configuration_choices",
        title=_(u"Layout"),
        description=_(u"Choose a layout for this slide."),
        required=False)

    heading = schema.TextLine(
        title=_(u"Heading"),
        required=False,
    )

    image = schema.Bytes(title=_(u"Image"), required=False)

    slide = schema.Text(title=_(u"Text"), required=False)

    link_reference = schema.Choice(
        title=_(u"Link to content"),
        description=_(u"Choose a content item to link this slide to."),
        source=SearchableTextSourceBinder({}, default_query='path:'),
        required=False,
    )

    url = schema.URI(
        title=_(u'External link'),
        description=_(
            u'Please enter a full URL. Has precedence before the above field.'
        ),
        required=False,
    )

    index = schema.Int(title=u'', required=False)
Exemple #13
0
class IBannerPortlet(IPortletDataProvider):
    """A portlet displaying a banners from a Collection's results
    """

    target_collection = schema.Choice(
        title=_(u"Target collection"),
        description=_(u"Find the collection which provides the items to list"),
        required=True,
        source=SearchableTextSourceBinder(
            {'portal_type': ('Topic', 'Collection')}, default_query='path:'))

    timer = schema.Int(title=_(u"Timer"),
                       description=_(u"Carousel rotated time (milliseconds)"),
                       required=False,
                       default=10000)

    image_scale = schema.Choice(
        title=_(u'portlet_image_scale', default=u'Image Scale'),
        description=_(u'portlet_help_image_scale',
                      default=u'Select, which image scale should be used '
                      u'for the portlet, if there is any image.'),
        required=True,
        default=None,
        vocabulary="collective.banner.ImageScaleVocabulary",
    )
Exemple #14
0
class IMoveAction(Interface):
    """
       Interface for the configurable aspects of a move action.
       We don't want to have a static target folder but a target folder inwhich
       contents will be stored in subfolders YYYY/MM
    """

    target_root_folder = schema.Choice(title=_(u"label_target_root",
                                               default=u"Root target folder"),
                                       description=_(u"help_target_root",
                                                     default=u"As a path \
                                                               relative \
                                                               to the \
                                                               portal root"),
                                       required=True,
                                       source=SearchableTextSourceBinder(
                                           {'is_folderish': True},
                                           default_query='path:'))

    folderish_type = schema.Choice(title=_(u"Type used to create folder"),
                                   default="Folder",
                                   required=True,
                                   vocabulary=TYPES_VOCABULARY)

    transitions = schema.List(title=_(u"Transitions to execute"),
                              value_type=schema.Choice(
                                  title=_(u"Transition"),
                                  vocabulary=TRANSITIONS_VOCABULARY),
                              default=["publish"],
                              required=False)
Exemple #15
0
class IParallaxPortlet(IPortletDataProvider):
    """Shows content on a background image with parallax effect.
    """
    js_hook_id = schema.TextLine(
        title=_(u"Javascript Hook ID"),
        description=_(u"Assign a unique element id that can be used as a hook for javascript"),
        required=False
    )

    text = schema.Text(
        title=_(u"Text"),
        description=_(u"The portlet body text."),
        required=False
    )

    background_image = schema.Choice(
        title=_(u"Background image"),
        description=_(u"Find the image"),
        required=False,
        source=SearchableTextSourceBinder({'object_provides' : provides})
    )

    center_text = schema.Bool(
        title=_(u"Center Text"),
        description=_(u"Tick this box if you simply want a short paragraph of text, centred in the parallax portlet."),
        required=False,
        default=False
    )
Exemple #16
0
class IPropertyPortlet(IPortletDataProvider):

    target = schema.Choice(title=_(u"Browse for contents"),
                           description=_(u"Choose contents to display."),
                           required=True,
                           source=SearchableTextSourceBinder(
                               {'portal_type': ('Folder')},
                               default_query='path:'))
Exemple #17
0
class IUltimasNoticias(IPortletDataProvider):
    """A portlet
    """

    noticias = schema.Choice(title=_(u"Colecao com as noticias"),
                             description=_(u"Informe a colecao das noticias."),
                             required=False,
                             source=SearchableTextSourceBinder(
                                 {'portal_type': 'Collection'},
                                 default_query='path:'))

    eventos = schema.Choice(title=_(u"Colecao com os eventos"),
                            description=_(u"Informe a colecao dos eventos."),
                            required=False,
                            source=SearchableTextSourceBinder(
                                {'portal_type': 'Collection'},
                                default_query='path:'))
Exemple #18
0
class IOSHAItemsPortlet(IPortletDataProvider):
    """ """
    header = schema.TextLine(
        title=_(u"Portlet header"),
        description=_(u"The display title of the rendered portlet"),
        required=True)
    count = schema.Int(title=_(u'Number of items to display'),
                       required=True,
                       default=3)
    types = schema.Tuple(
        title=_(u"Content Type"),
        description=_(u"Please specify the content types of the items "
                      u"to be displayed in this portlet."),
        required=True,
        value_type=schema.Choice(
            vocabulary="osha.theme.FriendlyTypesVocabulary"),
    )
    state = schema.Tuple(
        title=_(u"Workflow state"),
        description=_(u"You may limit the displayed items to a "
                      u"specific workflow state. By default all "
                      u"published items will be shown."),
        default=('published', ),
        required=True,
        value_type=schema.Choice(
            vocabulary="plone.app.vocabularies.WorkflowStates"))
    subject = schema.Tuple(
        title=_(u"Categories"),
        description=_(u"Pick one or more categories with which you want "
                      u"to filter the items shown in this portlet."),
        default=tuple(),
        value_type=schema.Choice(
            vocabulary="osha.theme.SubjectValuesVocabulary"),
    )
    sort = schema.Choice(
        title=_(u"Sorting Criterion"),
        description=_(u"Please choose the criterion on which the items "
                      u"should be sorted."),
        default='effective',
        vocabulary="osha.theme.SortableIndexesVocabulary",
    )
    portletlink = schema.Choice(
        title=_(u'Portlet link'),
        description=_(u"Choose a folder or page to which this portlet's "
                      u"title and the bottom link will point to. This "
                      u"is optional."),
        required=False,
        source=SearchableTextSourceBinder(
            {
                'object_provides': [
                    folder.IATFolder.__identifier__,
                    folder.IATBTreeFolder.__identifier__,
                    document.IATDocument.__identifier__,
                ]
            },
            default_query='path:'),
    )
Exemple #19
0
class IBuscaPortlet(IPortletDataProvider):
    """ Portlet de busca dentro da agenda
    """

    root = schema.Choice(
        title=_(u'Raiz'),
        description=_(u'Informe a raiz da busca de Agendas Diarias'),
        required=False,
        source=SearchableTextSourceBinder({'is_folderish': True},
                                          default_query='path:'))
Exemple #20
0
class IGaleria(IPortletDataProvider):
    """A portlet
    """

    root = schema.Choice(
        title=_(u"Pasta com as fotos"),
        description=_(
            u"Informe o local onde estao as fotos que serao exibidas."),
        required=False,
        source=SearchableTextSourceBinder({'is_folderish': True},
                                          default_query='path:'))
Exemple #21
0
class IMoveAction(Interface):
    """Interface for the configurable aspects of a move action.

    This is also used to create add and edit forms, below.
    """

    target_folder = schema.Choice(
        title=_(u"Target folder"),
        description=_(u"As a path relative to the portal root."),
        required=True,
        source=SearchableTextSourceBinder({'is_folderish': True},
                                          default_query='path:'))
Exemple #22
0
class IProgrammeHighlight(IPortletDataProvider):
    """
    Define your portlet schema here
    """
    target_programmeplanner = schema.Choice(
        title=_(u"Target programmeplanner"),
        description=_(
            u"Find the programmeplanner which provides the items to list"),
        required=True,
        source=SearchableTextSourceBinder(
            {'portal_type': ('wcc.programmeplanner.programmeplanner', )},
            default_query='path:'))
Exemple #23
0
class ICustomizableRecent(IRecentPortlet):
    """Customizable Recent portlet inherits from Plone Recent Portlet
    """

    name = schema.TextLine(
        title=PMF(u"label_recent_title", default=u"Title"),
        description=_(
            u"help_recent_title",
            default=u"The title of the recent items portlet. "
            "Leave blank if you want it to be computed by default as "
            "Recent items, or Recent items in ... if root node has been set."),
        default=u"",
        required=False)

    content_types = schema.Tuple(
        title=PMF(u"Content type"),
        description=_(u"The content types to display."),
        required=False,
        value_type=schema.Choice(
            vocabulary="plone.app.vocabularies.ReallyUserFriendlyTypes"))

    root = schema.Choice(
        title=PMF(u"label_navigation_root_path", default=u"Root node"),
        description=_(u'help_recent_root',
                      default=u"You may search for and choose a folder "
                      "to act as the root of the recent elements displayed. "
                      "Leave blank to use the Plone site root."),
        required=False,
        source=SearchableTextSourceBinder({'is_folderish': True},
                                          default_query='path:'))
    long_time_format = schema.Bool(
        title=_(u"Display the date in long format"),
        description=
        _(u"Display the date of the last modification in dd/mm/yyyy hh:mm format"
          ),
        default=False,
        required=True)

    display_icons = schema.Bool(
        title=_(u"Display icons"),
        description=_(
            u"Check/uncheck this box to display/hide icons in portlet"),
        default=True,
        required=True)

    display_all_link = schema.Bool(
        title=_(u"Display 'all recent changes link'"),
        description=
        _(u"Check/uncheck this box to display/hide 'all recent changes' link in portlet"
          ),
        default=True,
        required=True)
Exemple #24
0
class IMediaPortlet(IPortletDataProvider):

    header = schema.TextLine(title=_(u"Portlet title"),
                             description=_(u"Title of the rendered portlet"),
                             required=False)

    target_media = schema.Choice(
        title=_(u"Target Media"),
        description=_(u"Find the Media Link which provides the items to list"),
        required=True,
        source=SearchableTextSourceBinder({'portal_type': ('media_link', )},
                                          default_query='path:'),
    )
class IMonetCalendarPortlet(IPortletDataProvider):

    header = schema.TextLine(title=PloneMessageFactory(u'Portlet header'),
                             description=PloneMessageFactory(u'Title of the rendered portlet'),
                             required=True)

    calendar_section_path = schema.Choice(title=_(u'Calendar Section'),
                                          description=_('calendar_section_path',
                                                        u'Calendar section providing the events to be shown in the portlet'),
                                          required=True,
                                          source=SearchableTextSourceBinder({'object_provides': IMonetCalendarSection.__identifier__},
                                                                            default_query='path: '))

    days_before = schema.Int(title=_('Days before'),
                             description=_('days_before_help',
                                           u'Number of days, before the current date, to be included in the search.\n '
                                           u'Keep 0 to show only today events.'),
                             required=True,
                             min=0,
                             default=0)

    days_after = schema.Int(title=_('Days after'),
                            description=_('days_after_help',
                                           u'Number of days, after the current date, to be included in the search.\n '
                                           u'Keep 0 to show only today events.'),
                            required=True,
                            min=0,
                            default=7)

    header_as_link = schema.Bool(title=_(u"Header as link"),
                              description=_('header_as_link_help',
                                            _(u"Tick this box if you want that the portlet header will "
                                               "be a link to then related calendar.")
                                             ),
                              required=True,
                              default=True)


    omit_border = schema.Bool(title=_(u"Hide portlet"),
                              description=_('hide_portlet_help',
                                            _(u"Tick this box if you want to render the text above "
                                               "without the standard header, border or footer.")
                                             ),
                              required=True,
                              default=False)


    timeout = schema.Int(title=_(u'Cache timeout'),
                         description=_(u'Expiration time for cached results (in minutes)'),
                         required=True,
                         default=0)
class ICalendarExPortlet(IPortletDataProvider):
    """A portlet displaying a calendar with selectable path
    """

    name = schema.TextLine(
        title=_(u'label_calendarex_title', default=u'Title'),
        description=_(u'help_calendarex_title',
                      default=u'The title of this portlet. Leave blank to '
                      u'do not display portlet title.'),
        default=u"",
        required=False)

    root = schema.Choice(
        title=_(u'label_calendarex_root_path', default=u'Root node'),
        description=_(u'help_calendarex_root',
                      default=u'You may search for and choose a folder '
                      u'to act as the root of search for this '
                      u'portlet. '
                      u'Leave blank to use the Plone site root. '
                      u'You can also select a Collection for '
                      u'get only Events found by it.'),
        required=False,
        source=SearchableTextSourceBinder(
            {
                'object_provides': [
                    IATTopic.__identifier__, ICollection.__identifier__,
                    IFolderish.__identifier__, IATFolder.__identifier__
                ]
            },
            default_query='path:'))

    review_state = schema.Tuple(
        title=_(u'Review state'),
        description=_('help_review_state',
                      default=u'Filter contents using the review state. '
                      u'Leave blank to use the site default. '
                      u'This filter will be ignored if you select a '
                      u'collection as "Root node"'),
        default=(),
        value_type=schema.Choice(
            vocabulary='plone.app.vocabularies.WorkflowStates'),
        required=False)

    kw = schema.Tuple(title=_(u'Keywords'),
                      description=_('help_keywords',
                                    default=u'Keywords to be search for. '
                                    u'This filter will be ignored if '
                                    u'you select a collection as '
                                    u'"Root node"'),
                      default=(),
                      value_type=schema.TextLine())
Exemple #27
0
class ICarouselPortlet(IPortletDataProvider):
    """A portlet displaying a carousel with a Collection's results
    """

    header = schema.TextLine(title=_(u"Portlet header"),
                             description=_(u"Title of the rendered portlet"),
                             required=True)

    hideheader = schema.Bool(
        title=_(u"Don't show the header."),
        description=_(u"If enabled, the portlet will not show the header."),
        required=False,
        default=False)

    target_collection = schema.Choice(
        title=_(u"Target collection"),
        description=_(u"Find the collection which provides the items to list"),
        required=True,
        source=SearchableTextSourceBinder(
            {'portal_type': ('Topic', 'Collection')}, default_query='path:'))

    limit = schema.Int(
        title=_(u"Limit"),
        description=_(u"Specify the maximum number of items to show in the "
                      u"portlet. Leave this blank to show all items."),
        required=False)

    hide_controls = schema.Bool(
        title=_(u"Hide controls"),
        description=_(u"Tick this box if you want to temporarily hide "
                      "carousel controls i.e. next, prev, pause buttons."),
        required=True,
        default=False)

    timer = schema.Int(
        title=_(u"Timer"),
        description=_(u"How fast the carousel should be rotated \
                        (seconds)"),
        required=False,
        default=10)

    image_scale = schema.Choice(
        title=_(u'portlet_image_scale', default=u'Image Scale'),
        description=_(u'portlet_help_image_scale',
                      default=u'Select, which image scale should be used '
                      u'for the portlet, if there is any image.'),
        required=True,
        default=None,
        vocabulary="collective.carousel.ImageScaleVocabulary",
    )
class IItemViewPortlet(IPortletDataProvider):

    target = schema.Choice(title=i18n.portlet_target_title,
                           description=i18n.portlet_target_desc,
                           required=True,
                           source=SearchableTextSourceBinder(
                               {}, default_query='path:'))

    viewname = schema.Choice(
        title=i18n.portlet_viewname_title,
        description=i18n.portlet_viewname_desc,
        required=True,
        default="itemview_portlet",
        vocabulary="collective.portlet.itemview.vocabulary.templateview")
Exemple #29
0
class IRollingQuotesPortlet(IPortletDataProvider):
    header = schema.TextLine(title=_(u"Portlet header"),
                             description=_(u"Title of the rendered portlet"),
                             required=True)

    folder = schema.Choice(
        title=_(u"Folder"),
        description=_(u"Locate the Folder with quotes"),
        required=True,
        source=SearchableTextSourceBinder(
            {
                'object_provides':
                [IATFolder.__identifier__, IATBTreeFolder.__identifier__]
            },
            default_query='path:'))
Exemple #30
0
class IContentItemPortlet(IPortletDataProvider):
    """A portlet
    """

    content_item = schema.Choice(
        title=_(u"label_content_item", default=u"Content Item"),
        description=_(u'help_content_item',
                      default=u"Content item to display in the portlet."),
        required=True,
        source=SearchableTextSourceBinder({}, default_query='path:'))

    content_uid = schema.TextLine(
        title=u"UID",
        required=False,
    )