--- a/docs/HISTORY.txt Mon Jun 18 08:47:10 2018 +0200
+++ b/docs/HISTORY.txt Mon Jun 18 09:20:08 2018 +0200
@@ -3,6 +3,7 @@
0.1.6
-----
+ - added "key numbers" portlet
- use shared content renderer interface
- use custom preview layout for paragraph preview
- added custom preview layout
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_default_theme/component/keynumber/__init__.py Mon Jun 18 09:20:08 2018 +0200
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2008-2018 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
+
+# import packages
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_default_theme/component/keynumber/portlet/__init__.py Mon Jun 18 09:20:08 2018 +0200
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2008-2018 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.keynumber.portlet.interfaces import IKeyNumberPortletSettings
+from pyams_portal.interfaces import IPortalContext, IPortletRenderer
+from pyams_skin.layer import IPyAMSLayer
+
+# import packages
+from pyams_portal.portlet import PortletRenderer
+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/horizontal-render.pt', layer=IPyAMSLayer)
+class KeyNumberPortletHorizontalRenderer(PortletRenderer):
+ """Key numbers portlet horizontal renderer"""
+
+ label = _("Horizontal list with carousel")
+
+
+@adapter_config(name='vertical', context=(IPortalContext, IPyAMSLayer, Interface, IKeyNumberPortletSettings),
+ provides=IPortletRenderer)
+@template_config(template='templates/vertical-render.pt', layer=IPyAMSLayer)
+class KeyNumberPortletVerticalRenderer(PortletRenderer):
+ """Key numbers portlet vertical renderer"""
+
+ label = _("Vertical list")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_default_theme/component/keynumber/portlet/templates/horizontal-render.pt Mon Jun 18 09:20:08 2018 +0200
@@ -0,0 +1,20 @@
+<div tal:define="settings view.settings" i18n:domain="pyams_content">
+ <strong tal:define="title i18n:settings.title"
+ tal:condition="title">
+ <tal:var content="title"/><br /></strong>
+ <div tal:define="teaser i18n:settings.teaser"
+ tal:content="structure extension:html(teaser)">Teaser</div>
+ <ul>
+ <li tal:repeat="number settings.keynumbers.get_visible_items()">
+ <span tal:define="label i18n:number.label"
+ tal:condition="label">
+ <tal:var content="label" /> : </span>
+ <span class="badge"
+ tal:content="i18n:number.number">Number</span>
+ <span tal:define="unit i18n:number.unit"
+ tal:condition="unit"
+ tal:content="unit">Unit</span>
+ <span tal:content="i18n:number.text">text</span>
+ </li>
+ </ul>
+</div>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_default_theme/component/keynumber/portlet/templates/vertical-render.pt Mon Jun 18 09:20:08 2018 +0200
@@ -0,0 +1,20 @@
+<div tal:define="settings view.settings" i18n:domain="pyams_content">
+ <strong tal:define="title i18n:settings.title"
+ tal:condition="title">
+ <tal:var content="title"/><br /></strong>
+ <div tal:define="teaser i18n:settings.teaser"
+ tal:content="structure extension:html(teaser)">Teaser</div>
+ <ul>
+ <li tal:repeat="number settings.keynumbers.get_visible_items()">
+ <span tal:define="label i18n:number.label"
+ tal:condition="label">
+ <tal:var content="label" /> : </span>
+ <span class="badge"
+ tal:content="i18n:number.number">Number</span>
+ <span tal:define="unit i18n:number.unit"
+ tal:condition="unit"
+ tal:content="unit">Unit</span>
+ <span tal:content="i18n:number.text">text</span>
+ </li>
+ </ul>
+</div>
Binary file src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.mo has changed
--- a/src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po Mon Jun 18 08:47:10 2018 +0200
+++ b/src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po Mon Jun 18 09:20:08 2018 +0200
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-13 14:45+0200\n"
+"POT-Creation-Date: 2018-06-18 09:06+0200\n"
"PO-Revision-Date: 2017-06-07 12:41+0200\n"
"Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
"Language-Team: French\n"
@@ -18,12 +18,20 @@
#: src/pyams_default_theme/skin.py:35
msgid "PyAMS default skin"
-msgstr "Skin par défaut PyAMS"
+msgstr "Skin par défaut (PyAMS)"
#: src/pyams_default_theme/component/gallery/__init__.py:40
msgid "Default gallery renderer"
msgstr "Par défaut"
+#: src/pyams_default_theme/component/keynumber/portlet/__init__.py:37
+msgid "Horizontal list with carousel"
+msgstr "Liste horizontale (par défaut)"
+
+#: src/pyams_default_theme/component/keynumber/portlet/__init__.py:46
+msgid "Vertical list"
+msgstr "Liste verticale"
+
#: src/pyams_default_theme/component/illustration/__init__.py:72
msgid "Centered illustration"
msgstr "Illustration centrée (par défaut)"
@@ -189,8 +197,8 @@
#: src/pyams_default_theme/shared/view/templates/render.pt:3
msgid "WARNING: items displayed in this preview are out of context!!"
msgstr ""
-"ATTENTION : la sélection des éléments affichés dans cet aperçu ne tient pas compte du "
-"contexte éventuellement paramétré dans la vue"
+"ATTENTION : la sélection des éléments affichés dans cet aperçu ne tient pas "
+"compte du contexte éventuellement paramétré dans la vue"
#: src/pyams_default_theme/shared/view/portlet/__init__.py:37
msgid "Simple list view"
@@ -208,6 +216,14 @@
msgid "Default logos renderer"
msgstr "Par défaut"
+#: src/pyams_default_theme/features/menu/portlet/navigation/__init__.py:43
+msgid "Horizontal list with vertical illustrations"
+msgstr "Liste horizontale avec illustrations verticales (par défaut)"
+
+#: src/pyams_default_theme/features/menu/portlet/navigation/__init__.py:56
+msgid "Vertical list with small horizontal menus illustrations"
+msgstr "Liste verticale avec illustrations horizontales"
+
#~ msgid "Search..."
#~ msgstr "Chercher..."
--- a/src/pyams_default_theme/locales/pyams_default_theme.pot Mon Jun 18 08:47:10 2018 +0200
+++ b/src/pyams_default_theme/locales/pyams_default_theme.pot Mon Jun 18 09:20:08 2018 +0200
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-13 14:45+0200\n"
+"POT-Creation-Date: 2018-06-18 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -24,6 +24,14 @@
msgid "Default gallery renderer"
msgstr ""
+#: ./src/pyams_default_theme/component/keynumber/portlet/__init__.py:37
+msgid "Horizontal list with carousel"
+msgstr ""
+
+#: ./src/pyams_default_theme/component/keynumber/portlet/__init__.py:46
+msgid "Vertical list"
+msgstr ""
+
#: ./src/pyams_default_theme/component/illustration/__init__.py:72
msgid "Centered illustration"
msgstr ""
@@ -190,3 +198,11 @@
#: ./src/pyams_default_theme/shared/logo/__init__.py:39
msgid "Default logos renderer"
msgstr ""
+
+#: ./src/pyams_default_theme/features/menu/portlet/navigation/__init__.py:43
+msgid "Horizontal list with vertical illustrations"
+msgstr ""
+
+#: ./src/pyams_default_theme/features/menu/portlet/navigation/__init__.py:56
+msgid "Vertical list with small horizontal menus illustrations"
+msgstr ""