[Mpuls-commits] r5172 - in base/trunk: . mpulsweb/templates/search

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jul 18 09:33:00 CEST 2011


Author: roland
Date: 2011-07-18 09:32:59 +0200 (Mon, 18 Jul 2011)
New Revision: 5172

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/templates/search/search.mako
Log:
issue1627: don't show the  text search if there are no fields marked as 'search_match'

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-07-15 09:07:50 UTC (rev 5171)
+++ base/trunk/ChangeLog	2011-07-18 07:32:59 UTC (rev 5172)
@@ -1,3 +1,8 @@
+2011-07-18  Roland Geider  <roland.geider at intevation.de>
+
+	* mpulsweb/templates/search/search.mako: issue1627: don't show the
+	  text search if there are no fields marked as 'search_match'
+
 2011-07-14  Roland Geider  <roland.geider at intevation.de>
 
 	* mpulsweb/model/agencysettings.py,

Modified: base/trunk/mpulsweb/templates/search/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/search/search.mako	2011-07-15 09:07:50 UTC (rev 5171)
+++ base/trunk/mpulsweb/templates/search/search.mako	2011-07-18 07:32:59 UTC (rev 5172)
@@ -3,10 +3,20 @@
   ${self.buildFormHeader()}
   <div class="widget container">
     <table>
+      <%
+        search_field_set = False
+        for i in g.mpuls_config.get('case', 'fields'):
+            if i.get('search_match', False):
+                search_field_set = True
+      %>
+      
+      % if search_field_set:
       <tr>
         <td class="label">${_('Search')}</td>
         <td><input type="text" size="30" name="search_str" maxlength="256"></td>
       </tr>
+      % endif
+      
       % if h.hasRole(['admin_ka']) and g.mpuls_config.is_enabled('search', 'option-editor'):
       <tr>
         <td class="label">${_('Responsibility')}</td>



More information about the Mpuls-commits mailing list