Added navigation header attribute
authorThierry Florac <tflorac@ulthar.net>
Fri, 20 Nov 2020 08:30:22 +0100
changeset 1434 13db47aeac34
parent 1433 23b4d281e849
child 1435 347a4c2ef20c
Added navigation header attribute
src/pyams_content/shared/hub/interfaces.py
src/pyams_content/shared/hub/manager.py
src/pyams_content/shared/hub/zmi/manager.py
--- a/src/pyams_content/shared/hub/interfaces.py	Thu Nov 19 16:10:44 2020 +0100
+++ b/src/pyams_content/shared/hub/interfaces.py	Fri Nov 20 08:30:22 2020 +0100
@@ -39,6 +39,12 @@
 class IHubManager(ISiteManager):
     """Hub manager interface"""
 
+    navigation_header = I18nTextField(title=_("Navigation header"),
+                                      description=_("Alternate content's header displayed in "
+                                                    "navigation pages; original header will be "
+                                                    "used if none is specified"),
+                                      required=False)
+
 
 class IHubManagerFactory(Interface):
     """Hub manager factory interface"""
--- a/src/pyams_content/shared/hub/manager.py	Thu Nov 19 16:10:44 2020 +0100
+++ b/src/pyams_content/shared/hub/manager.py	Fri Nov 20 08:30:22 2020 +0100
@@ -52,6 +52,7 @@
     """Hub manager persistent class"""
 
     header = FieldProperty(IHubManager['header'])
+    navigation_header = FieldProperty(IHubManager['navigation_header'])
     description = FieldProperty(IHubManager['description'])
     notepad = FieldProperty(IHubManager['notepad'])
 
--- a/src/pyams_content/shared/hub/zmi/manager.py	Thu Nov 19 16:10:44 2020 +0100
+++ b/src/pyams_content/shared/hub/zmi/manager.py	Fri Nov 20 08:30:22 2020 +0100
@@ -106,6 +106,6 @@
 
     legend = _("Hub manager properties")
 
-    fields = field.Fields(IHubManager).select('title', 'short_name', 'header', 'description',
-                                              'notepad') + \
+    fields = field.Fields(IHubManager).select('title', 'short_name', 'header',
+                                              'navigation_header', 'description', 'notepad') + \
         field.Fields(IBaseSharedTool).select('shared_content_workflow')