#
# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
__docformat__ = 'restructuredtext'
# import standard library
# import interfaces
from pyams_content.component.paragraph.interfaces import IBaseParagraph
# import packages
from pyams_i18n.schema import I18nTextLineField, I18nTextField
from zope.schema import Choice, TextLine
from pyams_content import _
#
# Verbatim paragraph
#
VERBATIM_PARAGRAPH_TYPE = 'Verbatim'
VERBATIM_PARAGRAPH_NAME = _("Verbatim")
VERBATIM_PARAGRAPH_RENDERERS = 'PyAMS.paragraph.verbatim.renderers'
[docs]class IVerbatimParagraph(IBaseParagraph):
"""Verbatim paragraph interface"""
quote = I18nTextField(title=_("Quoted text"),
description=_("Quotation marks will be added automatically by presentation template"),
required=True)
author = TextLine(title=_("Author"),
description=_("Name of the quote author"),
required=False)
charge = I18nTextLineField(title=_("In charge of"),
description=_("Label of author function"),
required=False)
renderer = Choice(title=_("Verbatim template"),
description=_("Presentation template used for this paragraph"),
vocabulary=VERBATIM_PARAGRAPH_RENDERERS,
default='default')