), ), ), 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(), widget=atapi.SelectionWidget( label=_(u"Priority"), description=_(u"The priority of this task."), format="select", ), default=_(u"Medium"), vocabulary=["High", "Medium", "Low"]), atapi.DateTimeField(
u"Add a logo for the case study (normally the customer logo). Max 150x75 pixels (will be resized if bigger)." ), i18n_domain='ploneservicescenter', ), ), atapi.ReferenceField( 'provider', relationship='providerToCaseStudy', allowed_types=('Provider', ), vocabulary_display_path_bound=-1, vocabulary="getProvidersReferences", widget=atapi.ReferenceWidget( label=_(u"label_psc_provider_cat", default=u"Provider"), description=_( u"help_casestudy_provider", default= u"Select a provider from the below listing for the case study." ), i18n_domain='ploneservicescenter', ), ), )) class CaseStudy(Services.BaseServicesContent): """Shows off a Plone site or project built for a customer.""" implements(ICaseStudy) schema = schema archetype_name = "Case study" typeDescription = "Shows off a Plone site or project built for a customer."
searchable=True, storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u'label_job_title', default=u"Job Title"), description=_(u'help_job_title', default=u""))), # atapi.ReferenceField( 'organization', required=False, searchable=True, storage=atapi.AnnotationStorage(), vocabulary_factory='atreal.contacts.vocabularies.organizations', relationship='isEmployeeOf', widget=atapi.ReferenceWidget( label=_(u'label_organization', default=u"Organization"), description=_(u'help_organization', default=u""))), atapi.StringField('department', required=False, searchable=True, storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u'label_department', default=u"Department"), description=_(u'help_department', default=u""))), # atapi.StringField('address', required=False, searchable=True, storage=atapi.AnnotationStorage(), widget=atapi.StringWidget(
atapi.IntegerField("number", index="FieldIndex", default=42, validators=('isInt',), ), atapi.ImageField('image', default_output_type='image/jpeg', allowable_content_types=('image/*',), widget=atapi.ImageWidget()), atapi.ReferenceField('related', relationship='related', multiValued=True, widget=atapi.ReferenceWidget(), keepReferencesOnCopy=True), atapi.ReferenceField('rel2', relationship='rel2', multiValued=True, widget=atapi.ReferenceWidget(), keepReferencesOnCopy=True), ), marshall=PrimaryFieldMarshaller()) + TemplateMixin.schema class DDocument(TemplateMixin, atapi.BaseContent): """An extensible Document (test) type""" schema = schema
description=_(u'A not-quite-as-brief summary.'), ), predicateURI='http://purl.org/dc/terms/description', ), atapi.ReferenceField( 'involvedInvestigatorSites', enforceVocabulary=True, multiValued=True, relationship='involvedInvestigatorSitesForProtocol', required=False, storage=atapi.AnnotationStorage(), vocabulary_factory=u'eke.site.Sites', vocabulary_display_path_bound=-1, widget=atapi.ReferenceWidget( label=_(u'Involved Investigator Site'), description= _(u'Sites at which the investigators are involved with this protocol.' ), ), predicateURI= 'http://edrn.nci.nih.gov/rdf/schema.rdf#involvedInvestigatorSite', predicateTarget=ISite, ), atapi.ReferenceField( 'coordinatingInvestigatorSite', enforceVocabulary=True, multiValued=False, relationship='coordinatingInvestigatorSiteForProtocol', required=False, storage=atapi.AnnotationStorage(), vocabulary_factory=u'eke.site.Sites', vocabulary_display_path_bound=-1,
'preview': (400, 400), 'view': (250, 250), 'mini': (200, 200), 'thumb': (128, 128), 'tile': (64, 64), 'icon': (32, 32), 'listing': (16, 16), }, ), atapi.ReferenceField( 'provider', widget=atapi.ReferenceWidget( label=_(u"label_psc_provider_cat", default=u"Provider"), description=_( u"help_buzz_provider", default= u"Select a provider from the below listing for the media coverage." ), checkbox_bound=0, i18n_domain='ploneservicescenter', ), relationship='providerToBuzz', allowed_types=('Provider', ), vocabulary_display_path_bound=-1, vocabulary="getProvidersReferences", ), )) class Buzz(Services.BaseServicesContent): """A link to media coverage of Plone."""
sizes=None, widget=atapi.ImageWidget( label=u'Profile Image', label_msgid='isaw.facultycv_label_ProfileImage', il8n_domain='isaw.facultycv', ), required=False, searchable=True, accessor='profileImage', ), atapi.ReferenceField( name = 'ProfileRef', widget = atapi.ReferenceWidget( label = u'Profile reference', ), relationship = 'owned_profile', multiValued=False, ), atapi.TextField( name = 'Titles', default_output_type='text/x-html-safe', widget = atapi.RichWidget( label=u'Faculty Titles', label_msgid='isaw.facultycv_label_Titles', il8n_domain='isaw.facultycv', ), required = False,
default="Full Name"), visible={ 'edit': 'invisible', 'view': 'visible' }, i18n_domain='FacultyStaffDirectory', ), schemata="Basic Information", accessor="Title", user_property='fullname', searchable=True), RelationField(name='classifications', 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,
from Products.Archetypes import atapi from Products.ATContentTypes.content.schemata import finalizeATCTSchema from zope.interface import implements BiomarkerPanelSchema = Biomarker.schema.copy( ) + QualityAssuredObjectSchema.copy() + atapi.Schema((atapi.ReferenceField( 'members', enforceVocabulary=True, multiValued=True, relationship='panelComposition', required=False, storage=atapi.AnnotationStorage(), vocabulary_display_path_bound=-1, vocabulary_factory=u'eke.biomarker.BiomarkersVocabulary', widget=atapi.ReferenceWidget( label=_(u'Member Markers'), description=_(u'Biomarkers that are a part of this panel.'), ), ), )) finalizeATCTSchema(BiomarkerPanelSchema, folderish=True, moveDiscussion=False) class BiomarkerPanel(Biomarker): '''Biomarker panel.''' implements(IBiomarkerPanel) schema = BiomarkerPanelSchema portal_type = 'Biomarker Panel' members = atapi.ATReferenceFieldProperty('members') qaState = atapi.ATFieldProperty('qaState')
'text', required=False, searchable=True, storage=AnnotationStorage(migrate=True), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', widget=atapi.RichWidget( description='', label=_(u'Service description text'), rows=25), ), atapi.ReferenceField( 'los_categories', multiValued=True, allowed_types=('LOSCategory', ), relationship='sd_los', vocabulary='losCategoriesVocab', widget=atapi.ReferenceWidget(label=_(u"LOS categories"), ), languageIndependent=True, required=False, ), atapi.IntegerField( 'serviceId', required=False, searchable=False, storage=AnnotationStorage(migrate=True), validators=('isInt', ), widget=atapi.IntegerWidget(description='', label=_(u'Service Id')), ), atapi.ReferenceField( 'contacts', multiValued=True, allowed_types=('Person', ),
from zope.interface import implements from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import ISiteUsingPlone from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema + atapi.Schema((atapi.ReferenceField( 'provider', widget=atapi.ReferenceWidget( checkbox_bound=0, label=_(u"label_psc_provider_cat", default=u"Provider"), description=_( u"help_siteuseplone_provider", default= u"Select provider(s) from the below listing for the Site that Use Plone." ), i18n_domain='ploneservicescenter', ), relationship='providerToSiteUsingPlone', allowed_types=('Provider', ), vocabulary_display_path_bound=-1, vocabulary="getProvidersReferences", multiValued=True, ), )) class SiteUsingPlone(Services.BaseServicesContent): """Site using Plone.
'phase', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget(label=_(u'Phase'), ), predicateURI=predicateURIBase + 'Phase', ), )) ResearchedObjectSchema = atapi.Schema(( atapi.ReferenceField( 'protocols', storage=atapi.AnnotationStorage(), enforceVocabulary=True, multiValued=True, vocabulary_factory=u'eke.study.ProtocolsVocabulary', relationship='protocolsResearchingThisObject', vocabulary_display_path_bound=-1, widget=atapi.ReferenceWidget(label=_(u'Protocols & Studies'), ), predicateURI=predicateURIBase + 'referencesStudy', ), atapi.ReferenceField( 'publications', storage=atapi.AnnotationStorage(), enforceVocabulary=True, multiValued=True, vocabulary_factory=u'eke.publications.PublicationsVocabulary', relationship='publicationsAboutThisObject', vocabulary_display_path_bound=-1, widget=atapi.ReferenceWidget(label=_(u'Publications'), ), predicateURI=predicateURIBase + 'referencedInPublication', ), atapi.ReferenceField( 'resources',
from example.app.interfaces import IInfo from example.app.config import PROJECTNAME InfoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.ReferenceField( 'VenueReferenceField', relationship='venuerelationship', multiValued='True', allowed_types=('Venue', ), widget=atapi.ReferenceWidget( label='Reference Venue', description='Choose reference venue', visible={ 'view': 'visible', 'edit': 'visible' }, ), ), )) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. InfoSchema['title'].storage = atapi.AnnotationStorage() InfoSchema['description'].storage = atapi.AnnotationStorage() schemata.finalizeATCTSchema(InfoSchema, moveDiscussion=False) class Info(base.ATCTContent):
widget=atapi.TextAreaWidget( rows=15, label=_(u'label_additional_css', default=u'Additional CSS'), description=_(u'help_additional_css', default=u''))), atapi.ReferenceField( name='language_references', storage=atapi.AnnotationStorage(), schemata='subsite', multiValued=True, allowed_types=['Subsite'], relationship='subsite_subsite', widget=atapi.ReferenceWidget( checkbox_bound=1, label=_(u'label_language_references', default=u'Languages'), description=_(u'help_language_references', default=_(u'The language switch will only be ' 'displayed, if the chosen Subsite(s)' 'has a value in the forcelangage ' 'field')))), atapi.BooleanField(name='linkSiteInLanguagechooser', accessor='showLinkToSiteInLanguageChooser', schemata='subsite', default=False, widget=atapi.BooleanWidget( label=_(u'Link Plone Site in language chooser'))), atapi.StringField( name="forcelanguage", default="", vocabulary_factory="ftw.subsites.languages", schemata='subsite', widget=atapi.SelectionWidget(
# -*- Your Archetypes field definitions here ... -*- atapi.DateTimeField('startDate', widget=atapi.CalendarWidget(label='Start date', show_hm=False), ), atapi.DateTimeField('endDate', widget=atapi.CalendarWidget(label='End date', show_hm=False), ), atapi.StringField('ticketid'), atapi.ReferenceField('preferred_providers', relationship='preferred_providers', multiValued=True, allowed_types=('Provider',), widget=atapi.ReferenceWidget(label="Preferred providers", ), ), ateapi.RecordsField('compute_resources', required=0, minimalSize=2, subfields = ('cpus', 'memory', 'disk', 'virtualization', 'software'), subfield_types = {'virtualization': 'selection'}, subfield_labels ={'cpus':'CPUs', 'virtualization':'virtualization OK?', 'software':'requires OS/software', }, subfield_vocabularies = {'virtualization': 'yesno'}, widget=ateapi.RecordsWidget(label='Compute resources'), ), ateapi.RecordsField('storage_resources',
from edrnsite.collaborations.interfaces import IGroupSpaceIndex from Products.Archetypes import atapi from Products.ATContentTypes.content import base, schemata from zope.interface import implements GroupSpaceIndexSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( atapi.ReferenceField( 'chair', storage=atapi.AnnotationStorage(), enforceVocabulary=True, multiValued=False, vocabulary_factory=u'eke.site.People', relationship='chairOfThisGroup', vocabulary_display_path_bound=-1, widget=atapi.ReferenceWidget( label=_(u'Chair'), description=_(u'The person in charge of this group.'), )), atapi.ReferenceField( 'coChair', storage=atapi.AnnotationStorage(), enforceVocabulary=True, multiValued=False, vocabulary_factory=u'eke.site.People', relationship='coChairOfThisGroup', vocabulary_display_path_bound=-1, widget=atapi.ReferenceWidget( label=_(u'Co-Chair'), description=_( u'The assistant to the person in charge of this group.'), )), atapi.ReferenceField('members',
description=_( "Upload a scanned signature to be used on printed analysis " "results reports. Ideal size is 250 pixels wide by 150 high"), )), atapi.ReferenceField( 'Departments', required=0, vocabulary_display_path_bound=sys.maxint, allowed_types=('Department', ), relationship='LabContactDepartment', vocabulary='_departmentsVoc', referenceClass=HoldingReference, multiValued=1, widget=atapi.ReferenceWidget( checkbox_bound=0, label=_("Departments"), description=_("The laboratory departments"), ), ), StringField( 'DefaultDepartment', required=0, vocabulary_display_path_bound=sys.maxint, vocabulary='_defaultDepsVoc', widget=SelectionWidget( visible=True, format='select', label=_("Default Department"), description=_("Default Department"), ), ),
from Products.ATContentTypes.content.folder import ATFolder BodySystemStudySchema = KnowledgeObject.schema.copy( ) + ResearchedObjectSchema.copy() + ATFolder.schema.copy() + atapi.Schema(( atapi.ReferenceField( 'protocol', enforceVocabulary=True, multiValued=False, relationship='protocolStudyingBiomarkerThatIndicatesForAnOrgan', required=True, storage=atapi.AnnotationStorage(), vocabulary_display_path_bound=-1, vocabulary_factory=u'eke.study.ProtocolsVocabulary', widget=atapi.ReferenceWidget( label=_(u'Protocol'), description= _(u'The protocol or study that analyzed the organ for which the biomarker indicates diseases.' ), ), predicateURI=predicateURIBase + 'referencesStudy', ), atapi.StringField( 'decisionRule', required=False, searchable=True, storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u'Decision Rule'), description=_(u'Details about the decision rule for this study')), predicateURI=predicateURIBase + 'DecisionRule', ), ))
widget=atapi.TextAreaWidget( label='TextArea', maxlength=20, ), ), atapi.TextField( 'richtextfield', allowable_content_types=('text/plain', 'text/structured', 'text/restructured', 'text/html', 'application/msword'), widget=atapi.RichWidget(label='rich'), ), atapi.ReferenceField( 'referencefield', relationship='complextype', widget=atapi.ReferenceWidget(addable=1), allowed_types=('ComplexType', ), multiValued=1, ), )) + atapi.ExtensibleMetadata.schema class ComplexType(SimpleType): """A simple archetype""" schema = SimpleType.schema + schema archetype_name = meta_type = "ComplexType" portal_type = 'ComplexType' def _get_selection_vocab(self): return atapi.DisplayList((('Test', 'Test'), ))
description=_(u"desc_variation2_values", default=u""), visible={ 'view': 'invisible', 'edit': 'invisible' }, ), ), atapi.ReferenceField( 'supplier', required=0, languageIndependent=True, relationship='item_supplier', vocabulary_factory="ftw.shop.suppliers_vocabulary", widget=atapi.ReferenceWidget( label=_(u"label_supplier", default=u"Supplier"), description=_(u"desc_supplier", default=u""), checkbox_bound=10, ), ), )) class ShopItem(Categorizeable, ATCTContent): """A simple shop item""" implements(IShopItem) alsoProvides(IBuyable) meta_type = "ShopItem" schema = ShopItemSchema def SearchableText(self):
from bika.lims.config import PROJECTNAME from bika.lims.config import ManageClients from bika.lims import logger from bika.lims import bikaMessageFactory as _ ACTIVE_STATES = ["active"] schema = Person.schema.copy() + atapi.Schema( (atapi.ReferenceField('CCContact', schemata='Publication preference', vocabulary='getContacts', multiValued=1, allowed_types=('Contact', ), relationship='ContactContact', widget=atapi.ReferenceWidget( checkbox_bound=0, label=_("Contacts to CC"), )), )) schema['JobTitle'].schemata = 'default' schema['Department'].schemata = 'default' # Don't make title required - it will be computed from the Person's Fullname schema['title'].required = 0 schema['title'].widget.visible = False class Contact(Person): """A Contact of a Client which can be linked to a System User """ implements(IContact) schema = schema
widget=atapi.SelectionWidget( label=_(u"Notify Attendees by Email?"), description= _(u"Select which type of email notification to send to listed attendees" ), ), required=True, default=_(u"None"), vocabulary=[ 'None', 'One-time only', 'On every edit', ], ), atapi.ReferenceField(name='previousMeeting', widget=atapi.ReferenceWidget( label='Previous Meeting', ), allowed_types=('Meeting', ), multiValued=0, relationship='previous_meeting'), BackReferenceField( name='nextMeeting', widget=BackReferenceWidget( #widget=BackReferenceBrowserWidget( label='Next Meeting', ), allowed_types=('Meeting', ), multiValued=0, relationship='previous_meeting'), )) # Set storage on fields copied from ATFolderSchema, making sure # they work well with the python bridge properties.
description=_('Items to be included in email subject lines'), label=_("Email subject line"), ), ), atapi.ReferenceField( 'DefaultCategories', schemata=PMF('Preferences'), required=0, multiValued=1, vocabulary='getAnalysisCategories', vocabulary_display_path_bound=sys.maxint, allowed_types=('AnalysisCategory', ), relationship='ClientDefaultCategories', widget=atapi.ReferenceWidget( checkbox_bound=1, label=_("Default categories"), description=_( "Always expand the selected categories in client views"), ), ), atapi.ReferenceField( 'RestrictedCategories', schemata=PMF('Preferences'), required=0, multiValued=1, vocabulary='getAnalysisCategories', validators=('restrictedcategoriesvalidator', ), vocabulary_display_path_bound=sys.maxint, allowed_types=('AnalysisCategory', ), relationship='ClientRestrictedCategories', widget=atapi.ReferenceWidget( checkbox_bound=1,
from Products.ATContentTypes.content.folder import ATFolder from zope.interface import implements BiomarkerBodySystemSchema = KnowledgeObject.schema.copy() + QualityAssuredObjectSchema.copy() + PhasedObjectSchema.copy() \ + ResearchedObjectSchema.copy() + ATFolder.schema.copy() + atapi.Schema(( atapi.ReferenceField( 'bodySystem', enforceVocabulary=True, multiValued=False, relationship='bodySystemIndicatesFor', required=True, storage=atapi.AnnotationStorage(), vocabulary_display_path_bound=-1, vocabulary_factory=u'eke.knowledge.BodySystems', widget=atapi.ReferenceWidget( label=_(u'Organ'), description=_(u'The organ for which the biomarker indicates diseases.'), ), # No predicateURI here; the RDF output just names the organ, so we'll have to # link it manually during ingest. ), atapi.StringField( 'performanceComment', required=False, searchable=True, storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u'Performance Comment'), description=_(u'A description of biomarker performance with respect to this organ'), ), predicateURI='http://edrn.nci.nih.gov/rdf/rdfs/bmdb-1.0.0#PerformanceComment', ),