src/pyams_default_theme/component/paragraph/audio.py
branchdev-dc
changeset 104 a050abf1a69c
child 105 9e70ec7ccaa8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_default_theme/component/paragraph/audio.py	Wed Jul 18 18:51:18 2018 +0200
@@ -0,0 +1,40 @@
+#
+# 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.audio import IAudioParagraph
+from pyams_content.features.renderer import IContentRenderer
+from pyams_skin.layer import IPyAMSLayer
+
+# import packages
+from pyams_content.features.renderer.skin import BaseContentRenderer
+from pyams_default_theme import _
+from pyams_template.template import template_config
+from pyams_utils.adapter import adapter_config
+
+
+#
+#  Audio paragraph default renderer
+#
+
+@adapter_config(name='default', context=(IAudioParagraph, IPyAMSLayer), provides=IContentRenderer)
+@template_config(template='templates/keynumber-default.pt', layer=IPyAMSLayer)
+class DefaultAudioRenderer(BaseContentRenderer):
+    """Default Key Numbers renderer"""
+
+    label = _("Default audio renderer")
+    weight = 1