source: products/quintagroup.mobileextender/trunk/quintagroup/mobileextender/browser/interfaces.py @ 754

Last change on this file since 754 was 754, checked in by piv, 17 years ago

copied from trunk

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1from zope import interface, schema
2from zope.schema import vocabulary
3
4from Products.CMFCore.utils import getToolByName
5from quintagroup.mobileextender import mobileextenderMessageFactory as _
6
7class IMobileConfiglet(interface.Interface):
8    """A portlet which can render a classic Plone portlet macro
9    """
10
11    path = schema.TextLine(
12        title=_(u"label_path", default=u"Path"),
13        description=_(u"help_path",
14            default=u"The Physical path for objects found. "
15            "Leave blank to ignore this criterion."),
16        default=u"",
17        required=False,
18    )
19    ptypes = schema.List(
20        title=_(u'Portal Types'),
21        description=_(u"You may search for and choose portal type(s) "
22            "of object(s) to find. Leave blank to ignore this criterion."),
23        default=[],
24        #source = "quintagroup.mobileextender.ptypes",
25        value_type = schema.Choice( title=u"ptypes", source="quintagroup.mobileextender.ptypes" ),
26        required=False,
27    )
28    wfstates = schema.List(
29        title=_(u'Workflow States'),
30        description=_(u"You may search for and choose workflow review state(s) "
31            "of object(s) to find. Leave blank to ignore this criterion."),
32        default=[],
33        value_type = schema.Choice( title=u"review_states", source="quintagroup.mobileextender.wfstates" ),
34        required=False,
35    )
36    excludeids = schema.Text(
37        title=_(u'Exclude Ids'),
38        description=_(u"List ids, for exclude from mobile content marking. Ids must be separated "
39            "by new line. Leave blank to ignore this criterion."),
40        default=u"",
41        #value_type = schema.TextLine(),
42        required=False
43    )
44    excludepaths = schema.Text(
45        title=_(u'Exclude by Physical Paths'),
46        description=_(u"All objects, which physical path starts with one of specified one - will "
47            "be excluded from mobile content marking. Paths must start with portal id "
48            "(as in 'Path' field), and seaprated by new line. Leave blank to ignore this criterion."),
49        default=u"",
50        required=False
51    )
52    #sorton = schema.Choice(
53        #title=_(u'Sort index'),
54        #description=_(u"Check sort index."),
55        #vocabulary = "quintagroup.mobileextender.sortindices",
56        #default='',
57        #required=False
58    #)
59
60    #@interface.invariant
61    #def checkForACriterion(formdata):
62        #if not formdata.ptypes \
63           #and not formdata.path:
64            #raise interface.Invalid("Path of portal type(s) must be entered")
Note: See TracBrowser for help on using the repository browser.