required=False, searchable=True, storage=AnnotationStorage(), validators=('isTidyHtmlWithCleanup',), default_output_type='text/x-html-safe', widget=RichWidget( i18n_domain="ploneboard", label="Text", label_msgid="label_text", rows=25), ), LinesField('categories', widget = LinesWidget( description = \ "Enter the categories you want to have available for " "forums, one category on each line.", description_msgid = "help_categories_board", label = "Categories", label_msgid = "label_categories_board", i18n_domain = "ploneboard")), )) utils.finalizeSchema(schema) class Ploneboard(BrowserDefaultMixin, ATBTreeFolder): """Ploneboard is the outmost board object, what shows up in your site.""" implements(IPloneboard) meta_type = 'Ploneboard' schema = schema _at_rename_after_creation = True
from Products.ATContentTypes.content.base import registerATCT from Products.ATContentTypes.atct import ATFolder from Products.ATContentTypes.content.folder import ATFolderSchema from Products.CMFPlone.interfaces import IPloneSiteRoot from field import getTitledPath from storage import CAT_CONTAINER BaseCategorySchema = ATFolderSchema.copy() schema = BaseCategorySchema + Schema((LinesField( 'synonyms', searchable=True, widget=LinesWidget( description='Enter a value for synonyms.', description_msgid='help_synonyms', i18n_domain='videolibrary', label='Synonyms', label_msgid='label_synonyms', ), ), )) def getFullTitledPath(obj, titles=None): if titles is None: titles = list() if not hasattr(obj, 'getId') or not hasattr(obj, 'Title'): return () if obj.getId() != CAT_CONTAINER: titles.insert(0, obj.Title()) titles = getFullTitledPath(obj.aq_inner.aq_parent, titles) return tuple(titles)
TextField( 'xpproject_text', searchable = True, required = True, default_output_type = 'text/x-html-safe', widget = RichWidget( label = 'Project body', rows = 22, ), ), # developers for this project LinesField( 'xpproject_developers', searchable = False, required = True, vocabulary = 'vocabulary_allMembersList', widget = InAndOutWidget( label = 'Developers', descrpiton = "Please select developers for this project", ), ), # modules LinesField( 'xpproject_modules', searchable = False, required = True, widget = LinesWidget( label = 'Project Modules', description = 'Please specify the module for your project, one per line', cols = 40, ), ),
i18n_domain="SimpleBlog", description='Breve descripciĆ³n para este folder.'), ), ComputedField('existingCats', expression='here.getInheritedCategories()', widget=ComputedWidget( label='Existing categories.', label_msgid="label_blogfolder_existing_cats", i18n_domain="SimpleBlog", )), LinesField( 'categories', widget=LinesWidget( label='Additional categories', label_msgid="label_additional_categories", description_msgid="help_additional_categories", i18n_domain="SimpleBlog", description= 'Supply a list of possible additional categories that will be available to BlogEntries inside this folder or in sub folders.' ), ))) class BlogFolder(ATCTFolder): """ A folder object to store BlogEntries in """ schema = schema def canSetDefaultPage(self):
vocabulary='listUsers', languageIndependent=1), ReferenceField( name="members", relationship=GROUP_RELATIONSHIP, multiValued=1, languageIndependent=1, allowed_types=( 'Member', 'TestMember', ), vocabulary='listUsers', ), LinesField( name="roles_", accessor='getRoles', mutator='setRoles', ), )) # Make the group title and description user properties group['title'].user_property = True group['description'].user_property = True @implementer(group_ifaces.IGroup, IGroupPropertiesProvider) class TestGroup(BaseFolder): """A group archetype for testing""" schema = group security = ClassSecurityInfo()
'label': _('Client ID') }], ), ), StringField('ClientBatchID', required=0, widget=StringWidget(label=_("Client Batch ID"))), DateTimeField( 'BatchDate', required=False, widget=DateTimeWidget(label=_('Date'), ), ), LinesField('BatchLabels', vocabulary="BatchLabelVocabulary", accessor="getLabelNames", widget=MultiSelectionWidget( label=_("Batch Labels"), format="checkbox", )), RemarksField('Remarks', searchable=True, widget=RemarksWidget(label=_('Remarks'), )), ReferenceField( 'InheritedObjects', required=0, multiValued=True, allowed_types=('AnalysisRequest'), # batches are expanded on save referenceClass=HoldingReference, relationship='BatchInheritedObjects', widget=ReferenceWidget(visible=False, ), ),
label="Biography", description= "A short overview of who you are and what you do. Will be displayed on the your author page, linked from the items you create." ), ), StringField( 'location', languageIndependent=1, user_property=True, widget=StringWidget(label="Location", description="User's Location."), ), LinesField( 'sites', languageIndependent=1, user_property=True, widget=LinesWidget( label="Sites", description="How user associate with sites", ), ), LinesField( # not 'roles' b/c 'validate_roles' exists; stoopid Archetypes name="roles_", accessor='getRoles', mutator='setRoles', languageIndependent=1, vocabulary='getRoleSet', multiValued=1, widget=MultiSelectionWidget( label="Roles", description="Roles that member has.",
from collective.cart.shipping import PROJECTNAME from collective.cart.shipping import _ from collective.cart.shipping.interfaces import IShippingMethodAnnotations from collective.cart.shipping.interfaces import IShippingMethodContentType from persistent import Persistent from zope.interface import implements ShippingMethodSchema = ATContentTypeSchema.copy() + Schema(( LinesField( name='from_country', required=False, searchable=False, languageIndependent=True, storage=AnnotationStorage(), widget=MultiSelectionWidget( label=_(u'From Country'), description=_( u'Select countries from which this shipping method is applied.' ), size='15', ), vocabulary_factory="collective.cart.shipping.countries", enforceVocabulary=True, ), LinesField( name='to_country', required=False, searchable=False, languageIndependent=True, storage=AnnotationStorage(), widget=MultiSelectionWidget( label=_(u'To Country'),
widget=StringWidget( label=_("CC Emails"), description=_( "Default Emails to CC all published ARs for this client"), visible={ "edit": "visible", "view": "visible", }, ), ), LinesField( "EmailSubject", schemata="Preferences", default=[ "ar", ], vocabulary=EMAIL_SUBJECT_OPTIONS, widget=MultiSelectionWidget( description=_("Items to be included in email subject lines"), label=_("Email subject line"), ), ), ReferenceField( "DefaultCategories", schemata="Preferences", required=0, multiValued=1, vocabulary="getAnalysisCategories", vocabulary_display_path_bound=sys.maxint, allowed_types=("AnalysisCategory", ), relationship="ClientDefaultCategories", widget=ReferenceWidget(
'postcode': Column("Postcode"), 'country': Column("Country") }, ), schemata='Contact', ), # groups for this person LinesField( 'xpcm_contact_groups', searchable=True, required=False, vocabulary="vocabulary_contactGroups", widget=InAndOutWidget( label=u'Groups', description="Please select groups for this person", ), schemata='Contact', ), # memo for this contact. TextField( 'xpcm_contact_memo', searchable=True, required=False, default_output_type='text/x-html-safe', widget=RichWidget( label=u'Contact Memo', rows=22,
label_msgid='label_extend', description_msgid='help_extend', i18n_domain='plone', allow_file_upload=False, cols=40, rows=5), schemata='cbentry_extented_fields', ), #Category LinesField( 'entry_categories', required=True, widget=CategoryWidget( label='Category(s)', description='', label_msgid='label_entry_categories', description_msgid='help_entry_categories', i18n_domain='plone', ), index='KeywordIndex', ), LinesField( 'tags', required=False, widget=CategoryWidget( label='Tag(s)', description='', label_msgid='label_entry_categories', description_msgid='help_entry_categories', i18n_domain='plone', visible={
searchable=False, required=True, vocabulary='getProjectModules', default='mosapp', widget=SelectionWidget( label="Module", description="Select the module for this story", format='select'), ), # select the release that this story will be included. LinesField( 'xpstory_releases', searchable=True, required=True, vocabulary='vocabulary_releases', widget=InAndOutWidget( label='Planned Releases', description='Select planned releases for this story', ), ), ), ) finalizeATCTSchema(XPointStorySchema) # we don't need description here. XPointStorySchema['description'].widget.visible = False # the XPointStory class. class XPointStory(ATFolder): """XPoint Story for a XPointProject"""
from Products.ATContentTypes.interfaces import IATFolder from Products.ATContentTypes.atct import ATFolder from Products.ATContentTypes.atct import ATFolderSchema from Products.ATContentTypes.content.schemata import finalizeATCTSchema from iscorpio.plonerm.config import PROJECTNAME # define the schema... PRMResourcesSchema = ATFolderSchema.copy() + Schema(( # the available manufacturers. LinesField( 'prmManufacturers', searchable = False, required = True, widget = LinesWidget( label = 'Avilable Manufacturers', description = 'Please specify available manufactures. One line for each', ), ), # The unique sequence will serve all resources managed under here. IntegerField( 'prmUniqueSequence', default = 0, # hide for view mode. widget = IntegerWidget( label = 'Unique Sequence', description = 'This sequence will generate unique ids for this address book', ), ),
widget = SelectionWidget( label = 'Priority', description = 'Set the new priority for this artifact', format = 'select', ), default_method = 'getCurrentArtifactPriority', schemata = 'Metadata', ), # tags LinesField( 'xppm_response_tags', mutator = 'setXppm_response_tags', vocabulary = "vocabulary_artifactTag", widget = InAndOutWidget( label = u'Tags', description = "Please select the tags for this artifact", ), default_method = 'getCurrentArtifactTags', #schemata = 'Properties', schemata = 'Metadata', ), # story StringField( 'xppm_response_story', mutator = 'setXppm_response_story', searchable = False, required = False, vocabulary = 'vocabulary_allStoriesList', widget = SelectionWidget( label = 'Story',
widget=TextAreaWidget( description="Brief description of the forum topic.", description_msgid="help_description_forum", label="Description", label_msgid="label_description_forum", i18n_domain="ploneboard", rows=5 ) ), LinesField('category', write_permission=ManageForum, vocabulary='getCategories', widget=MultiSelectionWidget( description="Select which category the forum should be listed " "under. A forum can exist in multiple categories, " "although using only one category is recommended.", description_msgid="help_category", condition="object/getCategories", label="Category", label_msgid="label_category", i18n_domain="ploneboard", ) ), IntegerField('maxAttachments', write_permission=ManageForum, default=1, widget=IntegerWidget( description="Select the maximum number of attachments per comment.", description_msgid="help_maxattachments", label="Maximum number of attachments", label_msgid="label_maxattachments", i18n_domain="ploneboard",
description_msgid="help_event_announcement", label="Event Announcement", label_msgid="label_event_announcement", rows=25, i18n_domain="plone", allow_file_upload=zconf.ATDocument.allow_document_upload, ), ), LinesField( 'eventType', required=True, searchable=True, write_permission=ChangeEvents, vocabulary='getEventTypes', languageIndependent=True, widget=MultiSelectionWidget( size=6, description="", description_msgid="help_event_type", label="Event Type(s)", label_msgid="label_event_type", i18n_domain="plone", ), ), StringField( 'eventUrl', required=False, searchable=True, accessor='event_url', write_permission=ChangeEvents, validators=('isURL', ), widget=StringWidget(
from email.MIMEMultipart import MIMEMultipart from ZODB.POSException import ConflictError from Products.XPointContactManagement.config import PROJECTNAME from Products.XPointContactManagement.content.base import XPCMBase XPointMsgFolderSchema = ATFolderSchema.copy() + Schema(( # the unique sequence will serve contact, contact group, and contact # metadata. LinesField( 'xpcm_emsg_senders', required = True, # hide for view mode. widget = LinesWidget( label = "Message Senders' Emails", description = 'Set up the senders email addresses here, you may use format like this: <firstname secondname> [email protected]', ), ), ) ) # Plone 3 will re-organize all fields' shemata by using this method. finalizeATCTSchema(XPointMsgFolderSchema) # customizing the schema: set visible and location of fields. # here comes the class. class XPointMsgFolder(XPCMBase, ATFolder): """XPointMsgFolder will be the folder for contact information.
required=False, vocabulary='vocabulary_allStoriesList', widget=SelectionWidget( label='Story', description='stories related to this artifact', format='select', ), schemata='Metadata', ), # tags LinesField( 'xppm_artifact_tags', vocabulary="vocabulary_artifactTag", widget=InAndOutWidget( label=u'Tags', description="Please select the tags for this artifact", ), #schemata = 'Properties', schemata='Metadata', ), # attachment FileField( 'xppm_artifact_attachment', widget=FileWidget( label="Attachment", description="You may upload a file here:", ), storage=AttributeStorage(), schemata='Metadata', ),
SelectColumn('Sample Point', vocabulary='Vocabulary_SamplePoint'), 'SampleMatrix': SelectColumn('Sample Matrix', vocabulary='Vocabulary_SampleMatrix'), 'SampleType': SelectColumn('Sample Type', vocabulary='Vocabulary_SampleType'), 'ContainerType': SelectColumn('Container', vocabulary='Vocabulary_ContainerType'), 'Analyses': LinesColumn('Analyses'), 'Profiles': LinesColumn('Profiles'), })) Errors = LinesField('Errors', widget=LinesWidget( label=_('Errors'), rows=10, )) schema = BikaSchema.copy() + Schema(( OriginalFile, Filename, NrSamples, ClientName, ClientID, ClientOrderNumber, ClientReference, Contact, CCContacts, Batch, SampleData, Errors,
multiValued=1, languageIndependent=1, allowed_types=('SimpleMember', ), vocabulary='listUsers', widget=ReferenceWidget( label='Associated group members', description='''\ Members of this group that are really from other groups''', ), ), LinesField( # not 'roles' b/c 'validate_roles' exists; stoopid Archetypes name="roles_", accessor='getRoles', languageIndependent=1, vocabulary='getRoleSet', multiValued=1, widget=MultiSelectionWidget( label="Roles", description="Roles that members of this group should receive.", ), ), )) @implementer(IGroup) class SimpleGroup(BaseFolder): """A simple group archetype""" schema = SimpleSchema _at_rename_after_creation = True security = ClassSecurityInfo()
), BlobFileField( "MethodDocument", # XXX Multiple Method documents please widget=FileWidget( label=_("Method Document"), description=_("Load documents describing the method here"), )), # The instruments linked to this method. Don't use this # method, use getInstrumentUIDs() or getInstruments() instead LinesField( "_Instruments", vocabulary="getInstrumentsDisplayList", widget=MultiSelectionWidget( modes=("edit"), label=_("Instruments"), description=_( "The selected instruments have support for this method. " "Use the Instrument edit view to assign " "the method to a specific instrument"), ), ), # All the instruments available in the system. Don't use this # method to retrieve the instruments linked to this method, use # getInstruments() or getInstrumentUIDs() instead. LinesField("_AvailableInstruments", vocabulary="_getAvailableInstrumentsDisplayList", widget=MultiSelectionWidget(modes=("edit"), )), # If no instrument selected, always True. Otherwise, the user will # be able to set or unset the value. The behavior for this field
searchable=False, required=False, widget=IntegerWidget( label='Actual Used Hours', descrpiton='Put here the actual used hours for this task', ), ), # owner of this task.??? select from membership. # getToolByName(self, 'portal_membership') LinesField( 'xptask_owners', index='KeywordIndex:schema', searchable=False, required=False, vocabulary='vocabulary_developers', widget=InAndOutWidget( label='Task Owner(s)', descrpiton="Please select owners for this task", ), ), ), ) finalizeATCTSchema(XPointTaskSchema) # set the description field to invisible, we are not going to use it # for a task. XPointTaskSchema['description'].widget.visible = False # the content type class.
searchable=False, required=True, vocabulary='vocabulary_iterations', widget=SelectionWidget( label=u'Iteration Plan', description=u'Select the iteration plan for this story', format='select', ), ), # use cases for this story. LinesField( 'xppm_use_cases', searchable=False, required=False, vocabulary='vocabulary_useCases', widget=InAndOutWidget( label='Story Use Case(s)', descrpiton="Please select use cases for this story", ), ), # planned completed date, 90% finish deadline DateTimeField( 'xppm_completion_date', searchable=False, required=True, widget=CalendarWidget( label='90% Completion Deadline', description= 'Specify the date when this task should be completed at less 90%', #starting_year = 2007,
from leocornus.bookkeeping.config import PROJECTNAME from leocornus.bookkeeping.interface import IBKFolder __author__ = 'Sean Chen' __email__ = '*****@*****.**' # define a PPMProject as a folder in plone site. BKFolderSchema = ATBTreeFolderSchema.copy() + Schema(( # modules LinesField( 'bk_transaction_types', accessor = 'transactionTypes', searchable = False, required = True, default = ('Expense', 'Income'), widget = LinesWidget( label = 'Transaction Types', description = 'Please specify the transaction types, one per line', cols = 40, ), ), # the unique sequence will serve IntegerField( 'bk_unique_sequence', default = 0, # hide for view mode. widget = IntegerWidget( label = 'Unique Sequence', description = 'This sequence will generate unique ids for all artifacts in this folder.', ),
IntegerField('maxitems', schemata="display", default=0, widget=IntegerWidget( label=_(u"Maximum items"), description=_(u'Number of items visible in widget'), )), BooleanField('sortreversed', schemata="display", widget=BooleanWidget( label=_(u"Reverse options"), description=_(u"Sort options reversed"), )), LinesField('default', schemata="default", widget=LinesWidget( label=_(u'Default value'), description=_(u'Default items (one per line)'), i18n_domain="eea")), )) class Widget(CountableWidget): """ Widget """ # Widget properties widget_type = 'checkbox' widget_label = _('Checkboxes') view_js = '++resource++eea.facetednavigation.widgets.checkbox.view.js' edit_js = '++resource++eea.facetednavigation.widgets.checkbox.edit.js' view_css = '++resource++eea.facetednavigation.widgets.checkbox.view.css' edit_css = '++resource++eea.facetednavigation.widgets.checkbox.edit.css'
) implicitdesc = "" implicit = BooleanField('implicit', default=0, index="lens_catalog/FieldIndex:brains", widget=BooleanWidget(label="Also select contents?", description=implicitdesc, i18n_domain="rhaptos")) namespace_tagsdesc = "Add words you associate with this content. Separate each tag with a space." namespaceTags = LinesField( 'namespaceTags', #required=1, searchable=1, index="lens_catalog/KeywordIndex:brains", widget=LinesWidget(label="Namespace Tags", description=namespace_tagsdesc, i18n_domain="rhaptos"), ) # TODO: there's a TagIndex at http://svn.plone.org/svn/collective/Tags/trunk/indexes.py tagsdesc = "Add words you associate with this content. Separate each tag with a space." tags = LinesField( 'tags', #required=1, searchable=1, index="lens_catalog/KeywordIndex:brains", widget=LinesWidget( label="Tags", # TODO: TagsWidget? description=tagsdesc,