class IAttendee(model.Schema): """A conference attendee. """ title = schema.TextLine( title=_(u"Full name"), ) # Simple choice based on uuid. form.widget(program=ContentTreeFieldWidget) program = schema.Choice( title=_(u"Chosen Program"), source=UUIDSourceBinder(portal_type='example.conference.program'), required=False, ) # Multiple choice. form.widget(sessions=MultiContentTreeFieldWidget) sessions = schema.List( title=_(u"Sessions you wish to attend"), value_type=schema.Choice( title=_(u"Selection"), source=UUIDSourceBinder(portal_type='example.conference.session')), required=False, ) # Data grid if DataGridFieldFactory is not None: form.widget(presenters=DataGridFieldFactory) presenters = schema.List( title=_(u'Questions for presenters'), description=_(u"Write down a question for a presenter."), value_type=DictRow(title=_(u'Presenters'), schema=IPresenterInfo), required=False, ) # Another data grid, this time we will put it in a fieldset. form.fieldset('remarks', label=_(u"Remarks"), fields=['remarkables']) if DataGridFieldFactory is not None: form.widget(remarkables=DataGridFieldFactory) remarkables = schema.List( title=_(u'Remarkable content'), description=_(u"Select a remarkable piece of content on this site " u"and add a remark about it. Fine for reporting " u"typos as well."), value_type=DictRow(title=_(u'Remarkable'), schema=IRemarkable), required=False, )
class ITeaserPortlet(IPortletDataProvider): """A portlet which can some given Infos """ teasertitle = schema.TextLine(title=_(u'Title'), description=u'', required=True) teaserdesc = schema.Text(title=_(u'Description'), description=u'', required=True) internal_target = schema.Choice(title=_(u"Internal Target"), description=_(u"Find an internal target \ for this image to link to"), required=False, source=UUIDSourceBinder({})) image = NamedImage(title=_(u'Image'), description=u'', required=True) imagetitle = schema.TextLine( title=_( u'label_imagetitle', default=u'Image Title', ), description=_( u'help_imagetitle', default=u'The provided image title will be used as alt-text.', ), required=True, )
class ITransferForm(Interface): project_or_story = RelationChoice( title=_(u"Project or story"), description=_(u"Project or story where to transfer the booking"), source=UUIDSourceBinder(portal_type=('Project', 'Story')) )
class IPrenotazioniTile(Schema): """ """ prenotazione_folder = schema.Choice( title=u'Sportello prenotazione', description=u'Seleziona uno sportello prenotazione.', source=UUIDSourceBinder(portal_type=('PrenotazioniFolder')), required=True, ) directives.widget(prenotazione_folder=ContentTreeFieldWidget) calendar_layout = schema.Choice( title=u'Layout calendario', description=u'Seleziona se mostrare il calendario a tutta larghezza o' u' a metà. I calendari a metà larghezza vanno accoppiati a due a due.', required=True, vocabulary=layouts, ) css_class = schema.TextLine( title=u'Classe CSS', description=u'Inserisci una lista di classi CSS aggiuntive per' u' questa tile.', required=False, )
class IRelatedPersons(model.Schema): """Behavior schema """ widget(related_persons=MultiContentTreeFieldWidget) related_persons = schema.List( title=u'Related persons', description=u'Search for persons related to this item', value_type=schema.Choice(source=UUIDSourceBinder( portal_type='collective.roster.person')))
class IRemarkable(Interface): # Interface that defines a datagrid row. content = schema.Choice( title=_(u"Content"), source=UUIDSourceBinder(), required=True) remark = schema.TextLine( title=_(u'Remark'), required=True)
class IPresenterInfo(Interface): # Interface that defines a datagrid row. presenter = schema.Choice( title=_(u"Presenter"), source=UUIDSourceBinder(), required=True) question = schema.TextLine( title=_(u'Question'), required=True)
class IFolderContentsListingTile(IPersistentCoverTile): title = TextLine( title=u'Title', required=False, ) uuid = RelationChoice( title=u"Folder Root", source=UUIDSourceBinder( portal_type=['Folder', 'FolderishPage', 'SubTopic', 'MainTopic']), required=False, )
class ICountryHeaderTile(IPersistentCoverTile): title = schema.TextLine( title=_(u'Country name'), required=False, ) write_permission(embed='collective.cover.EmbedCode') embed = schema.Text( title=_(u'Map Embedding code'), required=False, ) uuid = RelationList(title=u"Linked objects", value_type=RelationChoice( title=u"Linked object", source=UUIDSourceBinder(), required=False, ))
class INavigationTile(Schema): """A tile which can render the navigation tree.""" name = schema.TextLine( title=_(u'Title'), description=_(u'The title of the navigation tree.'), default=u'', required=False, ) root = schema.Choice( title=_(u'Root node'), description=_( u'You may search for and choose a folder to act as the root ' u'of the navigation tree. Leave blank to use the Plone site ' u'root.'), source=UUIDSourceBinder(), required=False, ) directives.widget(root=ContentTreeFieldWidget) includeTop = schema.Bool( title=_(u'Include top node'), description=_( u'Whether or not to show the top, or "root", node in the ' u'navigation tree. This is affected by the "Start level" ' u'setting.'), default=False, required=False, ) currentFolderOnly = schema.Bool( title=_(u'Only show the contents of the current folder.'), description=_( u'If selected, the navigation tree will only show the current ' u'folder and its children at all times.'), default=False, required=False, ) topLevel = schema.Int( title=_(u'Start level'), description=_( u'An integer value that specifies the number of folder levels ' u'below the site root that must be exceeded before the ' u'navigation tree will display. 0 means that the navigation ' u'tree should be displayed everywhere including pages in the ' u'root of the site. 1 means the tree only shows up inside ' u'folders located in the root and downwards, never showing at ' u'the top level.'), default=0, required=False, ) bottomLevel = schema.Int( title=_(u'Navigation tree depth'), description=_( u'How many folders should be included before the navigation ' u'tree stops. 0 means no limit. 1 only includes the root ' u'folder.'), default=0, required=False, )