from Products.Archetypes import atapi from Products.Archetypes.interfaces import IObjectEditedEvent from Products.CMFCore.utils import getToolByName from Products.DataGridField import DataGridField, DataGridWidget from Products.DataGridField.Column import Column from five import grok from vindula.content.content.vindulanews import VindulaNews, VindulaNews_schema from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget from zope.interface import implements from vindula.services import MessageFactory as _ from vindula.services.config import PROJECTNAME from vindula.services.interfaces import IServico ServicoSchema = VindulaNews_schema.copy() + atapi.Schema(( atapi.ReferenceField('structures', multiValued=0, allowed_types=('OrganizationalStructure',), relationship='structures', widget=VindulaReferenceSelectionWidget( #default_search_index='SearchableText', typeview='list', label=_(u"Unidade Organizacional"), description=_(u"Selecione uma Unidade Organizacional."), ), required=True, validators = ('isNewStructure',), ),
from AccessControl import ClassSecurityInfo from zope.interface import implements from Products.Archetypes.atapi import * from vindula.content.content.vindulanews import VindulaNews, VindulaNews_schema 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 Products.UserAndGroupSelectionWidget.at import widget from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget VindulaPage_schema = VindulaNews_schema.copy() + Schema(( LinesField( 'themesNews', multiValued=1, accessor="ThemeNews", searchable=True, schemata='categorization', widget=KeywordWidget( label=_(u'Temas'), description=_(u'Selecione os temas da noticia.'), ), ), TextField( name='previewPage',
# coding=utf-8 from AccessControl import ClassSecurityInfo from zope.interface import implements from Products.Archetypes.atapi import * from Products.ATContentTypes.content import schemata, base from vindula.food.content.interfaces import IMenu from vindula.food import MessageFactory as _ from vindula.food.config import * from vindula.content.content.vindulanews import VindulaNews, VindulaNews_schema Menu_schema = VindulaNews_schema.copy() + Schema(( StringField( name='dias', widget=SelectionWidget(label=_(u"Dia do Prato"), description=_(u"Selecione em qual dia o prato e servido."), ), required=True, vocabulary='voc_dias', ), )) invisivel = {'view':'invisible','edit':'invisible',}