Define columns for all dashboards
authorThierry Florac <thierry.florac@onf.fr>
Fri, 08 Dec 2017 10:45:37 +0100
changeset 311 28a39fd182ea
parent 310 61c586146b50
child 312 cc13bd3548c3
Define columns for all dashboards
src/pyams_content/shared/common/zmi/dashboard.py
--- a/src/pyams_content/shared/common/zmi/dashboard.py	Fri Dec 08 10:45:10 2017 +0100
+++ b/src/pyams_content/shared/common/zmi/dashboard.py	Fri Dec 08 10:45:37 2017 +0100
@@ -102,7 +102,7 @@
         return tuple(super(BaseDashboardTable, self).values)
 
 
-@adapter_config(name='name', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='name', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardNameColumn(NameColumn):
     """Shared tool dashboard name column"""
 
@@ -127,7 +127,7 @@
         return II18n(self.context).query_attribute('title', request=self.request)
 
 
-@adapter_config(name='sequence', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='sequence', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardSequenceColumn(I18nColumn, GetAttrColumn):
     """Shared tool dashboard sequence ID column"""
 
@@ -143,7 +143,7 @@
             return '--'
 
 
-@adapter_config(name='status', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='status', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardStatusColumn(I18nColumn, GetAttrColumn):
     """Shared tool dashboard status column"""
 
@@ -169,7 +169,7 @@
             return '--'
 
 
-@adapter_config(name='status_date', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='status_date', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardStatusDateColumn(I18nColumn, GetAttrColumn):
     """Shared tool dashboard status date column"""
 
@@ -186,7 +186,7 @@
             return '--'
 
 
-@adapter_config(name='version', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='version', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardVersionColumn(I18nColumn, GetAttrColumn):
     """Shared tool dashboard version column"""
 
@@ -201,7 +201,7 @@
             return '--'
 
 
-@adapter_config(name='status_principal', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='status_principal', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardStatusPrincipalColumn(I18nColumn, GetAttrColumn):
     """Shared tool dashboard status principal column"""
 
@@ -219,7 +219,7 @@
             return '--'
 
 
-@adapter_config(name='owner', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='owner', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardOwnerColumn(I18nColumn, GetAttrColumn):
     """Shared tool dashboard owner column"""
 
@@ -238,7 +238,7 @@
             return manager.get_principal(next(iter(owner))).title
 
 
-@adapter_config(name='modified', context=(Interface, IPyAMSLayer, ISharedToolDashboardTable), provides=IColumn)
+@adapter_config(name='modified', context=(Interface, IPyAMSLayer, IDashboardTable), provides=IColumn)
 class SharedToolDashboardModifiedColumn(I18nColumn, GetAttrColumn):
     """Shared tool dashboard modified column"""
 
@@ -1000,17 +1000,3 @@
         return II18n(self.context).query_attribute('title', request=self.request)
 
     subtitle = _("Last updated contents")
-
-
-#
-# Advanced search access menu
-#
-
-@viewlet_config(name='advanced-search.menu', context=IBaseSharedTool, layer=IAdminLayer,
-                manager=IAllContentsMenu, permission=VIEW_SYSTEM_PERMISSION, weight=90)
-class SharedToolAdvancedSearchMenu(MenuItem):
-    """Shared tool advanced search menu"""
-
-    label = _("Advanced search")
-    icon_class = None
-    url = '#advanced-search.html'