def finalizeConferenceSchema(schema): schema['title'].storage = atapi.AnnotationStorage() schema['description'].storage = atapi.AnnotationStorage() schema['description'].required = True schema['description'].widget.label = _('Abstract') schema['description'].widget.description = _('A short summary of your article.') schema['subject'].storage = atapi.AnnotationStorage() schema['subject'].widget.label = _('Keywords') schema['subject'].widget.description = _('Please select among the existing keywords or add new ones to describe the subjects of your submission.') # Hide this fields for field in ('effectiveDate', 'expirationDate',): schema[field].widget.visible = {'edit': 'invisible', 'view': 'invisible'} # Call ATContentTypes schemata.finalizeATCTSchema( schema, folderish=True, moveDiscussion=False ) # Fix after ATContentTypes # Reorder schema.moveField('description', before='specialRequirements') schema.moveField('subject', after='description') # Schematas schema.changeSchemataForField('subject', 'default') return schema
logger = logging.getLogger("gcommons.Conference.content.Conference") ConferenceSchema = ( folder.ATFolderSchema.copy() + gcContainerMixin.schema.copy() + atapi.Schema( ( # -*- Your Archetypes field definitions here ... -*- atapi.StringField( name="venue", required=False, searchable=1, # default='', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget(label=_(u"Venue"), description=_(u"Description of the venue(s)")), ), # # Dates atapi.DateTimeField( name="startDate", required=True, searchable=False, accessor="start", default_method=DateTime, languageIndependent=True, widget=atapi.CalendarWidget(description="", label=_(u"label_event_start", default=u"Event Starts")), ), atapi.DateTimeField( "endDate", required=True,
logger = logging.getLogger('jcommons.Conference.content.ConferencePaper') ##################################### # Schema ConferencePaperSchema = folder.ATFolderSchema.copy() + RelatorsMixin.schema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.StringField( name='specialRequirements', required=False, searchable=1, #default='', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Special Requirements"), description=_(u"Does your paper require any specific requirements? Type any special requirements here (such as Powerpoint, video equipment, etc)"), ), ), atapi.ReferenceField( name='refPanel', relationship = 'refPanel', required=False, multiValued = False, searchable=1, #TODO: this should be a proper permission, not generic one write_permission='Manage Portal', vocabulary = 'listAvailablePanels', enforceVocabulary = True, mutator = 'setPanelRef',
label_msgid='gcommons_label_helpTextAnon', description_msgid='gcommons_help_helpTextAnon', i18n_domain='gcommons.Core', ), default_output_type='text/html', searchable=True, default=""" <h3>Payment system</h3> You need to login or register first. """ ), DataGridField( name='items', widget=DataGridWidget( label=_("Items"), description = _('Take your time to fill in the items that will be billed. For radio buttons use same id plus colon (see help).'), column_names=('Id', 'Name', 'Description', 'Price'), ), allow_empty_rows=False, required=False, columns=('id', 'name', 'description', 'price') ), )) def finalizeConferencePaymentSchema(schema): schema['title'].storage = atapi.AnnotationStorage() schema['description'].storage = atapi.AnnotationStorage() schemata.finalizeATCTSchema(schema, moveDiscussion=False)
description="Choose the type of event that best fits what you are proposing", #label_msgid="jcommons_event_title", #description_msgid="jcommons_help_draft_title", ), ), atapi.TextField('text', required=False, searchable=True, primary=True, storage = atapi.AnnotationStorage(), validators = ('isTidyHtmlWithCleanup',), default_output_type = 'text/x-html-safe', widget = atapi.RichWidget( description = 'Describe thoroughly your proposal', label = _(u'label_description', default=u'Description'), rows = 25, allow_file_upload = True, ), ), atapi.ComputedField('description', searchable=1, expression='context._compute_description()', ), #TODO: Move all this fields somewhere to common event schema # with boilerplate code and reasonable defaults # e.g. this can all be Conference values if no better value. atapi.StringField( name='venue',
logger = logging.getLogger('jcommons.Conference.content.ConferencePaper') ##################################### # Schema ConferencePaperSchema = folder.ATFolderSchema.copy() + RelatorsMixin.schema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.StringField( name='specialRequirements', required=False, searchable=1, #default='', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Special Requirements or Time Constraints"), description=_(u"Does your paper require any specific requirements? Type any special requirements here including any time constraints you might have."), ), ), atapi.ReferenceField( name='refPanel', relationship = 'refPanel', required = False, multiValued = False, #TODO: this should be a proper permission, not generic one write_permission='Manage Portal', vocabulary = 'listAvailablePanels', enforceVocabulary = True, mutator = 'setPanelRef',
label="Help text", description= "Enter any introductory help text you'd like to display on the tracker front page.", label_msgid='gcommons_label_helpText', description_msgid='gcommons_help_helpText', i18n_domain='gcommons.Core', ), default_output_type='text/html', searchable=True, default=""" <h3>Payment system</h3> """), DataGridField( name='items', widget=DataGridWidget( label=_("Items"), description= _('Take your time to fill in the items that will be billed. For radio buttons use same id plus colon (see help).' ), column_names=('Id', 'Name', 'Description', 'Price'), ), allow_empty_rows=False, required=False, columns=('id', 'name', 'description', 'price')), )) def finalizeConferencePaymentSchema(schema): schema['title'].storage = atapi.AnnotationStorage() schema['description'].storage = atapi.AnnotationStorage() schemata.finalizeATCTSchema(schema, moveDiscussion=False)
from Products.ATContentTypes.lib.calendarsupport import CalendarSupportMixin from Products.ATContentTypes.interfaces import ICalendarSupport logger = logging.getLogger('gcommons.Conference.content.Conference') ConferenceSchema = folder.ATFolderSchema.copy() + gcContainerMixin.schema.copy( ) + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.StringField( name='venue', required=False, searchable=1, #default='', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Venue"), description=_(u"Description of the venue(s)"), ), ), # # Dates atapi.DateTimeField( name='startDate', required=True, searchable=False, accessor='start', default_method=DateTime, languageIndependent=True, widget=atapi.CalendarWidget(description='', label=_(u'label_event_start',