[Mpuls-commits] r5506 - base/trunk/mpulsweb/templates/tags
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Oct 28 10:38:39 CEST 2011
Author: bricks
Date: 2011-10-28 10:38:39 +0200 (Fri, 28 Oct 2011)
New Revision: 5506
Modified:
base/trunk/mpulsweb/templates/tags/tags.mako
Log:
Semantically split the tags/Auswertungshinweise in several div containers
It wasn't possible to format the tags section "correctly" if sections/paragraphs
aren't treated as such. Therefore put each section in an own div container. Now each
section can be handled different with css.
Modified: base/trunk/mpulsweb/templates/tags/tags.mako
===================================================================
--- base/trunk/mpulsweb/templates/tags/tags.mako 2011-10-28 08:35:42 UTC (rev 5505)
+++ base/trunk/mpulsweb/templates/tags/tags.mako 2011-10-28 08:38:39 UTC (rev 5506)
@@ -2,9 +2,9 @@
<%inherit file="../casemanagement/main.mako" />
<%! import mpulsweb.lib.helper.filters as F %>
<%def name="buildNavipath()">
- ${parent.buildNavipath()}
- <li><a href="${h.url_for(controller='/case', action='select', id=session.get('case').id, confirmed=1)}">${_('Selected case documents')}</a></li>
- <li><a href="${h.url_for(controller='/tags', action='tags', id=session.get('case').id)}">${_('Tags')}</a></li>
+ ${parent.buildNavipath()}
+ <li><a href="${h.url_for(controller='/case', action='select', id=session.get('case').id, confirmed=1)}">${_('Selected case documents')}</a></li>
+ <li><a href="${h.url_for(controller='/tags', action='tags', id=session.get('case').id)}">${_('Tags')}</a></li>
</%def>
<div id="content_header_small">
@@ -17,83 +17,91 @@
tag_ids.sort()
%>
##<h2>${_('Internal Tags')}</h2>
-<h2>${_('Evaluation')}</h2>
-<table id="tags">
- % for num, id in enumerate([tag_id for tag_id in tag_ids if tag_id > 0 and tag_id < 10]):
- <tr class="${num%2 and 'hl' or ''}">
- <td width="25px" class="middle">
- % if id in c.tags:
- <img src="${h.url_for('/images/icons/info/ok_22.png')}"
- alt="Ok"
- width="22"
- height="22">
- % else:
- <img src="${h.url_for('/images/icons/info/failure_22.png')}"
- alt="Error"
- width="22"
- height="22">
+<div id="content_tags">
+ <div id="tags">
+ <h2>${_('Evaluation')}</h2>
+ <table>
+ % for num, id in enumerate([tag_id for tag_id in tag_ids if tag_id > 0 and tag_id < 10]):
+ <tr class="${num%2 and 'hl' or ''}">
+ <td width="25px" class="middle">
+ % if id in c.tags:
+ <img src="${h.url_for('/images/icons/info/ok_22.png')}"
+ alt="Ok"
+ width="22"
+ height="22">
+ % else:
+ <img src="${h.url_for('/images/icons/info/failure_22.png')}"
+ alt="Error"
+ width="22"
+ height="22">
+ % endif
+ </td>
+ <td class="note">
+ <strong>${g.taggingConf.get_name(id)}</strong> <!-- Tag-ID: (id:${id}) --><br>
+ ${g.taggingConf.get_desc(id)}
+ </td>
+ </tr>
+ % endfor
+ </table>
+ </div>
+ <div id="validities">
+ <h2>${_('Validities')}</h2>
+ <table>
+ % for num, id in enumerate([tag_id for tag_id in tag_ids if tag_id >= 10 and tag_id < 100]):
+ <tr class="${num%2 and 'hl' or ''}">
+ <td width="25px" class="middle">
+ % if id in c.tags:
+ <img src="${h.url_for('/images/icons/info/ok_22.png')}"
+ alt="Ok"
+ width="22"
+ height="22">
+ % else:
+ <img src="${h.url_for('/images/icons/info/failure_22.png')}"
+ alt="Error"
+ width="22"
+ height="22">
+ % endif
+ </td>
+ <td class="note">
+ <strong>${g.taggingConf.get_name(id)}</strong> <!-- Tag-ID: (id:${id}) --><br>
+ ${g.taggingConf.get_desc(id)}
+ </td>
+ </tr>
+ % endfor
+ </table>
+ </div>
+ <div id="rules">
+ <h2>${_('Rule-Check')}</h2>
+ <table>
+ <% errors = [tag_id for tag_id in tag_ids if tag_id >= 100 and tag_id < 10000 and tag_id in c.tags] %>
+ % for num, id in enumerate(errors):
+ <tr class="${num%2 and 'hl' or ''}">
+ <td width="25px" class="middle">
+ <img src="${h.url_for('/images/icons/info/failure_22.png')}"
+ alt="Error"
+ width="22"
+ height="22">
+ </td>
+ <td class="note">
+ <strong>${g.taggingConf.get_name(id)}</strong> <!-- Tag-ID: (id:${id}) --><br>
+ ${g.taggingConf.get_desc(id)}
+ </td>
+ </tr>
+ % endfor
+ % if len(errors) < 1:
+ <tr class="">
+ <td width="25px" class="middle">
+ <img src="${h.url_for('/images/icons/info/ok_22.png')}"
+ alt="Ok"
+ width="22"
+ height="22">
+ </td>
+ <td class="note">
+ <strong>${_('Data is consitent!')}</strong><br>
+ ${_('The rule based validation on the data was successfull. No errors found.')}
+ </td>
+ </tr>
% endif
- </td>
- <td class="note">
- <strong>${g.taggingConf.get_name(id)}</strong> <!-- Tag-ID: (id:${id}) --><br>
- ${g.taggingConf.get_desc(id)}
- </td>
- </tr>
- % endfor
-</table>
-<h2>${_('Validities')}</h2>
-<table>
- % for num, id in enumerate([tag_id for tag_id in tag_ids if tag_id >= 10 and tag_id < 100]):
- <tr class="${num%2 and 'hl' or ''}">
- <td width="25px" class="middle">
- % if id in c.tags:
- <img src="${h.url_for('/images/icons/info/ok_22.png')}"
- alt="Ok"
- width="22"
- height="22">
- % else:
- <img src="${h.url_for('/images/icons/info/failure_22.png')}"
- alt="Error"
- width="22"
- height="22">
- % endif
- </td>
- <td class="note">
- <strong>${g.taggingConf.get_name(id)}</strong> <!-- Tag-ID: (id:${id}) --><br>
- ${g.taggingConf.get_desc(id)}
- </td>
- </tr>
- % endfor
-</table>
-<h2>${_('Rule-Check')}</h2>
-<table>
- <% errors = [tag_id for tag_id in tag_ids if tag_id >= 100 and tag_id < 10000 and tag_id in c.tags] %>
- % for num, id in enumerate(errors):
- <tr class="${num%2 and 'hl' or ''}">
- <td width="25px" class="middle">
- <img src="${h.url_for('/images/icons/info/failure_22.png')}"
- alt="Error"
- width="22"
- height="22">
- </td>
- <td class="note">
- <strong>${g.taggingConf.get_name(id)}</strong> <!-- Tag-ID: (id:${id}) --><br>
- ${g.taggingConf.get_desc(id)}
- </td>
- </tr>
- % endfor
- % if len(errors) < 1:
- <tr class="">
- <td width="25px" class="middle">
- <img src="${h.url_for('/images/icons/info/ok_22.png')}"
- alt="Ok"
- width="22"
- height="22">
- </td>
- <td class="note">
- <strong>${_('Data is consitent!')}</strong><br>
- ${_('The rule based validation on the data was successfull. No errors found.')}
- </td>
- </tr>
- % endif
-</table>
+ </table>
+ </div>
+</div>
More information about the Mpuls-commits
mailing list