コード例 #1
0
        required=False,
        widget=CalendarInAndOutWidget(
            label=_("label_including", default=u"Including"),
            description=
            _("description_field_including",
              default=
              u"In this field you can set the list of days on which the event is additionally held, even if excluded by other filters.\n"
              u"Enter dates in the form yyyy-mm-dd.\n"
              u"This field became required if you don't provide any From/To dates of the event."
              ),
            auto_add=True,
        ),
        languageIndependent=True),
))

EventSchema = ATEventSchema.copy() + RECURRING_EVENT_SCHEMA.copy()

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

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

schemata.finalizeATCTSchema(EventSchema, moveDiscussion=False)
EventSchema.moveField('cadence', after='endDate')
EventSchema.moveField('except', after='cadence')
# finalizeATCTSchema moves 'location' into 'categories', we move it back:
EventSchema.changeSchemataForField('location', 'default')
EventSchema.moveField('location', before='startDate')

EventSchema['subject'].widget.visible = {'edit': 'visible'}
コード例 #2
0
from Products.Archetypes import atapi
from Products.ATContentTypes.content import schemata
from Products.ATContentTypes.content.event import ATEvent
from Products.ATContentTypes.content.event import ATEventSchema
from Products.LinguaPlone.I18NBaseObject import AlreadyTranslated
from Products.LinguaPlone.I18NOrderedBaseFolder import I18NOrderedBaseFolder
from Products.LinguaPlone import permissions

from slc.seminarportal.interfaces import ISeminar
from slc.seminarportal.config import PROJECTNAME, ALLOWABLE_TEXT_TYPES
from slc.seminarportal import seminarportalMessageFactory as _


SeminarSchema = atapi.BaseFolderSchema.copy() + \
    ATEventSchema.copy() + atapi.Schema((

    atapi.ImageField(
        name='logo',
        widget=atapi.ImageWidget(
            label=_(u"label_seminar_logo",
                    default=u"Graphic or Logo for the event"),
        ),
        languageIndependent=True,
        original_size=(200, 200),
        sizes={'thumb': (100, 125), 'normal': (200, 200)},
        default_output_type='image/jpeg',
        allowable_content_types=('image/gif', 'image/jpeg', 'image/png'),
    ),
    atapi.TextField(
        name='summary',
コード例 #3
0
ファイル: eventomj.py プロジェクト: luxcas/mj.agenda
from Products.ATContentTypes.content import schemata

from plone.app.blob.field import BlobField, ImageField

# -*- Message Factory Imported Here -*-
from mj.agenda import agendaMessageFactory as _

from mj.agenda.interfaces.interfaces import IMJEvento
from mj.agenda.config import PROJECTNAME

ATFileSchema['file'].primary = False
ATFileSchema['file'].schemata = 'Arquivo'
ATFileSchema['file'].required = False

MJEventoSchema = ATEventSchema.copy() + ATFileSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='event_categoria',
        required=False,
        searchable=True,
        schemata='categorization',
        widget=atapi.SelectionWidget(
            label=_(u"Categoria do evento"),
            description=_(u"Selecione a categoria do evento"),
            format='select',
        ),
        vocabulary='getCategoria',
    ), ))
コード例 #4
0
ファイル: eventomj.py プロジェクト: luxcas/mj.agenda
from Products.ATContentTypes.content import schemata

from plone.app.blob.field import BlobField, ImageField

# -*- Message Factory Imported Here -*-
from mj.agenda import agendaMessageFactory as _

from mj.agenda.interfaces.interfaces import IMJEvento
from mj.agenda.config import PROJECTNAME

ATFileSchema['file'].primary = False
ATFileSchema['file'].schemata = 'Arquivo'
ATFileSchema['file'].required = False

