예제 #1
0
class ILiveClass(model.Schema):
    """ Marker interface and Dexterity Python Schema for LiveClass
    """

    localLang = schema.TextLine(
        title=_(u'Local Language'),
        required=False,
    )

    teachSchool = RelationChoice(title=_(u"Teach School"),
                                 required=False,
                                 source=CatalogSource(Type='School'))

    coSchool = RelationList(
        title=_(u"Training Center"),
        default=[],
        value_type=RelationChoice(title=_(u"Related"),
                                  source=CatalogSource(Type='School')),
        required=False,
    )

    teacher = RelationChoice(title=_(u"Teacher"),
                             required=False,
                             source=CatalogSource(Type='Teacher'))

    embeded = schema.Text(
        title=_(u'Embeded Code'),
        required=False,
    )
예제 #2
0
class IRERNews(model.Schema):

    directives.order_after(image='IRichText.text')
    image = RelationChoice(
        title=_(u'Image'),
        required=False,
        vocabulary='plone.app.vocabularies.Catalog',
    )
    directives.widget(
        'image',
        RelatedItemsFieldWidget,
        source=CatalogSource(portal_type=('Image')),
        pattern_options={'resultTemplate': RESULT_TEMPLATE},
    )

    directives.order_after(image_caption='image')
    image_caption = schema.TextLine(
        title=_(u'label_image_caption', default=u'Image Caption'),
        description=u'',
        required=False,
    )

    directives.order_after(related_links='image_caption')
    related_links = RelationList(
        title=_(u'Related links'),
        default=[],
        value_type=RelationChoice(
            title=u'Related',
            vocabulary='plone.app.vocabularies.Catalog',
        ),
        required=False)
    directives.widget('related_links',
                      RelatedItemsFieldWidget,
                      source=CatalogSource(portal_type=('Link')))
예제 #3
0
class ICourse(model.Schema):
    """
    title = schema.TextLine(
        title=_(u'Title'),
        required=True,
    )"""

    local_language = schema.TextLine(
        title=_(u'Local Language'),
        required=False,
    )

    teacher = RelationChoice(
        title=_(u'Teacher'),
        source=CatalogSource(portal_type='Teacher'),
        required=False,
    )

    school = RelationList(
        title=_(u'Alliance Schools'),
        value_type=RelationChoice(
            title=u"School",
            source=CatalogSource(portal_type=['School', 'Folder'])),
        required=False,
    )

    hire_school = RelationChoice(
        title=_(u'Hire School'),
        source=CatalogSource(portal_type=['School', 'Folder']),
        required=False,
    )

    studentList = schema.Text(
        title=_(u'Student List'),
        description=_(u'format: city,school_name,student_name'),
        required=False,
    )

    place = schema.TextLine(
        title=_(u'Place of Study'),
        required=False,
    )

    course_date = schema.TextLine(
        title=_(u'Course Date'),
        required=False,
    )

    course_time = schema.TextLine(
        title=_(u'Course Time'),
        required=False,
    )

    course_outline = RichText(
        title=_(u'Course Outline'),
        required=False,
    )
class IRERPortletAdvancedStatic(static.IStaticPortlet):
    """
    A custom static text portlet
    """

    target_attr = schema.Bool(
        title=_(u"Open links in a new window"),
        description=_(
            u"Tick this box if you want to open the header "
            "and footer links in a new window"
        ),
        required=False,
        default=False,
    )

    image_ref = schema.Choice(
        title=_(u"Background image"),
        description=_(
            u"Insert an image that will be shown as background of the header"
        ),
        required=False,
        source=CatalogSource(portal_type="Image"),
    )

    image_ref_height = schema.Int(
        title=_(u"Background image height"),
        description=_(
            u"Specify image background's height (in pixels). If empty will"
            " be used image's height."
        ),
        required=False,
    )

    internal_url = schema.Choice(
        title=_(u"Internal link"),
        description=_(
            u"Insert an internal link. This field override external link field"
        ),
        required=False,
        source=CatalogSource(),
    )

    portlet_class = schema.TextLine(
        title=_(u"Portlet class"),
        required=False,
        description=_(u"CSS class to add at the portlet"),
    )

    css_style = schema.Choice(
        title=_(u"Portlet style"),
        description=_(u"Choose a CSS style for the portlet"),
        required=False,
        vocabulary="rer.portlet.advanced_static.CSSVocabulary",
    )
