[Mpuls-commits] r4437 - in base/trunk/mpulsweb/templates: . search
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 28 11:33:11 CET 2010
Author: torsten
Date: 2010-12-28 11:33:11 +0100 (Tue, 28 Dec 2010)
New Revision: 4437
Added:
base/trunk/mpulsweb/templates/search/
base/trunk/mpulsweb/templates/search/search.mako
Log:
Added new search template
Added: base/trunk/mpulsweb/templates/search/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/search/search.mako 2010-12-28 10:30:22 UTC (rev 4436)
+++ base/trunk/mpulsweb/templates/search/search.mako 2010-12-28 10:33:11 UTC (rev 4437)
@@ -0,0 +1,165 @@
+## -*- coding: utf-8 -*-
+% if g.mpuls_config.is_enabled('case-module', 'search'):
+ ${self.buildFormHeader()}
+ <div class="widget container">
+ <table>
+ <tr>
+ <td class="label">${_('Search')}</td>
+ <td><input type="text" size="30" name="search_str" maxlength="256"></td>
+ </tr>
+ % if h.hasRole(['admin_ka']) and g.mpuls_config.is_enabled('search', 'option-editor'):
+ <tr>
+ <td class="label">${_('Responsibility')}</td>
+ <td>
+ <select name="editor" id="editor">
+ <option value="-1">${_('All users')}</option>
+ % for user in c.userlist:
+ <option value="${user.id}">${user.last_name}, ${user.first_name}</option>
+ % endfor
+ </select>
+ </td>
+ </tr>
+ % endif
+ % if h.hasRole(['admin_ka']) and g.mpuls_config.is_enabled('search', 'option-agency'):
+ <tr style="${not c.extended_search and 'display:none' or ''}">
+ <td class="label"><label for="branch">${_("Branch")}</label></td>
+ <td>
+ <input type="text" name="branch" id="branch" maxlength="64">
+ </td>
+ </tr>
+ % endif
+ % if h.hasRole(['cm_ka']):
+ % if g.mpuls_config.is_enabled('case-module', 'organisation') and g.mpuls_config.is_enabled('search', 'option-responsibilty'):
+ <tr>
+ <td class="label">${_('Responsibility')}</td>
+ <td>
+ <input type="checkbox" name="own" id="show_own" value="1" checked="checked">
+ <label for="show_own">
+ <img title="${_('Own cases')}"
+ alt="${_('Editor')}"
+ src="${h.url_for('/images/icons/edit_editor.png')}"
+ width="22"
+ height="22">${_('Own')} (${c.count_own})
+ </label><br>
+ <input type="checkbox" name="standin" id="show_other" value="1" checked="checked">
+ <label for="show_other">
+ <img title="${_('Standin cases')}"
+ alt="Vertreter"
+ src="${h.url_for('/images/icons/edit_editors_22.png')}"
+ width="22"
+ height="22">${_('Standin')} (${c.count_standin})
+ </label>
+ </td>
+ <td></td>
+ </tr>
+ % else:
+ <input type="hidden" name="own" id="show_own" value="">
+ <input type="hidden" name="standin" id="show_other" value="">
+ % endif
+ % endif
+ % if g.mpuls_config.is_enabled('search', 'option-responsibilty'):
+ <tr>
+ <td class="label">${_('Status')}</td>
+ <td>
+ <input type="checkbox" name="state" id="show_open" value="1">
+ <label for="show_open">
+ <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})
+ </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})
+ </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})
+ </label>
+ % endif
+ </td>
+ <td></td>
+ </tr>
+ % endif
+ % if g.mpuls_config.is_enabled('search', 'option-phase'):
+ <tr style="${not c.extended_search and 'display:none' or ''}">
+ <td class="label">${_('Phase')}</td>
+ <td>
+ % for n,p in enumerate(c.phases):
+ <input type="checkbox" name="phase" id="phase_${n}" value="${p.id}">
+ <label for="phase_${n}">
+ ${p.getDescription()}<br>
+ </label>
+ % endfor
+ </td>
+ </tr>
+ % endif
+ % if g.mpuls_config.is_enabled('search', 'option-date'):
+ <tr style="${not c.extended_search and 'display:none' or ''}">
+ <td class="label">${_('Start date')}</td>
+ <td>
+ <input type="text" name="sdate" value="">
+ </td>
+ <td>
+ <form:error name="sdate">
+ </td>
+ </tr>
+ <tr style="${not c.extended_search and 'display:none' or ''}">
+ <td class="label">${_('End date')}</td>
+ <td>
+ <input type="text" name="edate" value="">
+ </td>
+ <td>
+ <form:error name="edate">
+ </td>
+ </tr>
+ % endif
+ % if g.case_search.supports_option("gender") and g.mpuls_config.is_enabled('search', 'option-gender'):
+ <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>
+ % endif
+ <%include file="/casemanagement/search_extra.mako" />
+ <tr>
+ <td class=""></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td class=""></td>
+ <td colspan="2">
+ <input type="submit" value="${_('cm_form_overview_search_submit')}">
+ ${self.buildSearchExtend()}
+ ${self.buildSearchReset()}
+ </td>
+ </tr>
+ </table>
+ </div>
+ </form>
+% endif
+<%def name="buildFormHeader()">
+ <form method="post" name="case_search" action="#" accept-charset="UTF-8">
+</%def>
+<%def name="buildSearchReset()">
+ <a href="${h.url_for('#')}">${_('Reset search')}</a>
+</%def>
+<%def name="buildSearchExtend()">
+ % if c.extended_search:
+ <a href="${h.url_for('#')}">${_('Hide extended search')}</a>
+ % else:
+ <a href="${h.url_for('#')}">${_('Show extended search')}</a>
+ % endif
+ ${h.getHelp('extended_search')}
+</%def>
More information about the Mpuls-commits
mailing list