diff -r 48c1ee485dc0 -r 9b93fdd5ba30 src/pyams_content/features/search/zmi/__init__.py --- a/src/pyams_content/features/search/zmi/__init__.py Fri Nov 13 13:11:29 2020 +0100 +++ b/src/pyams_content/features/search/zmi/__init__.py Fri Nov 13 13:13:48 2020 +0100 @@ -10,20 +10,19 @@ # FOR A PARTICULAR PURPOSE. # -__docformat__ = 'restructuredtext' - from z3c.form import field from zope.interface import Interface from zope.intid import IIntIds from pyams_content.features.search import ISearchFolder, SearchFolder from pyams_content.interfaces import MANAGE_SITE_PERMISSION -from pyams_content.shared.common.zmi.summary import SharedContentDublinCoreSummary, SharedContentWorkflowHistorySummary, \ - SharedContentWorkflowPublicationState +from pyams_content.shared.common.zmi.summary import SharedContentDublinCoreSummary, \ + SharedContentWorkflowHistorySummary, 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_content.zmi.interfaces import ISiteTreeTable from pyams_form.form import AJAXAddForm, ajax_config from pyams_form.interfaces.form import IInnerSubForm from pyams_i18n.interfaces import II18n, INegotiator @@ -34,7 +33,8 @@ from pyams_skin.layer import IPyAMSLayer from pyams_skin.viewlet.menu import MenuDivider from pyams_skin.viewlet.toolbar import ToolbarMenuItem -from pyams_utils.adapter import ContextRequestAdapter, ContextRequestViewAdapter, NullAdapter, adapter_config +from pyams_utils.adapter import ContextRequestAdapter, ContextRequestViewAdapter, NullAdapter, \ + adapter_config from pyams_utils.registry import get_utility from pyams_utils.unicode import translate_string from pyams_utils.url import absolute_url @@ -44,6 +44,9 @@ from pyams_zmi.interfaces.menu import IContentManagementMenu from pyams_zmi.layer import IAdminLayer + +__docformat__ = 'restructuredtext' + from pyams_content import _ @@ -70,14 +73,16 @@ title=II18n(self.context).query_attribute('title', request=self.request)) -@viewlet_config(name='add-search-folder.divider', context=ISiteContainer, layer=IAdminLayer, view=Interface, - manager=IToolbarAddingMenu, permission=MANAGE_SITE_PERMISSION, weight=89) +@viewlet_config(name='add-search-folder.divider', context=ISiteContainer, layer=IAdminLayer, + view=ISiteTreeTable, manager=IToolbarAddingMenu, + permission=MANAGE_SITE_PERMISSION, weight=89) class SearchFolderAddMenuDivider(MenuDivider): """Search folder add menu divider""" -@viewlet_config(name='add-search-folder.menu', context=ISiteContainer, layer=IAdminLayer, view=Interface, - manager=IToolbarAddingMenu, permission=MANAGE_SITE_PERMISSION, weight=90) +@viewlet_config(name='add-search-folder.menu', context=ISiteContainer, layer=IAdminLayer, + view=ISiteTreeTable, manager=IToolbarAddingMenu, + permission=MANAGE_SITE_PERMISSION, weight=90) class SearchFolderAddMenu(ToolbarMenuItem): """Search folder add menu"""