MJEventoSchema = ATEventSchema.copy() + ATFileSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='event_categoria',
        required=False,
        searchable=True,
        schemata='categorization',
        widget=atapi.SelectionWidget(
            label=_(u"Categoria do evento"),
            description=_(u"Selecione a categoria do evento"),
            format='select',),
        vocabulary='getCategoria',
    ),

))
コード例 #5
0
from Products.ATContentTypes.content.event import ATEventSchema
from Products.ATContentTypes.interfaces import IATEvent
from Products.ATContentTypes.interfaces import IATFolder
from Products.ATContentTypes.content.folder import ATFolder
from Products.ATContentTypes.content import schemata
from Products.ATContentTypes.lib.calendarsupport import CalendarSupportMixin
from Products.CMFCore.utils import getToolByName

# -*- Message Factory Imported Here -*-
from mj.agenda import agendaMessageFactory as _

from mj.agenda.interfaces.interfaces import IMJEvento
from mj.agenda.config import PROJECTNAME


MJEventoSchema = ATFolder.schema.copy() + ATEventSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='event_categoria',
        required=False,
        searchable=True,
        schemata='categorization',
        widget=atapi.SelectionWidget(
            label=_(u"Categoria do evento"),
            description=_(u"Selecione a categoria do evento"),
            format='select',),
        vocabulary='getCategoria',
    ),

))
コード例 #6
0
from Acquisition import aq_base

from Products.ATContentTypes.content.event import ATEvent
from Products.ATContentTypes.content.event import ATEventSchema
from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget
from Products.Archetypes import atapi
from Products.LinguaPlone.I18NBaseObject import AlreadyTranslated
from Products.LinguaPlone.I18NOrderedBaseFolder import I18NOrderedBaseFolder
from Products.Relations.field import RelationField
from Products.LinguaPlone import permissions

from slc.seminarportal import seminarportalMessageFactory as _
from slc.seminarportal.config import PROJECTNAME
from slc.seminarportal.interfaces import ISpeech

