Beispiel #1
0
from Products.CMFCore.utils import getToolByName
# from zope.app.file.interfaces import IImage # for View::images
from plone.z3cform.textlines.textlines import TextLinesFieldWidget
from plone.namedfile.field import NamedBlobImage
from collective import dexteritytextindexer

from irwilot.content import _

from zope.interface import implements
from zope.interface import Interface
from plone.memoize.instance import memoize

from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm

genre_voc = SimpleVocabulary(
    [   SimpleTerm(value=u'none', title=_(u'-')),
        SimpleTerm(value=u'landscape', title=_(u'Landskap')),
        SimpleTerm(value=u'portrait', title=_(u'Portratt')),
        SimpleTerm(value=u'stilllife', title=_(u'Stilliben')),
        SimpleTerm(value=u'fantasy', title=_(u'Fantasi')),
        SimpleTerm(value=u'composition', title=_(u'Composition')) ]
    )

style_voc = SimpleVocabulary(
    [   SimpleTerm(value=u'none', title=_(u'-')),
        SimpleTerm(value=u'realism', title=_(u'Realism')),
        SimpleTerm(value=u'impressionism', title=_(u'Impressionism')),
        SimpleTerm(value=u'symbolism', title=_(u'Symbolism')) ]
    )

technique_voc = SimpleVocabulary(
Beispiel #2
0
from five import grok
from zope import schema
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm

from plone.directives import form, dexterity
from plone.app.textfield import RichText

from Acquisition import aq_inner, aq_parent
from Products.CMFCore.utils import getToolByName

from irwilot.content import _

type_of_items_voc = SimpleVocabulary(
    [   SimpleTerm(value=u'nothing', title=_(u'Show nothing')),
        SimpleTerm(value=u'recent', title=_(u'Recent items')),
        SimpleTerm(value=u'featured', title=_(u'Featured items')) ]
    )

nimages_voc = SimpleVocabulary(
    [   SimpleTerm(value=u'5', title=_(u'5')),
        SimpleTerm(value=u'10', title=_(u'10')),
        SimpleTerm(value=u'15', title=_(u'15')) ]
    )

class IFrontPage(form.Schema):
    """The front page
    """
    
    title = schema.TextLine(
        title=_(u"Title"),
        )