Include keynumber portlet (merge dev-dc)
authorThierry Florac <thierry.florac@onf.fr>
Mon, 18 Jun 2018 09:20:08 +0200
changeset 54 e35d6943b20e
parent 53 ad7d0b85a2cc (diff)
parent 52 d80fc625e4d8 (current diff)
child 55 ab81e4954e66
Include keynumber portlet (merge dev-dc)
docs/HISTORY.txt
src/pyams_default_theme/component/keynumber/portlet/__init__.py
src/pyams_default_theme/component/keynumber/portlet/templates/horizontal-render.pt
src/pyams_default_theme/component/keynumber/portlet/templates/render.pt
src/pyams_default_theme/component/keynumber/portlet/templates/vertical-render.pt
src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.mo
src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po
src/pyams_default_theme/locales/pyams_default_theme.pot
--- a/docs/HISTORY.txt	Fri Jun 15 18:17:42 2018 +0200
+++ b/docs/HISTORY.txt	Mon Jun 18 09:20:08 2018 +0200
@@ -1,6 +1,13 @@
 History
 =======
 
+0.1.6
+-----
+ - added "key numbers" portlet
+ - use shared content renderer interface
+ - use custom preview layout for paragraph preview
+ - added custom preview layout
+
 0.1.5
 -----
  - added header and footer content providers
--- a/src/pyams_default_theme.egg-info/PKG-INFO	Fri Jun 15 18:17:42 2018 +0200
+++ b/src/pyams_default_theme.egg-info/PKG-INFO	Mon Jun 18 09:20:08 2018 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyams-default-theme
-Version: 0.1.5
+Version: 0.1.6
 Summary: PyAMS default theme
 Home-page: http://hg.ztfy.org/pyams/pyams_default_theme
 Author: Thierry Florac
@@ -12,6 +12,12 @@
         History
         =======
         
+        0.1.6
+        -----
+         - use shared content renderer interface
+         - use custom preview layout for paragraph preview
+         - added custom preview layout
+        
         0.1.5
         -----
          - added header and footer content providers
--- a/src/pyams_default_theme.egg-info/SOURCES.txt	Fri Jun 15 18:17:42 2018 +0200
+++ b/src/pyams_default_theme.egg-info/SOURCES.txt	Mon Jun 18 09:20:08 2018 +0200
@@ -56,6 +56,12 @@
 src/pyams_default_theme/features/__init__.py
 src/pyams_default_theme/features/footer/__init__.py
 src/pyams_default_theme/features/header/__init__.py
+src/pyams_default_theme/features/menu/__init__.py
+src/pyams_default_theme/features/menu/portlet/__init__.py
+src/pyams_default_theme/features/menu/portlet/navigation/__init__.py
+src/pyams_default_theme/features/menu/portlet/navigation/templates/double-vertical.pt
+src/pyams_default_theme/features/menu/portlet/navigation/templates/simple-horizontal.pt
+src/pyams_default_theme/locales/pyams_default_theme.mo
 src/pyams_default_theme/locales/pyams_default_theme.pot
 src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.mo
 src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po
@@ -76,8 +82,10 @@
 src/pyams_default_theme/shared/view/__init__.py
 src/pyams_default_theme/shared/view/portlet/__init__.py
 src/pyams_default_theme/shared/view/portlet/templates/view-items-list.pt
+src/pyams_default_theme/shared/view/templates/render.pt
 src/pyams_default_theme/templates/index.pt
 src/pyams_default_theme/templates/layout.pt
+src/pyams_default_theme/templates/preview-layout.pt
 src/pyams_default_theme/tests/__init__.py
 src/pyams_default_theme/tests/test_utilsdocs.py
 src/pyams_default_theme/tests/test_utilsdocstrings.py
\ No newline at end of file
--- a/src/pyams_default_theme/component/keynumber/portlet/__init__.py	Fri Jun 15 18:17:42 2018 +0200
+++ b/src/pyams_default_theme/component/keynumber/portlet/__init__.py	Mon Jun 18 09:20:08 2018 +0200
@@ -12,25 +12,35 @@
 
 __docformat__ = 'restructuredtext'
 
+
 # import standard library
 
 # import interfaces
-from pyams_content.component.keynumber.portlet import IKeyNumberPortletSettings
+from pyams_content.component.keynumber.portlet.interfaces 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_portal.portlet import PortletRenderer
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
+from zope.interface import Interface
 
-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"""
+@template_config(template='templates/horizontal-render.pt', layer=IPyAMSLayer)
+class KeyNumberPortletHorizontalRenderer(PortletRenderer):
+    """Key numbers portlet horizontal renderer"""
+
+    label = _("Horizontal list with carousel")
+
 
-    label = _("Vertical list of key numbers")
+@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>
--- a/src/pyams_default_theme/component/keynumber/portlet/templates/render.pt	Fri Jun 15 18:17:42 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<div tal:define="settings view.settings" i18n:domain="pyams_content">
-    <strong tal:define="title i18n:settings.title"
-            tal:condition="title"
-            tal:content="title + ' : '">Title</strong>
-    <span tal:content="settings.teaser"></span>
-    <ul>
-	    <li tal:repeat="number settings.keynumbers.get_visible_items()">
-			<span tal:define="label i18n:number.label"
-                  tal:condition="label"
-				  tal:content="label + ' : '">label</span>
-			<span tal:define="number i18n:number.number"
-				  tal:content="number or '--'" class="badge">Number</span>
-			<span tal:define="unit i18n:number.unit"
-				  tal:content="unit or '......'">Unit</span>
-			<span tal:define="txt i18n:number.text"
-				  tal:content="txt">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	Fri Jun 15 18:17:42 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	Fri Jun 15 18:17:42 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 ""