src/pyams_content/component/paragraph/zmi/__init__.py
changeset 555 8e8a14452567
parent 550 9658debb49a3
child 563 0d2e0946ed64
--- a/src/pyams_content/component/paragraph/zmi/__init__.py	Thu May 24 10:51:45 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/__init__.py	Fri May 25 08:03:41 2018 +0200
@@ -17,7 +17,7 @@
 
 # import interfaces
 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IBaseParagraph, IParagraphFactory, \
-    IParagraphFactorySettings
+    IParagraphFactorySettings, IParagraphRenderer
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView
 from pyams_content.interfaces import MANAGE_TOOL_PERMISSION
 from pyams_content.shared.common.interfaces import IWfSharedContent
@@ -31,6 +31,7 @@
 
 # import packages
 from pyams_content.component.paragraph.zmi.container import ParagraphContainerTable, ParagraphContainerBaseTable
+from pyams_content.features.renderer.zmi import BaseRenderedContentRenderer
 from pyams_form.form import AJAXEditForm, AJAXAddForm
 from pyams_form.help import FormHelp
 from pyams_form.schema import ActionButton, CloseButton
@@ -205,8 +206,8 @@
     """Paragraph edit form buttons"""
 
     preview = ActionButton(name='preview', title=_("Preview"),
-                           label_css_class='fa fa-fw fa-eye',
-                           url='preview.html',
+                           label_css_class='fa fa-fw fa-binoculars',
+                           url='content-preview.html',
                            modal_target=True)
 
     close = CloseButton(name='close', title=_("Cancel"))
@@ -242,3 +243,12 @@
             output.setdefault('events', []).append(
                 get_json_paragraph_refresh_event(self.context, self.request))
         return output
+
+
+#
+# Base paragraph renderer
+#
+
+@adapter_config(context=(IBaseParagraph, IPyAMSLayer), provides=IParagraphRenderer)
+class BaseParagraphRenderer(BaseRenderedContentRenderer):
+    """Base paragraph renderer"""