示例#1
0
TextoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
    atapi.LinesField(
        name='midia',
        widget=atapi.SelectionWidget(
            label="Mídia/Tipo de Matéria",
            description=
            "Selecione a Mídia/Tipo de Matéria a que este texto é destinado.",
        ),
        vocabulary='getListaMidias',
        required=True,
    ),
    atapi.TextField(
        name='texto',
        widget=atapi.TextAreaWidget(
            label="Texto",
            rows="15",
        ),
        allowable_content_types="('text/html','text/plain')",
        default_output_type="text/html",
        searchable=1,
    ),
))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.

TextoSchema['title'].storage = atapi.AnnotationStorage()
TextoSchema['title'].required = "False"
TextoSchema['title'].widget.visible = {
    "edit": "invisible",
    "view": "invisible"
}
示例#2
0
     ),
 ),
 atapi.StringField(
     'assignedTo',
     storage=atapi.AnnotationStorage(),
     widget=atapi.StringWidget(
         label=_(u"Assigned To"),
         description=
         _(u"The individuals or groups to whom this task has been assigned."
           ),
     ),
 ),
 atapi.TextField(
     'comments',
     storage=atapi.AnnotationStorage(),
     widget=atapi.TextAreaWidget(
         label=_(u"Comments"),
         description=_(u"to this task here."),
     ),
 ),
 atapi.ReferenceField(
     'milestone',
     widget=atapi.ReferenceWidget(
         label=_(u"Milestone"),
         description=_(u"The milestone set for this task."),
         format="select",
     ),
     allowed_types=('Milestone'),
     relationship='task_milestone',
 ),
 atapi.StringField('priority',
                   storage=atapi.AnnotationStorage(),
示例#3
0
         description=
         u"this is a medium image.  Optimum resolution is 750x422",
     ),
 ),
 atapi.StringField(
     name="imageCaption",
     widget=atapi.StringWidget(
         label=u"Image Caption",
         description=u"Image Caption Here",
     ),
 ),
 atapi.TextField(
     name="faculty",
     widget=atapi.RichWidget(
         label=u"Faculty Names",
         description=u"",
     ),
     searchable=True,
     validators=('isTidyHtmlWithCleanup', ),
     default_output_type='text/x-html-safe',
 ),
 atapi.StringField(
     name="units",
     widget=atapi.StringWidget(
         label=u"units",
         description=u"",
     ),
 ),
 atapi.StringField(
     name="prerequs",
     widget=atapi.StringWidget(
         label=u"Prerequisites",
                i18n_domain='FacultyStaffDirectory',
                default_content_type='image/gif',
            ),
            storage=atapi.AttributeStorage(),
            original_size=(200, 200),
            sizes={'normal': (200, 250)},
            default_output_type='image/jpeg',
            allowable_content_types=('image/gif', 'image/jpeg', 'image/png'),
        ),
        atapi.TextField(
            name='overviewText',
            schemata='Overview',
            allowable_content_types=config.ALLOWABLE_CONTENT_TYPES,
            widget=TinyMCEWidget(
                label=_(
                    u"FacultyStaffDirectory_label_overview_text",
                    default=u"Overview text (used for specialty overview view)"
                ),
                i18n_domain='FacultyStaffDirectory',
            ),
            default_output_type="text/x-html-safe",
            searchable=True,
            validators=('isTidyHtmlWithCleanup', ))), )

Specialty_schema = getattr(PersonGrouping, 'schema', atapi.Schema(
    ())).copy() + schema.copy()


class Specialty(PersonGrouping):
    """
    """
    security = ClassSecurityInfo()
示例#5
0
from uwosh.itdocs import itdocsMessageFactory as _
from uwosh.itdocs.interfaces import IBusinessRequirementsDocument
from uwosh.itdocs.config import PROJECTNAME

from Products.ATContentTypes.configuration import zconf

