class ITalk(model.Schema): """A conference talk. Talks are managed inside tracks of the Program. """ title = schema.TextLine( title=_(safe_unicode('Title')), description=_(safe_unicode('Talk title')), ) description = schema.Text(title=_(safe_unicode('Talk summary')), ) primary('details') details = RichText( title=_(safe_unicode('Talk details')), required=True, ) speaker = RelationList( title=_(safe_unicode('Presenter')), default=[], value_type=RelationChoice(vocabulary='ConferenceSpeaker'), required=False, missing_value=[], ) directives.widget( 'speaker', SelectFieldWidget, ) dexteritytextindexer.searchable('call_for_paper_topics') directives.widget(call_for_paper_topic=RadioFieldWidget) call_for_paper_topic = schema.List( title=_(safe_unicode('Choose the topic for your talk')), value_type=schema.Choice(source=vocabCfPTopics), required=True, ) directives.widget(planedtalklength=RadioFieldWidget) planedtalklength = schema.List( title=_(safe_unicode('Planed Length')), description=_( safe_unicode( "Give an estimation about the time you'd plan for your talk.") ), value_type=schema.Choice(source='TalkLength'), required=True, ) directives.widget(license=RadioFieldWidget) license = schema.List( title=_(safe_unicode('License Of Your Talk')), description=_(safe_unicode('Choose a license for your talk')), value_type=schema.Choice(source='ContentLicense'), required=True, ) messagetocommittee = schema.Text( title=_(safe_unicode('Messages to the Program Committee')), description=_( safe_unicode( 'You can give some information to the committee here, e.g. about days you are (not) ' 'available to give the talk')), required=False, ) read_permission(conferencetrack='cmf.ReviewPortalContent') write_permission(conferencetrack='cmf.ReviewPortalContent') conferencetrack = RelationList( title=_(safe_unicode('Choose the track for this talk')), default=[], value_type=RelationChoice(vocabulary='ConferenceTrack'), required=False, missing_value=[], ) directives.widget( 'conferencetrack', RadioFieldWidget, ) read_permission(twclength='cmf.ReviewPortalContent') write_permission(twclength='cmf.ReviewPortalContent') directives.widget(twclength=RadioFieldWidget) twclength = schema.List( title=_(safe_unicode('Talk Length')), description=_( safe_unicode('Set a time frame for the talk in minutes.')), value_type=schema.Choice(source='TalkLength'), required=False, ) read_permission(positionintrack='cmf.ReviewPortalContent') write_permission(positionintrack='cmf.ReviewPortalContent') positionintrack = schema.Int( title=_(safe_unicode('Position In The Track')), description=_( safe_unicode('Choose a number for the order in the track')), required=False, ) write_permission(startitem='collective.conferences.ModifyTalktime') startitem = schema.Datetime( title=_(safe_unicode('Startdate')), description=_(safe_unicode('Start date')), defaultFactory=startDefaultValue, required=False, ) write_permission(enditem='collective.conferences.ModifyTalktime') enditem = schema.Datetime( title=_(safe_unicode('Enddate')), description=_(safe_unicode('End date')), defaultFactory=endDefaultValue, required=False, ) model.fieldset( 'slides', label=_(safe_unicode('Slides')), fields=[ 'slidefileextension', 'slides', 'slides2', 'slides3', 'slides4' ], ) model.fieldset( 'files', label=_(safe_unicode('Files')), fields=['fileextension', 'files', 'files2'], ) model.fieldset( 'video', label=_(safe_unicode('Video')), fields=['videofileextension', 'video'], ) directives.mode(slidefileextension='display') slidefileextension = schema.TextLine( title=_( safe_unicode( 'The following file extensions are allowed for the upload of ' 'slides of conference talks as well as for linked slides ' '(upper case and lower case and mix of both):')), defaultFactory=allowedconferencetalkslideextensions, ) slides = NamedBlobFile( title=_(safe_unicode('Presentation slides')), description=_( safe_unicode( 'Please upload your presentation shortly after you have given your talk.' )), constraint=validatetalkslidefileextension, required=False, ) slides2 = NamedBlobFile( title=_(safe_unicode('Presentation Slides In Further File Format')), description=_( safe_unicode( 'Please upload your presentation shortly after you have given your talk.' )), constraint=validatetalkslidefileextension, required=False, ) slides3 = schema.URI( title=_(safe_unicode('Link To The Presentation Slides')), constraint=validatelinkedtalkslidefileextension, required=False, ) slides4 = schema.URI( title=_( safe_unicode( 'Link To The Presentation Slides In Further File Format')), constraint=validatelinkedtalkslidefileextension, required=False, ) directives.mode(fileextension='display') fileextension = schema.TextLine( title=_( safe_unicode( 'The following file extensions are allowed for the upload of ' 'material or additional files for conference talks as well as ' 'for linked material/ additional files ' '(upper case and lower case and mix of both):')), defaultFactory=allowedconferencetalkmaterialextensions, ) files = NamedBlobFile( title=_(safe_unicode('Additional Files of your presentation.')), description=_( safe_unicode( 'Please upload the additional files of your presentation (in archive format) ' 'shortly after you have given your talk.')), constraint=validatetalkmaterialfileextension, required=False, ) files2 = schema.URI( title=_( safe_unicode( 'Link to additional Files of your presentation in the correct file format (see for it above).' )), constraint=validatelinkedtalkmaterialfileextension, required=False, ) directives.mode(videofileextension='display') videofileextension = schema.TextLine( title=_( safe_unicode( 'The following file extensions are allowed for conference ' 'video uploads (upper case and lower case and mix of both):')), defaultFactory=allowedconferencevideoextensions, ) video = schema.URI( title=_(safe_unicode('Link to the Video of the talk')), constraint=validatevideofileextension, required=False, ) read_permission(reviewNotes='cmf.ReviewPortalContent') write_permission(reviewNotes='cmf.ReviewPortalContent') reviewNotes = schema.Text( title=_(safe_unicode('Review notes')), required=False, ) @invariant def validateLicensechoosen(value): if not value.license: raise ChooseLicense( _(safe_unicode('Please choose a license for your talk.'), ), ) @invariant def trackpositionset(value): if value.conferencetrack and not value.positionintrack: raise Invalid( _( safe_unicode( 'You need to choose a position in the track. Please ' "add this position to the field 'Position in Track'.")) ) @invariant def validatecfptopicchoosen(data): if not data.call_for_paper_topic: raise ChooseCfpTopic( _( safe_unicode( 'Please choose a call for paper topic for your talk.'), ), ) @invariant def validateplanedlengthchoosen(data): if not data.planedtalklength: raise ChoosePlanedLength( _(safe_unicode('Please choose a planed length for your talk.'), ), )
class IThema(model.Schema): """ Marker interface and Dexterity Python Schema for Thema """ image = NamedBlobImage(title=u"Titelbild des Themas", required=False) text = RichText(title=u"Beschreibung des Themas", required=False)