def __call__(self, context): TYPES = {_(u'Seniors'): 'seniors', _(u'Sport'): 'sport', _(u'Education and Job'): 'education', _(u"Neighborhood"): 'neighborhood', _(u"Social"): 'social', _(u"Culture and Arts"): 'culture', _(u"Services"): 'services', _(u"Youth"): 'youth', _(u"Family"): 'family'} return SimpleVocabulary([SimpleTerm(value, title=title) for title, value in TYPES.iteritems()])
from five import grok from plone.directives import dexterity, form from zope import schema from plone.indexer.decorator import indexer from plone.namedfile.interfaces import IImageScaleTraversable from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm from collective.geo.geographer.interfaces import IGeoreferenced from amap.mapview.vocabulary import color_codes from amap.mapview import MessageFactory as _ marker_types = SimpleVocabulary( [SimpleTerm(value=u'seniors', title=_(u'Seniors')), SimpleTerm(value=u'sport', title=_(u'Sport')), SimpleTerm(value=u'education', title=_(u'Education and Job')), SimpleTerm(value=u'neighborhood', title=_(u"Neighborhood")), SimpleTerm(value=u'social', title=_(u"Social")), SimpleTerm(value=u'culture', title=_(u"Culture and Arts")), SimpleTerm(value=u'services', title=_(u"Services")), SimpleTerm(value=u'youth', title=_(u"Youth")), SimpleTerm(value=u'family', title=_(u"Family"))]) class IInstitution(form.Schema, IImageScaleTraversable): """ single institution """