def update_item_schema(baseSchema): specificSchema = Schema(( TextField( name='internalCommunication', widget=RichWidget( condition="python: here.portal_plonemeeting.isManager(here)", description="InternalCommunication", description_msgid="item_internalCommunication_descr", label='InternalCommunication', label_msgid='PloneMeeting_label_internalCommunication', i18n_domain='PloneMeeting', ), optional=True, default_content_type="text/html", allowable_content_types=('text/html', ), default_output_type="text/x-html-safe", ), ReferenceField( name='strategicAxis', keepReferencesOnCopy=True, widget=ReferenceBrowserWidget( description="StrategicAxis", description_msgid="item_strategicAxis_descr", condition="python: here.attributeIsUsed('strategicAxis')", allow_search=True, allow_browse=False, startup_directory_method="classifierStartupDirectory", force_close_on_insert=False, restrict_browsing_to_startup_directory=True, base_query="classifierBaseQuery", show_results_without_query=True, label='StrategicAxis', label_msgid='PloneMeeting_label_strategicAxis', i18n_domain='PloneMeeting', ), multiValued=True, relationship="ItemStrategicAxis", allowed_types=('MeetingCategory', ), optional=True, ), )) baseSchema[ 'detailedDescription'].widget.description = "DetailedDescriptionMethode" baseSchema[ 'detailedDescription'].widget.description_msgid = "detailedDescription_item_descr" completeItemSchema = baseSchema + specificSchema.copy() completeItemSchema.moveField('strategicAxis', after='detailedDescription') return completeItemSchema
from Products.Archetypes import atapi from Products.ATContentTypes.content.base import ATCTContent from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin from Products.Doormat import DoormatMF as _ from Products.Doormat.config import PROJECTNAME from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget from zope.interface import implements from . import interfaces schema = atapi.Schema(( atapi.ReferenceField( name='collection', widget=ReferenceBrowserWidget( label=_('Collection'), label_msgid='Doormat_label_collection', i18n_domain='Doormat', ), allowed_types="('Topic', 'Collection')", relationship="internally_references_to_collection", ), atapi.ReferenceField( name='showMoreLink', widget=ReferenceBrowserWidget( label=_("'Show more' link"), description=_("Optionally, add a location for an extra link that " "will be displayed below the items, like a link to " "the collection itself."), label_msgid='Doormat_label_showMoreLink', description_msgid='Doormat_help_showMoreLink', i18n_domain='Doormat',
default=u"Default for the test email address."), i18n_domain='EasyNewsletter', ), ), atapi.ReferenceField( 'contentAggregationSources', multiValued=1, referencesSortable=1, relationship='contentAggregationSource', allowed_types_method="get_allowed_content_aggregation_types", widget=ReferenceBrowserWidget( allow_sorting=1, label=_( u"ENL_content_aggregation_sources_label", default=u"Content aggregation sources"), description=_( u"ENL_content_aggregation_sources_desc", default=u"Choose sources to aggregate newsletter content from." ), ), ), atapi.LinesField( 'salutations', default=("mr|Dear Mr.", "ms|Dear Ms.", "default|Dear"), schemata='personalization', widget=atapi.LinesWidget( label=_( u'EasyNewsletter_label_salutations', default=u"Subscriber Salutations."), description=_(
from Products.ATContentTypes.content import base from Products.ATContentTypes.content import schemata from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget from pcp.contenttypes.interfaces import IPlan from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities PlanSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( atapi.ReferenceField('principle_investigator', relationship='principal_investigator', allowed_types=('Person',), widget=ReferenceBrowserWidget(label='Principal investigator', allow_browse=1, startup_directory='/people', ), ), )) + CommonFields.copy() schemata.finalizeATCTSchema(PlanSchema, moveDiscussion=False) class Plan(base.ATCTContent, CommonUtilities): """The Master Plan for a community""" implements(IPlan) meta_type = "Plan" schema = PlanSchema
ECAssignmentBox_schema = ATFolderSchema.copy() + Schema(( ReferenceField( 'assignment_reference', allowed_types = ('ECAssignmentTask',), required = False, accessor = 'getReference', index = "FieldIndex:schema", # Adds "getRawAssignment_reference" # to catalog multiValued = False, relationship = 'alter_ego', widget = ReferenceBrowserWidget( description = 'Select an assignment task. A reference to an assignment task supersedes the assignment text and answer template below.', description_msgid = 'help_assignment_reference', i18n_domain = config.I18N_DOMAIN, label = 'Reference to assignment', label_msgid = 'label_assignment_reference', allow_search = True, show_indexes = False, ), ), TextField( 'assignment_text', required = False, searchable = True, allowable_content_types = config.ALLOWED_CONTENT_TYPES, default_content_type = config.DEFAULT_CONTENT_TYPE, default_output_type = config.DEFAULT_OUTPUT_TYPE, widget=RichWidget( label = 'Assignment text', label_msgid = 'label_assignment_text',
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget from pcp.contenttypes.interfaces import IResource from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities ResourceSchema = folder.ATFolderSchema.copy() + atapi.Schema(( atapi.ReferenceField( 'managed_by', relationship='managed_by', allowed_types=('Person', ), widget=ReferenceBrowserWidget( label='Managed by', allow_browse=1, startup_directory='/people', ), ), atapi.ReferenceField( 'hosted_by', relationship='hosted_by', allowed_types=('Provider', ), widget=ReferenceBrowserWidget( label='Hosted by', allow_browse=1, startup_directory='/providers', ), ), atapi.ReferenceField( 'used_by',
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget from pcp.contenttypes.interfaces import IServiceComponentOffer from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import ConditionsFields from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import OfferUtilities from pcp.contenttypes.content.common import CommonUtilities ServiceComponentOfferSchema = folder.ATFolderSchema.copy() + atapi.Schema(( atapi.ReferenceField('service_component', relationship='service_component_offered', allowed_types=('ServiceComponent',), widget=ReferenceBrowserWidget(label='Service component offered', description='Reference to the catalog entry of the service component being offered.', allow_browse=1, startup_directory='/catalog', ), ), atapi.ReferenceField('implementations', relationship='service_component_implementations_offered', allowed_types=('ServiceComponentImplementation',), multiValued=True, widget=ReferenceBrowserWidget(label='Implementations offered', description='Reference to the catalog entry of the implementations(s) of the service component being offered.', allow_browse=1, startup_directory='/catalog', ), ), atapi.ReferenceField('slas', relationship='slas_offered',
searchable=True, accessor='end', # compare ATContentTypes - Event default_method=DateTime, languageIndependent=True, widget=DatetimeWidget(label='End date (UTC)', pattern='yyyy/MM/dd HH:mm:ss UTC', description='When does the downtime end? In UTC!'), ), atapi.ReferenceField('affected_registered_serivces', relationship='affected_registered_services', allowed_types=('RegisteredService', 'RegisteredServiceComponent',), multiValued=True, widget=ReferenceBrowserWidget(label='Affected registered services', description='All registered services and components unavailable during downtime', allow_browse=1, startup_directory_method='getStartupDirectory', ), ), ateapi.UrlField('reason', widget=ateapi.UrlWidget(label='Reason', description='Optional URL to the change management document providing the reason for this downtime.', ), ), atapi.StringField('severity', searchable=1, default='warning', vocabulary=NamedVocabulary('severity_levels'), widget=atapi.SelectionWidget(label='Severity', ), ),
('*****@*****.**', 'RD Ost'), ('*****@*****.**', 'RD Suedost'), ('*****@*****.**', 'RD Suedwest'), ('*****@*****.**', 'RD West'), )) extension_fields = [ CustomReferenceField( 'careerform', schemata=u'Karriere', relationship='rel_careerform', multiValued=False, widget=ReferenceBrowserWidget( label=u"Online-Bewerbung", description= u"Soll die Stelle ein Online-Bewerbungsformular erhalten? Bitte hier eintragen.", startup_directory='/', destination_types=('FormFolder', ), force_close_on_insert=True, ), ), CustomStringField( 'kennziffer', schemata=u'Karriere', widget=StringWidget( label=u"Kennziffer", description= u"Bitte tragen Sie hier die Kennziffer der Bewerbung ein.", ), ), CustomStringField( 'pin',
manager = IDynamicViewManager(sourceObject) manager.setLayout(None) return CollageAliasSchema = ATCTContent.schema.copy() + atapi.Schema(( atapi.ReferenceField( name='target', mutator='set_target', accessor='get_target', referenceClass=CollageAliasReference, relationship='Collage_aliasedItem', multiValued=0, allowed_types=(), widget=ReferenceBrowserWidget( label=_(u'label_alias_target', default="Selected target object"), startup_directory='/', ), keepReferencesOnCopy=True, ), )) # we don't require any fields to be filled out CollageAliasSchema['title'].required = False # never show in navigation, also when its selected CollageAliasSchema['excludeFromNav'].default = True CollageAliasSchema['relatedItems'].widget.visible = { 'edit': 'invisible', 'view': 'invisible' }
class CustomLinesField(ExtensionField, LinesField): pass extension_fields = [ CustomReferenceField( 'titleimages', schemata='Medien', relationship='rel_titleimages', multiValued=True, widget=ReferenceBrowserWidget( label=_(u"Titelbilder"), description= _(u"Bitte waehlen Sie hier Bilder fuer die Anzeige im Titel des Ordners." ), startup_directory='/', destination_types=('Image', ), force_close_on_insert=True, ), ), CustomBooleanField( 'anzeige', schemata='Medien', default=True, widget=BooleanWidget( label=u"Anzeige des Titelbildes im Ordner", description= u"Auswahl wenn das Titelbild im Ordner angezeigt werden soll. Ist kein Bild vorhanden wird \ das Bild in einem darueber liegenden Ordner angezeigt", ),
atapi.StringField( 'features_future', searchable=1, widget=atapi.StringWidget( label='Future features', macro_view='trusted_string', ), ), atapi.ReferenceField( 'dependencies', relationship='depends_on', allowed_types=('Service', ), multiValued=True, widget=ReferenceBrowserWidget( label='Depends on', allow_browse=1, startup_directory='/catalog', ), ), ateapi.UrlField( 'usage_policy_link', searchable=1, widget=ateapi.UrlWidget(label='Usage policy'), ), ateapi.UrlField( 'user_documentation_link', searchable=1, widget=ateapi.UrlWidget(label='User documentation'), ), ateapi.UrlField( 'operations_documentation_link',
# additional imports from tagged value 'import' from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget ##code-section module-header #fill in your manual code here from zope import schema ##/code-section module-header schema = Schema(( ReferenceField( name='collection', widget=ReferenceBrowserWidget( label='Collection', label_msgid='Doormat_label_collection', i18n_domain='Doormat', ), allowed_types="('Topic')", relationship="internally_references_to_collection", ), ReferenceField( name='showMoreLink', widget=ReferenceBrowserWidget( label='Showmorelink', label_msgid='Doormat_label_showMoreLink', i18n_domain='Doormat', ), relationship="more_link_links_to_internal", ), StringField(
from pcp.contenttypes.interfaces import IProject from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities ProjectSchema = folder.ATFolderSchema.copy() + atapi.Schema(( ateapi.UrlField('website'), atapi.ReferenceField('community', read_permission='View internals', write_permission='Modify internals', relationship='done_for', allowed_types=('Community',), widget=ReferenceBrowserWidget(label='Customer', description='Main customer ' 'involved in this project', allow_browse=1, startup_directory='/customers', ), ), atapi.ReferenceField('community_contact', read_permission='View internals', write_permission='Modify internals', relationship='community_contact', allowed_types=('Person',), widget=ReferenceBrowserWidget(label='Customer contact', allow_browse=1, startup_directory='/people', ), ), atapi.ReferenceField('registered_services_used', read_permission='View internals',
from Products.EEAContentTypes.content.Article import Article_schema from Products.EEAContentTypes.content.Speech import Speech from Products.EEAContentTypes.content.Speech import Speech_schema field = OrderableReferenceField('relatedItems', relationship='relatesTo', multiValued=True, isMetadata=True, languageIndependent=False, index='KeywordIndex', write_permission=ModifyPortalContent, widget=ReferenceBrowserWidget( allow_search=True, allow_browse=True, allow_sorting=True, show_indexes=False, force_close_on_insert=True, label="Related Item(s)", label_msgid="label_related_items", description="", description_msgid="help_related_items", i18n_domain="plone", visible={ 'edit': 'visible', 'view': 'invisible' })) types_and_schema = ((ATDocument, ATDocumentSchema), (Highlight, Highlight_schema), (Article, Article_schema), (Speech, Speech_schema))
from pcp.contenttypes.interfaces import ICommunity from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities CommunitySchema = folder.ATFolderSchema.copy() + atapi.Schema(( ateapi.UrlField('url'), ateapi.AddressField('address'), atapi.ReferenceField( 'representative', relationship='representative', allowed_types=('Person', ), widget=ReferenceBrowserWidget( label='Representative', allow_browse=1, startup_directory='/people', ), ), atapi.ReferenceField( 'admins', relationship='community_admins', multiValued=True, allowed_types=('Person', ), widget=ReferenceBrowserWidget( label='Administrators', allow_browse=1, startup_directory='/people', ), ), BackReferenceField(
from redomino.tokenrole.utils import make_uuid from redomino.tokenrole.interfaces import ITokenInfoSchema from redomino.tokenroleform import tokenroleformMessageFactory as _ from redomino.tokenroleform.interfaces import ITokenRoleMailerAdapter from redomino.tokenroleform.config import PROJECTNAME TokenRoleMailerAdapterSchema = formMailerAdapterSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.ReferenceField( 'private_doc', storage=atapi.AnnotationStorage(), widget=ReferenceBrowserWidget( label=_(u"Private doc"), description=_(u"Choose the private item you are going to share"), startup_directory_method='startupDirectoryMethod', ), required=True, relationship='tokenrolemaileradapter_private_doc', allowed_types=(), # specify portal type names here ('Example Type',) multiValued=False, ), atapi.IntegerField( 'minutes', storage=atapi.AnnotationStorage(), widget=atapi.IntegerWidget( label=_(u"Validity (minutes)"), description=_(u"Type the token validity in minutes"), ), required=True,
from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities from pcp.contenttypes.content.common import ResourceFields from pcp.contenttypes.content.common import RequestFields from pcp.contenttypes.content.common import RequestUtilities ServiceComponentRequestSchema = folder.ATFolderSchema.copy() + atapi.Schema(( atapi.ReferenceField('service_component', relationship='requested_component', allowed_types=('ServiceComponent',), multiValued=False, widget=ReferenceBrowserWidget(label='Service component', description='The service component ' 'being requested', allow_browse=1, startup_directory='/catalog', ), ), atapi.ReferenceField('implementations', relationship='requested_component_implementations', allowed_types=('ServiceComponentImplementation',), multiValued=True, widget=ReferenceBrowserWidget(label='Implementation', description='If only certain ' 'implemenations are acceptable, this ' 'can be specified here. Leave empty ' 'if any implementation is fine.', allow_browse=1, startup_directory='/catalog', ),
from zope.interface import implements from Products.CMFCore.permissions import ManageUsers from Products.membrane.at.interfaces import IPropertiesProvider from Products.FacultyStaffDirectory.interfaces.classification import IClassification from Acquisition import aq_inner, aq_parent from Products.FacultyStaffDirectory.permissions import ASSIGN_CLASSIFICATIONS_TO_PEOPLE from Products.FacultyStaffDirectory import FSDMessageFactory as _ from DateTime import DateTime schema = Schema( (RelationField(name='people', widget=ReferenceBrowserWidget( label=_(u"FacultyStaffDirectory_label_people", default=u"People"), i18n_domain='FacultyStaffDirectory', allow_browse=0, allow_search=1, show_results_without_query=1, base_query="_search_people_in_this_fsd", startup_directory_method="_get_parent_fsd_path", ), write_permission=ASSIGN_CLASSIFICATIONS_TO_PEOPLE, allowed_types=('FSDPerson', ), multiValued=1, relationship='classifications_people'), ), ) Classification_schema = getattr(PersonGrouping, 'schema', Schema( ())).copy() + schema.copy() class Classification(PersonGrouping): """
from pcp.contenttypes.interfaces import IEnvironment from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget EnvironmentSchema = folder.ATFolderSchema.copy() + atapi.Schema(( atapi.ReferenceField('contact', relationship='contact_for', allowed_types=('Person',), widget=ReferenceBrowserWidget( allow_sorting=1, allow_search=1, allow_browse=1, force_close_on_insert=1, startup_directory='/people', use_wildcard_search=True, ), ), atapi.TextField('account', widget=atapi.TextAreaWidget(), ), ateapi.UrlField('terms_of_use'), atapi.BooleanField('rootaccess'), atapi.TextField('setup_procedure', widget=atapi.TextAreaWidget(), ), atapi.TextField('firewall_policy', widget=atapi.TextAreaWidget(), ),
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget from pcp.contenttypes.interfaces import IProject from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities ProjectSchema = folder.ATFolderSchema.copy() + atapi.Schema(( ateapi.UrlField('website'), atapi.ReferenceField('community', relationship='done_for', allowed_types=('Community',), widget=ReferenceBrowserWidget(label='Community', allow_browse=1, startup_directory='/communities', ), ), atapi.ReferenceField('community_contact', relationship='community_contact', allowed_types=('Person',), widget=ReferenceBrowserWidget(label='Community contact', allow_browse=1, startup_directory='/people', ), ), atapi.ReferenceField('service_provider', relationship='provided_by', allowed_types=('Provider',), widget=ReferenceBrowserWidget(label='Service provider', allow_browse=1,
from pcp.contenttypes.interfaces import IProvider from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import CommonUtilities ProviderSchema = folder.ATFolderSchema.copy() + atapi.Schema(( ateapi.UrlField('url'), ateapi.AddressField('address'), atapi.ReferenceField( 'contact', relationship='contact', allowed_types=('Person', ), widget=ReferenceBrowserWidget( label='Contact', allow_browse=1, startup_directory='/people', ), ), atapi.ReferenceField( 'admins', relationship='admin_of', multiValued=True, allowed_types=('Person', ), widget=ReferenceBrowserWidget( label='Administrators', allow_browse=1, startup_directory='/people', ), ), atapi.LinesField(
widget=atapi.StringWidget( label='Request procedures', macro_view='trusted_string', ), ), ateapi.UrlField( 'helpdesk', searchable=1, ), atapi.ReferenceField( 'managed_by', relationship='managed_by', allowed_types=('Person', ), widget=ReferenceBrowserWidget( label='Managed by', allow_browse=1, startup_directory='/people', ), ), atapi.ReferenceField( 'service_owner', relationship='owned_by', allowed_types=('Person', ), widget=ReferenceBrowserWidget( label='Service owner', allow_browse=1, startup_directory='/people', ), ), atapi.ReferenceField( 'contact',
vocabulary="_classificationReferences", widget=atapi.ReferenceWidget( label=_("FacultyStaffDirectory_label_classifications", default="Classifications"), i18n_domain='FacultyStaffDirectory', ), write_permission=ASSIGN_CLASSIFICATIONS_TO_PEOPLE, schemata="Basic Information", multiValued=True, relationship='people_classifications'), RelationField(name='departments', widget=ReferenceBrowserWidget( label=_("FacultyStaffDirectory_label_departments", default="Departments"), i18n_domain='FacultyStaffDirectory', base_query="_search_departments_in_this_fsd", allow_browse=0, allow_search=1, show_results_without_query=1, startup_directory_method="_get_parent_fsd_path", ), write_permission=ASSIGN_DEPARTMENTS_TO_PEOPLE, schemata="Basic Information", allowed_types=('FSDDepartment'), multiValued=True, relationship='DepartmentalMembership'), RelationField(name='committees', widget=ReferenceBrowserWidget( visible={ 'edit': 'visible', 'view': 'visible' },
from pcp.contenttypes.interfaces import IServiceOffer from pcp.contenttypes.config import PROJECTNAME from pcp.contenttypes.content.common import ConditionsFields from pcp.contenttypes.content.common import CommonFields from pcp.contenttypes.content.common import OfferUtilities from pcp.contenttypes.content.common import CommonUtilities ServiceOfferSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( atapi.ReferenceField('service', relationship='service_offered', allowed_types=('Service',), widget=ReferenceBrowserWidget(label='Service offered', description='Reference to the catalog entry of '\ 'the service being offered.', allow_browse=1, startup_directory='/catalog', visible={ 'edit': 'invisible'}, ), ), atapi.ReferenceField('service_option', relationship='service_option_offered', allowed_types=('Document',), widget=ReferenceBrowserWidget(label='Service option offered', allow_search=1, base_query={ 'Subject': ["Service option"]}, show_results_without_query=1, ), ), atapi.ReferenceField('slas',
RegisteredServiceComponentSchema = folder.ATFolderSchema.copy( ) + atapi.Schema(( atapi.ReferenceField( 'service_component_implementation_details', accessor='getServiceComponentImplementationDetails', read_permission='View internals', write_permission='Modify internals', relationship='implemented_by', allowed_types=('ServiceComponentImplementationDetails', ), multiValued=False, widget=ReferenceBrowserWidget( label='Service Component Implementation Details', description='Reference to specific implementation Details', searchable=True, allow_browse=1, startup_directory='/catalog', show_review_state=True, show_path=True, ), ), atapi.ReferenceField( 'service_providers', read_permission='View internals', write_permission='Modify internals', relationship='provided_by', allowed_types=('Provider', ), multiValued=True, widget=ReferenceBrowserWidget( label='Service provider(s)', description='The provider(s) hosting this service component.',
default_output_type='text/html', widget=TextAreaWidget( label=_(u"label_installation_instructions", default=u"Product Installation Instructions"), description=_(u"help_installation_instructions", default=u"Enter any installation instructions that should appear on each product page."), i18n_domain='plonesoftwarecenter', rows=6, ), ), ReferenceField('featuredProject', multiValued=0, allowed_types=('PSCProject',), relationship='featuredProject', widget=ReferenceBrowserWidget( label=_(u"label_featured_project", default=u"Featured Project"), description=_(u"help_featured_project", default=u"Featured project for the software center (for use with the plonesoftwarecenter_ploneorg template)."), i18n_domain='plonesoftwarecenter', ), ), ReferenceField('featuredProjectRelease', multiValued=0, allowed_types=('PSCRelease',), relationship='featuredProjectRelease', widget=ReferenceBrowserWidget( label=_(u"label_featured_project_release", default=u"Featured Project Release"), description=_(u"help_featured_project_release", default=u"Featured project release for the featured project of the software center (for use with the plonesoftwarecenter_ploneorg template)."), i18n_domain='plonesoftwarecenter', ), ),
from Products.Archetypes import atapi from Products.ATContentTypes.content import schemata from Products.ATContentTypes.content.link import ATLink, ATLinkSchema from observatorio.conteudo import MessageFactory as _ from observatorio.conteudo.config import PROJECTNAME from observatorio.conteudo.interfaces import IBanner BannerSchema = ATLinkSchema.copy() + atapi.Schema(( atapi.ReferenceField( name='link_interno', widget=ReferenceBrowserWidget( label=_(u'Link Interno'), description= _(u'Caso selecionado o link sera apontado para o local de sua escolha.' ), allow_search=True, allow_browse=True, ), #allowed_types=('Folder',), relationship='link_interno', multiValued=False, ), ImageField( name='imagem', widget=atapi.ImageWidget( label=_(u'Imagem do Banner'), description=_(u'Escolha da imagem do banner.'), ), required=False, ),
allowed_types=('KalturaVideo',), multiValued = True, isMetadata = False, accessor = 'getPlaylistVideos', mutator = 'setPlaylistVideos', required=False, default=(), widget = ReferenceBrowserWidget( addable = False, destination = [], allow_search = True, allow_browse = True, allow_sorting = True, show_indexes = False, force_close_on_insert = True, label = "Videos (Add Manually)", label_msgid = "label_kvideos_msgid", description = "Choose manually which videos are " "included in this playlist", description_msgid = "desc_kvideos_msgid", i18n_domain = "kaltura_video", visible = {'edit' : 'visible', 'view' : 'visible', } ), ), ) ) schemata.finalizeATCTSchema(ManualKalturaPlaylistSchema, folderish=False, moveDiscussion=False)
widget=ateapi.RecordsWidget(label='Storage resources'), ), )) ResourceContextFields = atapi.Schema(( # Provider is assumed to be available via the context - usually the # aquisition parent atapi.ReferenceField( 'project', relationship='project', multiValued=False, allowed_types=('Project', ), widget=ReferenceBrowserWidget( label="Project", description="The project for which this " "resource has been established.", allow_browse=1, startup_directory='/projects', ), ), atapi.ComputedField( 'scopes', expression='here.getScopeValues(asString = 1)', widget=atapi.ComputedWidget(label='Project Scopes'), ), atapi.ReferenceField( 'customer', relationship='customer', multiValued=False, allowed_types=('Community', ), widget=ReferenceBrowserWidget(