39 lines
861 B
Python
39 lines
861 B
Python
from five import grok
|
|
from zope import schema
|
|
from zope.interface import implements
|
|
from Products.Five.browser import BrowserView
|
|
from Products.CMFCore.utils import getToolByName
|
|
|
|
from plone.directives import form, dexterity
|
|
from plone.dexterity.content import Item
|
|
|
|
from tabellio.agenda.interfaces import MessageFactory as _
|
|
|
|
from themis.fields import LegisSession
|
|
|
|
class IBaseEvent(form.Schema):
|
|
title = schema.TextLine(title=_(u'Title'))
|
|
place = schema.TextLine(title=_(u'Place'))
|
|
|
|
startdate = schema.Datetime(title=_(u'Start'))
|
|
enddate = schema.Datetime(title=_(u'End'))
|
|
|
|
description = schema.Text(title=_(u'Description'))
|
|
|
|
|
|
class IEvent(IBaseEvent):
|
|
pass
|
|
|
|
|
|
class IParlEvent(IBaseEvent):
|
|
session = LegisSession(title=_(u'Session'))
|
|
|
|
|
|
class Event(Item):
|
|
implements(IEvent)
|
|
|
|
|
|
class ParlEvent(Item):
|
|
implements(IParlEvent)
|
|
|