From 48893dc6a7a0b56f465e0b824f4761cb724cc2ea Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Thu, 3 Jun 2010 06:44:18 +0000
Subject: [PATCH] Show listbox action widget for containers only. Fix CSS of
 search pop up to not overlay search results.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35921 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_km/Base_isListboxActionWidgetAvailable.xml         | 6 ++++++
 .../portal_skins/erp5_km_theme/ListBox_asHTML.xml           | 1 +
 .../portal_skins/erp5_km_theme/km_css/listbox.css.xml       | 4 +++-
 bt5/erp5_km/bt/revision                                     | 2 +-
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isListboxActionWidgetAvailable.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isListboxActionWidgetAvailable.xml
index 8a93b6a199..d85228b6aa 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isListboxActionWidgetAvailable.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isListboxActionWidgetAvailable.xml
@@ -62,12 +62,17 @@ portal = context.getPortalObject()\n
 list_mode = request.get(\'list_mode\', False)\n
 dialog_mode = request.get(\'dialog_mode\', False)\n
 list_style = request.get(\'list_style\', None)\n
+context_portal_type = context.getPortalType()\n
 \n
 if portal.portal_membership.isAnonymousUser() or \\\n
   dialog_mode == True or \\\n
   (list_mode and list_style==\'search\'):\n
   return False\n
 \n
+# show listbox action widget for module containers only\n
+if not context_portal_type.endswith(\'Module\'):# and context_portal_type!=\'Web Site\':\n
+  return False\n
+\n
 return True\n
 </string> </value>
         </item>
@@ -110,6 +115,7 @@ return True\n
                             <string>dialog_mode</string>
                             <string>None</string>
                             <string>list_style</string>
+                            <string>context_portal_type</string>
                             <string>True</string>
                           </tuple>
                         </value>
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml
index 423f823e72..8446346e4e 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml
@@ -482,6 +482,7 @@
         <div class="listbox_footer_box"\n
             tal:define="need_pagination python: int(here.total_size) > int(here.getMaxLineNumber())"\n
             tal:condition="need_pagination">\n
+\n
         <div class="listbox_pagination" \n
             tal:condition="need_pagination">\n
             <!--Display pagination -->\n
diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
index 84c3d83255..a0b4e0c92e 100644
--- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
+++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
@@ -46,13 +46,15 @@
 <tal:block define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/css;; charset=utf-8\')"/>\n
 \n
 /* Search popup fix*/\n
+\n
 div.search_popup{\n
   left:200px;\n
   position:absolute;\n
-  top:-20px;\n
+  top:-120px;\n
   width:250px;\n
 }\n
 \n
+\n
 /******************/ \n
 /* Listbox action */\n
 /******************/\n
diff --git a/bt5/erp5_km/bt/revision b/bt5/erp5_km/bt/revision
index 40efa8ca40..8adbb4693d 100644
--- a/bt5/erp5_km/bt/revision
+++ b/bt5/erp5_km/bt/revision
@@ -1 +1 @@
-1427
\ No newline at end of file
+1428
\ No newline at end of file
-- 
2.30.9