Ejemplo n.º 1
0
BookSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    atapi.ReferenceField('authors',
            relationship = 'book_author',
            multiValued = True,
            isMetadata = True,
            index = 'KeywordIndex',
            allowed_types= 'Person',
            widget = ReferenceBrowserWidget(
                allow_search = True,
                allow_browse = True,
                allow_sorting = True,
                show_indexes = False,
                force_close_on_insert = False,
                label = _(u'label_book_authors', default=u'Book authors'),
                description = '',
                visible = {'edit' : 'visible', 'view' : 'invisible' }
                )
            ),

    atapi.StringField('pages',
                searchable=1,
                required=0,
                is_duplicates_criterion=True,
                widget=atapi.StringWidget(label=_(u'label_pages', default=u"Pages"),
                    description=_(u'help_pages', default=u"A page number or range of numbers such as '42-111'"),),
                ),

    atapi.StringField('publisher',
                searchable=1,
Ejemplo n.º 2
0
from szcz.policy import policyMessageFactory as _
from szcz.policy.interfaces import IPerson
from szcz.policy.config import PROJECTNAME

PersonSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    atapi.TextField('biography',
              required=False,
              searchable=True,
              storage = atapi.AnnotationStorage(migrate=True),
              validators = ('isTidyHtmlWithCleanup',),
              default_output_type = 'text/html',
              widget = atapi.RichWidget(
                        description = '',
                        label = _(u'label_biography', default=u'Biography'),
                        rows = 25,
                        allow_file_upload = zconf.ATDocument.allow_document_upload),
    ),
    atapi.StringField('biography_lead',
                required=True,
                widget=atapi.StringWidget(label=_(u'label_biography_lead', default=u"Biography lead"),
                    description=_(u'help_biography_lead', default=u"Short text lead, best describing the person."),),
                ),

    atapi.StringField('years',
                required=True,
                widget=atapi.StringWidget(label=_(u'label_years', default=u"Years"),
                    description=_(u'help_years', default=u"Year of birth or range of life (birth-death)"),),
                ),
Ejemplo n.º 3
0
from szcz.policy import policyMessageFactory as _
from szcz.policy.interfaces import ICanon
from szcz.policy.config import PROJECTNAME

CanonSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    atapi.TextField('text',
              required=False,
              searchable=True,
              storage = atapi.AnnotationStorage(migrate=True),
              validators = ('isTidyHtmlWithCleanup',),
              default_output_type = 'text/html',
              widget = atapi.RichWidget(
                        description = '',
                        label = _(u'label_text', default=u'Text'),
                        rows = 25,
                        allow_file_upload = zconf.ATDocument.allow_document_upload),
    ),
    atapi.ReferenceField('authors',
            relationship = 'canon_author',
            multiValued = True,
            isMetadata = True,
            index = 'KeywordIndex',
            allowed_types= 'Person',
            widget = ReferenceBrowserWidget(
                allow_search = True,
                allow_browse = True,
                allow_sorting = True,
                show_indexes = False,
                force_close_on_insert = False,
Ejemplo n.º 4
0
from szcz.policy import policyMessageFactory as _
from szcz.policy.interfaces import IReview
from szcz.policy.config import PROJECTNAME

ReviewSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    atapi.TextField('text',
              required=False,
              searchable=True,
              primary=True,
              storage = atapi.AnnotationStorage(migrate=True),
              validators = ('isTidyHtmlWithCleanup',),
              default_output_type = 'text/x-html-safe',
              widget = atapi.RichWidget(
                        description = '',
                        label = _(u'label_body_text', default=u'Body Text'),
                        rows = 25,
                        allow_file_upload = zconf.ATDocument.allow_document_upload),
    ),
    atapi.ReferenceField('author',
            relationship = 'review_author',
            multiValued = False,
            isMetadata = True,
            index = 'KeywordIndex',
            allowed_types= 'Person',
            widget = ReferenceBrowserWidget(
                allow_search = True,
                allow_browse = True,
                allow_sorting = True,
                show_indexes = False,
                force_close_on_insert = True,