BooleanField('showUsage', default = False, widget=BooleanWidget(label='Show template description and instructions', description='When checked, a page with instructions for this template will be displayed before the actual template items are created.')), TextField('usage', searchable=1, required=0, primary=1, default_output_type = 'text/x-html-safe', allowable_content_types=('text/html',), widget=RichWidget(allow_file_upload=0, label='Instructions for the user', allow_format_edit=0, description="")), )) finalizeATCTSchema(schema) class Template(ATCTOrderedFolder): """A Template is a container that can hold any kind of content. After the Template is registered in a folder (or any other template-aware folderish item), a user can instantiate whatever is inside the Template container by using the templates drop-down menu next to the add item menu. """ meta_type = 'Template' schema = schema _at_rename_after_creation = True security = ClassSecurityInfo() security.declareProtected(View, "getAutoIcon") def getAutoIcon(self):
description_msgid = "help_event_attendees", i18n_domain = "plone")), StringField('diggTopic', default='offbeat_news', vocabulary=DIGG_TOPICS, widget=SelectionWidget(label='Digg topic', label_msgid="label_digg_topic", description_msgid="help_digg_topic", i18n_domain="SimpleBlog", description='Choose the digg topic.')), )) # Finalise the schema according to ATContentTypes standards. This basically # moves the Related items and Allow discussion fields to the bottom of the # form. See ATContentTypes.content.schemata for details. finalizeATCTSchema(schema) class BlogEntry(parentClass): """ A BlogEntry can exist inside a SimpleBlog Folder or an EntryFolder """ # Standard content type setup portal_type = meta_type = 'BlogEntry' archetype_name = 'Blog Entry' content_icon='entry_icon.gif' schema = schema global_allow=0 allow_discussion = 1 default_view = 'blogentry_view'
LinesField( name='msg_attachments', schemata='message', required=False, searchable=False, languageIndependent=True, storage=AnnotationStorage(), widget=MultiSelectionWidget( label=_(u'E-mail Attachments'), description=_(u'Please select the attachments to be sent with email.'), format='checkbox'), vocabulary='attachments', enforceVocabulary=True))) finalizeATCTSchema(PFGExtendedMailAdapterSchema, folderish=True, moveDiscussion=False) class PFGExtendedMailAdapter(ATFolder, FormMailerAdapter): """Extended Mail Adapter""" schema = PFGExtendedMailAdapterSchema _at_rename_after_creation = True implements(IPFGExtendedMailAdapterContentType) security = ClassSecurityInfo() security.declarePrivate('get_mail_text') def get_mail_text(self, fields, request, **kwargs): """Get header and body of e-mail as text (string)
searchable=True, languageIndependent=True, #write_permission = ChangeEvents, validators = ('isEmail',), widget = atapi.StringWidget( description = '', label = _(u'label_contact_email', default=u'Contact E-mail') ) ), )) # Finalise the schema according to ATContentTypes standards. This basically # moves the Related items and Allow discussion fields to the bottom of the # form. See ATContentTypes.content.schemata for details. finalizeATCTSchema(PersonSchema) #class Person(base.ATCTContent): class Person(atapi.OrderedBaseFolder, ATDocument, HistoryAwareMixin): """An Archetype for an Person application""" implements(IPerson) security = ClassSecurityInfo() # Readjust schema PersonSchema.moveField('firstName', before='description') PersonSchema.moveField('middleName', after='firstName') PersonSchema.moveField('lastName', after='middleName') PersonSchema['text'].widget.label = u'Biography'
schemata='Image', index='FieldIndex:schema', widget=StringWidget( description="Enter the source of the thumbnail " "This is used to identify the thumbnail image associated with the file", description_msgid='help_sampleThumb', i18n_domain='plone', label="""Item Thumb""", label_msgid='label_sampleThumb', ), ), )) #finalize ATCTSchema finalizeATCTSchema(STSampleSchema) class STSample(ATDocument): """Base class for non folderish AT Content Types""" """ A simple ContentType derived from the standard ATDocument """ schema = STSampleSchema content_icon = 'sample.gif' meta_type = 'STSample' portal_type = 'STSample' archetype_name = 'STSample'
widget=CalendarWidget( description="Enter the date of the item/article " "If the article doesn't have a specific release date leave this field blank " "The date will then be set as the items effective publishing date", description_msgid='help_itemDate', i18n_domain='STArticle', label="""Item release date""", label_msgid='label_itemDate', ), ), ),) # Finalise the schema according to ATContentTypes standards. This basically # moves the Related items and Allow discussion fields to the bottom of the # form. See ATContentTypes.content.schemata for details. finalizeATCTSchema(STArticleSchema) # Declare our class to be first a folderish object, and second get all the # fields from ATDocument. ## class kdbDocument(ATDocument, OrderedBaseFolder): class STArticle(OrderedBaseFolder, ATDocument): """ A document which may contain directly uploaded images and attachments """ # Standard content type setup portal_type = meta_type = 'STArticle' archetype_name = 'STArticle' content_icon = 'starticle.gif' schema = STArticleSchema
LinesField( name='msg_attachments', schemata='message', required=False, searchable=False, languageIndependent=True, storage=AnnotationStorage(), widget=MultiSelectionWidget( label=_('E-mail Attachments'), description=_('Please select the attachments to be sent with email.'), format='checkbox'), vocabulary='attachments', enforceVocabulary=True))) finalizeATCTSchema(PFGExtendedMailAdapterSchema, folderish=True, moveDiscussion=False) class PFGExtendedMailAdapter(ATFolder, FormMailerAdapter): """Extended Mail Adapter""" schema = PFGExtendedMailAdapterSchema _at_rename_after_creation = True implements(IPFGExtendedMailAdapterContentType) security = ClassSecurityInfo() security.declarePrivate('get_mail_text') def get_mail_text(self, fields, request, **kwargs): """Get header and body of e-mail as text (string)
label_msgid="label_productDetaillink", description="Link to the shop location (external server)", description_msgid="help_productDetaillink", i18n_domain="plone", ), validators=('isURL',) ), )) #Finalize schema definition finalizeATCTSchema(STProductSchema) class STProduct(ATDocument): schema = STProductSchema ##code-section class-header #fill in your manual code here #disable atdocuments rich text field schema['text'].primary = False #reorder fields schema.moveField('text', after='productLongtitleOne')
widget=AttachmentsManagerWidget( description=_(u'RichDocument_help_displayAttachments', default=u"If selected, a list of uploaded attachments will be " "presented at the bottom of the document to allow " "them to be easily downloaded"), label=_(u'RichDocument_label_displayAttachments', default="Display attachments download box") ), ), ),) # Finalise the schema according to ATContentTypes standards. This basically # moves the Related items and Allow discussion fields to the bottom of the # form. See ATContentTypes.content.schemata for details. finalizeATCTSchema(RichDocumentSchema) # Declare our class to be first a folderish object, and second get all the # fields from ATDocument. ## class RichDocument(ATDocument, OrderedBaseFolder): class RichDocument(OrderedBaseFolder, ATDocument): """A document which may contain directly uploaded images and attachments.""" implements(INonStructuralFolder, IRichDocument) # Standard content type setup portal_type = meta_type = 'RichDocument' schema = RichDocumentSchema # Make sure we get title-to-id generation when an object is created