[Mpuls-commits] r3897 - base/trunk/mpulsweb/templates/tags

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 6 12:37:51 CEST 2010


Author: torsten
Date: 2010-10-06 12:37:51 +0200 (Wed, 06 Oct 2010)
New Revision: 3897

Modified:
   base/trunk/mpulsweb/templates/tags/tags.mako
Log:
* mpulsweb/templates/tags/tags.mako: new layout for tags overview.
Tags are now categorized in three categories: 1. Evaluation, 2.
Validities, 3. Errors. Each Tag is colored, so the user sees if the
case is missing some tags.


Modified: base/trunk/mpulsweb/templates/tags/tags.mako
===================================================================
--- base/trunk/mpulsweb/templates/tags/tags.mako	2010-10-06 10:22:00 UTC (rev 3896)
+++ base/trunk/mpulsweb/templates/tags/tags.mako	2010-10-06 10:37:51 UTC (rev 3897)
@@ -12,28 +12,50 @@
 ${_('Tags')}
   </div>
 </div>
-<h2>${_('Internal Tags')}</h2>
+<% 
+tag_ids = [int(i) for i in g.taggingConf.get_checks()]
+tag_ids.sort()
+%>
+##<h2>${_('Internal Tags')}</h2>
+<h2>${_('Evaluation')}</h2>
 <table>
-  <tr>
-    <th class="table_status">${_('ID')}</th>
-    <th class="table_name">${_('Name')}</th>
-    <th>${_('Description')}</th>
-    <th class="actions">${_('Set')}</th>
+  % 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="15px" class="${id in c.tags and 'ok' or 'error'}">
+      &nbsp;
+    </td>
+    <td class="note">
+      <strong>${g.taggingConf.get_name(id)}</strong> (id:${id})<br>
+      ${g.taggingConf.get_desc(id)}
+    </td>
   </tr>
-  % for num, id in enumerate(g.taggingConf.get_checks()):
+  % 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>
-      ${id}
+    <td width="15px" class="${id in c.tags and 'ok' or 'error'}">
+      &nbsp;
     </td>
-    <td>
-      ${g.taggingConf.get_name(id)}
+    <td class="note">
+      <strong>${g.taggingConf.get_name(id)}</strong> (id:${id})<br>
+      ${g.taggingConf.get_desc(id)}
     </td>
-    <td>
+  </tr>
+  % endfor
+</table>
+<h2>${_('Errors')}</h2>
+<table>
+  % for num, id in enumerate([tag_id for tag_id in tag_ids if tag_id >= 100 and tag_id < 10000]):
+  <tr class="${num%2 and 'hl' or ''}">
+    <td width="15px" class="${id not in c.tags and 'ok' or 'error'}">
+      &nbsp;
+    </td>
+    <td class="note">
+      <strong>${g.taggingConf.get_name(id)}</strong> (id:${id})<br>
       ${g.taggingConf.get_desc(id)}
     </td>
-    <td class="actions">
-      <input disabled="disabled" type="checkbox" name="tags" value="${id}">
-    </td>
   </tr>
   % endfor
 </table>



More information about the Mpuls-commits mailing list