Updated header
authorThierry Florac <tflorac@ulthar.net>
Wed, 12 Dec 2018 16:03:05 +0100
changeset 1160 33de88e935cf
parent 1159 fc062f9e32c0
child 1161 10bb070ff1d6
Updated header
src/pyams_content/features/search/zmi/__init__.py
--- a/src/pyams_content/features/search/zmi/__init__.py	Wed Dec 12 16:02:53 2018 +0100
+++ b/src/pyams_content/features/search/zmi/__init__.py	Wed Dec 12 16:03:05 2018 +0100
@@ -22,16 +22,16 @@
     SharedContentWorkflowPublicationState
 from pyams_content.shared.site.interfaces import ISiteContainer
 from pyams_content.shared.site.zmi import SiteManagerFoldersSelectorFieldWidget
+from pyams_content.shared.site.zmi.container import SiteContainerHeaderContentProvider
 from pyams_content.shared.site.zmi.folder import ISiteFolderAddFormFields
 from pyams_form.form import AJAXAddForm, ajax_config
 from pyams_form.interfaces.form import IInnerSubForm
 from pyams_i18n.interfaces import II18n, INegotiator
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_security.zmi.interfaces import IObjectSecurityMenu
-from pyams_skin.interfaces import IContentTitle, IPageHeader
+from pyams_skin.interfaces import IContentTitle
 from pyams_skin.interfaces.viewlet import IContextActions, IMenuHeader, IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from pyams_skin.page import DefaultPageHeaderAdapter, HeaderContentProvider
 from pyams_skin.viewlet.menu import MenuDivider
 from pyams_skin.viewlet.toolbar import ToolbarMenuItem
 from pyams_utils.adapter import ContextRequestAdapter, ContextRequestViewAdapter, NullAdapter, adapter_config
@@ -47,14 +47,9 @@
 from pyams_content import _
 
 
-@adapter_config(context=(ISearchFolder, IPyAMSLayer, Interface), provides=IPageHeader)
-class SearchFolderPropertiesHeaderAdapter(DefaultPageHeaderAdapter):
-    """Search folder header adapter"""
-
-    back_url = '/admin#properties.html'
-    back_target = None
-
-    icon_class = 'fa fa-fw fa-edit'
+@contentprovider_config(name='content_header', context=ISearchFolder, view=Interface, layer=IPyAMSLayer)
+class SearchFolderHeaderContentProvider(SiteContainerHeaderContentProvider):
+    """Search folder header content provider"""
 
 
 @adapter_config(context=(ISearchFolder, IContentManagementMenu), provides=IMenuHeader)
@@ -150,15 +145,6 @@
 
 
 #
-# Search folder content providers
-#
-
-@contentprovider_config(name='content_header', context=ISearchFolder, view=Interface, layer=IPyAMSLayer)
-class SearchFolderHeaderContentProvider(HeaderContentProvider):
-    """Search folder header content provider"""
-
-
-#
 # Custom search folders adapters
 #