예제 #5
0
    def _constructField(self, attributes):
        portal_type = (attributes.get('portal_type')
                       or attributes.get('portal_types') or [])
        if 'portal_type' in attributes:
            del attributes['portal_type']

        if not portal_type:
            attributes['source'] = CatalogSource()
        else:
            attributes['source'] = CatalogSource(portal_type=portal_type)

        return super(RelationChoiceBaseHandler,
                     self)._constructField(attributes)
예제 #6
0
class ICover(model.Schema):
    title = schema.TextLine(title=_(u"Cover"), required=True)
    application = RelationList(title=_(u"application relation list"),
                               required=False,
                               value_type=RelationChoice(
                                   title=_(u"application"),
                                   source=CatalogSource(Type='category'),
                               ))
    polyester = RelationList(title=_(u"polyester relation list"),
                             required=False,
                             value_type=RelationChoice(
                                 title=_(u"polyester"),
                                 source=CatalogSource(Type='polyester'),
                             ))
class IHautreinigungsmittel(model.Schema):
    """
    Schema eines Hautreinigungsmittels
    """

    title = schema.TextLine(title=_(u"Produktname"))

    anwendungsbereich = schema.List(title=_(u"Anwendungsbereich"), value_type=schema.Choice(vocabulary=schmutzVocabulary), required=False,)

    inhaltsstoffe = schema.List(title=_(u"Inhaltsstoffe"), value_type=schema.TextLine(), required=False)

    reibemittel = schema.List(title=_(u"Reibemittel"), value_type=schema.TextLine(), required=False)

    loesemittel = schema.List(title=_(u"Lösemittel"), value_type=schema.TextLine(), required=False)

    konservierungsmittel = schema.List(title=_(u"Konservierungsmittel"), value_type=schema.TextLine(), required=False)

    duftstoffe = schema.List(title=_(u"Duftstoffe"), value_type=schema.TextLine(), required=False)

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

    bild = NamedBlobImage(title=_(u"Produktbild"), required=False)

    hersteller = RelationChoice(
        title=_(u"Hersteller oder Lieferant"),
        source=CatalogSource(portal_type=["Folder", "Hersteller"]),
        required=False)
예제 #8
0
class IBandoCollectionPortlet(ICollectionPortlet):
    """A portlet which renders the results of a collection object.
    """

    show_more_text = schema.TextLine(
        title=_(u"Other text"),
        description=_(u"Alternative text to show in 'other' link."),
        required=True,
        default=u"Altro\u2026",
    )

    show_more_path = schema.Choice(
        title=_(u"Internal link"),
        description=_(
            u"Insert an internal link. This field override external link field"
        ),
        required=False,
        source=CatalogSource(),
    )

    show_description = schema.Bool(title=u"Mostra descrizione",
                                   required=True,
                                   default=False)

    show_tipologia_bando = schema.Bool(title=u"Mostra tipologia bando",
                                       required=True,
                                       default=False)

    show_effective = schema.Bool(title=u"Mostra data di pubblicazione",
                                 required=True,
                                 default=False)

    show_scadenza_bando = schema.Bool(title=u"Mostra data di scadenza",
                                      required=True,
                                      default=False)
예제 #9
0
class INewsletter(model.Schema):

    form.widget(value=DataGridFieldFactory)

    target = RelationChoice(
        title=_(u"Target Collection"),
        source=CatalogSource(object_provides=ICollection.__identifier__),
        required=False,
    )

    show_summary = schema.Choice(
        title=_(u"Enabled"),
        required=False,
        values=['yes', 'no', 'auto'],
        default='auto',
    )

    limit = schema.Choice(
        title=_(u"Months to Limit"),
        required=False,
        values=[1, 3, 6, 9, 12],
        default=1,
    )

    value = schema.List(title=u"News Items",
                        value_type=DictRow(title=u"News Item",
                                           schema=INewsletterItemsRowSchema),
                        required=False)

    listserv_email = schema.TextLine(
        title=_(u"Listserv Email"),
        description=_(u"[Listserv Name]@lists.psu.edu"),
        required=False,
    )
