from Products.Archetypes import atapi CollageColumnSchema = atapi.BaseContent.schema.copy() + atapi.Schema( (atapi.StringField( name='title', accessor='Title', required=False, searchable=True, widget=atapi.StringWidget( label=_(u'label_optional_column_title', default=u"Title"), description=_( u'help_optional_column_title', default=u"You may optionally supply a title for this column."), )), )) CollageColumnSchema = CollageColumnSchema + CommonCollageSchema.copy() # move description to main edit page CollageColumnSchema['description'].schemata = 'default' # never show row in navigation, also when its selected CollageColumnSchema['excludeFromNav'].default = True # support show in navigation feature and at marshalling finalizeATCTSchema(CollageColumnSchema, folderish=True, moveDiscussion=False) @implementer(ICollageColumn) class CollageColumn(BrowserDefaultMixin, LayoutContainer, atapi.OrderedBaseFolder):
accessor='getShowTitle', widget=atapi.BooleanWidget( label=_(u'label_show_title', default=u"Show title")), default=1), atapi.BooleanField('show_description', accessor='getShowDescription', widget=atapi.BooleanWidget( label=_(u'label_show_description', default='Show description')), default=1), )) CollageSchema = CollageSchema + CommonCollageSchema.copy() # move description to main edit page CollageSchema['description'].schemata = 'default' # support show in navigation feature and at marshalling # speciel case set folderish to False since we want related items to be used finalizeATCTSchema(CollageSchema, folderish=False, moveDiscussion=False) class Collage(LayoutContainer, ATCTMixin, atapi.OrderedBaseFolder): # FIXME: Do we always need Zope 2 style interfaces ? __implements__ = (getattr(atapi.OrderedBaseFolder,'__implements__',()), getattr(ATCTMixin, '__implements__',())) schema = CollageSchema
from Products.Archetypes import atapi CollageRowSchema = atapi.BaseContent.schema.copy() + atapi.Schema( (atapi.StringField( name='title', accessor='Title', required=False, searchable=True, widget=atapi.StringWidget( label=_(u'label_optional_row_title', default='Title'), description=_( u'help_optional_row_title', default=u"You may optionally supply a title for this row."), )), )) CollageRowSchema = CollageRowSchema + CommonCollageSchema.copy() # move description to main edit page CollageRowSchema['description'].schemata = 'default' # never show row in navigation, also when its selected CollageRowSchema['excludeFromNav'].default = True # support show in navigation feature and at marshalling finalizeATCTSchema(CollageRowSchema, folderish=True, moveDiscussion=False) @implementer(ICollageRow) class CollageRow(BrowserDefaultMixin, LayoutContainer, atapi.OrderedBaseFolder):