[Mpuls-commits] r4482 - base/trunk/mpulsweb/templates/search

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jan 10 09:37:17 CET 2011


Author: torsten
Date: 2011-01-10 09:37:16 +0100 (Mon, 10 Jan 2011)
New Revision: 4482

Modified:
   base/trunk/mpulsweb/templates/search/search.mako
Log:
Use new showCount function to display number of cases for different search
criteria.


Modified: base/trunk/mpulsweb/templates/search/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/search/search.mako	2011-01-10 08:36:00 UTC (rev 4481)
+++ base/trunk/mpulsweb/templates/search/search.mako	2011-01-10 08:37:16 UTC (rev 4482)
@@ -39,7 +39,7 @@
                     alt="${_('Editor')}"
                     src="${h.url_for('/images/icons/edit_editor.png')}"
                     width="22"
-                    height="22">${_('Own')} (${c.count_own})
+                    height="22">${_('Own')} ${self.showCount(c.count_own)}
               </label><br>
               <input type="checkbox" name="standin" id="show_other" value="1" checked="checked">
               <label for="show_other">
@@ -47,7 +47,7 @@
                     alt="Vertreter"
                     src="${h.url_for('/images/icons/edit_editors_22.png')}"
                     width="22"
-                    height="22">${_('Standin')} (${c.count_standin})
+                    height="22">${_('Standin')} ${self.showCount(c.count_standin)}
               </label>
             </td>
             <td></td>
@@ -66,16 +66,16 @@
               <img title="${_('Editable cases')}" alt="${_('Editable')}" src="${h.url_for('/images/icons/edit_22.png')}" height="22" width="22">${_('Editable cases')}</label><br>
             <input type="checkbox" name="state" id="show_markdelete" value="3" checked="checked">
             <label for="show_markdelete">
-              <img title="${_('Almost deleted')}" alt="${_('Almost deleted')}" src="${h.url_for('/images/icons/delete_inactive_22.png')}" height="22" width="22">${_('Almost deleted')} (${c.count_del})
+              <img title="${_('Almost deleted')}" alt="${_('Almost deleted')}" src="${h.url_for('/images/icons/delete_inactive_22.png')}" height="22" width="22">${_('Almost deleted')} ${self.showCount(c.count_del)}
             </label><br>
             % if g.mpuls_config.is_enabled('case-module', 'anonymize'):
               <input type="checkbox" name="state" id="show_markanonymize" value="4" checked="checked">
               <label for="show_markanonymize">
-                <img title="${_('Almost anonymized')}" alt="${_('Almost anonymized')}" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">${_('Almost anonymized')} (${c.count_markanon})
+                <img title="${_('Almost anonymized')}" alt="${_('Almost anonymized')}" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">${_('Almost anonymized')} ${self.showCount(c.count_markanon)}
               </label><br>
               <input type="checkbox" name="state" id="show_anonymized" value="5" checked="checked">
               <label for="show_anonymized">
-                <img title="${_('Anonymized')}" alt="${_('Anonymized')}" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">${_('Anonymized')} (${c.count_anon})
+                <img title="${_('Anonymized')}" alt="${_('Anonymized')}" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">${_('Anonymized')} ${self.showCount(c.count_anon)}
               </label>
             % endif
           </td>
@@ -149,6 +149,9 @@
   </div>
   </form>
 % endif
+<%def name="showCount(num)">
+  ${"(%s)" % num}
+</%def>
 <%def name="buildFormHeader()">
   <form method="post" name="case_search" action="#" accept-charset="UTF-8">
 </%def>



More information about the Mpuls-commits mailing list