예제 #10
0
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_uid = schema.Choice(
        title=_(u'portlet_label_search_base', default=u'Search base'),
        description=_(
            u'portlet_help_search_base',
            default=u'Select search base Folder or Collection to search for '
            u'events. The URL to to this item will also be used to '
            u'link to in calendar searches. If empty, the whole site '
            u'will be searched and the event listing view will be '
            u'called on the site root.'),
        required=False,
        source=CatalogSource(
            object_provides={
                'query': [
                    ISyndicatableCollection.__identifier__,
                    IFolder.__identifier__
                ],
                'operator':
                'or'
            }),
    )
예제 #11
0
class ISchedule(model.Schema):
    """Schedule Type"""
    id = schema.TextLine(
        title=_(u"Code"),
        required=True,
        description=_(
            u"A String Based on Abbreviation of Administrative Area."))

    title = schema.TextLine(
        title=_(u"Title"),
        required=True,
    )
    description = schema.Text(
        title=_(u"Description"),
        required=False,
    )
    body = RichTextField(
        title=_(u"Body"),
        required=False,
    )
    temples = RelationList(
        title=_(u"Related Temples"),
        required=False,
        default=[],
        value_type=RelationChoice(title=u"Related Temple",
                                  source=CatalogSource(portal_type='Temple')),
    )
예제 #12
0
class IHautpflegemittel(model.Schema):
    """ Marker interface and Dexterity Python Schema for Hautpflegemittel
    """

    title = schema.TextLine(title=_(u"Produktname"))

    anwendungsbereich = schema.List(
        title=_(u"Anwendungsbereich"),
        value_type=schema.Choice(vocabulary=anwendungVocabulary),
        required=False,
    )

    inhaltsstoffe = schema.List(title=_(u"Inhaltsstoffe"),
                                value_type=schema.TextLine(),
                                required=False)

    konservierungsmittel = schema.List(title=_(u"Konservierungsmittel"),
                                       value_type=schema.TextLine(),
                                       required=False)

    duftstoffe = schema.List(title=_(u"Duftstoffe"),
                             value_type=schema.TextLine(),
                             required=False)

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

    bild = NamedBlobImage(title=_(u"Produktbild"), required=False)

    hersteller = RelationChoice(
        title=_(u"Hersteller oder Lieferant"),
        source=CatalogSource(portal_type=["Folder", "Hersteller"]),
        required=False)
예제 #13
0
class IGroupByDateAction(Interface):
    """ Configuration options for this content rule action
    """
    base_folder = Choice(
        title=_(u"Base folder"),
        description=_(u"Choose the base folder for the date "
                      u"hierarchy."),
        required=True,
        source=CatalogSource(is_folderish=True),
    )

    container = TextLine(title=_(u"Container"),
                         description=_(
                             u"Select the type of container in which "
                             u"the structure will be based."),
                         default=u'Folder',
                         required=True)

    structure = TextLine(title=_(u"Hierarchy structure"),
                         description=_(u"Choose hierarchy structure. Use "
                                       u"strftime formating. e.g.: '%Y/%m/%d'"
                                       u" to have 2011/11/17 or '%Y/%m' to "
                                       u"have 2011/11"),
                         required=True,
                         default=u'%Y/%m/%d')
예제 #14
0
class Iusuario(Interface):
    title = schema.TextLine(title=_(u'Nome'), required=True)
    description = schema.TextLine(title=_(u'Sobrenome'), required=False)
    apelido = schema.TextLine(title=_(u'Apelido'), required=True)
    cpf = schema.TextLine(title=_(u'CPF'),
                          description=_(u'Deve ter 11 digitos'),
                          required=True,
                          min_length=0,
                          max_length=11)
    sexo = schema.Choice(title=_(u'sexo'), vocabulary=opSexos, required=False)
    #Add varios elementos na lista
    filmesFavoritos = RelationList(
        title=_(u'Filmes Favoritos'),
        value_type=RelationChoice(source=CatalogSource(portal_type='filme')),
        description=_(
            u'Dos filmes que estao no sistema, dizer quais declara favorito'),
        required=False,
    )
    #Add um elemento
    # filmesFavoritos = RelationChoice(
    #     title       = _(u'Filmes Favoritos'),
    #     source      = CatalogSource(portal_type = 'filme'),
    #     required    = False,
    # )
    endereco = schema.Choice(title=_(u"Endereco"),
                             source=getPaises,
                             required=False)
    aniversario = schema.Date(title=(u'Data de Nascimento'), required=False)
    dexteritytextindexer.searchable('title', 'description', 'apelido')
