Added default renderer for shared content's title portlet
authorThierry Florac <thierry.florac@onf.fr>
Tue, 25 Sep 2018 11:24:50 +0200
changeset 152 7bd4cb30b503
parent 151 c555624ebbbd
child 153 461fa3beb438
Added default renderer for shared content's title portlet
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
src/pyams_default_theme/shared/common/portlet/templates/title.pt
src/pyams_default_theme/shared/common/portlet/title.py
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 Sep 24 16:03:04 2018 +0200
+++ b/src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po	Tue Sep 25 11:24:50 2018 +0200
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-09-13 17:19+0200\n"
+"POT-Creation-Date: 2018-09-25 11:23+0200\n"
 "PO-Revision-Date: 2017-06-07 12:41+0200\n"
 "Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
 "Language-Team: French\n"
@@ -20,7 +20,7 @@
 msgid "PyAMS default skin"
 msgstr "Skin par défaut (PyAMS)"
 
-#: src/pyams_default_theme/component/gallery/__init__.py:40
+#: src/pyams_default_theme/component/gallery/__init__.py:34
 msgid "Default gallery renderer"
 msgstr "Par défaut"
 
@@ -121,11 +121,11 @@
 msgid "Don't use default map configuration"
 msgstr "Ne pas utiliser la configuration de carte par défaut"
 
-#: src/pyams_default_theme/component/paragraph/portlet/__init__.py:41
+#: src/pyams_default_theme/component/paragraph/portlet/__init__.py:40
 msgid "Default paragraphs renderer"
 msgstr "Par défaut"
 
-#: src/pyams_default_theme/component/paragraph/portlet/__init__.py:68
+#: src/pyams_default_theme/component/paragraph/portlet/__init__.py:67
 msgid "Default paragraphs navigation"
 msgstr "Par défaut"
 
@@ -280,6 +280,10 @@
 "Si 'oui', seuls les blocs de contenu désignés comme ancres seront "
 "sélectionnés"
 
+#: src/pyams_default_theme/shared/common/portlet/title.py:38
+msgid "Default title renderer"
+msgstr "Par défaut"
+
 #: src/pyams_default_theme/shared/common/portlet/head.py:38
 msgid "Default header renderer"
 msgstr "Par défaut"
--- a/src/pyams_default_theme/locales/pyams_default_theme.pot	Mon Sep 24 16:03:04 2018 +0200
+++ b/src/pyams_default_theme/locales/pyams_default_theme.pot	Tue Sep 25 11:24:50 2018 +0200
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-09-13 17:19+0200\n"
+"POT-Creation-Date: 2018-09-25 11:23+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"
@@ -20,7 +20,7 @@
 msgid "PyAMS default skin"
 msgstr ""
 
-#: ./src/pyams_default_theme/component/gallery/__init__.py:40
+#: ./src/pyams_default_theme/component/gallery/__init__.py:34
 msgid "Default gallery renderer"
 msgstr ""
 
@@ -119,11 +119,11 @@
 msgid "Don't use default map configuration"
 msgstr ""
 
-#: ./src/pyams_default_theme/component/paragraph/portlet/__init__.py:41
+#: ./src/pyams_default_theme/component/paragraph/portlet/__init__.py:40
 msgid "Default paragraphs renderer"
 msgstr ""
 
-#: ./src/pyams_default_theme/component/paragraph/portlet/__init__.py:68
+#: ./src/pyams_default_theme/component/paragraph/portlet/__init__.py:67
 msgid "Default paragraphs navigation"
 msgstr ""
 
@@ -261,6 +261,10 @@
 msgid "If 'yes', only paragraphs set as 'anchors' will be selected"
 msgstr ""
 
+#: ./src/pyams_default_theme/shared/common/portlet/title.py:38
+msgid "Default title renderer"
+msgstr ""
+
 #: ./src/pyams_default_theme/shared/common/portlet/head.py:38
 msgid "Default header renderer"
 msgstr ""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_default_theme/shared/common/portlet/title.py	Tue Sep 25 11:24:50 2018 +0200
@@ -0,0 +1,37 @@
+
+# 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
+
+from zope.interface import Interface
+
+# import interfaces
+from pyams_content.shared.common.portlet.interfaces import ISharedContentTitlePortletSettings
+from pyams_default_theme import _
+from pyams_portal.interfaces import IPortalContext, IPortletRenderer
+# import packages
+from pyams_portal.portlet import PortletRenderer
+from pyams_skin.layer import IPyAMSLayer
+from pyams_template.template import template_config
+from pyams_utils.adapter import adapter_config
+
+
+@adapter_config(context=(IPortalContext, IPyAMSLayer, Interface, ISharedContentTitlePortletSettings),
+                provides=IPortletRenderer)
+@template_config(template='templates/title.pt', layer=IPyAMSLayer)
+class SharedContentTitlePortletRenderer(PortletRenderer):
+    """Shared content title portlet renderer"""
+
+    label = _("Default title renderer")