Version 0.1.57 0.1.57
authorThierry Florac <tflorac@ulthar.net>
Mon, 01 Feb 2021 13:48:27 +0100
changeset 548 356a54a98a51
parent 547 ac39aec467ea
child 549 3a1b042768da
Version 0.1.57
buildout.cfg
docs/HISTORY.txt
setup.py
src/pyams_default_theme.egg-info/PKG-INFO
src/pyams_default_theme.egg-info/SOURCES.txt
src/pyams_default_theme/features/search/portlet/interfaces.py
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/site/folder.py
--- a/buildout.cfg	Mon Feb 01 13:36:23 2021 +0100
+++ b/buildout.cfg	Mon Feb 01 13:48:27 2021 +0100
@@ -80,4 +80,4 @@
 eggs = pyams_default_theme [test]
 
 [versions]
-pyams_default_theme = 0.1.56
+pyams_default_theme = 0.1.57
--- a/docs/HISTORY.txt	Mon Feb 01 13:36:23 2021 +0100
+++ b/docs/HISTORY.txt	Mon Feb 01 13:48:27 2021 +0100
@@ -1,6 +1,11 @@
 History
 =======
 
+0.1.57
+------
+ - handle navigation mode on sites and hubs managers
+ - updated map paragraph form manager
+
 0.1.56
 ------
  - updated search results templates to handle cases where components are not applied on
--- a/setup.py	Mon Feb 01 13:36:23 2021 +0100
+++ b/setup.py	Mon Feb 01 13:48:27 2021 +0100
@@ -22,7 +22,7 @@
 README = os.path.join(DOCS, 'README.txt')
 HISTORY = os.path.join(DOCS, 'HISTORY.txt')
 
-version = '0.1.56'
+version = '0.1.57'
 long_description = open(README).read() + '\n\n' + open(HISTORY).read()
 
 tests_require = []
--- a/src/pyams_default_theme.egg-info/PKG-INFO	Mon Feb 01 13:36:23 2021 +0100
+++ b/src/pyams_default_theme.egg-info/PKG-INFO	Mon Feb 01 13:48:27 2021 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pyams-default-theme
-Version: 0.1.56
+Version: 0.1.57
 Summary: PyAMS default theme
 Home-page: http://hg.ztfy.org/pyams/pyams_default_theme
 Author: Thierry Florac
@@ -11,6 +11,11 @@
         History
         =======
         
+        0.1.57
+        ------
+         - handle navigation mode on sites and hubs managers
+         - updated map paragraph form manager
+        
         0.1.56
         ------
          - updated search results templates to handle cases where components are not applied on
--- a/src/pyams_default_theme.egg-info/SOURCES.txt	Mon Feb 01 13:36:23 2021 +0100
+++ b/src/pyams_default_theme.egg-info/SOURCES.txt	Mon Feb 01 13:48:27 2021 +0100
@@ -209,6 +209,7 @@
 src/pyams_default_theme/shared/site/breadcrumb.py
 src/pyams_default_theme/shared/site/folder.py
 src/pyams_default_theme/shared/site/link.py
+src/pyams_default_theme/shared/site/manager.py
 src/pyams_default_theme/shared/site/portlet/__init__.py
 src/pyams_default_theme/shared/site/portlet/templates/site-panels-vertical.pt
 src/pyams_default_theme/shared/site/portlet/templates/site-panels.pt
--- a/src/pyams_default_theme/features/search/portlet/interfaces.py	Mon Feb 01 13:36:23 2021 +0100
+++ b/src/pyams_default_theme/features/search/portlet/interfaces.py	Mon Feb 01 13:48:27 2021 +0100
@@ -15,7 +15,7 @@
 from zope.contentprovider.interfaces import IContentProvider
 from zope.interface import Attribute, Interface
 from zope.schema import Bool, Choice, Int
-from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
+from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
 
 from pyams_i18n.schema import I18nTextLineField
 
