--- a/src/pyams_content/shared/common/zmi/search.py Mon Oct 24 15:53:43 2016 +0200
+++ b/src/pyams_content/shared/common/zmi/search.py Mon Oct 24 15:54:38 2016 +0200
@@ -22,11 +22,10 @@
from pyams_content.shared.common.interfaces.zmi import ISharedToolDashboardTable
from pyams_pagelet.interfaces import PageletCreatedEvent
from pyams_sequence.interfaces import ISequentialIntIds
-from pyams_skin.interfaces import IPageHeader, IContentSearch
+from pyams_skin.interfaces import IPageHeader, IContentSearch, IInnerPage
from pyams_skin.layer import IPyAMSLayer
from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
from pyams_workflow.interfaces import IWorkflowVersions, IWorkflow
-from pyams_zmi.interfaces import IAdminView
from z3c.table.interfaces import IValues
from zope.dublincore.interfaces import IZopeDublinCore
@@ -39,6 +38,7 @@
from pyams_pagelet.pagelet import pagelet_config
from pyams_security.schema import Principal
from pyams_skin.page import DefaultPageHeaderAdapter
+from pyams_skin.skin import apply_skin
from pyams_skin.table import BaseTable
from pyams_template.template import template_config
from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
@@ -136,7 +136,7 @@
@template_config(template='templates/advanced-search.pt', layer=IPyAMSLayer)
-@implementer(IAdminView)
+@implementer(IInnerPage)
class SharedToolAdvancedSearchForm(SearchForm):
"""Shared tool advanced search form"""
@@ -147,6 +147,7 @@
def __init__(self, context, request):
super(SharedToolAdvancedSearchForm, self).__init__(context, request)
request.registry.notify(PageletCreatedEvent(self))
+ apply_skin(self.request, 'PyAMS admin skin')
@property
def fields(self):
@@ -200,7 +201,7 @@
@pagelet_config(name='advanced-search.html', context=ISharedTool, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
-class SharedToolAdvancedSearchView(AdminView, SearchView):
+class SharedToolAdvancedSearchView(SearchView):
"""Shared tool advanced search view"""
search_form_factory = SharedToolAdvancedSearchForm
@@ -247,4 +248,4 @@
@property
def values(self):
form = self.view.search_form_factory(self.context, self.request)
- return form.get_search_results()
+ return form.get_search_results() or ()