Updated dashboard header
authorThierry Florac <thierry.florac@onf.fr>
Mon, 11 Sep 2017 14:42:46 +0200
changeset 127 2b5eeaf6cbbc
parent 126 00e660aa11a0
child 128 6cdea4a15bfd
Updated dashboard header
src/pyams_content/root/zmi/__init__.py
--- a/src/pyams_content/root/zmi/__init__.py	Mon Sep 11 14:42:19 2017 +0200
+++ b/src/pyams_content/root/zmi/__init__.py	Mon Sep 11 14:42:46 2017 +0200
@@ -25,6 +25,7 @@
 from pyams_content.zmi.interfaces import IDashboardMenu, IMyDashboardMenu, IAllContentsMenu
 from pyams_i18n.interfaces import II18n
 from pyams_skin.interfaces import IInnerPage, IPageHeader
+from pyams_skin.interfaces.configuration import IBackOfficeConfiguration
 from pyams_skin.interfaces.viewlet import IBreadcrumbItem
 from pyams_skin.layer import IPyAMSLayer
 from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
@@ -120,7 +121,10 @@
 
     icon_class = 'fa fa-fw fa-line-chart'
 
-    title = _("Your contents dashboard")
+    @property
+    def title(self):
+        config = IBackOfficeConfiguration(self.context)
+        return II18n(config).query_attribute('title', request=self.request)
 
 
 #
@@ -134,8 +138,6 @@
     _single_title = _("MANAGER - {0} content waiting for your action")
     _plural_title = _("MANAGER - {0} contents waiting for your action")
 
-    dt_sort_order = 'asc'
-
 
 @adapter_config(context=(ISiteRoot, IPyAMSLayer, SiteRootDashboardManagerWaitingTable), provides=IValues)
 class SiteRootDashboardManagerWaitingValues(ContextRequestViewAdapter):