[Mpuls-commits] r4289 - base/trunk/mpulsweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Dec 1 11:01:31 CET 2010
Author: torsten
Date: 2010-12-01 11:01:30 +0100 (Wed, 01 Dec 2010)
New Revision: 4289
Modified:
base/trunk/mpulsweb/templates/casemanagement/search.mako
Log:
* mpulsweb/templates/casemanagement/search.mako: Issue1426: Only show search options if they are enabled.
Modified: base/trunk/mpulsweb/templates/casemanagement/search.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/search.mako 2010-12-01 09:59:53 UTC (rev 4288)
+++ base/trunk/mpulsweb/templates/casemanagement/search.mako 2010-12-01 10:01:30 UTC (rev 4289)
@@ -10,7 +10,7 @@
<td class="label">${_('Search')}</td>
<td><input type="text" size="30" name="search_str" maxlength="256"></td>
</tr>
- % if h.hasRole(['admin_ka']):
+ % if h.hasRole(['admin_ka']) and g.mpuls_config.is_enabled('search', 'option-editor'):
<tr>
<td class="label">${_('Responsibility')}</td>
<td>
@@ -22,6 +22,8 @@
</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>
@@ -30,7 +32,7 @@
</tr>
% endif
% if h.hasRole(['cm_ka']):
- % if g.mpuls_config.is_enabled('case-module', 'organisation'):
+ % 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>
@@ -58,40 +60,45 @@
<input type="hidden" name="standin" id="show_other" value="">
% endif
% endif
- <tr>
- <td class="label">${_('Status')}</td>
- <td>
- <input type="checkbox" name="state" id="show_open" value="1">
- <label for="show_open">
- <img title="Bearbeitbare Fallakten" alt="Bearbeitbare" src="${h.url_for('/images/icons/edit_22.png')}" height="22" width="22">Bearbeitbare Fallakten</label><br>
- <input type="checkbox" name="state" id="show_markdelete" value="3" checked="checked">
- <label for="show_markdelete">
- <img title="Zu löschende Fallakten" alt="Schwebend Gelöscht" src="${h.url_for('/images/icons/delete_inactive_22.png')}" height="22" width="22">Schwebend gelöscht (${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="Schwebend anonymisierte Fallakten" alt="Schwebend anonymisiert" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">Schwebend anonymisiert (${c.count_markanon})
+ % 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="Bearbeitbare Fallakten" alt="Bearbeitbare" src="${h.url_for('/images/icons/edit_22.png')}" height="22" width="22">Bearbeitbare Fallakten</label><br>
+ <input type="checkbox" name="state" id="show_markdelete" value="3" checked="checked">
+ <label for="show_markdelete">
+ <img title="Zu löschende Fallakten" alt="Schwebend Gelöscht" src="${h.url_for('/images/icons/delete_inactive_22.png')}" height="22" width="22">Schwebend gelöscht (${c.count_del})
</label><br>
- <input type="checkbox" name="state" id="show_anonymized" value="5" checked="checked">
- <label for="show_anonymized">
- <img title="Anonymisierte Fallakten" alt="Anonymisiert" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">Anonymisiert (${c.count_anon})
- </label>
- % endif
- </td>
- <td></td>
- </tr>
- <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>
+ % 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="Schwebend anonymisierte Fallakten" alt="Schwebend anonymisiert" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">Schwebend anonymisiert (${c.count_markanon})
+ </label><br>
+ <input type="checkbox" name="state" id="show_anonymized" value="5" checked="checked">
+ <label for="show_anonymized">
+ <img title="Anonymisierte Fallakten" alt="Anonymisiert" src="${h.url_for('/images/icons/anonymise_inactive_22.png')}" height="22" width="22">Anonymisiert (${c.count_anon})
</label>
- % endfor
- </td>
- </tr>
+ % 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>
@@ -110,7 +117,8 @@
<form:error name="edate">
</td>
</tr>
- % if g.case_search.supports_option("gender"):
+ % 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>
More information about the Mpuls-commits
mailing list