from zope.interface import implements from Products.Archetypes.atapi import * from Products.ATContentTypes.content.schemata import finalizeATCTSchema from Products.ATContentTypes.content.newsitem import ATNewsItemSchema from Products.ATContentTypes.content.newsitem import ATNewsItem from vindula.tile.content.interfaces import ITileAccordionItem from vindula.tile import MessageFactory as _ from vindula.tile.config import * TileAccordionItem_schema = ATNewsItemSchema.copy() invisivel = {'view':'invisible','edit':'invisible',} TileAccordionItem_schema['image'].widget.visible = invisivel TileAccordionItem_schema['imageCaption'].widget.visible = invisivel finalizeATCTSchema(TileAccordionItem_schema) class TileAccordionItem(ATNewsItem): """ TileAccordionItem """ security = ClassSecurityInfo() implements(ITileAccordionItem) portal_type = 'TileAccordionItem' _at_rename_after_creation = True
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin from Products.ATContentTypes.content.newsitem import ATNewsItem from Products.ATContentTypes.content.newsitem import ATNewsItemSchema from Products.PloneConfContentTypes.config import * ##code-section module-header #fill in your manual code here ##/code-section module-header schema = Schema((), ) ##code-section after-local-schema #fill in your manual code here ##/code-section after-local-schema PloneConfNewsItem_schema = ATNewsItemSchema.copy() + \ schema.copy() ##code-section after-schema #fill in your manual code here ##/code-section after-schema class PloneConfNewsItem(ATNewsItem): """ """ security = ClassSecurityInfo() implements(interfaces.IPloneConfNewsItem) meta_type = 'PloneConfNewsItem' _at_rename_after_creation = True
from plone.app.blob.field import FileField as MediaFileField except: from Products.Archetypes.atapi import FileField as MediaFileField try: from Products.LinguaPlone.public import * except ImportError: from Products.Archetypes.atapi import * SELECTION = DisplayList(( ('internal', 'Hochgeladene Datei'), ('external', 'Verlinkte Datei'), )) MediaSchema = ATNewsItemSchema.copy() MediaSchema['text'].primary = False MediaSchema = MediaSchema + Schema(( BooleanField( 'showimage', storage=AnnotationStorage(), widget=BooleanWidget( label=_(u"Show Image"), description=_(u"Display the Image beside the Body Text."), ), ), StringField( 'link',
# -*- coding: utf-8 -*- from zope.interface import implements from Products.Archetypes import atapi from Products.ATContentTypes.content import schemata from Products.ATContentTypes.content.newsitem import ATNewsItem, ATNewsItemSchema from museudigital.conteudos.config import PROJECTNAME from museudigital.conteudos.interfaces import ICapitulo CapituloSchema = ATNewsItemSchema.copy() schemata.finalizeATCTSchema(CapituloSchema, folderish=True, moveDiscussion=False) class Capitulo(ATNewsItem): """ """ implements(ICapitulo) meta_type = "Capitulo" schema = CapituloSchema _at_rename_after_creation = True atapi.registerType(Capitulo, PROJECTNAME)
# make the description field of NewsItems render HTML description = TextField('description', required=False, searchable=True, accessor="Description", mutator='setDescription', edit_accessor="getRawDescription", isMetadata=True, storage=MetadataStorage(), generateMode="mVc", validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', allowable_content_type=('text/html', 'text/x-html-safe'), schemata='default', widget=RichWidget( label=_(u'label_description', default=u'Description'), description=_(u'help_description', default=u'A short summary of the content.'), rows=25, allow_file_upload=zconf.ATDocument.allow_document_upload) ) del ATNewsItemSchema['description'] ATNewsItemSchema.addField(description) ATNewsItemSchema.moveField('description', after='title') finalizeATCTSchema(ATNewsItemSchema)
description_msgid='PloneShows_help_individualTixLink', i18n_domain='PloneShows', ), ), copied_fields['image'], copied_fields['imageCaption'], ), ) ##code-section after-local-schema #fill in your manual code here ##/code-section after-local-schema Show_schema = ATFolderSchema + ATNewsItemSchema.copy() + \ schema.copy() ##code-section after-schema #fill in your manual code here ##/code-section after-schema class Show(ATFolder, ATNewsItem): """ """ security = ClassSecurityInfo() implements(interfaces.IShow) meta_type = 'Show' _at_rename_after_creation = True
#Dheeraj Sagar, Malad(W) #Mumbai-400064, India ############################################################################### from Products.Archetypes.atapi import * from Products.ATContentTypes.content.newsitem \ import ATNewsItem as BaseClass from Products.ATContentTypes.content.newsitem \ import ATNewsItemSchema as DefaultSchema from Products.ATContentTypes.content.base import registerATCT from ubify.coretypes.config import PROJECTNAME schema = DefaultSchema.copy() class ATNewsItem(BaseClass): __doc__ = BaseClass.__doc__ + "(customizable version)" portal_type = BaseClass.portal_type archetype_name = BaseClass.archetype_name schema = schema registerATCT(ATNewsItem, PROJECTNAME)
widget=StringField._properties['widget']( label="URL", description="Actual location of source news item", label_msgid='PloneRSS_label_remoteUrl', description_msgid='PloneRSS_help_remoteUrl', i18n_domain='PloneRSS', ), ), ), ) ##code-section after-local-schema #fill in your manual code here ##/code-section after-local-schema rss_item_schema = ATNewsItemSchema.copy() + \ schema.copy() ##code-section after-schema #fill in your manual code here ##/code-section after-schema class rss_item(ATNewsItem): """ """ security = ClassSecurityInfo() implements(interfaces.Irss_item) meta_type = 'rss_item' _at_rename_after_creation = True
description_msgid='PloneSchooltimeShows_help_individualTixLink', i18n_domain='PloneSchooltimeShows', ), ), copied_fields['image'], copied_fields['imageCaption'], ), ) ##code-section after-local-schema #fill in your manual code here ##/code-section after-local-schema Show_schema = ATFolderSchema + ATNewsItemSchema.copy() + \ schema.copy() ##code-section after-schema #fill in your manual code here ##/code-section after-schema class Show(ATFolder, ATNewsItem): """ """ security = ClassSecurityInfo() implements(interfaces.IShow) meta_type = 'Show' _at_rename_after_creation = True
from Products.ATContentTypes.content.newsitem import ATNewsItemSchema from Products.PloneConfContentTypes.config import * ##code-section module-header #fill in your manual code here ##/code-section module-header schema = Schema(( ), ) ##code-section after-local-schema #fill in your manual code here ##/code-section after-local-schema PloneConfNewsItem_schema = ATNewsItemSchema.copy() + \ schema.copy() ##code-section after-schema #fill in your manual code here ##/code-section after-schema class PloneConfNewsItem(ATNewsItem): """ """ security = ClassSecurityInfo() implements(interfaces.IPloneConfNewsItem) meta_type = 'PloneConfNewsItem' _at_rename_after_creation = True
copied_fields['remoteUrl'], BooleanField( name='externalWindow', default=1, widget=BooleanWidget(label="Open Link in a New Window?", ), searchable=0, ), BooleanField( name='showInitiative', default=1, widget=BooleanWidget(label="Show Initiative?", ), searchable=0, ), )) InitiativeSchema = ATNewsItemSchema.copy() + schema.copy() #InitiativeSchema['remoteUrl'] = ATLinkSchema['remoteUrl'].copy() #InitiativeSchema['remoteUrl'].default = "" #InitiativeSchema['remoteUrl'].required = False #InitiativeSchema.['remoteUrl'].widget.description = "If not linking to an external site this field can be left as is" #InitiativeSchema.['remoteUrl'].widget.label = "URL" class Initiative(ATNewsItem): """ """ assocMimetypes = ( 'application/*', 'audio/*',
from vindula.content.content.interfaces import IVindulaNews from AccessControl import ClassSecurityInfo from zope.interface import implements from Products.Archetypes.atapi import * from Products.ATContentTypes.content.newsitem import ATNewsItemSchema from Products.ATContentTypes.content.newsitem import ATNewsItem from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget from Products.ATContentTypes.content.schemata import finalizeATCTSchema from vindula.content.config import * from plone.contentrules.engine.interfaces import IRuleAssignable from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget from vindula.content.content.requiredreadingschema import RequiredReadingSchema VindulaNews_schema = ATNewsItemSchema.copy() + RequiredReadingSchema.copy() + Schema(( LinesField( 'themesNews', multiValued=1, accessor="ThemeNews", searchable=True, schemata='categorization', widget=KeywordWidget( label=_(u'Temas'), description=_(u'Selecione os temas da noticia.'), ), ), ReferenceField('imageRelac',
if field in schema and related_item_default: schema.changeSchemataForField(field, 'default') field = 'excludeFromNav' if field in schema and exclude_from_nav_default: schema.changeSchemataForField(field, 'default') marshall_register(schema) return schema DocumentSchema = ATDocumentSchema.copy() finalizeATCTSchema(DocumentSchema, tag_default=False) document_schema = DocumentSchema NewsItemSchema = ATNewsItemSchema.copy() finalizeATCTSchema(NewsItemSchema, tag_default=False) newsitem_schema = NewsItemSchema EventSchema = ATEventSchema.copy() finalizeATCTSchema(EventSchema) event_schema = EventSchema FolderSchema = ATFolderSchema.copy() finalizeATCTSchema(FolderSchema, tag_default=False, related_item_default=False) folder_schema = FolderSchema FormSchema = FormFolderSchema.copy() finalizeATCTSchema(FormSchema, tag_default=False, related_item_default=False) form_schema = FormSchema
# -*- coding: utf-8 -*- from zope.interface import implements from Products.Archetypes import atapi from Products.ATContentTypes.content import schemata from Products.ATContentTypes.content.newsitem import ATNewsItem, ATNewsItemSchema from museudigital.conteudos.config import PROJECTNAME from museudigital.conteudos.interfaces import IAcervo AcervoSchema = ATNewsItemSchema.copy() schemata.finalizeATCTSchema(AcervoSchema, folderish=True, moveDiscussion=False) class Acervo(ATNewsItem): """ """ implements(IAcervo) meta_type = "Acervo" schema = AcervoSchema _at_rename_after_creation = True atapi.registerType(Acervo, PROJECTNAME)
widget = StringWidget(label = _(u'Slides URL'), description = _(u"Please enter the URL to the slides."), ), ), StringField('video', searchable = True, storage = AnnotationStorage(), widget = StringWidget(label = _(u'Video URL'), description = _(u"Please enter the URL to the video."), ), ), )) TalkSchema = ATNewsItemSchema.copy() + schema.copy() TalkSchema['title'].storage = AnnotationStorage() TalkSchema['description'].storage = AnnotationStorage() TalkSchema['text'].storage = AnnotationStorage() finalizeATCTSchema(TalkSchema, folderish=False, moveDiscussion=False) class Talk(ATNewsItem): """Talk """ implements(ITalk) portal_type = "Talk" _at_rename_after_creation = True
BooleanField( name='showInitiative', default=1, widget=BooleanWidget( label="Show Initiative?", ), searchable=0, ), ) ) InitiativeSchema = ATNewsItemSchema.copy() + schema.copy() #InitiativeSchema['remoteUrl'] = ATLinkSchema['remoteUrl'].copy() #InitiativeSchema['remoteUrl'].default = "" #InitiativeSchema['remoteUrl'].required = False #InitiativeSchema.['remoteUrl'].widget.description = "If not linking to an external site this field can be left as is" #InitiativeSchema.['remoteUrl'].widget.label = "URL" class Initiative(ATNewsItem): """ """
#You can also contact Cynapse at: #802, Building No. 1, #Dheeraj Sagar, Malad(W) #Mumbai-400064, India ############################################################################### from Products.Archetypes.atapi import * from Products.ATContentTypes.content.newsitem \ import ATNewsItem as BaseClass from Products.ATContentTypes.content.newsitem \ import ATNewsItemSchema as DefaultSchema from Products.ATContentTypes.content.base import registerATCT from ubify.coretypes.config import PROJECTNAME schema = DefaultSchema.copy() class ATNewsItem(BaseClass): __doc__ = BaseClass.__doc__ + "(customizable version)" portal_type = BaseClass.portal_type archetype_name = BaseClass.archetype_name schema = schema registerATCT(ATNewsItem, PROJECTNAME)
widget=BooleanWidget(label=_(u"External link"), description=_(u"Check to use external links on spnsor logos."), ), ), StringField('category', storage = AnnotationStorage(), vocabulary = CATEGORIES, widget = MultiSelectionWidget(label=_(u"Category"), description=_(u"Please select a category."), ), ), )) SponsorSchema = ATNewsItemSchema.copy() + schema.copy() SponsorSchema['title'].storage = AnnotationStorage() SponsorSchema['description'].storage = AnnotationStorage() SponsorSchema['text'].storage = AnnotationStorage() SponsorSchema['image'].widget.description = _(u'label_image_field', default = u'Logo or image of the sponsor') SponsorSchema['imageCaption'].widget.visible = {"edit": "invisible", "view": "invisible"} SponsorSchema['excludeFromNav'].default = True finalizeATCTSchema(SponsorSchema, folderish=False, moveDiscussion=False) class Sponsor(ATNewsItem): """Sponsor """ implements(ISponsor)