SpeechSchema = atapi.OrderedBaseFolderSchema.copy() + ATEventSchema.copy() + \
               atapi.Schema((
    RelationField(
        name='speakers',
        widget=ReferenceBrowserWidget(
            label=_(u"label_speech_speakers", default=u'Speaker(s)'),
            base_query={'portal_type': 'SPSpeaker',
                        'sort_on': 'getSortableName'},
            allow_browse=1,
            allow_search=1,
            show_results_without_query=1,
            image_portal_types=('SPSpeaker',),
            image_method='image_icon',
            macro='seminarportal_referencebrowser',
        ),
        languageIndependent=True,
コード例 #7
0
ファイル: speech.py プロジェクト: syslabcom/slc.seminarportal
from Acquisition import aq_base

from Products.ATContentTypes.content.event import ATEvent
from Products.ATContentTypes.content.event import ATEventSchema
from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget
from Products.Archetypes import atapi
from Products.LinguaPlone.I18NBaseObject import AlreadyTranslated
from Products.LinguaPlone.I18NOrderedBaseFolder import I18NOrderedBaseFolder
from Products.Relations.field import RelationField
from Products.LinguaPlone import permissions

from slc.seminarportal import seminarportalMessageFactory as _
from slc.seminarportal.config import PROJECTNAME
from slc.seminarportal.interfaces import ISpeech

SpeechSchema = atapi.OrderedBaseFolderSchema.copy() + ATEventSchema.copy() + \
               atapi.Schema((
    RelationField(
        name='speakers',
        widget=ReferenceBrowserWidget(
            label=_(u"label_speech_speakers", default=u'Speaker(s)'),
            base_query={'portal_type': 'SPSpeaker',
                        'sort_on': 'getSortableName'},
            allow_browse=1,
            allow_search=1,
            show_results_without_query=1,
            image_portal_types=('SPSpeaker',),
            image_method='image_icon',
            macro='seminarportal_referencebrowser',
        ),
        languageIndependent=True,
コード例 #8
0
#Dheeraj Sagar, Malad(W)
#Mumbai-400064, India
###############################################################################
from Products.Archetypes.atapi import *

from Products.ATContentTypes.content.event \
     import ATEvent as BaseClass
from Products.ATContentTypes.content.event \
     import ATEventSchema as DefaultSchema

from Products.ATContentTypes.content.base import registerATCT

from ubify.coretypes.config import PROJECTNAME


schema = DefaultSchema.copy()


class ATEvent(BaseClass):

    __doc__ = BaseClass.__doc__ + "(customizable version)"

    portal_type = BaseClass.portal_type
    archetype_name = BaseClass.archetype_name

    schema = schema


registerATCT(ATEvent, PROJECTNAME)

コード例 #9
0
from redturtle.imagedevent.interfaces import IImagedEvent
from redturtle.imagedevent.config import PROJECTNAME

from Products.ATContentTypes.configuration import zconf
from Products.validation.config import validation
from Products.validation.validators.SupplValidators import MaxSizeValidator
from Products.validation import V_REQUIRED

from Products.ATContentTypes.permission import ChangeEvents
from types import StringType
from Products.CMFCore import permissions

validation.register(MaxSizeValidator("checkNewsImageMaxSize", maxsize=zconf.ATNewsItem.max_file_size))

ImagedEventSchema = ATEventSchema.copy() + atapi.Schema(
    (
        # *** from the old ATCT event ***
        atapi.LinesField(
            "eventType",
            required=False,
            searchable=True,
            write_permission=ChangeEvents,
            languageIndependent=True,
            widget=atapi.KeywordWidget(
                size=6, description="", label=atct_m(u"label_event_type", default=u"Event Type(s)")
            ),
        ),
        # *** Images field ***
        atapi.ImageField(
            "image",
コード例 #10
0
from Products.CMFCore import permissions

# Archetypes & ATCT imports
from Products.Archetypes import atapi
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata

# Product imports
from fbimn.verteidigung import config
from fbimn.verteidigung.interfaces import IVerteidigung
from fbimn.verteidigung import exampleMessageFactory as _

############################################################### schema definition ###

if True:
	schema = ATEventSchema.copy() + atapi.Schema((

	atapi.StringField('graduateName', 
		languageIndependent=True,
		searchable = True,
		required = True,
		write_permission = ChangeEvents,
		widget = atapi.StringWidget(
			size = 52,
			maxlength=60,
			visible = {'edit': 'visible', 'view': 'visible'},
			label = config.LABEL_GRADUATE_NAME,
		),
	),

	atapi.StringField('graduateGroupCourse', 
コード例 #11
0
ファイル: patch.py プロジェクト: talkara/sll.policy
    if field in schema and related_item_default:
        schema.changeSchemataForField(field, 'default')

    field = 'excludeFromNav'
    if field in schema and exclude_from_nav_default:
        schema.changeSchemataForField(field, 'default')

    marshall_register(schema)
    return schema


DocumentSchema = ATDocumentSchema.copy()
finalizeATCTSchema(DocumentSchema, tag_default=False)
document_schema = DocumentSchema

NewsItemSchema = ATNewsItemSchema.copy()
finalizeATCTSchema(NewsItemSchema, tag_default=False)
newsitem_schema = NewsItemSchema

EventSchema = ATEventSchema.copy()
finalizeATCTSchema(EventSchema)
event_schema = EventSchema

FolderSchema = ATFolderSchema.copy()
finalizeATCTSchema(FolderSchema, tag_default=False, related_item_default=False)
folder_schema = FolderSchema

FormSchema = FormFolderSchema.copy()
finalizeATCTSchema(FormSchema, tag_default=False, related_item_default=False)
form_schema = FormSchema
コード例 #12
0
    copied_fields['contactName'],

    copied_fields['contactEmail'],

    copied_fields['contactPhone'],

    copied_fields['eventType'],


),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Performance_schema = ATEventSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Performance(ATEvent):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IPerformance)

    meta_type = 'Performance'
    _at_rename_after_creation = True
コード例 #13
0
            required= False,
            widget = CalendarInAndOutWidget(
                label=_("label_including", default=u"Including"),
                description=_("description_field_including",
                              default=u"In this field you can set the list of days on which the event is additionally held, even if excluded by other filters.\n"
                                      u"Enter dates in the form yyyy-mm-dd.\n"
                                      u"This field became required if you don't provide any From/To dates of the event."),
                auto_add=True,
                ),
            languageIndependent=True
        ),

))


EventSchema = ATEventSchema.copy() + RECURRING_EVENT_SCHEMA.copy()

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

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

schemata.finalizeATCTSchema(EventSchema, moveDiscussion=False)
EventSchema.moveField('cadence', after='endDate')
EventSchema.moveField('except', after='cadence')
# finalizeATCTSchema moves 'location' into 'categories', we move it back:
EventSchema.changeSchemataForField('location', 'default')
EventSchema.moveField('location', before='startDate')

EventSchema['subject'].widget.visible = {'edit': 'visible'}
コード例 #14
0
from zope.interface import implements

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

from Products.ATContentTypes.content.event import ATEventSchema, ATEvent

# -*- Message Factory Imported Here -*-

from collective.barcamp.interfaces import IBarcampSession
from collective.barcamp.config import PROJECTNAME
from DateTime import DateTime


BarcampSessionSchema = ATEventSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        'speaker',
        storage=atapi.AnnotationStorage(),
    ),
    atapi.StringField(
        'level',
        storage=atapi.AnnotationStorage(),
        widget=atapi.SelectionWidget(
            format='select',
            label=u'Level',
        ),
        vocabulary=['beginner', 'intermediate', 'advanced']
    ),
コード例 #15
0
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.ATContentTypes.content.event import ATEvent
from Products.ATContentTypes.content.event import ATEventSchema
from Products.PloneConfContentTypes.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema = Schema((), )

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Course_schema = ATEventSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema


class Course(ATEvent):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.ICourse)

    meta_type = 'Course'
    _at_rename_after_creation = True
コード例 #16
0
        storage=AttributeStorage(),
        schemata='metadata'
    ),
    BooleanField(
        name='reminder_sent',
        storage=AttributeStorage(),
        schemata='metadata',
        default=False
    )
),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

ILOEvent_schema = ATEventSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema
#ILOEvent_schema['reminder_sent'].widget.visible = {
#    'edit':'invisible','view':'invisible'
#}
class ILOEvent(ATEvent):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IILOEvent)

    meta_type = 'ILOEvent'
コード例 #17
0
ファイル: Announcement.py プロジェクト: bnl-sdcc/griddev
#copied_fields['text'].widget = TextAreaWidget
copied_fields['text'].widget.label = "Event Detail"
copied_fields['text'].widget.description = "Enter a detailed description of the event."
copied_fields['text'].widget.description_msgid = "description_announcement_text"
copied_fields['text'].widget.rows = 8
#copied_fields['text'].validators = ('isTidyHtmlWithCleanup')
copied_fields['startDate'] = ATEvent.schema['endDate'].copy()
copied_fields['startDate'].widget.label= "Event Start Date and Time"
copied_fields['startDate'].widget.description = "Enter the start time and date of the event."
copied_fields['startDate'].widget.description_msgid = "description_announcement_start_time"
copied_fields['endDate'] = ATEvent.schema['endDate'].copy()
copied_fields['endDate'].widget.label= "Event End Date and Time"
copied_fields['endDate'].widget.description = "Enter the anticipated end time and date of the event."
copied_fields['endDate'].widget.description_msgid = "description_announcement_end_time"

AnnouncementSchema = ATEventSchema.copy() + Schema((
    
    #A brief but descriptive title for the announcement or event.
    copied_fields['title'],
#    StringField(
#        name='title',
#        widget=StringWidget(
#            label="Announcement Title",
#            description="Enter a brief but descriptive title for the anouncement or event.",
#            label_msgid='Announcements_label_title',
#            description_msgid='Announcements_help_title',
#            i18n_domain='Announcements',
#            visible={'view': 'hidden', 'edit': 'visible'},
#        ),
#        required=1,
#        accessor="Title",
コード例 #18
0
    copied_fields['contactName'],

    copied_fields['contactEmail'],

    copied_fields['contactPhone'],

    copied_fields['eventType'],


),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Performance_schema = ATEventSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Performance(ATEvent):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IPerformance)

    meta_type = 'Performance'
    _at_rename_after_creation = True
コード例 #19
0
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.ATContentTypes.content.event import ATEvent
from Products.ATContentTypes.content.event import ATEventSchema
from Products.PloneConfContentTypes.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema = Schema(())

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Sprint_schema = ATEventSchema.copy() + schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema


class Sprint(ATEvent):
    """
    """

    security = ClassSecurityInfo()

    implements(interfaces.ISprint)

    meta_type = "Sprint"
    _at_rename_after_creation = True
コード例 #20
0
ファイル: event.py プロジェクト: macagua/eduIntelligent-cynin
#You can also contact Cynapse at:
#802, Building No. 1,
#Dheeraj Sagar, Malad(W)
#Mumbai-400064, India
###############################################################################
from Products.Archetypes.atapi import *

from Products.ATContentTypes.content.event \
     import ATEvent as BaseClass
from Products.ATContentTypes.content.event \
     import ATEventSchema as DefaultSchema

from Products.ATContentTypes.content.base import registerATCT

from ubify.coretypes.config import PROJECTNAME

schema = DefaultSchema.copy()


class ATEvent(BaseClass):

    __doc__ = BaseClass.__doc__ + "(customizable version)"

    portal_type = BaseClass.portal_type
    archetype_name = BaseClass.archetype_name

    schema = schema


registerATCT(ATEvent, PROJECTNAME)
コード例 #21
0
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.ATContentTypes.content.event import ATEvent
from Products.ATContentTypes.content.event import ATEventSchema
from Products.PloneConfContentTypes.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema = Schema((), )

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Sprint_schema = ATEventSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema


class Sprint(ATEvent):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.ISprint)

    meta_type = 'Sprint'
    _at_rename_after_creation = True
コード例 #22
0
from Products.CMFCore import permissions

from Products.ATContentTypes.content.event import ATEventSchema
from Products.ATContentTypes.content.event import ATEvent

from Products.MultiEvent.config import *
from Products.DataGridField import DataGridField, DataGridWidget
from Products.DataGridField.Column import Column

from Products.MultiEvent.utilities import *
from Products.MultiEvent import config

from i18n.messageid import MessageFactory
_ = MessageFactory('Products.MultiEvent')

schema = ATEventSchema.copy() + Schema((

    DataGridField('UpcomingEvents',
        columns=('location','startDate','endDate'),
        allow_reorder = False,
        widget = DataGridWidget(
            label=_(u'label_upcoming_events',
                    default=u'Upcoming Events'),
            description = _(u"help_upcoming_event",
                    default=u"Date must be in the day/month/Year format."),
            columns={'location' : Column(_(u"Location")),
                     'startDate' : Column(_(u"Start Date")),
                     'endDate' : Column(_(u"End Date")),
                    },),
        ),
コード例 #23
0
ファイル: patch.py プロジェクト: taito/sll.policy
    if field in schema and related_item_default:
        schema.changeSchemataForField(field, 'default')

    field = 'excludeFromNav'
    if field in schema and exclude_from_nav_default:
        schema.changeSchemataForField(field, 'default')

    marshall_register(schema)
    return schema


DocumentSchema = ATDocumentSchema.copy()
finalizeATCTSchema(DocumentSchema, tag_default=False)
document_schema = DocumentSchema

NewsItemSchema = ATNewsItemSchema.copy()
finalizeATCTSchema(NewsItemSchema, tag_default=False)
newsitem_schema = NewsItemSchema

EventSchema = ATEventSchema.copy()
finalizeATCTSchema(EventSchema)
event_schema = EventSchema

FolderSchema = ATFolderSchema.copy()
finalizeATCTSchema(FolderSchema, tag_default=False, related_item_default=False)
folder_schema = FolderSchema

FormSchema = FormFolderSchema.copy()
finalizeATCTSchema(FormSchema, tag_default=False, related_item_default=False)
form_schema = FormSchema