class LandItemExtender(object): """ Extender for LandItem """ implements(ISchemaExtender) fields = [ TextField("text", schemata="default", primary=True, allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', widget=atapi.RichWidget( label=_("Metadata"), description=_("Metadata for this item"))), StringField("embed", schemata="default", widget=atapi.TextAreaWidget( label=_("Map View"), description=_("Paste here the code provided " "by your webservice (iframe, jscode)"))), TextField( "webservices", schemata="default", primary=False, allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', widget=atapi.RichWidget( label=_("Web Map Services"), description=_("Web Map Services available for this data"))), TextField("download", schemata="default", primary=False, allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', widget=atapi.RichWidget( label=_("Download"), description=_("Download information"))), ImageField("legend", schemata="default", sizes=None, widget=atapi.ImageWidget( label=_("Legend"), description=_("Image for Legend"))), ] def __init__(self, context): self.context = context def getFields(self): return self.fields
class Extender(object): """ Extender """ implements(ISchemaExtender) fields = [ BooleanField( "frozen", schemata="default", widget=atapi.BooleanWidget( label=_("Freze this item"), description=_("Freeze this item and make it unclickable"))), ImageField("image", schemata="default", sizes=None, widget=atapi.ImageWidget( label=_("Thumbnail"), description=_("Image for thumbnail"))), StringField("url", schemata="default", widget=atapi.StringWidget( label=_("More details URL"), description=_("Provide an external link, if any"))), TextField("text", schemata="default", primary=True, allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', widget=atapi.RichWidget( label=_("Rich text"), description=_("Detailed body for this item"))), ] def __init__(self, context): self.context = context def getFields(self): return self.fields
default_method='getDefaultRefDraft', widget=ReferenceBrowserWidget(visible={ 'edit': 'invisible', 'view': 'visible' })), atapi.TextField( 'text', required=False, searchable=True, primary=True, storage=atapi.AnnotationStorage(), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', widget=atapi.RichWidget( description='', label=_(u'label_body_text', default=u'Body Text'), rows=25, allow_file_upload=True, ), ), )) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. CommentSchema['title'].storage = atapi.AnnotationStorage() CommentSchema['description'].storage = atapi.AnnotationStorage() CommentSchema['description'].widget.visible = { 'edit': 'invisible', 'view': 'invisible' } schemata.finalizeATCTSchema(CommentSchema, moveDiscussion=False)
rows=3)), # Using a bare ObjetField doesn't make sense ... #ObjectField('author'), atapi.StringField('author'), atapi.TextField('body', required=1, primary=1, searchable=1, default_output_type='text/html', allowable_content_types=('text/restructured', 'text/plain', 'text/html', 'application/msword'), widget=atapi.RichWidget(), ), 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',
atapi.StringField( 'sub_sector', storage=atapi.AnnotationStorage(), widget=atapi.SelectionWidget( label=_(u"Sub sector"), description=_(u"Organization's sub sector"), format='select', ), vocabulary_factory='contacts.sub_sectors', required=False, searchable=1, ), atapi.TextField( 'text', storage=atapi.AnnotationStorage(), widget=atapi.RichWidget(label=_(u"Text"), ), required=False, searchable=1, default_content_type='text/html', default_output_type='text/x-html-safe', ), )) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. OrganizationSchema['title'].storage = atapi.AnnotationStorage() OrganizationSchema['title'].widget.label = _('Name') OrganizationSchema['description'].storage = atapi.AnnotationStorage() OrganizationSchema['description'].widget.visible = { 'edit': 'invisible',
timestamp=1, ), ), atapi.TextField( 'textarea_maxlength', 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"
description=_(u"Engenharia reversa."), )), #atapi.StringField( # name="observacao", # required=False, # searchable=False, # widget=atapi.TextAreaWidget( # label=_(u"Observação"),), #), atapi.TextField( name='observacao', required=False, searchable=True, default_output_type='text/x-html-safe', widget=atapi.RichWidget( label='Observação', rows=10, ), ), atapi.StringField( name='status_ra', required=False, searchable=True, widget=atapi.SelectionWidget( label=_(u"Status da RA"), description=_(u"Selecione o status da RA"), format='select', ), vocabulary=[ '', 'Em aprovação', 'Nova', 'Atribuída', 'Executada', 'Aceita' ], ),
# # Schemata: Professional Information # atapi.LinesField(name='jobTitles', storage=atapi.AnnotationStorage(), widget=atapi.LinesField._properties['widget']( label=_(u"Job Titles"), description=_(u"One per line"), i18n_domain='gcommons.Users', ), schemata="Professional Information", searchable=True), atapi.TextField(name='biography', widget=atapi.RichWidget( label=_(u"Biography"), i18n_domain='gcommons.Users', ), schemata="Professional Information", searchable=True, validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', user_property='description'), atapi.LinesField(name='education', widget=atapi.LinesField._properties['widget']( label=_(u"FacultyStaffDirectory_label_education", default=u"Education"), i18n_domain='gcommons.Users', ), schemata="Professional Information", searchable=True), atapi.LinesField(
from rg.prenotazioni.interfaces import IPrenotazioniFolder from zope.interface import implements PrenotazioniFolderSchema = BaseFolderSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( 'descriptionAgenda', required=False, searchable=True, storage=atapi.AnnotationStorage(migrate=True), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', widget=atapi.RichWidget( description=("Inserire il testo di presentazione " "dell'agenda corrente"), label=_(u'Descrizione Agenda', default=u''), rows=10, allow_file_upload=zconf.ATDocument.allow_document_upload), ), atapi.DateTimeField( 'daData', storage=atapi.AnnotationStorage(), widget=atapi.CalendarWidget( label=_(u'Data inizio validità'), description=_(u""), show_hm=False, ), required=True, default=DateTime(), ), atapi.DateTimeField(
default=u'This will replace the placeholder [[UNSUBSCRIBE]].'), i18n_domain='EasyNewsletter', ), ), atapi.TextField( 'default_header', default= "[[SUBSCRIBER_SALUTATION]]<br />==================================", allowable_content_types=('text/plain', 'text/structured', 'text/html', 'application/msword'), default_output_type='text/html', widget=atapi.RichWidget( rows=10, label=_(u"EasyNewsletter_label_default_header", default=u"Header"), description=_( u'description_text_header', default=u'The default header text. This is used as a default \ for new issues. You can use the placeholders [[SUBSCRIBER_SALUTATION]] and [[UNSUBSCRIBE]] here.' ), i18n_domain='EasyNewsletter', ), ), atapi.TextField( 'default_footer', allowable_content_types=('text/plain', 'text/structured', 'text/html', 'application/msword'), default="==================================<br />[[UNSUBSCRIBE]]", default_output_type='text/html', widget=atapi.RichWidget( rows=10, label=_(u"EasyNewsletter_label_default_footer", default=u"Footer"), description=_(
MeetingSchema = folder.ATFolderSchema.copy() + event.ATEventSchema.copy( ) + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( 'agenda', required=False, searchable=True, storage=atapi.AnnotationStorage(), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', allowable_content_types=('text/plain', 'text/structured', 'text/html', 'application/msword'), widget=atapi.RichWidget( label=_(u"Agenda"), description=_(u"the agenda for the meeting"), rows=40, allow_file_upload=zconf.ATDocument.allow_document_upload, ), ), atapi.TextField( 'minutes', required=False, searchable=True, storage=atapi.AnnotationStorage(), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', allowable_content_types=('text/plain', 'text/structured', 'text/html', 'application/msword'), widget=atapi.RichWidget( label=_(u"Minutes"), description=_(u"the minutes of the meeting"),
RenoPrimeSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( 'text_above_map', required=False, searchable=True, primary=True, storage=atapi.AnnotationStorage(migrate=True), validators=('isTidyHtmlWithCleanup', ), #validators=('isTidyHtml',), default_output_type='text/x-html-safe', widget=atapi.RichWidget( description='', label=_(u'label_before_map', default=u'Text before map'), rows=25, allow_file_upload=zconf.ATDocument.allow_document_upload), ), atapi.TextField( 'text_below_map', required=False, searchable=True, storage=atapi.AnnotationStorage(migrate=True), validators=('isTidyHtmlWithCleanup', ), #validators=('isTidyHtml',), default_output_type='text/x-html-safe', widget=atapi.RichWidget( description='', label=_(u'label_below_map', default=u'Text below map'),
# bekam from bekam.veiculos.content.interfaces import IDestaque from bekam.veiculos.config import PROJECTNAME from bekam.veiculos import _ # Schema definition schema = ATContentTypeSchema.copy() + atapi.Schema(( atapi.TextField( name='text', required=False, searchable=False, storage=atapi.AnnotationStorage(migrate=True), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u'label_text', u'Texto'), rows=20, allow_file_upload=False, ), ), ImageField( name='image', sizes={ 'large': (768, 768), 'preview': (400, 400), 'mini': (200, 200), 'thumb': (128, 128), 'tile': (64, 64), 'icon': (32, 32), 'listing': (16, 16), }, required=False,
from archetypes.referencebrowserwidget import ReferenceBrowserWidget except ImportError: from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget TablePageSchema = ATDocumentSchema.copy() + atapi.Schema(( atapi.TextField('textBefore', required=False, searchable=True, storage=atapi.AnnotationStorage(migrate=True), validators=('isTidyHtmlWithCleanup',), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u'label_text_before', default=u'Text before the table'), visible={'view': 'invisible', 'edit': 'visible'}, rows=25, allow_file_upload=zconf.ATDocument.allow_document_upload), ), DataGridField('pageColumns', required=True, storage=atapi.AnnotationStorage(), columns=("id", "label", "description", "type", "vocabulary", "options"), widget=DataGridWidget( label=_(u"Columns"), description=_('help_pageColumns', default=u"Definition of rows inside the table"), visible={'view': 'invisible', 'edit': 'visible'}, helper_js=('datagridwidget.js', 'datagridwidget_patches.js', 'datagridmultiselect.js'), columns={
widget=ateapi.RecordsWidget( description="Other key-value pairs to characterise "\ "this item. Use this specifically to signal information "\ "that you think should be included in the fields above." ), ), atapi.TextField('text', required=False, searchable=True, primary=True, storage=atapi.AnnotationStorage(migrate=True), validators=('isTidyHtmlWithCleanup',), default_output_type='text/x-html-safe', widget=atapi.RichWidget( description=u'Any other additional information not '\ 'covered so far.', label=u'Text', rows=15, ), ), )) class CommonUtilities(object): """Mixin class to provide shared functionality across content types""" def identifierTypes(self, instance): """Controlled vocabulary for the supported PID systems""" return ateapi.getDisplayList(instance, 'identifier_types', add_select=True)
validators=(), widget=atapi.StringWidget( description='Office room number.', label=_(u'Office Room Number', default=u'Office Room Number'), )), atapi.TextField('education', required=False, searchable=False, default="", validators=(), allowable_content_types=('text/html', ), default_output_type='text/html', widget=atapi.RichWidget( allow_file_upload=False, description='Staff member educational information.', label=_(u'Education Information', default=u'Education Information'), )), atapi.TextField('background', required=False, searchable=False, default="", validators=(), allowable_content_types=('text/html', ), default_output_type='text/html', widget=atapi.RichWidget( allow_file_upload=False, description='Staff member background information.', label=_( u'Professional Background Information', default=u'Professional Background Information'),
from Products.Archetypes import atapi from Products.Archetypes.config import PKG_NAME from Products.CMFCore.permissions import setDefaultRoles from AccessControl import ClassSecurityInfo schema = atapi.BaseSchema + atapi.Schema(( atapi.TextField( 'body', required=1, searchable=1, default_output_type='text/html', allowable_content_types=('text/plain', 'text/restructured', 'text/html', 'application/msword'), widget=atapi.RichWidget( description="""Enter or upload text for the Body of the document""" ), ), atapi.StringField('ptype', default_method='Type'), )) class SimpleType(atapi.BaseContent): """A simple archetype""" schema = schema atapi.registerType(SimpleType, PKG_NAME) TestView = 'Archetypes Tests: Protected Type View' setDefaultRoles(TestView, ( 'Anonymous',
from uwosh.itdocs.interfaces import IBusinessRequirementsDocument from uwosh.itdocs.config import PROJECTNAME from Products.ATContentTypes.configuration import zconf BusinessRequirementsDocumentSchema = folder.ATFolderSchema.copy( ) + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( 'businessworkflow', storage=atapi.AnnotationStorage(), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u'Business Workflow'), rows=25, description=_(u''), ), default='Example created in MS Visio', ), atapi.TextField( 'businessrequirements', storage=atapi.AnnotationStorage(), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u'Business Requirements'), rows=25, description=_(u''), ), default='', ),
from zope.interface import implements from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import IBuzz from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema + atapi.Schema(( atapi.TextField( 'body', widget=atapi.RichWidget( label=_(u"label_psc_detailed_info", default=u"Detailed information"), description=_( u"help_buzz_body", default=u"Enter the details description about this buzz."), i18n_domain='ploneservicescenter', ), allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', required=0, searchable=1, ), atapi.ImageField( 'logo', widget=atapi.ImageWidget( label=_(u"label_general_logo", default=u"Logo"), description=_( u"help_buzz_logo",
name="imageCaption", widget=atapi.StringWidget( label=u"Image Caption", description=u"Image Caption Here", ), ), atapi.StringField( name="insettitle", widget=atapi.StringWidget(label=u"Small Collumn Title", description=u"This text will be blue"), ), atapi.TextField( name="insetcolumn", widget=atapi.RichWidget( label=u"Small Column Text", description=u"for blue headings pick the blueheading style", width="40", ), searchable=True, validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', ), )) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. DssTwoCollumnPageSchema['title'].storage = atapi.AnnotationStorage() DssTwoCollumnPageSchema['description'].storage = atapi.AnnotationStorage() schemata.finalizeATCTSchema(DssTwoCollumnPageSchema, moveDiscussion=False)
description= _(u'URL to a api that allows querying biomarker ids for links and alternative ids of external resources.' ), size=60, ), ), atapi.TextField( 'disclaimer', required=False, storage=atapi.AnnotationStorage(), searchable=False, validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u'Disclaimer'), description=_( u'Legal disclaimer to display on Biomarker Folder pages.'), rows=10, )), atapi.StringField( 'bmSumDataSource', required=True, storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u'Biomarker Summary Statistics Data Source'), description= _(u'URL to a source of summary statistics json that describes biomarker data.' ), size=60, ), ), atapi.StringField(
label=u"Top Image", description= u"this is a medium image. Optimum resolution is 750x422", ), ), atapi.StringField( name="imageCaption", widget=atapi.StringWidget( label=u"Image Caption", description=u"Image Caption Here", ), ), atapi.TextField( name="faculty", widget=atapi.RichWidget( label=u"Faculty Names", description=u"", ), searchable=True, validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', ), atapi.StringField( name="units", widget=atapi.StringWidget( label=u"units", description=u"", ), ), atapi.StringField( name="prerequs", widget=atapi.StringWidget(
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, searchable = True ), atapi.StringField( name = 'Phone', default_output_type='text/x-html-safe', widget = atapi.StringWidget( label=u'Phone', label_msgid='isaw.facultycv_label_Phone', il8n_domain='isaw.facultycv', ),
from Products.Archetypes import atapi from Products.ATContentTypes.content import folder from Products.ATContentTypes.content import schemata from crgis.atcontents import atcontentsMessageFactory as _ from crgis.atcontents.interfaces import IPilgrimage from crgis.atcontents.config import PROJECTNAME PilgrimageSchema = folder.ATFolderSchema.copy() + atapi.Schema( (atapi.TextField( 'body', storage=atapi.AnnotationStorage(), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u"Body"), rows=20, ), ), )) # Set storage on fields copied from ATFolderSchema, making sure # they work well with the python bridge properties. PilgrimageSchema['title'].storage = atapi.AnnotationStorage() PilgrimageSchema['description'].storage = atapi.AnnotationStorage() PilgrimageSchema['title'].widget.label = _(u'Pilgrimage Title') PilgrimageSchema['effectiveDate'].widget.label = _(u'Pilgrimage StartDate') PilgrimageSchema['effectiveDate'].widget.description = _( u'Pilgrimage StartDate Description') PilgrimageSchema['expirationDate'].widget.visible = { 'edit': 'invisible', 'view': 'invisible'
label_msgid='EEAContentTypes_label_embed', i18n_domain='eea',), ), atapi.TextField( schemata='default', name='full_story_description', languageIndependent=False, searchable=True, required_for_published=False, required=False, allowable_content_types=('text/html',), default_content_type='text/html', default_output_type='text/x-html-safe', widget=atapi.RichWidget( label='Full story description', description=('Full story description should be added here.'), label_msgid='EEAContentTypes_label_full_story_description', i18n_domain='eea', rows=10,), ), EEAReferenceField('relatedItems', schemata='categorization', relationship='relatesTo', multiValued=True, languageIndependent=True, keepReferencesOnCopy=True, validators = (('maxRelatedItems', V_REQUIRED),), widget=EEAReferenceBrowserWidget( label='Related items', description='Specify relations to other content within Plone.') ), ))
schema = atapi.Schema(( atapi.TextField( name='summary', searchable=True, storage=atapi.AnnotationStorage(), allowable_content_types=('text/html', ), default_content_type='text/html', validators=('isTidyHtmlWithCleanup', ), default_input_type='text/html', default_output_type='text/x-html-safe', widget=atapi.RichWidget( rows=4, label=_(u'summary'), allow_file_upload=False, ) ), atapi.TextField( name='generalinformation', searchable=True, storage=atapi.AnnotationStorage(), allowable_content_types=('text/html', ), default_content_type='text/html', validators=('isTidyHtmlWithCleanup', ), default_input_type='text/html', default_output_type='text/x-html-safe', widget=atapi.RichWidget( rows=4,
) + atapi.Schema(( atapi.StringField( 'Project', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Component"), description=_(u"Component name or label"), ), default=_(''), ), atapi.TextField( 'questions', storage=atapi.AnnotationStorage(), widget=atapi.RichWidget( label=_(u"Function"), description=_(u"Describe the function of the component"), rows=10, ), default='', ), # run instructions need to be implemented atapi.TextField( 'questions', storage=atapi.AnnotationStorage(), widget=atapi.RichWidget( label=_(u"Additional Information"), description= _(u"ex: Information for the system is in the document: _SystemInfo.doc" ), rows=20,
TaskSchema = document.ATDocumentSchema.copy() + \ atapi.Schema(( atapi.TextField( name='text', searchable=True, required=False, default_content_type='text/html', allowable_content_types=('text/html',), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', default_input_type='text/html', storage=atapi.AnnotationStorage(), widget=atapi.RichWidget( label=_(u'task_label_text', default=u'Text'), description=_(u'task_help_text', default=u''))), atapi.DateTimeField( name='start_date', required=True, searchable=True, accessor='start', default_method='default_start_date', widget=FtwCalendarWidget( label=_(u'task_label_start_date', default=u'Start of Task'), description=_(u'task_help_start_date', default=u'Enter the starting date and time, ' 'or click the calendar icon and select it.'), visible={'edit': 'invisible', 'view': 'invisible'})),
storage=atapi.AnnotationStorage(), default_output_type='text/x-html-safe', widget=atapi.LabelWidget( label=_(u'Operation'), rows=25, description=_(u'How to run this query'), ), default='', ), atapi.TextField( 'parameters', storage=atapi.AnnotationStorage(), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u'Parameters'), rows=25, description=_(u'Parameters to enter for this query'), ), default='', ), atapi.TextField( 'additionalinfo', storage=atapi.AnnotationStorage(), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u'Additional Information'), rows=25, description=_(u''), ), default= 'Information for the system is in the document: _SystemInfo.doc',
# type=['File', 'ArquivoBiblioteca'], # required=True, # multiValued=True, # ) FileField( name='anexos', title=u'Anexo', description=u'É obrigatório a inserção de pelo menos um anexo', required=True, ), )) BoaPratica_schema['description'].default_content_type = 'text/html' BoaPratica_schema['description'].allowable_content_types = ('text/html', ) BoaPratica_schema['description'].default_output_type = 'text/html' BoaPratica_schema['description'].widget = atapi.RichWidget( label=u'Descrição', allow_file_upload=False) schemata.finalizeATCTSchema(BoaPratica_schema, folderish=True) class BoaPratica(folder.ATFolder): """ Reserve Content for BoaPratica""" implements(IBoaPratica) portal_type = 'BoaPratica' schema = BoaPratica_schema _at_rename_after_creation = True