src/pyams_content/shared/view/zmi/properties.py
changeset 81 3e37d4dd8e3b
parent 26 7f025cebf19d
child 92 3facc843c06f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/shared/view/zmi/properties.py	Tue Jun 06 17:11:11 2017 +0200
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2008-2015 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'
+
+
+# import standard library
+
+# import interfaces
+from pyams_content.shared.view.interfaces import IWfView
+from pyams_form.interfaces.form import IInnerSubForm
+from pyams_skin.layer import IPyAMSLayer
+
+# import packages
+from pyams_content.shared.common.zmi.properties import SharedContentPropertiesEditForm
+from pyams_utils.adapter import adapter_config
+from pyams_zmi.form import InnerAdminEditForm
+from z3c.form import field
+
+from pyams_content import _
+
+
+@adapter_config(name='publication',
+                context=(IWfView, IPyAMSLayer, SharedContentPropertiesEditForm),
+                provides=IInnerSubForm)
+class ViewPropertiesEditForm(InnerAdminEditForm):
+    """View properties edit form extension"""
+
+    legend = _("Contents search settings")
+    fieldset_class = 'bordered no-x-margin margin-y-10'
+
+    fields = field.Fields(IWfView).select('selected_content_types', 'order_by', 'reversed_order')