From 7bbb56444062659916e4dfd9b8d99f5c8e3b3d29 Mon Sep 17 00:00:00 2001
From: Mayoro Diagne <mayoro@nexedi.com>
Date: Wed, 23 Jun 2010 18:36:41 +0000
Subject: [PATCH] 2010-06-23 mayoro * modify
 ERP5Site_getQuickSearchableTypeList to allow processing anonymous and not
 anonymous procedure * after login redirect in desired default page (default
 view)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36558 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../ERP5Site_getQuickSearchableTypeList.xml     | 17 ++++++++++++++++-
 .../erp5_egov_theme/WebSite_login.xml           |  2 +-
 bt5/erp5_egov/bt/change_log                     |  4 ++++
 bt5/erp5_egov/bt/revision                       |  2 +-
 4 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/ERP5Site_getQuickSearchableTypeList.xml b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/ERP5Site_getQuickSearchableTypeList.xml
index 35a0cb213c..b58a3f8ee6 100644
--- a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/ERP5Site_getQuickSearchableTypeList.xml
+++ b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/ERP5Site_getQuickSearchableTypeList.xml
@@ -53,7 +53,16 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>type_list = context.EGov_getAllowedFormTypeList() + (\'Person\', \'Organisation\')\n
+            <value> <string>portal_types = context.getPortalObject().portal_types\n
+validated_type_list = portal_types.searchFolder(portal_type=\'EGov Type\', validation_state = \'validated\')\n
+\n
+portal_type_list = ()\n
+\n
+for portal_type in validated_type_list:\n
+  portal_type_list += (portal_type.getTitle(),)\n
+\n
+\n
+type_list = portal_type_list + (\'Person\', \'Organisation\')\n
 return type_list\n
 </string> </value>
         </item>
@@ -93,6 +102,12 @@ return type_list\n
                           <tuple>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>portal_types</string>
+                            <string>validated_type_list</string>
+                            <string>portal_type_list</string>
+                            <string>_getiter_</string>
+                            <string>portal_type</string>
+                            <string>_inplacevar_</string>
                             <string>type_list</string>
                           </tuple>
                         </value>
diff --git a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov_theme/WebSite_login.xml b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov_theme/WebSite_login.xml
index 5746ac75a6..f3dd187253 100644
--- a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov_theme/WebSite_login.xml
+++ b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov_theme/WebSite_login.xml
@@ -65,7 +65,7 @@
         </tal:block>\n
       </tal:block>\n
       <tal:block tal:condition="python: here.EGov_checkUserIsAPersonOrOrganisation()==True or here.EGov_getUserDocumentUrl()==None">\n
-        <tal:block tal:define="came_from python: request.get(\'came_from\') or request.get(\'field_came_from\') or request.get(\'field_came_from\') or here.absolute_url() + \'/view\';\n
+        <tal:block tal:define="came_from python: request.get(\'came_from\') or request.get(\'field_came_from\') or request.get(\'field_came_from\') or here.absolute_url();\n
                    dummy python: response.redirect(came_from);" />\n
       </tal:block>\n
     </tal:block>\n
diff --git a/bt5/erp5_egov/bt/change_log b/bt5/erp5_egov/bt/change_log
index fef184f2d0..bdb2e8ed4e 100644
--- a/bt5/erp5_egov/bt/change_log
+++ b/bt5/erp5_egov/bt/change_log
@@ -1,3 +1,7 @@
+2010-06-23 mayoro
+* modify ERP5Site_getQuickSearchableTypeList to allow processing anonymous and not anonymous procedure
+* after login redirect in desired default page (default view)
+
 2010-06-23 mayoro
 * Allow manager to set own password for procedures
 
diff --git a/bt5/erp5_egov/bt/revision b/bt5/erp5_egov/bt/revision
index b6fdfc3c05..e1f27603b6 100644
--- a/bt5/erp5_egov/bt/revision
+++ b/bt5/erp5_egov/bt/revision
@@ -1 +1 @@
-609
\ No newline at end of file
+613
\ No newline at end of file
-- 
2.30.9