@@ -92,14 +92,14 @@
                                  default=FULL_HEADER_DISPLAY)
 
     start_length = Int(title=_("Start length"),
-                       description=_("If you choose to display only header start, you can specify "
-                                     "maximum text length"),
+                       description=_("If you choose to display only header start, you can "
+                                     "specify maximum text length"),
                        required=True,
                        default=120)
 
     button_title = I18nTextLineField(title=_("Button's title"),
-                                     description=_("Navigation button's title is normally defined "
-                                                   "based on target's content type; you can "
-                                                   "override this label by giving a custom title "
-                                                   "here"),
+                                     description=_("Navigation button's title is normally "
+                                                   "defined based on target's content type; you "
+                                                   "can override this label by giving a custom "
+                                                   "title here"),
                                      required=False)
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 Feb 01 13:36:23 2021 +0100
+++ b/src/pyams_default_theme/locales/fr/LC_MESSAGES/pyams_default_theme.po	Mon Feb 01 13:48:27 2021 +0100
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2020-11-13 11:06+0100\n"
+"POT-Creation-Date: 2021-01-30 01:05+0100\n"
 "PO-Revision-Date: 2017-06-07 12:41+0200\n"
 "Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
 "Language-Team: French\n"
@@ -147,7 +147,7 @@
 msgid "Small frame on the right"
 msgstr "Encadré placé sur la droite"
 
-#: src/pyams_default_theme/component/paragraph/map.py:92
+#: src/pyams_default_theme/component/paragraph/map.py:105
 msgid "Default map renderer"
 msgstr "Par défaut"
 
@@ -311,6 +311,16 @@
 msgid "Use default configuration?"
 msgstr "Utiliser la configuration par défaut ?"
 
+#: src/pyams_default_theme/component/paragraph/interfaces/map.py:44
+msgid "Map height"
+msgstr "Hauteur de la carte"
+
+#: src/pyams_default_theme/component/paragraph/interfaces/map.py:45
+msgid "Map height, in pixels"
+msgstr ""
+"Hauteur de la carte, en pixels ; ATTENTION : cette contrainte peut ne pas "
+"être respectée dans certains contextes, notamment sur mobile !"
+
 #: src/pyams_default_theme/component/paragraph/interfaces/frame.py:37
 msgid "Show associations?"
 msgstr "Afficher les liens et pièces jointes ?"
@@ -350,7 +360,7 @@
 msgid "Previous and next topics"
 msgstr "Contenus précédent et suivant"
 
-#: src/pyams_default_theme/component/paragraph/zmi/map.py:62
+#: src/pyams_default_theme/component/paragraph/zmi/map.py:53
 msgid "Don't use default map configuration"
 msgstr "Ne pas utiliser la configuration de carte par défaut"
 
@@ -918,15 +928,15 @@
 msgid "Default form fields renderer"
 msgstr "Par défaut"
 
-#: src/pyams_default_theme/shared/view/portlet/__init__.py:82
+#: src/pyams_default_theme/shared/view/portlet/__init__.py:86
 msgid "Simple vertical view"
 msgstr "Liste verticale simple (par défaut)"
 
-#: src/pyams_default_theme/shared/view/portlet/__init__.py:107
+#: src/pyams_default_theme/shared/view/portlet/__init__.py:111
 msgid "Simple horizontal thumbnails view"
 msgstr "Liste horizontale simple"
 
-#: src/pyams_default_theme/shared/view/portlet/__init__.py:139
+#: src/pyams_default_theme/shared/view/portlet/__init__.py:143
 msgid "Vertical panels view"
 msgstr "Page carrefour simple"
 
--- a/src/pyams_default_theme/locales/pyams_default_theme.pot	Mon Feb 01 13:36:23 2021 +0100
+++ b/src/pyams_default_theme/locales/pyams_default_theme.pot	Mon Feb 01 13:48:27 2021 +0100
@@ -1,12 +1,12 @@
 #
 # SOME DESCRIPTIVE TITLE
 # This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
 #, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2020-11-13 11:06+0100\n"
+"POT-Creation-Date: 2021-01-30 01:05+0100\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"
@@ -147,7 +147,7 @@
 msgid "Small frame on the right"
 msgstr ""
 
-#: ./src/pyams_default_theme/component/paragraph/map.py:92
+#: ./src/pyams_default_theme/component/paragraph/map.py:105
 msgid "Default map renderer"
 msgstr ""
 