예제 #15
0
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_uid = 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=CatalogSource(is_folderish=True),
    )
예제 #16
0
class ISchedule(model.Schema):
    """Schedule Type"""
    title = schema.TextLine(
        title=_(u"Title"),
        required=False,
    )
    description = schema.Text(
        title=_(u"Description"),
        required=False,
    )
    body = RichTextField(
        title=_(u"Body"),
        required=False,
    )
    temples = RelationList(
        title=_(u"Related Temples"),
        default=[],
        value_type=RelationChoice(
            title=u'Related Temple',
            source=CatalogSource(Type=['Temple','Folder'])
        ),
        required=False,
    )
    directives.widget(
        'temples',
        RelatedItemsFieldWidget,
        pattern_options={
            'recentlyUsed': True,
        }
    )
예제 #17
0
 def __call__(self, context):
     query = self.query.copy()
     query['portal_type'] = constants.LIBRARY_PORTAL_TYPE
     query_factory = queryAdapter(context, interface=ILibraryQuery)
     if query_factory is not None:
         query.update(query_factory())
     return CatalogSource(**query)
예제 #18
0
class IPerson(Interface):
    """ Fields to be used with DataGridField below
    """

    first_name = schema.TextLine(
        title=_(u'First Name'),
        description=_(u'First Name'),
        required=False,
    )

    last_name = schema.TextLine(
        title=_(u'Last Name'),
        description=_(u'Family Name'),
        required=False,
    )

    #we probably need 'many relation fields', since one person can have
    #several relations to same person
    #Teoretically, your x-wife is not your brothers wife
    family_relation = RelationChoice(
        title=_(u"Realation"),
        source=CatalogSource(
            portal_type=['DatagridDemoType', 'Person', 'etc']),
        required=False,
    )
예제 #19
0
class ISearchPubblicazioniTile(model.Schema):
    """ Interfaccia per la tile di ricerca pubblicazioni della RER.
    """

    title = schema.TextLine(title=_(u'Title'), required=True, default=u'')

    search_path = schema.Choice(
        title=_('searchpub_tile_folderuid', u'Percorso di ricerca'),
        description=_(
            'searchpub_tile_folderuid_help',
            u'Usa questo campo per limitare la ricerca di pubblicazioni ad un'
            u'percorso specifico.'),
        source=CatalogSource(portal_type=('Folder')),
        required=False,
    )

    css_class = schema.TextLine(
        title=_('search_publication_tile_css_class', u'CSS class'),
        description=_(
            'search_publication_tile_css_class_help',
            u'Insert a list of additional css classes for this tile.',
        ),
        required=False,
        default=u'',
    )
예제 #20
0
    def _constructField(self, attributes):
        portal_type = attributes.get('portal_type') \
            or attributes.get('portal_types') \
            or []
        if 'portal_type' in attributes:
            del attributes['portal_type']

        if HAS_CONTENTTREE and not HAS_WIDGETS and not portal_type:
            attributes['source'] = ObjPathSourceBinder()
        elif HAS_CONTENTTREE and not HAS_WIDGETS:
            attributes['source'] = ObjPathSourceBinder(portal_type=portal_type)
        elif not portal_type:
            attributes['source'] = CatalogSource()
        else:
            attributes['source'] = CatalogSource(portal_type=portal_type)

        return super(RelationChoiceBaseHandler,
                     self)._constructField(attributes)
