# HG changeset patch # User Thierry Florac # Date 1529306408 -7200 # Node ID e35d6943b20e86a59848cdd602e952b78407edd4 # Parent ad7d0b85a2ccd7fb267db17cb73d40c75f3875d3# Parent d80fc625e4d86349551a54feca761f9d02015355 Include keynumber portlet (merge dev-dc) diff -r ad7d0b85a2cc -r e35d6943b20e docs/HISTORY.txt --- 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 diff -r ad7d0b85a2cc -r e35d6943b20e 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 Mon Jun 18 09:20:08 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 ad7d0b85a2cc -r e35d6943b20e 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 Mon Jun 18 09:20:08 2018 +0200 @@ -0,0 +1,46 @@ +# +# 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.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") diff -r ad7d0b85a2cc -r e35d6943b20e src/pyams_default_theme/component/keynumber/portlet/templates/horizontal-render.pt --- /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 @@ +
+ +
+
Teaser
+
    +
  • + + : + Number + Unit + text +
  • +
+
diff -r ad7d0b85a2cc -r e35d6943b20e src/pyams_default_theme/component/keynumber/portlet/templates/vertical-render.pt --- /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 @@ +
+ +
+
Teaser
+
    +
  • + + : + Number + Unit + text +
  • +
+
diff -r ad7d0b85a2cc -r e35d6943b20e src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.mo Binary file src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.mo has changed diff -r ad7d0b85a2cc -r e35d6943b20e src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po --- 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 \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..." diff -r ad7d0b85a2cc -r e35d6943b20e src/pyams_default_theme/locales/pyams_default_theme.pot --- 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 \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 ""