BusinessRequirementsDocumentSchema = folder.ATFolderSchema.copy(
) + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.TextField(
        'businessworkflow',
        storage=atapi.AnnotationStorage(),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(
            label=_(u'Business Workflow'),
            rows=25,
            description=_(u''),
        ),
        default='Example created in MS Visio',
    ),
    atapi.TextField(
        'businessrequirements',
        storage=atapi.AnnotationStorage(),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(
            label=_(u'Business Requirements'),
            rows=25,
            description=_(u''),
        ),
        default='',
    atapi.StringField(
        name='responsavel',
        required=False,
        widget=atapi.StringWidget(
            label=_(u"Responsavel"),
            description=_(u"")
        ),
    ),

    atapi.TextField(
        name='mensagem',
        required=False,
        searchable=True,
        storage=atapi.AnnotationStorage(migrate=True),
        widget=atapi.TextAreaWidget(
            label=_(u"Mensagem"),
            description=_(u""),
            rows=5,
        ),
    ),

))

schemata.finalizeATCTSchema(MensagemSchema)


class Mensagem(ATCTContent):
    """ Classe do conteudo Mensagem
    """
from Products.Archetypes import atapi

from Products.PloneServicesCenter import PSCMessageFactory as _
from Products.PloneServicesCenter.interfaces import ICaseStudy
from Products.PloneServicesCenter.content import Services

schema = Services.servicesSchema + atapi.Schema((
    atapi.TextField(
        'body',
        allowable_content_types=('text/html', ),
        default_content_type='text/html',
        default_output_type='text/html',
        widget=atapi.RichWidget(
            label=_(u"label_psc_detailed_info",
                    default=u"Detailed information"),
            description=_(
                u"help_casestudy_body",
                default=u"Enter the details description about this case study."
            ),
            i18n_domain='ploneservicescenter',
        ),
        required=0,
        searchable=1,
    ),
    atapi.ImageField(
        'logo',
        max_size=(150, 75),
        widget=atapi.ImageWidget(
            label=_(u"label_psc_logo", default=u"Logo"),
            description=_(
                u"help_casestudy_logo",
示例#8
0
    from archetypes.querywidget.field import QueryField
else:
    from plone.app.collection.field import QueryField

PROJECTNAME = 'plone.restapi.tests'

ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.StringField('testStringField'),
    atapi.BooleanField('testBooleanField'),
    atapi.IntegerField('testIntegerField'),
    atapi.FloatField('testFloatField'),
    atapi.FixedPointField('testFixedPointField'),
    atapi.DateTimeField('testDateTimeField'),
    atapi.LinesField('testLinesField'),
    atapi.FileField('testFileField'),
    atapi.TextField('testTextField'),
    atapi.ImageField('testImageField'),
    atapi.ReferenceField('testReferenceField', relationship='testrelation'),
    atapi.ReferenceField(
        'testMVReferenceField', relationship='testrelation', multiValued=True),
    BlobField('testBlobField'),
    FileField('testBlobFileField'),
    ImageField('testBlobImageField'),
    QueryField('testQueryField'),
    atapi.StringField('testRequiredField', required=True),
    atapi.StringField('testReadonlyField', mode='r'),
    atapi.StringField('testWriteonlyField', mode='w'),
    atapi.StringField('testReadPermissionField',
                      read_permission=permissions.ManagePortal),
    atapi.StringField('testWritePermissionField',
                      write_permission=permissions.ManagePortal),
示例#9
0
        'title',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label="Title",
            description="",
        ),
        default="",
        required=True,
    ),

    atapi.TextField(
        'function',
        storage=atapi.AnnotationStorage(),
        widget=atapi.TextAreaWidget(
            label='Function',
            description='Function of instruction',
            rows = 5,
            ),
        default='',
        required=True,
    ),

      atapi.StringField(
        'operation',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label="Operation",
            description="How to run the instruction",
            size=50,
        ),
        default=_(u"Home >  >  >"),
            default_content_type='image/gif',
        ),
        storage=atapi.AttributeStorage(),
        original_size=(400, 500),
        sizes={'thumb': (100, 125), 'normal': (200, 250)},
        default_output_type='image/jpeg',
        allowable_content_types=('image/gif', 'image/jpeg', 'image/png'),
    ),

    atapi.TextField(
        name='biography',
        allowable_content_types=config.ALLOWABLE_CONTENT_TYPES,
        widget=TinyMCEWidget(
            label=_(u"FacultyStaffDirectory_label_biography", default=u"Biography"),
            i18n_domain='FacultyStaffDirectory',
        ),
        schemata="Professional Information",
        searchable=True,
        validators=('isTidyHtmlWithCleanup',),
        default_output_type='text/x-html-safe',
        user_property='description'
    ),

    atapi.LinesField(
        name='education',
        widget=atapi.LinesField._properties['widget'](
            label=_(u"FacultyStaffDirectory_label_education", default=u"Education"),
            i18n_domain='FacultyStaffDirectory',
        ),
        schemata="Professional Information",
        searchable=True
示例#11
0
        outerJoin='<br />',
        widget=ateapi.RecordsWidget(
            description="Other key-value pairs to characterise "
            "this item: to be specically used to signal additional information "
            "not included in the previous fields.",
            condition="python:here.stateNotIn(['considered'])",
        ),
    ),
    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=u'Any other additional information not '
            'covered so far.',
            label=u'Text',
            rows=15,
        ),
    ),
))

