src/pyams_content/features/search/zmi/reference.py
changeset 1061 d1db251eeea3
child 1231 20fbc5f350d1
equal deleted inserted replaced
1060:29b1aaf9e080 1061:d1db251eeea3
       
     1 #
       
     2 # Copyright (c) 2008-2018 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 from pyams_content.features.search import ISearchFolder
       
    16 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
       
    17 from pyams_content.shared.view.zmi.reference import ViewReferencesEditForm
       
    18 from pyams_form.form import ajax_config
       
    19 from pyams_pagelet.pagelet import pagelet_config
       
    20 from pyams_skin.layer import IPyAMSLayer
       
    21 from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
       
    22 
       
    23 from pyams_content import _
       
    24 
       
    25 
       
    26 @pagelet_config(name='references.html', context=ISearchFolder, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
       
    27 @ajax_config(name='references.json', context=ISearchFolder, layer=IPyAMSLayer, permission=MANAGE_CONTENT_PERMISSION)
       
    28 class SearchFolderReferencesEditForm(ViewReferencesEditForm):
       
    29     """View search folder references settings edit form"""
       
    30 
       
    31     legend = _("Search folder internal references settings")