Beispiel #1
0
class IEvento(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    tempo = schema.Int(
        title=_(u"Tempo"),
        required=True,
        description=_(u"Informe o tempo em segundos."),
    )
#
    imagem = schema.Bytes(
        title=_(u"Foto"),
        required=True,
        description=_(u"Field description"),
    )
#
    data = schema.TextLine(
        title=_(u"Data"),
        required=True,
        description=_(u"Informe a data"),
    )
#
    hora = schema.TextLine(
        title=_(u"Hora"),
        required=True,
        description=_(u"Field description"),
    )
#
    local = schema.TextLine(
        title=_(u"Local"),
        required=True,
        description=_(u"Nome do Local - Cidade/UF"),
    )
Beispiel #2
0
class IAlbum(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    trilha = schema.Bytes(
        title=_(u"Trilha"),
        required=True,
        description=_(u"Field description"),
    )
class IVinheta(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    video = schema.Bytes(
        title=_(u"Video"),
        required=True,
        description=_(u"Field description"),
    )
class IColuna(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    autor = schema.TextLine(
        title=_(u"Autor"),
        required=True,
        description=_(u"Field description"),
    )
    #
    foto = schema.Bytes(
        title=_(u"Foto"),
        required=True,
        description=_(u"Field description"),
    )
class ITexto(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    texto = schema.Text(
        title=_(u"Texto"),
        required=True,
        description=_(u"Field description"),
    )
    #
    tempo = schema.Int(
        title=_(u"Tempo"),
        required=False,
        description=_(u"Field description"),
    )
Beispiel #6
0
class IFoto(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    tempo = schema.Int(
        title=_(u"Tempo"),
        required=True,
        description=_(u"Field description"),
    )
    #
    arquivo = schema.Bytes(
        title=_(u"Arquivo"),
        required=True,
        description=_(u"Field description"),
    )
    #
    legenda = schema.TextLine(
        title=_(u"Legenda"),
        required=False,
        description=_(u"Field description"),
    )
Beispiel #7
0
# -*- Message Factory Imported Here -*-
from rendereasy.origineclub import origineclubMessageFactory as _

from rendereasy.origineclub.interfaces import ITexto
from rendereasy.origineclub.config import PROJECTNAME

TextoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

    atapi.TextField(
        'texto',
        storage=atapi.AnnotationStorage(),
        widget=atapi.TextAreaWidget(
            label=_(u"Texto"),
        ),
        required=True,
    ),


    atapi.IntegerField(
        'tempo',
        storage=atapi.AnnotationStorage(),
        widget=atapi.IntegerWidget(
            label=_(u"Tempo"),
            description=_(u"Field description"),
        ),
        validators=('isInt'),
    ),
class IPerguntaResposta(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    nomepergunta = schema.TextLine(
        title=_(u"Nome - Pergunta"),
        required=False,
        description=_(u"Field description"),
    )
    #
    creditopergunta = schema.TextLine(
        title=_(u"Credito - Pergunta"),
        required=False,
        description=_(u"Field description"),
    )
    #
    videopergunta = schema.Bytes(
        title=_(u"Video - Pergunta"),
        required=False,
        description=_(u"Field description"),
    )
    #
    nomeresposta = schema.TextLine(
        title=_(u"Nome - Resposta"),
        required=True,
        description=_(u"Field description"),
    )
    #
    creditoresposta = schema.TextLine(
        title=_(u"Credito - Resposta"),
        required=True,
        description=_(u"Field description"),
    )
    #
    videoresposta = schema.Bytes(
        title=_(u"Video - Resposta"),
        required=True,
        description=_(u"Field description"),
    )
Beispiel #9
0
from rendereasy.origineclub.interfaces import IPerguntaResposta
from rendereasy.origineclub.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

PerguntaRespostaSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

    atapi.StringField(
        'nomepergunta',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Nome - Pergunta"),
        ),
    ),


    atapi.StringField(
        'creditopergunta',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Crédito - Pergunta"),
        ),
    ),


    atapi.FileField(
        'videopergunta',
Beispiel #10
0
from rendereasy.origineclub import origineclubMessageFactory as _

from rendereasy.origineclub.interfaces import IAlbum
from rendereasy.origineclub.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

AlbumSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.FileField(
        'trilha',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(label=_(u"Trilha"), ),
        required=True,
        validators=('isNonEmptyFile'),
    ), ))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.

AlbumSchema['title'].widget.label = _(u"Nome do Álbum")
AlbumSchema['title'].storage = atapi.AnnotationStorage()
AlbumSchema['description'].storage = atapi.AnnotationStorage()
AlbumSchema['description'].widget.visible = {
    "edit": "invisible",
    "view": "invisible"
}
AlbumSchema['location'].widget.visible = {
from rendereasy.origineclub.interfaces import IEvento
from rendereasy.origineclub.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

EventoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

    atapi.IntegerField(
        'tempo',
        storage=atapi.AnnotationStorage(),
        widget=atapi.IntegerWidget(
            label=_(u"Tempo"),
            description=_(u"Informe o tempo em segundos."),
        ),
        required=True,
        default=5,
        validators=('isInt'),
    ),

    atapi.ImageField(
        'imagem',
        storage=atapi.AnnotationStorage(),
        widget=atapi.ImageWidget(
            label=_(u"Foto"),
        ),
        required=True,
        validators=('isNonEmptyFile'),
Beispiel #12
0
from rendereasy.origineclub.interfaces import IColuna
from rendereasy.origineclub.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

ColunaSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

    atapi.StringField(
        'autor',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Autor"),
        ),
        required=True,
    ),

    atapi.ImageField(
        'foto',
        storage=atapi.AnnotationStorage(),
        widget=atapi.ImageWidget(
            label=_(u"Foto"),
        ),
        required=True,
        validators=('isNonEmptyFile'),
    ),

Beispiel #13
0
from rendereasy.origineclub import origineclubMessageFactory as _

from rendereasy.origineclub.interfaces import IVinheta
from rendereasy.origineclub.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

VinhetaSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.FileField(
        'video',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(label=_(u"Vídeo"), ),
        required=True,
        validators=('isNonEmptyFile'),
    ), ))

# Set storage on fields copied from ATContentTypeSchema, making sure
# they work well with the python bridge properties.

VinhetaSchema['title'].storage = atapi.AnnotationStorage()
VinhetaSchema['description'].storage = atapi.AnnotationStorage()
VinhetaSchema['description'].widget.visible = {
    "edit": "invisible",
    "view": "invisible"
}
VinhetaSchema['location'].widget.visible = {
    "edit": "invisible",