예제 #21
0
class IScooterTile(IBorderTile):

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

    target = RelationChoice(
        title=_(u"Target Collection"),
        source=CatalogSource(object_provides=ICollection.__identifier__),
        required=False,
    )

    target_container = RelationChoice(
        title=_(u"Target Container"),
        source=CatalogSource(object_provides=IDexterityContainer.__identifier__),
        required=False,
    )

    exclude_navigation = schema.Bool(
        title=_(u"Hide items excluded from navigation"),
        required=False,
        default=False,
    )

    count = schema.Choice(
        title=_(u"Count"),
        values=[1,2,3,4],
        required=False,
    )

    style = schema.Choice(
        title=_(u"Card Style"),
        vocabulary='agsci.common.tiles.card_style',
        default=u'image',
        required=False,
    )

    show_item_title = schema.Bool(
        title=_(u"Show Item Title?"),
        description=_(u"(For Image card style)"),
        required=False,
        default=True,
    )
class ICoupon(model.Schema):

    code = schema.TextLine(title=u'Code', )

    categories = schema.Set(
        title=u'Product Category',
        description=u'If specified, this coupon will only apply to '
        u'products from the specified categories.',
        value_type=schema.Choice(
            vocabulary='jazkarta.shop.product_categories', ),
    )

    scope = schema.Choice(
        title=u'Discount applies to',
        values=(
            u'One item',
            u'All items in cart',
        ),
    )

    amount = Currency(title=u'Discount Amount', )

    unit = schema.Choice(
        title=u'Discount Unit',
        values=(u'$', u'%'),
    )

    per_user_limit = schema.Int(
        title=u'Use Limit Per User',
        description=u'The number of times this coupon may be used '
        u'by an individual. Enter 0 for unlimited.',
        default=1,
    )

    product = schema.Choice(
        title=u'Specific Product',
        description=u'Optionally specify one product to which this coupon '
        u'may be applied.',
        source=CatalogSource(
            object_provides='jazkarta.shop.interfaces.IProduct'),
        required=False,
    )

    # excluded_products = schema.Set(
    #     title=u'Excluded Products',
    #     description=u'Products for which this coupon may not be used.',
    #     value_type=schema.Choice(
    #         source=CatalogSource(
    #             object_provides='jazkarta.shop.interfaces.IProduct'),
    #     ),
    #     required=False,
    # )

    start = schema.Datetime(title=u'Start Date', )

    end = schema.Datetime(title=u'End Date', )
예제 #23
0
class IProduct(model.Schema):
    """Marker for content that can be purchased."""

    product_category = schema.Choice(
        title=u'Product Category',
        required=False,
        vocabulary='jazkarta.shop.product_categories',
    )

    price = Currency(
        title=u'Unit Price',
        default=Decimal("0.00"),
        min=Decimal("0.00"),
    )

    stock_level = schema.Int(
        title=u'Stock Level',
        description=u'Number of items remaining in warehouse. '
        u'Leave blank for no limit.',
        required=False,
        min=0,
    )

    taxable = schema.Bool(
        title=u'Taxable?',
        description=u'Mark the box if this product is subject to sales tax.',
        default=True,
    )

    weight = schema.Float(
        title=u'Weight (lbs)',
        description=u'Used to calculate shipping.',
        required=False,
    )

    recommended_products = RelationList(
        title=u'Recommended products',
        description=
        u'Recommendations to users who bought this product, shown during checkout.',
        default=[],
        required=False,
        value_type=schema.Choice(source=CatalogSource(
            object_provides='jazkarta.shop.interfaces.IProduct'), ))

    model.fieldset(
        'shop',
        label=u"Shop",
        fields=(
            'product_category',
            'price',
            'stock_level',
            'taxable',
            'weight',
            'recommended_products',
        ),
    )
예제 #24
0
class IBicyclePicture(Interface):
    title = schema.TextLine(
        title=_(u'Title'),
        required=True,
    )
    event = RelationChoice(
        title=_(u'Event Select'),
        source=CatalogSource(Type="EventList"),
        required=False,
    )
    place = RelationChoice(
        title=_(u'Place Select'),
        source=CatalogSource(Type="PlaceList"),
        required=False,
    )
    image = NamedBlobImage(
        title=_(u"Upload Image"),
        required=False
    )
