--- a/src/pyams_content/features/preview/zmi/__init__.py Fri Dec 14 13:32:54 2018 +0100
+++ b/src/pyams_content/features/preview/zmi/__init__.py Fri Dec 14 14:44:31 2018 +0100
@@ -39,6 +39,7 @@
@viewlet_config(name='preview.action', context=IPreviewTarget, layer=IAdminLayer, view=Interface,
manager=IToolbarViewletManager, permisison=VIEW_SYSTEM_PERMISSION, weight=50)
+@template_config(template='templates/preview-action.pt', layer=IAdminLayer)
class PreviewAction(ToolbarAction):
"""Content preview action"""
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/features/preview/zmi/templates/preview-action.pt Fri Dec 14 14:44:31 2018 +0100
@@ -0,0 +1,17 @@
+<div class="btn-group"
+ tal:attributes="class view.group_css_class | default">
+ <div class="${view.css_class}"
+ data-toggle="${'modal' if view.modal_target else None}"
+ data-ams-url="${view.get_url()}"
+ data-ams-stop-propagation="${'true' if view.modal_target else None}"
+ data-ams-data="${tales:object_data(view)}">
+ <i class="${view.label_css_class}"></i>
+ <tal:var content="view.label" />
+ </div>
+ <div class="${view.css_class} hint"
+ title="Open preview in new window" i18n:attributes="title"
+ data-ams-url="${tales:absolute_url(context)}/preview.html"
+ data-ams-target="_blank">
+ <i class="fa fa-fw fa-window-maximize"></i>
+ </div>
+</div>