Removed view renderer
authorThierry Florac <thierry.florac@onf.fr>
Wed, 13 Jun 2018 14:27:08 +0200
changeset 643 6fa677b3456c
parent 642 f2323704d6c3
child 644 e8af44ddd0ae
Removed view renderer
src/pyams_content/shared/view/zmi/render.py
src/pyams_content/shared/view/zmi/templates/render.pt
--- a/src/pyams_content/shared/view/zmi/render.py	Wed Jun 13 12:35:44 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#
-# 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.features.renderer.interfaces import IContentRenderer
-from pyams_content.shared.view.interfaces import IWfView
-from pyams_skin.layer import IPyAMSLayer
-
-# import packages
-from pyams_content.features.renderer.skin import BaseContentRenderer
-from pyams_template.template import template_config
-from pyams_utils.adapter import adapter_config
-
-
-@adapter_config(name='view-render', context=(IWfView, IPyAMSLayer), provides=IContentRenderer)
-@template_config(template='templates/render.pt', layer=IPyAMSLayer)
-class ViewRenderer(BaseContentRenderer):
-    """Shared view renderer"""
-
-    weight = 20
-
-    @property
-    def items(self):
-        return self.context.get_results(self.context)
--- a/src/pyams_content/shared/view/zmi/templates/render.pt	Wed Jun 13 12:35:44 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<fieldset i18n:domain="pyams_content">
-	<legend class="inner" i18n:translate="">View result items</legend>
-	<div class="alert alert-info padding-5" i18n:translate="">
-		WARNING: items displayed in this preview are out of context!!
-	</div>
-	<tal:loop repeat="item view.items">
-		<span tal:content="i18n:item.title" /><br />
-	</tal:loop>
-</fieldset>