Exemple #1
0
from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from zope.interface import implements
import interfaces
from uwosh.bulletin.config import *
from Products.ATContentTypes.content.document import ATDocument, ATDocumentSchema

InfoPageSchema = ATDocumentSchema.copy()
InfoPageSchema['title'].widget.label = "Info Page Title"
InfoPageSchema['text'].widget.label = "Info Page Body Text"

class InfoPage(ATDocument):
    
    implements(interfaces.IInfoPage, interfaces.IBatchPrintable)
    
    security = ClassSecurityInfo()
    schema = InfoPageSchema
    portal_type = "InfoPage"
    archetype_name = "InfoPage"
    meta_type = "InfoPage"

    
registerType(InfoPage, PRODUCT_NAME)
from Products.ATContentTypes.content.document import ATDocumentSchema
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

PloneConfDocument_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class PloneConfDocument(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IPloneConfDocument)

    meta_type = 'PloneConfDocument'
    _at_rename_after_creation = True
from Products.ATContentTypes.content.document import ATDocumentSchema, ATDocumentBase
from vindula.controlpanel.content.interfaces import IRedirectUser

from zope.interface import implements
from archetypes.schemaextender.field import ExtensionField
from Products.Archetypes.atapi import *
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.UserAndGroupSelectionWidget.at import widget

from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.controlpanel.config import *

from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget

# Interface and schema
RedirectUser_schema =  ATDocumentSchema.copy() + Schema((
    
    LinesField(
            name="userORgroups",
            multiValued=1,
            widget = widget.UserAndGroupSelectionWidget(
                label=u"Usuários ou Grupos",
                description=u"Selecione os usuários ou grupos que estarão nesta regra.",required=True,
                ),
            required=True,
            ),
    
    ReferenceField('redirectPath',
        multiValued=0,
        label=_(u"Local de envio"),
        relationship='redirectPath',
Exemple #4
0
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT
from Products.CMFCore.utils import getToolByName

from jalon.content import contentMessageFactory as _
from jalon.content.config import PROJECTNAME
from jalon.content.interfaces import IJalonRessourceExterne

import jalon_utils
import copy

ressourceType = [
    u"Lien web".encode("utf-8"), u"Lecteur exportable".encode("utf-8")
]

JalonRessourceExterneSchema = ATDocumentSchema.copy() + atpublic.Schema((
    atpublic.StringField("sousTitre",
                         required=False,
                         accessor="getSousTitre",
                         searchable=False,
                         widget=atpublic.StringWidget(
                             label=_(u"Sous titre"), )),
    atpublic.StringField("typeRessourceExterne",
                         required=True,
                         accessor="getTypeRessourceExterne",
                         searchable=False,
                         default="",
                         vocabulary=ressourceType,
                         widget=atpublic.SelectionWidget(
                             label=_(u"Type de la Ressource Externe"),
                             format="select",
from vindula.liberiuntheme import MessageFactory as _

from AccessControl import ClassSecurityInfo

from vindula.liberiuntheme.content.interfaces import IDownload
from Products.ATContentTypes.content.document import ATDocumentSchema,ATDocumentBase

from zope.interface import implements
from Products.Archetypes.atapi import *
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.liberiuntheme.config import *
from DateTime.DateTime import DateTime
from time import strftime, gmtime


Download_schema = ATDocumentSchema.copy() + Schema((
                                                    
    TextField(
            name='desc_button',
            default_output_type='text/html',
            widget=RichWidget(
                label=_(u"Descrição do botão de download."),
                description=_(u"Insira uma descrição para o botão de download."),
                rows="5",
                label_msgid='vindula_liberiuntheme_label_desc_button',
                description_msgid='vindula_liberiuntheme_help_desc_button',
                i18n_domain='vindula_liberiuntheme',
            ),
            required=False,
    ),
    
Exemple #6
0
from Products.Archetypes.public import DisplayList
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata
from Products.ATContentTypes.configuration import zconf
from Products.validation import V_REQUIRED

from upc.genweb.kbpuc import kbpucMessageFactory as _
from upc.genweb.kbpuc.interfaces import IFaq
from upc.genweb.kbpuc.config import PROJECTNAME

from Products.ATContentTypes.content.document import ATDocumentSchema, ATDocument

from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget
from AccessControl import ClassSecurityInfo

faq_kbpuc_Schema = ATDocumentSchema.copy() + atapi.Schema((

     atapi.LinesField('servicios',
                required=False,
                vocabulary='listaServicios',
                enforceVocabulary=True,
                widget=atapi.InAndOutWidget(
                        label="Llista de Serveis",
                        label_msgid="upc.genweb.kbpuc.llista_serveis",
                        description="Seleccionar els serveis de la llista.",
                        description_msgid="upc.genweb.kbpuc.llista_serveis_descr",
                        i18n_domain = "upc.genweb.kbpuc"),
     ),

    atapi.StringField(
        name = 'servei',
from Products.PloneHelpCenter.interfaces import IHelpCenterHowTo
from schemata import HelpCenterItemSchemaNarrow
from PHCContent import PHCContentMixin, HideOwnershipFields, IHelpCenterContent

from Products.ATContentTypes.interface import IATFolder, IATDocument
from Products.ATContentTypes.content.document import \
    ATDocumentSchema, ATDocumentBase
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.ATContentTypes.lib.constraintypes import ConstrainTypesMixinSchema
from Products.ATContentTypes.content.base import ATCTOrderedFolder

# Create a Frankenstein's monster: a hybrid of ATCT
# folder and document types.
# Since the document type is more complex, we'll use it for the base.

HowToSchema = ATDocumentSchema.copy(
) + ConstrainTypesMixinSchema + HelpCenterItemSchemaNarrow
HideOwnershipFields(HowToSchema)
finalizeATCTSchema(HowToSchema, folderish=True, moveDiscussion=False)


class HelpCenterHowTo(ATDocumentBase, PHCContentMixin, ATCTOrderedFolder):
    """A How-to is a document describing how to address a single, common
    use-case or issue. You may add images and files as attachments.
    """

    implements(IATFolder, IATDocument, IHelpCenterHowTo, IHelpCenterContent)

    isPrincipiaFolderish = True

    content_icon = 'howto_icon.gif'
contenuDocumentSemantique = [
    u"Pas d'encadré".encode("utf-8"), u"Objectifs".encode("utf-8"),
    u"Commentaire".encode("utf-8"), u"Extrait".encode("utf-8"),
    u"Pré-requis".encode("utf-8"), u"Présentation".encode("utf-8"),
    u"Introduction".encode("utf-8"), u"Conclusion".encode("utf-8"),
    u"Exemple".encode("utf-8"), u"Complément".encode("utf-8"),
    u"En savoir plus".encode("utf-8"), u"Explication".encode("utf-8"),
    u"Définition".encode("utf-8"), u"Remarque".encode("utf-8"),
    u"Méthode".encode("utf-8"), u"Rappel".encode("utf-8"),
    u"Attention".encode("utf-8"), u"Syntaxe".encode("utf-8"),
    u"Conseil".encode("utf-8"), u"Confère".encode("utf-8"),
    u"Citation".encode("utf-8"), u"Activité".encode("utf-8")
]

DocumentSemantiqueSchema = ATDocumentSchema.copy() + atpublic.Schema(
    (atpublic.StringField("typeSemantique",
                          required=False,
                          accessor="getTypeSemantique",
                          default=0,
                          searchable=False,
                          vocabulary=contenuDocumentSemantique,
                          widget=atpublic.SelectionWidget(
                              label=_(u"label_typeSemantique",
                                      default=u"Type"),
                              description=_(u"desc_typeSemantique",
                                            default=u"Description du type"),
                              format="select")), ))


class DocumentSemantique(ATDocumentBase):
from zope.interface import Interface
from vindula.reservacorporativa.content.interfaces import IBlockReserve

from AccessControl import ClassSecurityInfo
from zope.interface import implements
from Products.Archetypes.atapi import *
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocumentBase
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.reservacorporativa.config import *

from datetime import datetime, time
from DateTime import DateTime

BlockReserve_schema = ATDocumentSchema.copy() + Schema((

    #    StringField(
    #        name='reserves',
    #        widget=SelectionWidget(label=_(u"Reserva relacionada."),
    #                               description=_(u"Selecione qual reserva corporativa vai ser bloqueada."),
    #                               ),
    #        required=True,
    #        vocabulary='voc_reserves',
    #    ),
    StringField(
        name='start_time',
        widget=StringWidget(
            label=_(u"Horário inicial"),
            description=_(
                u"Selecione o horário inicial que a reserva será bloqueada."),
Exemple #10
0
from marsapp.categories.widget import MarscatWidget

from marsapp.content.permissions import VIEW_REPOSITORY_PERMISSION
from marsapp.content.permissions import EDIT_REPOSITORY_PERMISSION

from marsapp.content import MarsMessageFactory as _

from Products.ATContentTypes.content.schemata import relatedItemsField

from ordereddict import OrderedDict

MarsBaseSchema = ATContentTypeSchema.copy()
MarsFolderSchema = ATFolderSchema.copy()
MarsBTreeFolderSchema = ATBTreeFolderSchema.copy()
MarsContentTypeSchema = ATFolderSchema.copy()
MarsCollectionObjectSchema = ATDocumentSchema.copy() + Schema(
    (
        #     ReferenceField('colRelatedSite',
        #        required=False,
        #        searchable=True,
        #        multiValued=False,
        #        relationship='colRelatedSite',
        #        allowed_types=('Mars Site',),
        #        widget=ReferenceBrowserWidget(label='Mars Site',
        #            label_msgid='label_discovery_site',
        #            description='Select the site related to this object',
        #            description_msgid='help_discovery_site',
        #            domain='mars',
        #            startup_directory='/collections/sites',
        #            ),
        #        schemata='description',
Exemple #11
0
# -*- coding: utf-8 -*-

from zope.interface import implements
from Products.Archetypes import public as atpublic
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT

from jalonedit.content import contentMessageFactory as _
from jalonedit.content.config import PROJECTNAME
from jalonedit.content.interfaces import IBibliographie

from DateTime import DateTime

BibliographieSchema = ATDocumentSchema.copy() + atpublic.Schema((
    atpublic.StringField(
        "sous-titre",
        required=False,
        accessor="getSousTitre",
        searchable=False,
        widget=atpublic.StringWidget(
            label=_(u"label_sousTitreWebographie",
                    default=u"sous Titre Webographie"),
            description=_(u"desc_sousTitreWebographie",
                          default=u"Description du sous Titre Webographie"),
        )),
    atpublic.StringField(
        "premier-auteur",
        required=True,
        accessor="getPremierAuteur",
        searchable=False,
        widget=atpublic.StringWidget(
Exemple #12
0
    #     searchable=1,
    # ),
    BooleanField(
        name='featured',
        widget=BooleanField._properties['widget'](
            label='Featured',
            description='If selected, this case study will be shown in the slider on the homepage or elsewhere on the site where featured case studies are displayed.',
            label_msgid='label_case_study_featured',
            description_msgid='description_case_study_featured',
            i18n_domain='pd.content',
        ),
    ),
),
)

CaseStudy_schema = ATDocumentSchema.copy() + \
    schema.copy()

CaseStudy_schema['description'].schemata = 'default'

class CaseStudy(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(ICaseStudy, ILocalPortletAssignable)

    meta_type = 'CaseStudy'
    _at_rename_after_creation = True

    schema = CaseStudy_schema
from Products.PloneArticle.config import PLONEARTICLE_TOOL, PROJECTNAME

from Products.PloneArticle.interfaces import IPloneArticle
from Products.PloneArticle.field import FileInnerContentField, \
     ImageInnerContentField, LinkInnerContentField
from Products.PloneArticle.widget import FileInnerContentWidget, \
    ImageInnerContentWidget, LinkInnerContentWidget
from Products.PloneArticle.content.mixin import ArticleMixin
from Products.PloneArticle.pafti import PloneArticleFactoryTypeInformation

from Products.PloneArticle.version import CURRENT_ARTICLE_VERSION

# Inherits schema from ATDocument
# Copy it to make sure PloneArticle schema is totally independant
PloneArticleSchema = ATDocumentSchema.copy() + Schema((
    FileInnerContentField(
        'files',
        searchable=True,
        schemata='files',
        widget=FileInnerContentWidget(
            label='Files',
            label_msgid='label_files',
            i18n_domain='plonearticle',
        ),
    ),
    ImageInnerContentField(
        'images',
        searchable=True,
        schemata='images',
        widget=ImageInnerContentWidget(
Exemple #14
0
from Products.Archetypes import atapi
from Products.CMFCore.utils import ImmutableId
from Products.CMFCore.permissions import ModifyPortalContent
from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.document import ATDocumentSchema
from zope.interface import Interface, implements
from Products.CMFCore.utils import getToolByName

from zest.cachetuning import config
from zest.cachetuning import ZestCacheTuningMessageFactory as _


class ICacheTuningTool(Interface):
    """marker interface"""

cacheTuningToolSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.BooleanField(
        name = 'jq_replace_username',
        default=True,
        widget = atapi.BooleanWidget(
            label=_(u'label_jq_replace_username',
                    default=u'Replace username using Javascript'),
            description=_(u'help_jq_replace_username',
                          default=u'Enable caching the pages ' + \
                          'and keeping username displayed.')
            ),
        schemata='username',
        ),

    atapi.StringField(
        name='jq_replace_username_selector',
Exemple #15
0
from collective.datagridcolumns.SelectColumn import SelectColumn
from collective.datagridcolumns.TextAreaColumn import TextAreaColumn
from collective.tablepage import config
from collective.tablepage import tablepageMessageFactory as _
from collective.tablepage.interfaces import IDataStorage
from collective.tablepage.interfaces import ITablePage
from zope.component import queryUtility
from zope.interface import implements

try:
    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',
Exemple #16
0
from Products.validation import V_REQUIRED

from Products.CMFCore.permissions import View

from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema

from pcommerce.core.interfaces import IProduct
from pcommerce.core import PCommerceMessageFactory as _
from pcommerce.core.config import PROJECTNAME

from Products.CMFPlone.interfaces import INonStructuralFolder
from Products.CMFPlone import PloneMessageFactory as _p

from zope.schema.interfaces import IVocabularyFactory

ProductSchema = ATDocumentSchema.copy() + Schema((
    StringField(name='no', searchable=1, widget=StringWidget(label=_('No'), )),
    FixedPointField(name='price',
                    languageIndependent=True,
                    widget=DecimalWidget(label=_(u'Price'), )),
    BooleanField(name='new',
                 languageIndependent=True,
                 widget=BooleanWidget(label=_(u'New product'), )),
    BooleanField(name='hot',
                 languageIndependent=True,
                 widget=BooleanWidget(label=_(u'Hot product'), )),
    LinesField(name='shipments',
               required=True,
               multiValued=True,
               widget=MultiSelectionWidget(
                   label=_(u'label_shipment_methods',
Exemple #17
0
            description="Location type categories",
            label_msgid='PleiadesEntity_label_locationType',
            description_msgid='PleiadesEntity_help_locationType',
            i18n_domain='PleiadesEntity',
        ),
        description="Location type categories",
        vocabulary_factory='pleiades.vocabularies.location_types',
        default=["representative"],
        enforceVocabulary=1,
        multiValued=1,
        accessor='getLocationType',
    ),

))

Location_schema = ATDocumentSchema.copy() + \
    schema.copy() + \
    getattr(Temporal, 'schema', atapi.Schema(())).copy() + \
    getattr(Work, 'schema', atapi.Schema(())).copy()
schema = Location_schema

off = {"edit": "invisible", "view": "invisible"}

schema["effectiveDate"].widget.visible = off
schema["expirationDate"].widget.visible = off
schema["allowDiscussion"].widget.visible = off
schema["excludeFromNav"].widget.visible = off
schema["presentation"].widget.visible = off
schema["tableContents"].widget.visible = off
schema["nodes"].widget.visible = off
schema["text"].widget.label = 'Details'
Exemple #18
0
# -*- coding: utf-8 -*-

from zope.interface import implements
from plone.app.blob.field import BlobField
from Products.Archetypes import public as atpublic
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT
from Products.CMFCore.utils import getToolByName

from jalon.content import contentMessageFactory as _
from jalon.content.config import PROJECTNAME
from jalon.content.interfaces import IJalonFile

import jalon_utils

JalonFileSchema = ATDocumentSchema.copy() + atpublic.Schema((
    BlobField('file',
              widget=atpublic.FileWidget(label='A file',
                                         description='Some file'),
              required=True,
              ),
    atpublic.StringField("actif",
                         required=False,
                         accessor="getActif",
                         searchable=False,
                         default="actif",
                         widget=atpublic.StringWidget(label=_(u"Actif"),
                         )),
    atpublic.TextField("correction",
                       required=True,
                       accessor="getCorrection",
            columns={ 'category' : Column("Category"), 'tags':Column("Tags") },
            label='Categories',
            description_msgid='flickrgallery_help_categories',
            label_msgid='flickrgallery_label_categories',
            i18n_domain='flickrgallery',
        )
    ),

),
)

##code-section after-local-schema #fill in your manual code here

##/code-section after-local-schema

FlickrGallery_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
FlickrGallery_schema['text'].widget.visible = {'view':'invisible','edit':'invisible'}
FlickrGallery_schema['text'].required = False
##/code-section after-schema

class FlickrGallery(ATDocument):
    """
    """
    security = ClassSecurityInfo()
    __implements__ = (getattr(ATDocument,'__implements__',()),)

    # This name appears in the 'add' box
    archetype_name = 'FlickrGallery'
Exemple #20
0
            label="New Subscription Link URL",
            description="Link address for new subscriptions",
            size=60,
            label_msgid='PloneShows_label_seasonNewLink',
            description_msgid='PloneShows_help_seasonNewLink',
            i18n_domain='PloneShows',
        ),
    ),

),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Season_schema = ATFolderSchema + ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Season(ATFolder, ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.ISeason)

    meta_type = 'Season'
    _at_rename_after_creation = True
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.PloneSchooltimeShows.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

Now_Playing_Page_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Now_Playing_Page(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.INow_Playing_Page)

    meta_type = 'Now_Playing_Page'
    _at_rename_after_creation = True
Exemple #22
0
# -*- coding: utf-8 -*-

from zope.interface import implements
from Products.Archetypes import public as atpublic
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT

from jalonedit.content import contentMessageFactory as _
from jalonedit.content.config import PROJECTNAME
from jalonedit.content.interfaces import IGlossaire

from DateTime import DateTime

GlossaireSchema = ATDocumentSchema.copy()


class Glossaire(ATDocumentBase):
    """ Un mot de glossaire
    """

    implements(IGlossaire)
    meta_type = 'Glossaire'
    schema = GlossaireSchema
    schema['description'].required = False
    schema['description'].mode = "r"


registerATCT(Glossaire, PROJECTNAME)
from zope.app.component.hooks import getSite 
from zope.interface import Interface
from vindula.content.content.interfaces import IVindulaPortlet
from plone.contentrules.engine.interfaces import IRuleAssignable
from AccessControl import ClassSecurityInfo
from zope.interface import implements
from Products.Archetypes.atapi import *
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocumentBase
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.content.config import *

from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget

VindulaPortlet_schema = ATDocumentSchema.copy() + Schema((

   ReferenceField('imageRelac',
        multiValued=0,
        allowed_types=('Image'),
        label=_(u"Imagem "),
        relationship='Imagem',
        widget=VindulaReferenceSelectionWidget(
            #default_search_index='SearchableText',
            label=_(u"Imagem "),
            description='Imagem para destaque no portlet. A imagem será redimensionada para um tamanho adequado.')),

    TextField(
            name='title_image',
            widget=StringWidget(
                label=_(u"Título da Imagem"),
            label= _(
                u"unfiltered_template_label", 
                default=u'Unfiltered template code'),
            description = _(
                u'unfiltered_template_description', 
                default=u'Edit template code here if you are working with raw HTML - otherwise WYSIWYG editor might scramble the result. Leave empty if normal WYSIWYG input is used.'),
            rows = 25
            ),
        ),


    ),
    
)

TemplatedDocument_schema = ATDocumentSchema.copy() + \
    schema.copy()

TemplatedDocument_schema["text"].accessor = "getTemplatedText"
TemplatedDocument_schema["text"].widget.label = "Text (templated)"
TemplatedDocument_schema["text"].widget.description = "This document view supports automatic text substitutions. For available substitutions, please contact your site administration."


# Display this text instead of content if there are errors 
ERROR_MESSAGE = _("The page structure contains errors (template evalution failed or resulted to emptry string). Please contact the site manager. Content editors can see the error if they enable Catch errors checkbox on Edit > Template tab")

class TemplatedDocument(ATDocument):
    """ A page allowing Cheetah template tags in Kupu text.
    """
    security = ClassSecurityInfo()
Exemple #25
0
#"""
#To add video into the page, just insert the url inbetween the tags ###flashvideo### and ###/flashvideo###.
#For example, ###flashvideo###www.example.com/someflashvideo.flv###/flashvideo###
#""",
#    label = _(u'label_body_text', default=u'Body Text'),
#    rows = 20,
#    allow_file_upload = zconf.ATDocument.allow_document_upload
#)

schema = Schema((

    copied_fields['text'],
    
    

))

FlashPageSchema = ATDocumentSchema.copy() + schema.copy()

class FlashPage(ATDocument):
    
    implements(IFlashPage)
    
    security = ClassSecurityInfo()
    schema = FlashPageSchema
    portal_type = "FlashPage"
    archetype_name = "FlashPage"
    meta_type = "FlashPage"

    
registerType(FlashPage, PROJECT_NAME)
Exemple #26
0
# -*- coding: utf-8 -*-

from zope.interface import implements
from Products.Archetypes import public as atpublic
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT

from jalonedit.content import contentMessageFactory as _
from jalonedit.content.config import PROJECTNAME
from jalonedit.content.interfaces import IVideo

from DateTime import DateTime


VideoSchema = ATDocumentSchema.copy()

class Video(ATDocumentBase):
    """ Un document de bloc présentation pour 
    """

    implements(IVideo)
    meta_type = 'Video'
    schema = VideoSchema
    schema['description'].title = "Lecteur exportable"
    schema['description'].required = True
    schema['text'].mode = "r"

    def getAffichage(self):
        return "toto titi tata"

registerATCT(Video, PROJECTNAME)
Exemple #27
0
        relationship="connectsWith",
    ),

),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Place_schema = BaseFolderSchema.copy() + \
    getattr(Named, 'schema', Schema(())).copy() + \
    getattr(Work, 'schema', Schema(())).copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
Place_schema = ATDocumentSchema.copy() + \
    schema.copy() + \
    getattr(Named, 'schema', Schema(())).copy() + \
    getattr(Work, 'schema', Schema(())).copy()
##/code-section after-schema

off = {"edit": "invisible", "view": "invisible"}

schema = Place_schema

schema["effectiveDate"].widget.visible = off
schema["expirationDate"].widget.visible = off
schema["allowDiscussion"].widget.visible = off
schema["excludeFromNav"].widget.visible = off
schema["text"].widget.label = 'Details'
schema["presentation"].widget.visible = off
Exemple #28
0
#
#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.document \
     import ATDocument as BaseClass
from Products.ATContentTypes.content.document \
     import ATDocumentSchema as DefaultSchema

from Products.ATContentTypes.content.base import registerATCT

from ubify.coretypes.config import PROJECTNAME

schema = DefaultSchema.copy()


class ATDocument(BaseClass):
    __doc__ = BaseClass.__doc__ + " (customizable version)"

    portal_type = BaseClass.portal_type
    archetype_name = BaseClass.archetype_name

    schema = schema


registerATCT(ATDocument, PROJECTNAME)
Exemple #29
0
from Products.Archetypes import atapi
from Products.CMFCore.utils import ImmutableId
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.permissions import ModifyPortalContent
from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.document import ATDocumentSchema
from zope.interface import Interface, implements
import config

from collective.sendaspdf import SendAsPDFMessageFactory as _

class ISendAsPDFTool(Interface):
    """send as pdf tool marker interface"""


sendAsPDFSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.StringField(
        name = 'pdf_generator',
        default='wk',
        widget=atapi.SelectionWidget(
            format="select",
            label=_(u'label_pdf_generator',
                    default=u'PDF generator'),
            ),
        vocabulary = '_generatorVocabulary'
        ),

    atapi.StringField(
        name = 'tempdir',
        default='/tmp',
        widget=atapi.StringWidget(
Exemple #30
0
from schemata import HelpCenterItemSchemaNarrow
from PHCContent import PHCContentMixin, HideOwnershipFields, IHelpCenterContent

from Products.ATContentTypes.interface import IATFolder, IATDocument
from Products.ATContentTypes.content.document import \
    ATDocumentSchema, ATDocumentBase
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.ATContentTypes.lib.constraintypes import \
    ConstrainTypesMixinSchema
from Products.ATContentTypes.content.base import ATCTOrderedFolder

# Create a Frankenstein's monster: a hybrid of ATCT
# folder and document types.
# Since the document type is more complex, we'll use it for the base.

HowToSchema = ATDocumentSchema.copy() + ConstrainTypesMixinSchema + \
              HelpCenterItemSchemaNarrow

HideOwnershipFields(HowToSchema)
finalizeATCTSchema(HowToSchema, folderish=True, moveDiscussion=False)


class HelpCenterHowTo(ATCTOrderedFolder, ATDocumentBase, PHCContentMixin):
    """A How-to is a document describing how to address a single, common
    use-case or issue. You may add images and files as attachments.
    """

    implements(IATFolder, IATDocument, IHelpCenterHowTo, IHelpCenterContent)
    isPrincipiaFolderish = True
    content_icon = 'howto_icon.gif'
    typeDescription = 'A How-to is a document describing how to address a ' \
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata
from Products.ATContentTypes.configuration import zconf
from Products.validation import V_REQUIRED

from upc.genweb.descriptorTIC import descriptorticMessageFactory as _
from upc.genweb.descriptorTIC.interfaces import IFaq
from upc.genweb.descriptorTIC.config import PROJECTNAME

from Products.validation.config import validation
from AccessControl import ClassSecurityInfo

from Products.ATContentTypes.content.document import ATDocumentSchema, ATDocument
from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget

faq_tic_Schema = ATDocumentSchema.copy() + atapi.Schema((

    atapi.LinesField('listaservei',
        required=False,
        vocabulary='listaServicios',
        enforceVocabulary=True,
        widget=atapi.InAndOutWidget(
            label_msgid="faqTIC_serveis_relacionats",
            description_msgid="faqTIC_descrip_serveis_relacionats",
            i18n_domain = "upc.genweb.descriptorTIC"
        ),
    ),

))

schemata.finalizeATCTSchema(faq_tic_Schema, moveDiscussion=False)
Exemple #32
0
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.document import ATDocumentSchema
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

PloneConfDocument_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema


class PloneConfDocument(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IPloneConfDocument)

    meta_type = 'PloneConfDocument'
    _at_rename_after_creation = True
Exemple #33
0
        widget=atapi.SelectionWidget(
            label="Association Certainty",
            description="Select level of certainty in association between location and place",
            label_msgid='PleiadesEntity_label_associationCertainty',
            description_msgid='PleiadesEntity_help_associationCertainty',
            i18n_domain='PleiadesEntity',
        ),
        description="Level of certainty in association between location and place",
        vocabulary=NamedVocabulary("""association-certainty"""),
        default="certain",
        enforceVocabulary=1,
    ),

))

Connection_schema = ATDocumentSchema.copy() + schema.copy() + \
    getattr(Temporal, 'schema', atapi.Schema(())).copy() + \
    getattr(Work, 'schema', atapi.Schema(())).copy()
schema = Connection_schema

off = {"edit": "invisible", "view": "invisible"}

schema["title"].required = 0
schema["title"].widget.visible = off
schema["description"].widget.visible = off
schema["text"].widget.visible = off

schema["effectiveDate"].widget.visible = off
schema["expirationDate"].widget.visible = off
schema["allowDiscussion"].widget.visible = off
schema["excludeFromNav"].widget.visible = off
Exemple #34
0
from Products.validation import V_REQUIRED

from Products.CMFCore.permissions import View

from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema

from pcommerce.core.interfaces import IProduct
from pcommerce.core import PCommerceMessageFactory as _
from pcommerce.core.config import PROJECTNAME

from Products.CMFPlone.interfaces import INonStructuralFolder
from Products.CMFPlone import PloneMessageFactory as _p

from zope.schema.interfaces import IVocabularyFactory

ProductSchema = ATDocumentSchema.copy() + Schema((

    StringField(
        name='no',
        searchable=1,
        widget=StringWidget(
            label=_('No'),
        )
    ),

    FixedPointField(
        name='price',
        languageIndependent=True,
        widget=DecimalWidget(
            label=_(u'Price'),
        )
Exemple #35
0
""" Annonces Jalon. """
from zope.interface import implements
from Products.Archetypes.public import *
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT
from Products.CMFCore.utils import getToolByName

from jalon.content import contentMessageFactory as _
from jalon.content.config import PROJECTNAME
from jalon.content.interfaces import IJalonAnnonce

from jalon.content.browser.config.jalonconfiguration import IJalonConfigurationControlPanel

import jalon_utils

JalonAnnonceSchema = ATDocumentSchema.copy() + Schema((
    LinesField("publics",
               required=False,
               accessor="getPublics",
               searchable=False,
               widget=LinesWidget(label=_(u"Publics cible d'une annonce"),
                                  visible={'view': 'visible', 'edit': 'invisible'})
               ),
))


class JalonAnnonce(ATDocumentBase):

    """ Une annonce dans un cours. """

    implements(IJalonAnnonce)
            label=_(u'call_award_notice_corrigendum_label',
                    default=u'Award notice corrigendum'),
            description=_(
                u'call_award_notice_corrigendum_description',
                default=u'Select the file with the award notice corrigendum'),
            allow_search=0,
            restrict_browsing_to_startup_directory=1,
            force_close_on_insert=1,
            ),
        relationship='award_notice_corrigendum_attachment',
        ),
),
)


CallForContractors_schema = BaseSchema.copy() + \
    schema.copy() +\
    ConstrainTypesMixinSchema.copy() +\
    NextPreviousAwareSchema.copy()

finalizeATCTSchema(CallForContractors_schema)

unwantedFields = ('rights', 'contributors', 'allowDiscussion', 'location',
    'creators', 'creation_date', 'modification_date', 'nextPreviousEnabled',
    'excludeFromNav', 'tableContents', 'presentation', 'language')

for name in unwantedFields:
    CallForContractors_schema[name].widget.visible['edit'] = 'invisible'
    CallForContractors_schema[name].widget.visible['view'] = 'invisible'
    CallForContractors_schema.changeSchemataForField(name, 'default')
Exemple #37
0
from Products.Archetypes import atapi
from Products.ATContentTypes.content.base import registerATCT
from Products.ATContentTypes.content.document import ATDocumentBase
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.CMFCore import permissions

try:
    from Products.CMFPlone.factory import _IMREALLYPLONE5  # noqa
except ImportError:
    from archetypes.querywidget.field import QueryField
else:
    from plone.app.collection.field import QueryField

PROJECTNAME = "plone.restapi.tests"

ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.StringField("testStringField"),
    atapi.BooleanField("testBooleanField"),
    atapi.IntegerField("testIntegerField"),
    atapi.FloatField("testFloatField"),
    atapi.FixedPointField("testFixedPointField"),
    atapi.DateTimeField("testDateTimeField"),
    atapi.LinesField("testLinesField"),
    atapi.FileField("testFileField"),
    atapi.TextField("testTextField"),
    atapi.ImageField("testImageField"),
    atapi.ReferenceField("testReferenceField", relationship="testrelation"),
    atapi.ReferenceField(
        "testMVReferenceField", relationship="testrelation", multiValued=True),
    BlobField("testBlobField"),
    FileField("testBlobFileField"),
Exemple #38
0
# -*- coding: utf-8 -*-

from zope.interface import implements
from Products.Archetypes import public as atpublic
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT

from jalon.content import contentMessageFactory as _
from jalon.content.config import PROJECTNAME
from jalon.content.interfaces import IJalonConnect

import copy
import jalon_utils

JalonConnectSchema = ATDocumentSchema.copy() + atpublic.Schema((
    atpublic.StringField(
        'dateAjout',
        required = False,
        accessor = 'getDateAjout',
        searchable = False,
        widget = atpublic.StringWidget(
            label = _(u"Date de création sur Adobe Connect")
            )),
    atpublic.StringField(
        "duree",
        required = False,
        accessor = "getDuree",
        searchable = False,
        widget = atpublic.StringWidget(
            label = _(u"Durée"),
            )),
Exemple #39
0
# -*- coding: utf-8 -*-

from zope.interface import implements
from Products.ATContentTypes.content.document import ATDocumentBase, ATDocumentSchema
from Products.ATContentTypes.content.base import registerATCT

from jalon.content.config import PROJECTNAME
from jalon.content.interfaces import IJalonTermeGlossaire

import jalon_utils
import copy

JalonTermeGlossaireSchema = ATDocumentSchema.copy()


class JalonTermeGlossaire(ATDocumentBase):
    """ Un terme de glossaire sous Jalon
    """

    implements(IJalonTermeGlossaire)
    meta_type = 'JalonTermeGlossaire'
    schema = JalonTermeGlossaireSchema
    schema['description'].required = True
    schema['description'].widget.label = "Définition"
    schema['text'].required = False
    schema['text'].mode = "r"

    def ajouterTag(self, tag):
        return jalon_utils.setTag(self, tag)

    def getAttributsType(self):
        for name in show:
            if name in to_hide:
                to_hide.remove(name)

    for name in to_hide:
        if name in schema:
            field = schema[name]
            schema.changeSchemataForField(name, 'default')
            field.widget.visible = {'view': 'invisible', 'edit': 'invisible'}
            field.write_permission = ManagePortal

    # Hide from navigation by default
    schema['excludeFromNav'].default = True


ShopItemBlockSchema = ATDocumentSchema.copy() + atapi.Schema((

    atapi.ReferenceField(
        'item',
        required=1,
        languageIndependent=True,
        relationship='itemblock_item',
        allowed_types=['ShopItem'],
        allow_search=True,
        allow_browse=True,
        widget=ReferenceBrowserWidget(
            label=_(u"label_item", default=u"Shop Item"),
            startup_directory_method='get_startup_directory',
        ),
    ),
))
            label="New Subscription Link URL",
            description="Link address for new subscriptions",
            size=60,
            label_msgid='PloneSchooltimeShows_label_seasonNewLink',
            description_msgid='PloneSchooltimeShows_help_seasonNewLink',
            i18n_domain='PloneSchooltimeShows',
        ),
    ),

),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Season_schema = ATFolderSchema + ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Season(ATFolder, ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.ISeason)

    meta_type = 'Season'
    _at_rename_after_creation = True
Exemple #42
0
RelatedItemsField = ReferenceField(
    'relatedItems',
    relationship='PloneHelpCenter',
    allowed_types=BUNGENI_REFERENCEABLE_TYPES,
    required=0,
    multiValued=1,
    languageIndependent=1,
    widget=PHCReferenceWidget(
        label="Referenced Items",
        description="Set one or more references to HelpCenter items.",
        description_msgid="phc_reference",
        label_msgid="phc_label_reference",
        i18n_domain="plonehelpcenter"),
)

TabbedSubpagesSchema = ATDocumentSchema.copy() + Schema((RelatedItemsField), )

TabbedSubpagesSchema['title'].required = 0
TabbedSubpagesSchema['text'].required = 0


class TabbedSubpages(ATDocument):
    """
    Represents a page aggregating the content of referenced "sub-pages".
    Each sub-page gets a tab so that only one sub-page is shown at a time.
    """

    security = ClassSecurityInfo()
    global_allow = 1
    portal_type = meta_type = TYPE_PARAMS['TabbedSubpages']['portal_type']
    archetype_name = TYPE_PARAMS['TabbedSubpages']['archetype_name']
from collective.datagridcolumns.SelectColumn import SelectColumn
from collective.datagridcolumns.TextAreaColumn import TextAreaColumn
from collective.tablepage import config
from collective.tablepage import tablepageMessageFactory as _
from collective.tablepage.interfaces import IDataStorage
from collective.tablepage.interfaces import ITablePage
from zope.component import queryUtility
from zope.interface import implements

try:
    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,
            ),
        ),
from AccessControl import ClassSecurityInfo
from Products.ATContentTypes.content.document import ATDocumentSchema, ATDocumentBase
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.Archetypes.atapi import *
from five import grok
from plone.app.blob.field import FileField, ImageField
from plone.contentrules.engine.interfaces import IRuleAssignable
from zope.interface import implements

from vindula.content import MessageFactory as _
from vindula.content.config import *
from vindula.content.content.interfaces import IVindulaVideo
from vindula.content.models.content_field import ContentField


VindulaVideo_schema =  ATDocumentSchema.copy() + Schema((
 
 
    BooleanField(
        name='activ_portlteRight',
        default=True,
        widget=BooleanWidget(
            label="Coluna Direita",
            description='Ativa a visualização dos itens da coluna da direita. Ex: Portlets.',
        ),
        required=False,
    ),                                                       
    
    BooleanField(
        name='activ_portletLeft',
        default=True,
Exemple #45
0
from Products.CMFPlone import PloneMessageFactory as _


_sampleToolBar  = """[
['Source','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','rtSpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['Link','Unlink','Anchor','Image'],
['Style','FontFormat'],
['FitWindow']
]"""
      

FCKDocumentSchema = ATDocumentSchema.copy() + Schema((
    TextField('smalltext',
              required=False,
              searchable=True,
              storage = AnnotationStorage(migrate=True),
              validators = ('isTidyHtmlWithCleanup',),
              allowable_content_types = ('text/html',),
              default_content_type = 'text/html',
              default_output_type = 'text/x-html-safe',
              widget = FckWidget(
                        description = '',
                        label = _(u'label_small_text', default=u'Small Text'),
                        rows=10,
                        width = '80%',
                        height ='200px',
                        fck_toolbar = 'Basic',
from PHCContent import PHCContentMixin, HideOwnershipFields, IHelpCenterContent

from Products.ATContentTypes.interface import IATFolder, IATDocument
from Products.ATContentTypes.content.document import \
    ATDocumentSchema, ATDocumentBase
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.ATContentTypes.lib.constraintypes import \
    ConstrainTypesMixinSchema
from Products.ATContentTypes.content.base import ATCTOrderedFolder


# Create a Frankenstein's monster: a hybrid of ATCT
# folder and document types.
# Since the document type is more complex, we'll use it for the base.

HowToSchema = ATDocumentSchema.copy() + ConstrainTypesMixinSchema + \
              HelpCenterItemSchemaNarrow

HideOwnershipFields(HowToSchema)
finalizeATCTSchema(HowToSchema, folderish=True, moveDiscussion=False)


class HelpCenterHowTo(ATCTOrderedFolder, ATDocumentBase, PHCContentMixin):
    """A How-to is a document describing how to address a single, common
    use-case or issue. You may add images and files as attachments.
    """

    implements(IATFolder, IATDocument, IHelpCenterHowTo, IHelpCenterContent)
    isPrincipiaFolderish = True
    content_icon = 'howto_icon.gif'
    typeDescription = 'A How-to is a document describing how to address a ' \
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.PloneShows.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

Now_Playing_Page_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema


class Now_Playing_Page(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.INow_Playing_Page)

    meta_type = 'Now_Playing_Page'
    _at_rename_after_creation = True
from Products.PloneArticle.config import PLONEARTICLE_TOOL, PROJECTNAME

from Products.PloneArticle.interfaces import IPloneArticle
from Products.PloneArticle.field import FileInnerContentField, \
     ImageInnerContentField, LinkInnerContentField
from Products.PloneArticle.widget import FileInnerContentWidget, \
    ImageInnerContentWidget, LinkInnerContentWidget
from Products.PloneArticle.content.mixin import ArticleMixin
from Products.PloneArticle.pafti import PloneArticleFactoryTypeInformation

from Products.PloneArticle.version import CURRENT_ARTICLE_VERSION


# Inherits schema from ATDocument
# Copy it to make sure PloneArticle schema is totally independant
PloneArticleSchema = ATDocumentSchema.copy() + Schema((
    FileInnerContentField(
        'files',
        searchable=True,
        schemata='files',
        widget=FileInnerContentWidget(
            label='Files',
            label_msgid='label_files',
            i18n_domain='plonearticle',
            ),
        ),
    ImageInnerContentField(
        'images',
        searchable=True,
        schemata='images',
        widget=ImageInnerContentWidget(
Exemple #49
0
        allow_browse="True",
    ),

),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Feature_schema = BaseFolderSchema.copy() + \
    getattr(Named, 'schema', Schema(())).copy() + \
    getattr(Work, 'schema', Schema(())).copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
Feature_schema = ATDocumentSchema.copy() + \
    schema.copy() + \
    getattr(Named, 'schema', Schema(())).copy() + \
    getattr(Work, 'schema', Schema(())).copy()
##/code-section after-schema

class Feature(BaseFolder, ATDocumentBase, Named, Work, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IFeature)

    meta_type = 'Feature'
    _at_rename_after_creation = True
from vindula.liberiuntheme import MessageFactory as _

from AccessControl import ClassSecurityInfo

from vindula.liberiuntheme.content.interfaces import IPlanosPrecos
from Products.ATContentTypes.content.document import ATDocumentSchema,ATDocumentBase

from zope.interface import implements
from Products.Archetypes.atapi import *
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.liberiuntheme.config import *
from DateTime.DateTime import DateTime
from time import strftime, gmtime


PlanosPrecos_schema = ATDocumentSchema.copy() + Schema((

    TextField(
            name='URLButton',
            widget=StringWidget(
                label=_(u"URL do destino."),
                description=_(u"Insira a URL que o usuário será direcionado ao clicar no botão de 'assinar'."),
                label_msgid='vindula_liberiuntheme_label_title_URLButton',
                description_msgid='vindula_liberiuntheme_title_URLButton',
                i18n_domain='vindula_liberiuntheme',
            ),
        required=True,
    ),        
    
    
    IntegerField(
Exemple #51
0
from Products.CMFCore import permissions
from plone.app.blob.field import BlobField
from plone.app.blob.field import FileField
from plone.app.blob.field import ImageField
from plone.app.folder.folder import ATFolder
from plone.app.folder.folder import ATFolderSchema
try:
    from Products.CMFPlone.factory import _IMREALLYPLONE5  # noqa
except ImportError:
    from archetypes.querywidget.field import QueryField
else:
    from plone.app.collection.field import QueryField

PROJECTNAME = 'plone.restapi.tests'

ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema((

    atapi.StringField('testStringField'),
    atapi.BooleanField('testBooleanField'),
    atapi.IntegerField('testIntegerField'),
    atapi.FloatField('testFloatField'),
    atapi.FixedPointField('testFixedPointField'),
    atapi.DateTimeField('testDateTimeField'),
    atapi.LinesField('testLinesField'),
    atapi.FileField('testFileField'),
    atapi.TextField('testTextField'),
    atapi.ImageField('testImageField'),
    atapi.ReferenceField('testReferenceField', relationship='testrelation'),
    atapi.ReferenceField('testMVReferenceField', relationship='testrelation',
                         multiValued=True),
    BlobField('testBlobField'),
            description="Attach feature source file",
            label="Feature source file",
            label_msgid='PleiadesEntity_label_source',
            description_msgid='PleiadesEntity_help_source',
            i18n_domain='PleiadesEntity',
        ),
        storage=AttributeStorage(),
        description="XML source of features",
    ),
),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

PositionalAccuracy_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class PositionalAccuracy(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IPositionalAccuracy)

    meta_type = 'PositionalAccuracy'
    _at_rename_after_creation = True
Exemple #53
0
    from Products.CMFCore.CMFCorePermissions import ModifyPortalContent, View
try:
  from Products.LinguaPlone.public import *
except ImportError:
  from Products.Archetypes.public import *

from zope.interface import implements
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from Products.qPloneGoogleMaps.field import *
from Products.qPloneGoogleMaps.config import *
from geo.interfaces import IPlacemark

MarkerSchema = ATDocumentSchema.copy() + Schema((
    MapField('location',
        default=None,
        required=True,
        validators=('isLocation',),
        widget=MapWidget(
            label='Marker Location',
            label_msgid='label_marker_center',
            description='Here you can choose marker location on the map by mouse clicking',
            description_msgid='help_marker_center',
            i18n_domain='googlemaps',
        )
    ),

    StringField('color',
        vocabulary=('default', 'red', 'green', 'blue'),
from vindula.themedefault.browser.viewlets import MenuViewlet

from zope.interface import Interface

from vindula.implantacao.content.interfaces import IImplantacao
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocumentBase
from Products.SmartColorWidget.Widget import SmartColorWidget

from zope.interface import implements
from Products.Archetypes.atapi import *
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.implantacao.config import *

Implantacao_schema = ATDocumentSchema.copy() + Schema((

    #Layout  -------------------------------------
    ImageField(
        name='logoCabecalho',
        widget=ImageWidget(
            label=_(u"Logo do cabeçalho"),
            description=_(u""),
            label_msgid='vindula_themedefault_label_logoCabecalho',
            description_msgid='vindula_themedefault_help_logoCabecalho',
            i18n_domain='vindula_implantacao',
        ),
        schemata='Layout',
    ),
    ImageField(
        name='logoRodape',
##/code-section module-header

schema = Schema((LinesField(
    name='keywords',
    widget=LinesField._properties['widget'](
        label='Keywords',
        label_msgid='Communities_label_keywords',
        i18n_domain='Communities',
    ),
    searchable=1,
), ), )

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Onthology_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema


class Onthology(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IOnthology)

    meta_type = 'Onthology'
    _at_rename_after_creation = True
#802, Building No. 1,
#Dheeraj Sagar, Malad(W)
#Mumbai-400064, India
###############################################################################
from Products.Archetypes.atapi import *

from Products.ATContentTypes.content.document \
     import ATDocument as BaseClass
from Products.ATContentTypes.content.document \
     import ATDocumentSchema as DefaultSchema

from Products.ATContentTypes.content.base import registerATCT

from ubify.coretypes.config import PROJECTNAME


schema = DefaultSchema.copy()


class ATDocument(BaseClass):
    __doc__ = BaseClass.__doc__ + " (customizable version)"

    portal_type = BaseClass.portal_type
    archetype_name = BaseClass.archetype_name

    schema = schema


registerATCT(ATDocument, PROJECTNAME)

from zope.interface import Interface

from vindula.themedefault.content.interfaces import IHomePage
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocumentBase

from zope.interface import implements
from Products.Archetypes.atapi import *
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.themedefault.config import *

from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget

HomePage_schema =  ATDocumentSchema.copy() + Schema((

#Configurar Banner  -------------------------------------
    BooleanField(
        name='active_banner',
        widget=BooleanWidget(
            label=_(u"Ativar banner na homepage"),
            description=_(u"Selecione para ativar o banner na homepage"),
            label_msgid='vindula_themedefault_label_active_banner',
            description_msgid='vindula_themedefault_help_active_banner',
            i18n_domain='vindula_themedefault',
        ),
    ),

    ReferenceField('ref_banner',
        multiValued=1,
from vindula.themedefault.browser.viewlets import MenuViewlet 

from zope.interface import Interface

from vindula.implantacao.content.interfaces import IImplantacao
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocumentBase
from Products.SmartColorWidget.Widget import SmartColorWidget

from zope.interface import implements
from Products.Archetypes.atapi import *
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.implantacao.config import *

Implantacao_schema =  ATDocumentSchema.copy() + Schema((

                                                     
#Layout  -------------------------------------
    ImageField(
        name='logoCabecalho',
        widget=ImageWidget(
            label=_(u"Logo do cabeçalho"),
            description=_(u""),
            label_msgid='vindula_themedefault_label_logoCabecalho',
            description_msgid='vindula_themedefault_help_logoCabecalho',
            i18n_domain='vindula_implantacao',
        ),
        schemata = 'Layout',
    ),
    
        'relatedItems',
        relationship='PloneHelpCenter',
        allowed_types=BUNGENI_REFERENCEABLE_TYPES,
        required = 0,
        multiValued=1,
        languageIndependent=1,
        widget=PHCReferenceWidget (
                label="Referenced Items",
                description="Set one or more references to HelpCenter items.",
                description_msgid = "phc_reference",
                label_msgid = "phc_label_reference",
                i18n_domain="plonehelpcenter"
                ),
    )

TabbedSubpagesSchema = ATDocumentSchema.copy() + Schema((RelatedItemsField),)

TabbedSubpagesSchema['title'].required = 0
TabbedSubpagesSchema['text'].required = 0

class TabbedSubpages(ATDocument):
    """
    Represents a page aggregating the content of referenced "sub-pages".
    Each sub-page gets a tab so that only one sub-page is shown at a time.
    """
    
    security = ClassSecurityInfo()
    global_allow = 1
    portal_type = meta_type = TYPE_PARAMS['TabbedSubpages']['portal_type']
    archetype_name = TYPE_PARAMS['TabbedSubpages']['archetype_name']
    immediate_view = default_view = TYPE_PARAMS['TabbedSubpages']['default_view']
Exemple #60
0
from zope.interface import implements

# Archetypes imports
from Products.Archetypes.atapi import *

# ATContentTypes imports
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.ATContentTypes.content.folder import ATFolder
from Products.ATContentTypes.content.folder import ATFolderSchema
from Products.ATContentTypes.content.document import ATDocumentSchema

# drako.knowledgebase imports
from easyshop.core.config import *
from easyshop.core.interfaces import IInformationPage

schema = ATFolderSchema.copy() + ATDocumentSchema.copy() + Schema ((
    FileField(
        name='file',
        widget=FileWidget(
            label="File",
            label_msgid='schema_file_label',
            description = "Upload of the original document.",
            description_msgid = "schema_file_description",            
            i18n_domain="EasyShop",
        ),
    ),            
))

finalizeATCTSchema(schema, moveDiscussion=False)
class InformationPage(ATFolder):
    """