예제 #1
0
from zope.interface import implementer

try:
    from Products.LinguaPlone import public as atapi
except ImportError:
    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)

예제 #2
0
from zope.interface import implementer

try:
    from Products.LinguaPlone import public as atapi
except ImportError:
    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)

                           "Will be shown in the news listing, and in the news "
                           "item itself. Image will be scaled to a sensible"
                           " size and image width should be of minimum 1024px"),
                       description_msgid="help_news_image",
                       label="Image",
                       label_msgid="label_news_image",
                       i18n_domain="plone",
                       show_content_type=False)
                   ),

    public.StringField(
        name='imageLink',
        widget=public.StringWidget(
            label="Image Link",
            label_msgid="label_news_image_link",
            description="Enter a URL that the image should be linked to",
            description_msgid="help_image_link",
            i18n_domain='EEAContentTypes',
            size="40",
        ),
        validators=('isURL',),
    ),

    public.StringField(
        name='imageCaption',
        widget=public.StringWidget(
            label="Image Caption",
            description="Enter a caption for the image (max 5 words)",
            description_msgid="help_image_caption",
            label_msgid="label_image_caption",
            size="40",
            i18n_domain='EEAContentTypes',
예제 #4
0
         ('507', _(u'507: Notebook 57, short format')),
     ]),
     required=True,
     storage=atapi.AnnotationStorage(),
     searchable=False,
     widget=atapi.SelectionWidget(
         description='',
         label=_('Enter the format code of this payment'),
         size=3)),
 atapi.StringField(
     'mipago_sender',
     languageIndependent=True,
     required=True,
     storage=atapi.AnnotationStorage(),
     searchable=False,
     widget=atapi.StringWidget(
         description='', label=_('Enter the sender code'), size=6)),
 atapi.StringField('mipago_suffix',
                   languageIndependent=True,
                   required=True,
                   storage=atapi.AnnotationStorage(),
                   searchable=False,
                   widget=atapi.StringWidget(
                       description='',
                       label=_('Enter the suffix of this payment'),
                       size=3)),
 atapi.DateTimeField('mipago_payment_limit_date',
                     languageIndependent=True,
                     required=True,
                     storage=atapi.AnnotationStorage(),
                     searchable=False,
                     widget=atapi.CalendarWidget(
예제 #5
0
    # No multilingual support
    from Products.Archetypes import atapi

from Products.Poi import PoiMessageFactory as _
from Products.Poi import permissions
from Products.Poi.config import PROJECTNAME
from Products.Poi.interfaces import ITracker
from Products.Poi.utils import linkBugs
from Products.Poi.utils import linkSvn

schema = atapi.Schema((
    atapi.StringField(
        name='title',
        widget=atapi.StringWidget(
            label=_(u'Poi_label_tracker_title', default=u"Tracker name"),
            description=_(
                u'Poi_help_tracker_title',
                default=u"Enter a descriptive name for this tracker"),
        ),
        required=True,
        accessor="Title",
        searchable=True),
    atapi.TextField(
        name='description',
        widget=atapi.TextAreaWidget(
            label=_(u'Poi_label_tracker_description',
                    default=u"Tracker description"),
            description=_(u'Poi_help_tracker_description',
                          default=u"Describe the purpose of this tracker"),
        ),
        use_portal_factory="1",
        accessor="Description",
예제 #6
0
from Products.Collage.interfaces import ICollage
from Products.Collage.utilities import CollageMessageFactory as _
from zope.interface import implementer

try:
    from Products.LinguaPlone import public as atapi
except ImportError:
    from Products.Archetypes import atapi

CollageSchema = atapi.BaseContent.schema.copy() + atapi.Schema((
    atapi.StringField(
        name='title',
        searchable=True,
        widget=atapi.StringWidget(
            label='Title',
            label_msgid='label_title',
            i18n_domain='plone',
        )
    ),

    atapi.TextField(
        name='description',
        searchable=True,
        widget=atapi.TextAreaWidget(
            label='Description',
            label_msgid='label_description',
            i18n_domain='plone',
        )
    ),
    atapi.BooleanField(
        'show_title',
        languageIndependent=True,
        max_size=zconf.ATNewsItem.max_image_dimension,
        sizes={},
        validators=(('isNonEmptyFile', V_REQUIRED),
                    ('checkNewsImageMaxSize', V_REQUIRED)),
        widget=atapi.ImageWidget(description=_(
            'This image will be shown when this banner is active.'),
                                 label=_('Image'),
                                 show_content_type=False)),
    atapi.StringField('imageUrl',
                      required=False,
                      searchable=False,
                      default="http://",
                      widget=atapi.StringWidget(description=_(
                          'Instead of uploading an image, you may enter'
                          ' the URL of an image hosted on another server.'),
                                                label=_('Image URL'),
                                                maxlength='511')),
    atapi.TextField(
        'text',
        required=False,
        validators=('isTidyHtmlWithCleanup', ),
        default_output_type='text/x-html-safe',
        widget=atapi.RichWidget(label=_('Body'), ),
    ),
))

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

CarouselBannerSchema['title'].storage = atapi.AnnotationStorage()
예제 #8
0
         allow_search=True,
         allow_browse=True,
         force_close_on_insert=True,
         startup_directory='/',
     ),
 ),
 atapi.StringField(
     'link_external',
     required=False,
     searchable=False,
     languageIndependent=True,
     validators=("isURL"),
     widget=atapi.StringWidget(
         label=_(u"label_link_external", default=u"External Link"),
         description=_(
             u"help_link_external",
             default=u"Url to external content. For internal content, "
             u"use the field above. Use form http://WEBSITE.TLD/"),
     ),
 ),
 atapi.StringField(
     'importance',
     required=True,
     searchable=True,
     languageIndependent=True,
     vocabulary_factory="collective.teaser.ImportanceVocabulary",
     enforceVocabulary=True,
     default=DEFAULT_IMPORTANCE,
     widget=atapi.SelectionWidget(
         label=_(u"label_importance", default=u"Importance"),
         description=_(u"help_importance",