[Mpuls-commits] r3467 - in base/trunk: . mpulsweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Aug 27 16:46:12 CEST 2010


Author: bh
Date: 2010-08-27 16:46:12 +0200 (Fri, 27 Aug 2010)
New Revision: 3467

Added:
   base/trunk/mpulsweb/templates/casemanagement/search_extra.mako
Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/templates/casemanagement/search.mako
Log:
* mpulsweb/templates/casemanagement/search.mako: Include
search_extra.mako so that applications can easily add additional
search options.

* mpulsweb/templates/casemanagement/search_extra.mako: New.  This
mpuls base template does not really do anything.  It's merely a
hook for mpuls applications to add new options to the search page.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-27 14:42:22 UTC (rev 3466)
+++ base/trunk/ChangeLog	2010-08-27 14:46:12 UTC (rev 3467)
@@ -1,5 +1,15 @@
 2010-08-27  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/templates/casemanagement/search_extra.mako: New.  This
+	mpuls base template does not really do anything.  It's merely a
+	hook for mpuls applications to add new options to the search page.
+
+	* mpulsweb/templates/casemanagement/search.mako: Include
+	search_extra.mako so that applications can easily add additional
+	search options.
+
+2010-08-27  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/search.py (Search.convert_form_parameters): New.
 	Only very slightly modified copy of parseSearchOptions in
 	controllers/case_overview.py.  Now it can easily be extended by

Modified: base/trunk/mpulsweb/templates/casemanagement/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/search.mako	2010-08-27 14:42:22 UTC (rev 3466)
+++ base/trunk/mpulsweb/templates/casemanagement/search.mako	2010-08-27 14:46:12 UTC (rev 3467)
@@ -120,6 +120,7 @@
           </td>
         </tr>
       % endif
+        <%include file="/casemanagement/search_extra.mako" />
       <tr>
         <td class=""></td>
         <td></td>

Added: base/trunk/mpulsweb/templates/casemanagement/search_extra.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/search_extra.mako	2010-08-27 14:42:22 UTC (rev 3466)
+++ base/trunk/mpulsweb/templates/casemanagement/search_extra.mako	2010-08-27 14:46:12 UTC (rev 3467)
@@ -0,0 +1,17 @@
+## Define this template in derived mpuls application to add extra case
+## search options to the search form
+## Typical structure:
+##    <tr style="${not c.extended_search and 'display:none' or ''}">
+##      <td class="label">${_('Gender')}</td>
+##      <td>
+##        <select name="gender" id="gender">
+##          <option value="-2">${_('All')}</option>
+##          <option value="0">${_('Female')}</option>
+##          <option value="1">${_('Male')}</option>
+##          <option value="-1">${_('Unspecified')}</option>
+##        </select>
+##      </td>
+##      <td>
+##        <form:error name="gender">
+##      </td>
+##    </tr>



More information about the Mpuls-commits mailing list