# HG changeset patch # User Damien Correia # Date 1529078530 -7200 # Node ID 67b8199301b805c4f1eb4cd27529d3bcbd26040e # Parent c14ccc1308ad4a38c36e3760117f6beea0f20615 Added Keynumber portlet default renderer diff -r c14ccc1308ad -r 67b8199301b8 src/pyams_default_theme/component/keynumber/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/component/keynumber/__init__.py Fri Jun 15 18:02:10 2018 +0200 @@ -0,0 +1,20 @@ +# +# Copyright (c) 2008-2018 Thierry Florac +# 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 + +# import packages diff -r c14ccc1308ad -r 67b8199301b8 src/pyams_default_theme/component/keynumber/portlet/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/component/keynumber/portlet/__init__.py Fri Jun 15 18:02:10 2018 +0200 @@ -0,0 +1,36 @@ +# +# Copyright (c) 2008-2018 Thierry Florac +# 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.keynumber.portlet import IKeyNumberPortletSettings +from pyams_portal.interfaces import IPortalContext, IPortletRenderer +from pyams_portal.portlet import PortletRenderer +from pyams_skin.layer import IPyAMSLayer + +# import packages +from pyams_template.template import template_config +from pyams_utils.adapter import adapter_config + +from zope.interface import Interface +from pyams_default_theme import _ + + +@adapter_config(context=(IPortalContext, IPyAMSLayer, Interface, IKeyNumberPortletSettings), provides=IPortletRenderer) +@template_config(template='templates/render.pt', layer=IPyAMSLayer) +class KeyNumberPortletRenderer(PortletRenderer): + """New portlet renderer""" + + label = _("Default comment renderer") diff -r c14ccc1308ad -r 67b8199301b8 src/pyams_default_theme/component/keynumber/portlet/templates/render.pt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/component/keynumber/portlet/templates/render.pt Fri Jun 15 18:02:10 2018 +0200 @@ -0,0 +1,19 @@ +
+ Title + +
    +
  • + label + Number + Unit + text +
  • +
+