src/pyams_content/features/search/zmi/reference.py
changeset 1061 d1db251eeea3
child 1231 20fbc5f350d1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/features/search/zmi/reference.py	Wed Nov 07 17:29:54 2018 +0100
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2008-2018 Thierry Florac <tflorac AT ulthar.net>
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+
+__docformat__ = 'restructuredtext'
+
+from pyams_content.features.search import ISearchFolder
+from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_content.shared.view.zmi.reference import ViewReferencesEditForm
+from pyams_form.form import ajax_config
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
+
+from pyams_content import _
+
+
+@pagelet_config(name='references.html', context=ISearchFolder, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
+@ajax_config(name='references.json', context=ISearchFolder, layer=IPyAMSLayer, permission=MANAGE_CONTENT_PERMISSION)
+class SearchFolderReferencesEditForm(ViewReferencesEditForm):
+    """View search folder references settings edit form"""
+
+    legend = _("Search folder internal references settings")