ResourceFields = atapi.Schema((
    ateapi.RecordsField(
        'compute_resources',
        required=0,
        minimalSize=2,
        subfields=('nCores', 'ram', 'diskspace', 'system', 'virtualization'),
    # -*- Your Archetypes field definitions here ... -*-
    atapi.TextField(
        name='helpTextAnon',
        allowable_content_types=('text/plain', 'text/structured', 'text/html',
                                 'application/msword'),
        widget=atapi.RichWidget(
            label="Anonymous Help text",
            description=
            "Enter any introductory help text you'd like to display for users that have not yet logged in.",
            label_msgid='gcommons_label_helpTextAnon',
            description_msgid='gcommons_help_helpTextAnon',
            i18n_domain='gcommons.Core',
        ),
        default="""
      <h2>Welcome to the registration and paper submission system</h2>
        <p>
        To register or submit your piece, follow these steps:</p>
        <dl><dt>1. Create account</dt>
        Click on "Create account" and fill out the form. An account will be created and an e-mail is sent to you for confirmation.</dl>
        <dl><dt>2. Login </dt>
        You may log in right after receiving an email by using the "Login" link.</dl>
        <dl><dt>3. Submit your abstract </dt></dl>
        <dl><dt>4. Finish editing and send to editors</dt>
        Click on "Submit to Editors"</dl>
        You are done! Thanks for submitting the product of your work.
         
        """,
        default_output_type='text/html',
        searchable=True),
    atapi.TextField(
        name='helpText',
示例#13
0
"""

from zope.interface import implements, directlyProvides

from Products.Archetypes import atapi
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

from uwosh.colsagenda import colsagendaMessageFactory as _
from uwosh.colsagenda.interfaces import IAgenda
from uwosh.colsagenda.config import PROJECTNAME

AgendaSchema = folder.ATFolderSchema.copy() + atapi.Schema((atapi.TextField(
    'text',
    searchable=True,
    primary=True,
    default_output_type='text/x-html-safe',
    storage=atapi.AnnotationStorage(),
    widget=atapi.RichWidget(label=_(u"Text"),
                            description=_(u"Main agenda text"))), ))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.

AgendaSchema['title'].storage = atapi.AnnotationStorage()
AgendaSchema['description'].storage = atapi.AnnotationStorage()

schemata.finalizeATCTSchema(AgendaSchema, folderish=True, moveDiscussion=False)


class Agenda(folder.ATFolder):
    """A rich text field that can contain files."""
示例#14
0
from zope.interface import implements
from Products.Archetypes import atapi

from hai.pnp import pnpMessageFactory as _
from hai.pnp.interfaces import IHowto
from hai.pnp.config import PROJECTNAME
from hai.pnp.config import FUNCTIONAL_AREA_CODES
from hai.pnp.content.basecontent import BasePandPContent, BasePandPSchema, makeNumericString

HowtoSchema = BasePandPSchema.copy() + atapi.Schema((
    atapi.TextField(
        name='text',
        storage=atapi.AnnotationStorage(),
        required=False,
        searchable=1,
        validators=('isTidyHtmlWithCleanup', ),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(
            label=_(u"Howto Text"),
            description=_(u"Detailed text of this Policy"),
        ),
    ),
    atapi.StringField(
        'functionalAreaCode',
        schemata='categorization',
        storage=atapi.AnnotationStorage(),
        vocabulary=FUNCTIONAL_AREA_CODES,
        enforce_vocabulary=True,
        widget=atapi.SelectionWidget(
            label=_(u"Functional Area Code"),
            description=_(
                u"The department or function that governs this content"),
示例#15
0
from Products.ATBackRef.backref import BackReferenceWidget, BackReferenceBrowserWidget, BackReferenceField
from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget \
     import ReferenceBrowserWidget

MeetingSchema = folder.ATFolderSchema.copy() + event.ATEventSchema.copy(
) + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.TextField(
        'agenda',
        required=False,
        searchable=True,
        storage=atapi.AnnotationStorage(),
        validators=('isTidyHtmlWithCleanup', ),
        default_output_type='text/x-html-safe',
        allowable_content_types=('text/plain', 'text/structured', 'text/html',
                                 'application/msword'),
        widget=atapi.RichWidget(
            label=_(u"Agenda"),
            description=_(u"the agenda for the meeting"),
            rows=40,
            allow_file_upload=zconf.ATDocument.allow_document_upload,
        ),
    ),
    atapi.TextField(
        'minutes',
        required=False,
        searchable=True,
        storage=atapi.AnnotationStorage(),
        validators=('isTidyHtmlWithCleanup', ),
        default_output_type='text/x-html-safe',
        allowable_content_types=('text/plain', 'text/structured', 'text/html',
示例#16
0
     storage=AnnotationStorage(),
     sizes={
         'large': (768, 768),
         'mini': (200, 200),
         'thumb': (128, 128),
     },
 ),
 atapi.TextField(
     'text',
     required=False,
     searchable=True,
     primary=True,
     storage=atapi.AnnotationStorage(migrate=True),
     allowable_content_types=('text/html', ),
     default_content_type='text/html',
     validators=('isTidyHtmlWithCleanup', ),
     default_input_type='text/html',
     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.FixedPointField(
     'price',
     default="0.00",
     required=0,
     languageIndependent=True,
     widget=atapi.DecimalWidget(
         label=_(u"label_price", default=u"Price"),
示例#17
0
    ('1', _(u'Option 1 : printemps')),
    ('2', unicode('Option 2 : \xc3\xa9t\xc3\xa9',
                  'utf-8')),  # e-acute t e-acute
    ('3', u'Option 3 : automne'),
    ('4', _(u'option3', default=u'Option 3 : hiver')),
))

schema = atapi.BaseSchema + atapi.Schema((
    atapi.LinesField(
        'MULTIPLEFIELD',
        searchable=1,
        vocabulary=MULTIPLEFIELD_LIST,
        widget=atapi.MultiSelectionWidget(i18n_domain='plone', ),
    ),
    atapi.TextField(
        'TEXTFIELD',
        primary=True,
    ),
))


class Dummy(atapi.BaseContent):

    portal_discussion = DummyDiscussionTool()

    def getCharset(self):
        return 'utf-8'


class BaseObjectTest(ATSiteTestCase):
    def afterSetUp(self):
        ATSiteTestCase.afterSetUp(self)
示例#18
0
                                        },
                        innerJoin = ': ',
                        outerJoin = '<br />',
                        widget=ateapi.RecordsWidget(
                            description="Other key-value pairs to characterise "\
                            "this item. Use this specifically to signal information "\
                            "that you think should be included in the fields above."
                            ),
                        ),
    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=u'Any other additional information not '\
                        'covered so far.',
                        label=u'Text',
                        rows=15,
                        ),
    ),
))


class CommonUtilities(object):
    """Mixin class to provide shared functionality across content types"""
    def identifierTypes(self, instance):
        """Controlled vocabulary for the supported PID systems"""

        return ateapi.getDisplayList(instance,
示例#19
0
    from archetypes.querywidget.field import QueryField
else:
    from plone.app.collection.field import QueryField

PROJECTNAME = "plone.restapi.tests"

ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.StringField("testStringField"),
    atapi.BooleanField("testBooleanField"),
    atapi.IntegerField("testIntegerField"),
    atapi.FloatField("testFloatField"),
    atapi.FixedPointField("testFixedPointField"),
    atapi.DateTimeField("testDateTimeField"),
    atapi.LinesField("testLinesField"),
    atapi.FileField("testFileField"),
    atapi.TextField("testTextField"),
    atapi.ImageField("testImageField"),
    atapi.ReferenceField("testReferenceField", relationship="testrelation"),
    atapi.ReferenceField(
        "testMVReferenceField", relationship="testrelation", multiValued=True),
    BlobField("testBlobField"),
    FileField("testBlobFileField"),
    ImageField("testBlobImageField"),
    QueryField("testQueryField"),
    atapi.StringField("testRequiredField", required=True),
    atapi.StringField("testReadonlyField", mode="r"),
    atapi.StringField("testWriteonlyField", mode="w"),
    atapi.StringField("testReadPermissionField",
                      read_permission=permissions.ManagePortal),
    atapi.StringField("testWritePermissionField",
                      write_permission=permissions.ManagePortal),
示例#20
0
from zope.interface import implements

try:
    from archetypes.referencebrowserwidget import ReferenceBrowserWidget
except ImportError:
    from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget


TablePageSchema = ATDocumentSchema.copy() + atapi.Schema((

    atapi.TextField('textBefore',
              required=False,
              searchable=True,
              storage=atapi.AnnotationStorage(migrate=True),
              validators=('isTidyHtmlWithCleanup',),
              default_output_type='text/x-html-safe',
              widget=atapi.RichWidget(
                        label=_(u'label_text_before', default=u'Text before the table'),
                        visible={'view': 'invisible', 'edit': 'visible'},
                        rows=25,
                        allow_file_upload=zconf.ATDocument.allow_document_upload),
    ),

    DataGridField('pageColumns',
                  required=True,
                  storage=atapi.AnnotationStorage(),
                  columns=("id", "label", "description", "type", "vocabulary", "options"),
                  widget=DataGridWidget(
                      label=_(u"Columns"),
                      description=_('help_pageColumns',
                                    default=u"Definition of rows inside the table"),
                      visible={'view': 'invisible', 'edit': 'visible'},
                 default=u"Text for the 'unsubscribe' link"),
         description=_(
             u"EasyNewsletter_help_unsubscribe_string",
             default=u'This will replace the placeholder [[UNSUBSCRIBE]].'),
         i18n_domain='EasyNewsletter',
     ),
 ),
 atapi.TextField(
     'default_header',
     default=
     "[[SUBSCRIBER_SALUTATION]]<br />==================================",
     allowable_content_types=('text/plain', 'text/structured', 'text/html',
                              'application/msword'),
     default_output_type='text/html',
     widget=atapi.RichWidget(
         rows=10,
         label=_(u"EasyNewsletter_label_default_header", default=u"Header"),
         description=_(
             u'description_text_header',
             default=u'The default header text. This is used as a default \
                 for new issues. You can use the placeholders [[SUBSCRIBER_SALUTATION]] and [[UNSUBSCRIBE]] here.'
         ),
         i18n_domain='EasyNewsletter',
     ),
 ),
 atapi.TextField(
     'default_footer',
     allowable_content_types=('text/plain', 'text/structured', 'text/html',
                              'application/msword'),
     default="==================================<br />[[UNSUBSCRIBE]]",
     default_output_type='text/html',
     widget=atapi.RichWidget(
示例#22
0
from Products.ATContentTypes.lib.historyaware import HistoryAwareMixin
from Products.CMFCore.permissions import View

# bekam
from bekam.veiculos.content.interfaces import IDestaque
from bekam.veiculos.config import PROJECTNAME
from bekam.veiculos import _
# Schema definition
schema = ATContentTypeSchema.copy() + atapi.Schema((
    atapi.TextField(
        name='text',
        required=False,
        searchable=False,
        storage=atapi.AnnotationStorage(migrate=True),
        validators=('isTidyHtmlWithCleanup', ),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(
            label=_(u'label_text', u'Texto'),
            rows=20,
            allow_file_upload=False,
        ),
    ),
    ImageField(
        name='image',
        sizes={
            'large': (768, 768),
            'preview': (400, 400),
            'mini': (200, 200),
            'thumb': (128, 128),
            'tile': (64, 64),
            'icon': (32, 32),
from rg.prenotazioni import prenotazioniMessageFactory as _
from rg.prenotazioni.config import PROJECTNAME
from rg.prenotazioni.content.basefolder import BaseFolder, BaseFolderSchema
from rg.prenotazioni.interfaces import IPrenotazioniFolder
from zope.interface import implements

PrenotazioniFolderSchema = BaseFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.TextField(
        'descriptionAgenda',
        required=False,
        searchable=True,
        storage=atapi.AnnotationStorage(migrate=True),
        validators=('isTidyHtmlWithCleanup', ),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(
            description=("Inserire il testo di presentazione "
                         "dell'agenda corrente"),
            label=_(u'Descrizione Agenda', default=u''),
            rows=10,
            allow_file_upload=zconf.ATDocument.allow_document_upload),
    ),
    atapi.DateTimeField(
        'daData',
        storage=atapi.AnnotationStorage(),
        widget=atapi.CalendarWidget(
            label=_(u'Data inizio validità'),
            description=_(u""),
            show_hm=False,
        ),
        required=True,
示例#24
0
        validators=('zptvalidator', ),
        widget=atapi.TextAreaWidget(
            label=_(u'label_body_zpt', default=u'Newsletter Template'),
            description=_(
                'help_body_zpt',
                default=u'This is a Zope Page Template file that is used for \
                     rendering the newsletter mail.'),
            i18n_domain="plone",
            rows=30,
        ),
    ),
    atapi.TextField(
        'description',
        accessor="Description",
        widget=atapi.TextAreaWidget(
            label=_(u"label_description", default=u'Description'),
            description=_(u"help_description",
                          default=u"Enter a value for description."),
            i18n_domain="plone",
        ),
    ),
), )


class ENLTemplate(atapi.BaseContent):
    """Template used for styling newsletter entries.
    """
    implements(IENLTemplate)
    security = ClassSecurityInfo()
    schema = schema
    _at_rename_after_creation = True
示例#25
0
     schemata="default",
     widget=atapi.StringWidget(
         size=50,
         label='Backward label',
         label_msgid='widget_backward_label_title',
         description='Label to be used for backward relations',
         description_msgid='widget_forward_label_description',
         i18n_domain="eea"
     )
 ),
 atapi.TextField('description',
     schemata='default',
     searchable=1,
     accessor="Description",
     widget=atapi.TextAreaWidget(
         label='Description',
         description="A short summary of the content",
         label_msgid="label_description",
         description_msgid="help_description",
         i18n_domain="plone"
     )
 ),
 atapi.BooleanField('required',
     schemata='default',
     default=False,
     widget=atapi.BooleanWidget(
         label='Required',
         label_msgid='widget_required_title',
         description=('Select this if you want to make this relation '
                      'mandatory (action: edit)'),
         description_msgid='widget_required_description',
         i18n_domain="eea"
示例#26
0
# -*- Message Factory Imported Here -*-
from cirb.renoprime import renoprimeMessageFactory as _

from cirb.renoprime import PROJECTNAME

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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.TextField(
        'text_above_map',
        required=False,
        searchable=True,
        primary=True,
        storage=atapi.AnnotationStorage(migrate=True),
        validators=('isTidyHtmlWithCleanup', ),
        #validators=('isTidyHtml',),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(
            description='',
            label=_(u'label_before_map', default=u'Text before map'),
            rows=25,
            allow_file_upload=zconf.ATDocument.allow_document_upload),
    ),
    atapi.TextField(
        'text_below_map',
        required=False,
        searchable=True,
        storage=atapi.AnnotationStorage(migrate=True),
        validators=('isTidyHtmlWithCleanup', ),
        #validators=('isTidyHtml',),
        default_output_type='text/x-html-safe',
        widget=atapi.StringWidget(
            label=u"Image Caption",
            description=u"Image Caption Here",
        ),
    ),
    atapi.StringField(
        name="insettitle",
        widget=atapi.StringWidget(label=u"Small Collumn Title",
                                  description=u"This text will be blue"),
    ),
    atapi.TextField(
        name="insetcolumn",
        widget=atapi.RichWidget(
            label=u"Small Column Text",
            description=u"for blue headings pick the blueheading style",
            width="40",
        ),
        searchable=True,
        validators=('isTidyHtmlWithCleanup', ),
        default_output_type='text/x-html-safe',
    ),
))

# Set storage on fields copied from ATContentTypeSchema, making sure
# they work well with the python bridge properties.

DssTwoCollumnPageSchema['title'].storage = atapi.AnnotationStorage()
DssTwoCollumnPageSchema['description'].storage = atapi.AnnotationStorage()

schemata.finalizeATCTSchema(DssTwoCollumnPageSchema, moveDiscussion=False)
示例#28
0
# -*- Message Factory Imported Here -*-

from collective.TemplateUploadCenter.interfaces import ITemplateUploadCenter
from collective.TemplateUploadCenter.config import PROJECTNAME

TemplateUploadCenterSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.TextField(
        name='description',
        accessor='Description',
        #storage=MetadataStorage(),
        widget=atapi.TextAreaWidget(
            label=u'Description',
            label_msgid='description',
            description=u'Description for the Template Upload Center.',
            i18n_domain='collective.TemplateUploadCenter',
            rows=6,
        ),
        searchable=True,
    ),
    atapi.StringField(
        'product_title',
        default='Templates',
        widget=atapi.StringWidget(
            label=u'Product Title',
            label_msgid='product_title',
            description=
            u"Title of products when using the project view. For example, 'Add-on Product', 'Extension', or 'Template'.",
            i18n_domain='collective.TemplateUploadCenter',
示例#29
0
from Products.Archetypes import atapi
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

from crgis.atcontents import atcontentsMessageFactory as _

from crgis.atcontents.interfaces import IPilgrimage
from crgis.atcontents.config import PROJECTNAME

PilgrimageSchema = folder.ATFolderSchema.copy() + atapi.Schema(
    (atapi.TextField(
        'body',
        storage=atapi.AnnotationStorage(),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(
            label=_(u"Body"),
            rows=20,
        ),
    ), ))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.

PilgrimageSchema['title'].storage = atapi.AnnotationStorage()
PilgrimageSchema['description'].storage = atapi.AnnotationStorage()
PilgrimageSchema['title'].widget.label = _(u'Pilgrimage Title')
PilgrimageSchema['effectiveDate'].widget.label = _(u'Pilgrimage StartDate')
PilgrimageSchema['effectiveDate'].widget.description = _(
    u'Pilgrimage StartDate Description')
PilgrimageSchema['expirationDate'].widget.visible = {
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata
from Products.ATContentTypes.configuration import zconf

from ejn.types import typesMessageFactory as _
from ejn.types.vocabs import site_themes
from ejn.types.vocabs import site_regions
from ejn.types.interfaces import IReporterResource
from ejn.types.config import PROJECTNAME

ReporterResourceSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
    atapi.TextField(
        'text',
        searchable=1,
        default_output_type='text/x-html-safe',
        widget=atapi.TinyMCEWidget(
            label=_(u'label_story_text', default=u"Story Text"),
            rows=8,
            allow_file_upload=zconf.ATDocument.allow_document_upload,
        ),
    ),
    atapi.ImageField('image',
                     sizes={
                         'large': (768, 768),
                         'preview': (400, 400),
                         'twoeightfive': (285, 285),
                         'mini': (200, 200),
                         'thumb': (128, 128),
                         'tiny': (84, 84),
                         'tile': (64, 64),
                     },
                     widget=atapi.ImageWidget(