From f31f3d8b9a1c1283f537099755a2166ed2ff7074 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Thu, 10 Jun 2010 12:52:19 +0000
Subject: [PATCH] Enable configuration of Cacheable features of ERP5 Form
 instances. This modification displays new Tab in ZMI in order to associate
 the Form with an Accelerated HTTP Cache Manager.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36221 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/Form.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py
index b58fd4141a..16e44a7e6c 100644
--- a/product/ERP5Form/Form.py
+++ b/product/ERP5Form/Form.py
@@ -522,6 +522,9 @@ def create_settings_form():
                      method, enctype, encoding, stored_encoding, unicode_mode, edit_order])
     return form
 
+
+from OFS.Cache import filterCacheTab
+
 class ERP5Form(ZMIForm, ZopePageTemplate):
     """
         A Formulator form with a built-in rendering parameter based
@@ -538,7 +541,11 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
                       ({'label':'Proxify', 'action':'formProxify'},
                        {'label':'UnProxify', 'action':'formUnProxify'},
                        {'label':'RelatedProxy', 
-                         'action':'formShowRelatedProxyFields'}
+                         'action':'formShowRelatedProxyFields'},
+                       {'label': 'Cache',
+                        'action': 'ZCacheable_manage',
+                        'filter': filterCacheTab,
+                        'help': ('OFSP', 'Cacheable-properties.stx')}
                       )+
                       ZMIForm.manage_options[5:])
 
-- 
2.30.9