@@ -292,6 +292,14 @@
 msgid "Use default configuration?"
 msgstr ""
 
+#: ./src/pyams_default_theme/component/paragraph/interfaces/map.py:44
+msgid "Map height"
+msgstr ""
+
+#: ./src/pyams_default_theme/component/paragraph/interfaces/map.py:45
+msgid "Map height, in pixels"
+msgstr ""
+
 #: ./src/pyams_default_theme/component/paragraph/interfaces/frame.py:37
 msgid "Show associations?"
 msgstr ""
@@ -326,7 +334,7 @@
 msgid "Previous and next topics"
 msgstr ""
 
-#: ./src/pyams_default_theme/component/paragraph/zmi/map.py:62
+#: ./src/pyams_default_theme/component/paragraph/zmi/map.py:53
 msgid "Don't use default map configuration"
 msgstr ""
 
@@ -879,15 +887,15 @@
 msgid "Default form fields renderer"
 msgstr ""
 
-#: ./src/pyams_default_theme/shared/view/portlet/__init__.py:82
+#: ./src/pyams_default_theme/shared/view/portlet/__init__.py:86
 msgid "Simple vertical view"
 msgstr ""
 
-#: ./src/pyams_default_theme/shared/view/portlet/__init__.py:107
+#: ./src/pyams_default_theme/shared/view/portlet/__init__.py:111
 msgid "Simple horizontal thumbnails view"
 msgstr ""
 
-#: ./src/pyams_default_theme/shared/view/portlet/__init__.py:139
+#: ./src/pyams_default_theme/shared/view/portlet/__init__.py:143
 msgid "Vertical panels view"
 msgstr ""
 
--- a/src/pyams_default_theme/shared/site/folder.py	Mon Feb 01 13:36:23 2021 +0100
+++ b/src/pyams_default_theme/shared/site/folder.py	Mon Feb 01 13:48:27 2021 +0100
@@ -15,7 +15,7 @@
 from pyramid.httpexceptions import HTTPSeeOther
 
 from pyams_content.shared.site import ISiteElementNavigation
-from pyams_content.shared.site.interfaces import FOLDER_REDIRECT_DISPLAY_MODE, ISiteFolder
+from pyams_content.shared.site.interfaces import SITE_CONTAINER_REDIRECT_MODE, ISiteFolder
 from pyams_default_theme.interfaces import IContentSummaryInfo
 from pyams_i18n.interfaces import II18n
 from pyams_pagelet.pagelet import pagelet_config
@@ -65,20 +65,22 @@
     """Site folder index page"""
 
     def __call__(self, **kwargs):
-        if self.context.navigation_mode == FOLDER_REDIRECT_DISPLAY_MODE:
+        if self.context.navigation_mode == SITE_CONTAINER_REDIRECT_MODE:
             target = next(self.context.get_visible_items(self.request), None)
             if target is not None:
                 return HTTPSeeOther(relative_url(target, request=self.request))
-        return super(SiteFolderIndexPage, self).__call__(**kwargs)
+        return super().__call__(**kwargs)
 
 
-@pagelet_config(name='preview.html', context=ISiteFolder, layer=IPyAMSUserLayer, permission=VIEW_SYSTEM_PERMISSION)
+@pagelet_config(name='preview.html', context=ISiteFolder, layer=IPyAMSUserLayer,
+                permission=VIEW_SYSTEM_PERMISSION)
 class SiteFolderPreviewPage(PortalContextPreviewPage):
     """Site folder preview page"""
 
     def __call__(self, **kwargs):
-        if self.context.navigation_mode == FOLDER_REDIRECT_DISPLAY_MODE:
+        if self.context.navigation_mode == SITE_CONTAINER_REDIRECT_MODE:
             target = next(self.context.get_visible_items(self.request), None)
             if target is not None:
-                return HTTPSeeOther(relative_url(target, request=self.request, view_name='preview.html'))
-        return super(SiteFolderPreviewPage, self).__call__(**kwargs)
+                return HTTPSeeOther(relative_url(target, request=self.request,
+                                                 view_name='preview.html'))
+        return super().__call__(**kwargs)