[Mpuls-commits] r1110 - wasko/branches/2.0/waskaweb/templates/documents

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 2 09:54:03 CET 2010


Author: torsten
Date: 2010-02-02 09:53:59 +0100 (Tue, 02 Feb 2010)
New Revision: 1110

Modified:
   wasko/branches/2.0/waskaweb/templates/documents/case_overview.mako
Log:
* waskaweb/templates/documents/case_overview.mako: Formatting.


Modified: wasko/branches/2.0/waskaweb/templates/documents/case_overview.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/documents/case_overview.mako	2010-02-01 17:26:50 UTC (rev 1109)
+++ wasko/branches/2.0/waskaweb/templates/documents/case_overview.mako	2010-02-02 08:53:59 UTC (rev 1110)
@@ -1,69 +1,76 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../casemanagement/main.mako" />
 <%def name="buildNavipath()">
-	${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
-	<li><a href="/casedocument/index/${session.get('case').id}">${_('cm_np_doc_overview')}</a></li>
+  ${parent.buildNavipath()}
+  <li>
+    <a href="/case/select/${session.get('case').id}/1">
+      ${_('cm_np_select')}
+    </a>
+  </li>
+  <li>
+    <a href="/casedocument/index/${session.get('case').id}">
+      ${_('cm_np_doc_overview')}
+    </a>
+  </li>
 </%def>
 
 <div id="content_header_small">
   <div id="content_ueberschrift">
-  ${_('cm_header_doc_overview')}
+    ${_('cm_header_doc_overview')}
   </div>
-% if h.hasRole(['cm_ka']):
-  <div id="modusfield">
-    <div class="actions">
+  % if h.hasRole(['cm_ka']):
+    <div id="modusfield">
+      <div class="actions">
 	<ul>
-		<li><a href="/casedocument/new/"> ${_('cm_actions_link_doc_new')}</a></li>
+	  <li><a href="/casedocument/new/">${_('cm_actions_link_doc_new')}</a></li>
 	</ul>
+      </div>
     </div>
-  </div>
-% endif
+  % endif
 </div>
 
 <%!  import waskaweb.lib.filters as F %>
 <table>
   <tr>
-    <th class="table_header_h table_description">${_('doc_overview_tbl_header_filename')}</th>
-    <th class="number_field table_header_h table_date">${_('doc_overview_tbl_header_filesize')}</th>
-    <th class="table_header_h table_action">${_('doc_overview_tbl_header_actions')}</th>
+    <th class="table_header_h table_description">
+      ${_('doc_overview_tbl_header_filename')}
+    </th>
+    <th class="number_field table_header_h table_date">
+      ${_('doc_overview_tbl_header_filesize')}
+    </th>
+    <th class="table_header_h actions">
+      ${_('doc_overview_tbl_header_actions')}
+    </th>
   </tr>
-  <% idset = 0 %>
-% if len(c.files) > 0:
-  <% 
-    kb = lambda x: h.format_number(x * 1.0/1024.0) 
-    myid = session.get('case').id
-  %>
-  % for f in c.files:
-  % if idset==0:
-   <tr>
-     <td>${ f.getName() | F.shorten, h}</td>
-     <td class="number_field">${kb(f.size)} KB</td>
-     <td class="table_action"><a href="/document/caseShow/${f.id}/${f.getName() | F.H}" target="_blank"><img src="/images/icons/view_red.gif" border="0" alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
-     % if h.hasRole(['cm_ka']):
-     <a href="/document/caseDelete/${f.id}/${myid}/0"><img src="/images/icons/delete_red.gif" border="0" alt="${_('cm_overview_a_delete')}" title="${_('cm_overview_a_delete')}"></a>
-     % endif
-     </td>
-   </tr>
-   <% idset = 1 %>
+  % if len(c.files) > 0:
+    <% 
+      kb = lambda x: h.format_number(x * 1.0/1024.0) 
+      myid = session.get('case').id
+    %>
+    % for num, f in enumerate(c.files):
+      <tr class="${num%2 and 'hl' or ''}">
+        <td>${ f.getName() | F.shorten, h}</td>
+        <td class="number_field">${kb(f.size)} KB</td>
+        <td class="actions">
+          <a href="/document/caseShow/${f.id}/${f.getName() | F.H}" 
+          target="_blank">
+            <img src="/images/icons/view_red.gif" border="0" 
+            alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
+          % if h.hasRole(['cm_ka']):
+            <a href="/document/caseDelete/${f.id}/${myid}/0">
+              <img src="/images/icons/delete_red.gif" border="0" 
+              alt="${_('cm_overview_a_delete')}" 
+              title="${_('cm_overview_a_delete')}">
+            </a>
+          % endif
+        </td>
+      </tr>
+    % endfor
   % else:
-   <tr>
-    <td class="table_row_h">${ f.getName() | F.shorten, h}</td>
-    <td class="number_field table_row_h">${kb(f.size)} KB</td>
-    <td class="table_row_h table_action"><a href="/document/caseShow/${f.id}/${f.getName() | F.H}" target="_blank"><img src="/images/icons/view_red.gif" border="0" alt="${_('cm_overview_a_show')}" title="${_('cm_overview_a_show')}"></a>
-    % if h.hasRole(['cm_ka']):
-    <a href="/document/caseDelete/${f.id}/${myid}/0"><img src="/images/icons/delete_red.gif" border="0" alt="${_('cm_overview_a_delete')}" title="${_('cm_overview_a_delete')}"></a>
-    % endif
-    </td>
-   </tr>
-   <% idset = 0 %>
+    <tr>
+      <td colspan="3">
+        ${_('doc_overview_nofilesfound')}
+      </td>
+    </tr>
   % endif
-  % endfor
-% else:
-  <tr>
-    <td colspan="3">
-      ${_('doc_overview_nofilesfound')}
-    </td>
-  </tr>
-% endif
 </table>



More information about the Mpuls-commits mailing list