예제 #25
0
class ITileInterface(ISkeeterTile):

    form.order_after(target='title')
    form.omitted('featured_id')

    target = schema.Choice(
        title=_(u"Target Collection"),
        source=CatalogSource(object_provides=ICollection.__identifier__),
        required=False,
    )
예제 #26
0
def tracker_issues(context):
    """ vocabulary source for issues just inside this tracker
    """
    if ITracker.providedBy(context):
        current_tracker = context
    else:
        current_tracker = context.getTracker()
    path = '/'.join(current_tracker.getPhysicalPath())
    query = {'path': {'query': path}, 'object_provides': IIssue.__identifier__}
    return CatalogSource(**query)
예제 #27
0
class ICopyAction(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=CatalogSource(is_folderish=True))
예제 #28
0
class IContentPortlet(IPortletDataProvider):
    """A portlet

    It inherits from IPortletDataProvider because for this portlet, the
    data that is being rendered and the portlet assignment itself are the
    same.
    """

    content = schema.Choice(
        title=_(u"Content Item"),
        required=True,
        source=CatalogSource(object_provides=ILayoutAware.__identifier__))
예제 #29
0
class ICover(Interface):
    """ 首頁 """
    title = schema.TextLine(
        title=_(u"Title"),
        required=True,
    )

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

    heros = RelationList(
        title=_(u"Heros"),
        description=_(u"Rleated items for hero section"),
        value_type=RelationChoice(title=_(u"Related"),
                                  source=CatalogSource(portal_type='Product'),),
        required=True,
    )

    newProduct = RelationList(
        title=_(u"New Product"),
        description=_(u"Rleated items for home page new product list"),
        value_type=RelationChoice(title=_(u"Related"),
                                  source=CatalogSource(portal_type='Product'),),
        required=True,
    )

    hotProduct = RelationList(
        title=_(u"Hot Product"),
        description=_(u"Rleated items for home page not product list"),
        value_type=RelationChoice(title=_(u"Related"),
                                  source=CatalogSource(portal_type='Product'),),
        required=True,
    )

    article = RelationList(
        title=_(u"Article"),
        description=_(u"Rleated items for home page article list"),
        value_type=RelationChoice(title=_(u"Related"),
                                  source=CatalogSource(portal_type='Post', path='/i8d/ishare', review_state='published'),),
        required=True,
    )

    healthy = RelationList(
        title=_(u"Healthy"),
        description=_(u"Rleated items for home page article list"),
        value_type=RelationChoice(title=_(u"Related"),
                                  source=CatalogSource(portal_type='Post', path='/i8d/healthy', review_state='published'),),
        required=True,
    )

    # 先改為 post 給健康專欄用, 以後看狀況再改
    question = RelationList(
        title=_(u"Question"),
        description=_(u"Rleated items for home page question list"),
        value_type=RelationChoice(title=_(u"Related"),
                                  source=CatalogSource(portal_type='Question', ),),
        required=True,
    )
class ICollectionFilterPortlet(IPortletDataProvider):

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

    target_collection = schema.Choice(
        title=_(u'label_target_collection', default=u'Target Collection'),
        description=_(
            u'help_target_collection',
            default=u'The collection, which is the source for the filter '
                    u'items and where the filter is applied.'
        ),
        required=True,
        source=CatalogSource(
            object_provides=ISyndicatableCollection.__identifier__
        ),
    )

    group_by = schema.Choice(
        title=_('label_groupby', u'Group by'),
        description=_(
            'help_groupby',
            u'Select the criteria to group the collection results by.'
        ),
        required=True,
        vocabulary='collective.portlet.collectionfilter.GroupByCriteria',
    )

    show_count = schema.Bool(
        title=_(u'label_show_count', default=u'Show count'),
        description=_(
            u'help_show_count',
            default=u'Show the result count for each filter group.'),
        default=False,
        required=False
    )

    cache_time = schema.TextLine(
        title=_(u"label_cache_time", default=u"Cache Time (s)"),
        description=_(
            u'help_cache_time',
            default=u"Cache time in seconds. 0 for no caching."
        ),
        default=u'60',
        required=False,
    )