[Mpuls-commits] r4097 - in jmd/trunk/jmdweb/templates: . settings
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Nov 3 10:26:58 CET 2010
Author: torsten
Date: 2010-11-03 10:26:57 +0100 (Wed, 03 Nov 2010)
New Revision: 4097
Added:
jmd/trunk/jmdweb/templates/settings/
jmd/trunk/jmdweb/templates/settings/edit.mako
jmd/trunk/jmdweb/templates/settings/show.mako
Log:
Issue1323: Special templates for agency settings.
Added: jmd/trunk/jmdweb/templates/settings/edit.mako
===================================================================
--- jmd/trunk/jmdweb/templates/settings/edit.mako 2010-11-03 08:15:42 UTC (rev 4096)
+++ jmd/trunk/jmdweb/templates/settings/edit.mako 2010-11-03 09:26:57 UTC (rev 4097)
@@ -0,0 +1,120 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../main.mako" />
+<%
+ formular_labels = {'ka_name': _('adm_form_settings_kaname'),
+ 'fkz': _('adm_form_settings_fkz'),
+ 'max_speicherdauer': _('adm_form_settings_max_savetime')
+ }
+%>
+<%def name="buildNavipath()">
+ ${parent.buildNavipath()}
+ <li>
+ <a href="${h.url_for(controller='/settings')}">${_('adm_np_root')}</a>
+ </li>
+ <li>
+ <a href="${h.url_for(controller='/settings', action='show')}">${_('adm_np_showsettings')}</a>
+ </li>
+ <li>
+ <a href="${h.url_for(controller='/settings', action='edit')}">${_('adm_np_editsettings')}</a>
+ </li>
+</%def>
+
+<div id="content_header_small">
+ <div id="content_ueberschrift">
+ ${_('adm_header_editsettings')}
+ </div>
+ <div id="modusfield">
+ <div class="actions">
+ <ul>
+ <li>
+ <a href="${h.url_for(controller='settings',
+ action='show')}">
+ ${_('adm_actions_link_showsettings')}
+ </a>
+ </li>
+ </ul>
+ </div>
+ </div>
+</div>
+
+${self.buildFormErrors(formular_labels)}
+<div id="admin_edit_settings">
+ <p>${_('adm_con_es_editsettings')}</p>
+ <div class="waska_form">
+ <form action="${h.url_for(controller='/settings', action='editAction')}" method="POST">
+ <fieldset>
+ <legend>${_('Specification for agency')}</legend>
+ <div class="waska_form_element w30">
+ <label for="ka_name">${_('adm_form_settings_kaname')}</label>
+ % if c.form_errors.get('ka_name'):
+ <input type="text" class="field error_box" id="ka_name"
+ value="${c.form_result.get('ka_name', c.agency.getName())}"
+ name="ka_name" maxlength="60">
+ % else:
+ <input type="text" class="field" id="ka_name" name="ka_name"
+ value="${c.form_result.get('ka_name', c.agency.getName())}"
+ maxlength="60">
+ % endif
+ </div>
+ <div class="waska_form_element w30">
+ <label for="ka_adresse">${_('adm_form_settings_kaadress')}</label>
+ % if c.form_errors.get('ka_adresse'):
+ <input type="text" class="field error_box" id="ka_adresse"
+ value="${c.form_result.get('ka_adresse', c.agency.getAddress())}"
+ name="ka_adresse" maxlength="120">
+ % else:
+ <input type="text" class="field" id="ka_adresse" name="ka_adresse"
+ value="${c.form_result.get('ka_adresse', c.agency.getAddress())}"
+ maxlength="120">
+ % endif
+ </div>
+ </fieldset>
+ <fieldset>
+ <legend>${_('Specification for cases')}</legend>
+ <div class="waska_form_element w100">
+ <label for="max_speicherdauer">
+ ${_('adm_form_settings_max_savetime')}
+ </label>
+ % if c.form_errors.get('max_speicherdauer'):
+ <input type="text" class="error_box" id="max_speicherdauer"
+ name="max_speicherdauer"
+ value="${c.form_result.get('max_speicherdauer',
+ c.agency.getMaxSavetime())}"
+ maxlength="4">
+ % else:
+ <input type="text" id="max_speicherdauer" name="max_speicherdauer"
+ value="${c.form_result.get('max_speicherdauer',
+ c.agency.getMaxSavetime())}"
+ maxlength="4">
+ % endif
+ <p class="info">
+ ${_('Automatic reminders are used to identify cases, which has not been edited for longer than the specified value. Additionally there can be further conditions when a reminder is created. Further condition: %s') % g.mpuls_config.get('case', 'reminderconditiondesc')}
+ </p>
+ </div>
+ <div class="waska_form_element w100">
+ % if c.form_errors.get('anon_transfer'):
+ <a href="#error_list">
+ <img class="smallicon" alt="" src="${h.url_for('/images/icons/info/failure_22.png')}">
+ </a>
+ % endif
+ % if c.agency.isAnonTransfer():
+ <input id="anon_transfer" name="anon_transfer" type="checkbox"
+ checked />
+ % else:
+ <input id="anon_transfer" name="anon_transfer" type="checkbox"/>
+ % endif
+ <label for="anon_transfer">
+ ${_('adm_form_settings_anontransfer')}
+ </label>
+ <p>
+ ${_('If this option is activated, anonymized cases are transmitted for evaluation purpose to a central agency. Anonymized cases do to not contain any personal data such as name or addresses.')}
+ </p>
+ </div>
+ </fieldset>
+ <div id="admin_edit_settings_submit" class="waska_form_element w100">
+ <input type="submit" value="${_('adm_form_settings_save')}">
+ </div>
+ </form>
+ </div>
+</div>
+
Added: jmd/trunk/jmdweb/templates/settings/show.mako
===================================================================
--- jmd/trunk/jmdweb/templates/settings/show.mako 2010-11-03 08:15:42 UTC (rev 4096)
+++ jmd/trunk/jmdweb/templates/settings/show.mako 2010-11-03 09:26:57 UTC (rev 4097)
@@ -0,0 +1,65 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../main.mako" />
+<%! import mpulsweb.lib.helper.filters as F %>
+<%def name="buildNavipath()">
+ ${parent.buildNavipath()}
+ <li>
+ <a href="${h.url_for(controller='/settings')}">${_('adm_np_root')}</a>
+ </li>
+ <li>
+ <a href="${h.url_for(controller='/settings', action='show')}">${_('adm_np_showsettings')}</a>
+ </li>
+</%def>
+
+<div id="content_header_small">
+ <div id="content_ueberschrift">
+ ${_('adm_header_showsettings')}
+ </div>
+ <div id="modusfield">
+ <div class="actions">
+ <ul>
+ <li>
+ <a href="${h.url_for(controller='/settings', action='edit')}">
+ ${_('adm_actions_link_editsettings')}
+ </a>
+ </li>
+ </ul>
+ </div>
+ </div>
+</div>
+
+<p>${_('adm_con_ss_view_agency')}</p>
+<table>
+ <tr>
+ <td class="label table_header_v table_width_name">
+ ${_('adm_form_settings_kaname')}
+ </td>
+ <td class="table_row_v table_description">${c.agency.getName()| F.NA}
+ </td>
+ </tr>
+ <tr>
+ <td class="label table_width_name">
+ ${_('adm_form_settings_kaadress')}
+ </td>
+ <td class="table_description">${c.agency.getAddress()| F.NA}
+ </td>
+ </tr>
+ <tr>
+ <td class="label table_header_v">${_('adm_form_settings_max_savetime')}</td>
+ <td class="table_row_v">${c.agency.getMaxSavetime()| F.NA}</td>
+ </tr>
+ <tr>
+ <td class="label">${_('additional conditions for reminders')}</td>
+ <td class="">${h.literal(g.mpuls_config.get('case', 'reminderconditiondesc'))}</td>
+ </tr>
+ <tr>
+ <td class="label table_header_v">${_('adm_form_settings_anontransfer')}</td>
+ <td class="table_row_v">
+ % if c.agency.isAnonTransfer():
+ ${_('adm_form_settings_anontransfer_yes')}
+ % else:
+ ${_('adm_form_settings_anontransfer_no')}
+ % endif
+ </td>
+ </tr>
+</table>
More information about the Mpuls-commits
mailing list