#                                                       ),
 #                         ),
 #    atapi.ReferenceField('communities_secondary',
 #                         relationship='secondary_provider_for',
 #                         multiValued=True,
 #                         allowed_types=('Community',),
 #                         widget=ReferenceBrowserWidget(label='Secondary provider for',
 #                                                       allow_browse=1,
 #                                                       startup_directory='/communities',
 #                                                       ),
 #                         ),
 BackReferenceField(
     'affiliated',
     relationship='affiliated',
     multiValued=True,
     widget=BackReferenceWidget(visible={'edit': 'invisible'}, ),
 ),
 BackReferenceField(
     'hosts',
     relationship='hosted_by',
     multiValued=True,
     widget=BackReferenceWidget(visible={'edit': 'invisible'}, ),
 ),
 BackReferenceField(
     'projects_invloved',
     relationship='provided_by',
     multiValued=True,
     widget=BackReferenceWidget(
         label='Projects involved',
         visible={'edit': 'invisible'},
     ),
Beispiel #2
0
# -*- Message Factory Imported Here -*-

from pcp.contenttypes.interfaces import IServiceComponentImplementation
from pcp.contenttypes.config import PROJECTNAME
from pcp.contenttypes.content.common import CommonFields
from pcp.contenttypes.content.common import CommonUtilities


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

    BackReferenceField('offered_by',
                       relationship='service_component_implementations_offered',
                       multiValued=True,
                       widget=BackReferenceWidget(label='Offered by',
                                                  visible={
                                                      'edit': 'invisible'},
                                                  ),
                       ),
    BackReferenceField('requested_by',
                       relationship='requested_component_implementations',
                       multiValued=True,
                       widget=BackReferenceWidget(label='Requested by',
                                                  visible={
                                                      'edit': 'invisible'},
                                                  ),
                       ),

)) + CommonFields.copy()


schemata.finalizeATCTSchema(
Beispiel #3
0
ServiceSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    ateapi.UrlField('url'),
    atapi.ReferenceField('managed_by',
                         relationship='managed_by',
                         allowed_types=('Person',),
                         widget=ReferenceBrowserWidget(label='Managed by',
                                                       allow_browse=1,
                                                       startup_directory='/people',
                                                       ),
                         ),
    BackReferenceField('resources_used',
                       relationship='used_by',
                       multiValued=True,
                       widget=BackReferenceWidget(label='Resources used',
                                                  visible={'edit':'invisible'},
                                                  ),
                       ),
    BackReferenceField('used_by_project',
                       relationship='using',
                       multiValued=True,
                       widget=BackReferenceWidget(label='Used by projects',
                                                  visible={'edit':'invisible'},
                                                  ),
                       ),
)) + CommonFields.copy()


schemata.finalizeATCTSchema(
    ServiceSchema,
    folderish=True,