[Mpuls-commits] r5104 - in base/trunk: . mpulsweb/templates/documents

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jun 14 15:04:42 CEST 2011


Author: frank
Date: 2011-06-14 15:04:40 +0200 (Tue, 14 Jun 2011)
New Revision: 5104

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/templates/documents/case_overview.mako
   base/trunk/mpulsweb/templates/documents/global_overview.mako
Log:
GUI Update: Document lists in line

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-06-10 17:23:22 UTC (rev 5103)
+++ base/trunk/ChangeLog	2011-06-14 13:04:40 UTC (rev 5104)
@@ -1,3 +1,9 @@
+2011-06-14	Frank Koormann <frank.koormann at intevation.de>
+
+	* mpulsweb/templates/documents/case_overview.mako, 
+	mpulsweb/templates/documents/global_overview.mako: Brought both document
+	lists in line: Use hover and compact alternating rendering. 
+
 2011-06-06  Ludwig Reiter <ludwig.reiter at intevation.de>
 
 	* mpulsweb/i18n/mpulsweb.pot,

Modified: base/trunk/mpulsweb/templates/documents/case_overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/case_overview.mako	2011-06-10 17:23:22 UTC (rev 5103)
+++ base/trunk/mpulsweb/templates/documents/case_overview.mako	2011-06-14 13:04:40 UTC (rev 5104)
@@ -30,7 +30,7 @@
 </div>
 
 <%!  import mpulsweb.lib.helper.filters as F %>
-<table>
+<table class="hovertable">
   <tr>
     <th class="table_header_h table_description">
       ${_('Filename')}
@@ -47,14 +47,22 @@
       kb = lambda x: h.format_number(x * 1.0/1024.0) 
     %>
     % for num, f in enumerate(c.files):
-      <tr class="${num%2 and 'hl' or ''}">
-        <td>${ f.getName() | F.shorten}</td>
-        <td class="number_field">${kb(f.size)} KB</td>
-        <td class="actions">
+    <tr class="${num%2 and 'hl' or ''}">
+      <td>
+          <a href="${h.url_for(controller='/casedocument', action='show', id=f.id, url=f.getName())}"
+             target="_blank"
+             >${ F.shorten(f.getName(),60) }
+          </a>
+      </td>
+      <td class="number_field">
+          ${kb(f.size)} KB
+      </td>
+      <td class="actions">
           <a href="${h.url_for(controller='/casedocument', action='show', id=f.id, url=f.getName())}" 
-          target="_blank">
-            <img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" 
-            alt="${_('Show')}" title="${_('Show')}"></a>
+             target="_blank"
+             ><img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="${_('Show')}" 
+                   title="${_('Show')}" title="${_('Show')}">
+          </a>
           % if h.hasRole(['cm_ka']) and session.get('case').getState().getState() == 1:
             <a href="${h.url_for(controller='/casedocument', action='delete', id=f.id, confirmed=0)}">
               <img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" 
@@ -62,8 +70,8 @@
               title="${_('Delete')}">
             </a>
           % endif
-        </td>
-      </tr>
+      </td>
+    </tr>
     % endfor
   % else:
     <tr>

Modified: base/trunk/mpulsweb/templates/documents/global_overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/global_overview.mako	2011-06-10 17:23:22 UTC (rev 5103)
+++ base/trunk/mpulsweb/templates/documents/global_overview.mako	2011-06-14 13:04:40 UTC (rev 5104)
@@ -22,51 +22,46 @@
 </div>
 
 <table class="hovertable">
-  <tr class="table_header_h">
-    <th class="table_description">${_('Filename')}</th>
-    <th class="number_field table_date">${_('Filesize')}</th>
-    <th class="table_action">${_('Actions')}</th>
+  <tr>
+    <th class="table_header_h table_description">
+      ${_('Filename')}
+    </th>
+    <th class="table_header_h number_field table_date">
+      ${_('Filesize')}
+    </th>
+    <th class="table_header_h actions">
+      ${_('Actions')}
+    </th>
   </tr>
   <% idset = 0 %>
 % if len(c.files) > 0:
   <% kb = lambda x: h.format_number(x * 1.0/1024.0) %>
-  % for f in c.files:
-  % if idset==0:
-  <tr>
+  % for num, f in enumerate(c.files):
+  <tr class="${num%2 and 'hl' or ''}">
     <td>
-        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank">${ f.getName() | F.shorten}</a>
+        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}"
+           target="_blank"
+           >${ F.shorten(f.getName(),60) }
+        </a>
     </td>
     <td class="number_field">
         ${kb(f.size)} KB
     </td>
-    <td class="table_action">
-        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank"><img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="${_('Show')}" 
-        title="${_('Show')}" title="${_('Show')}"></a>
+    <td class="actions">
+        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" 
+           target="_blank"
+           ><img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="${_('Show')}" 
+                 title="${_('Show')}" title="${_('Show')}">
+        </a>
         % if h.hasRole(['admin_ka']):
-        <a href="${h.url_for(controller='/document', action='globalDelete', id=f.id)}"><img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" alt="${_('Delete')}" title="${_('Delete')}"></a>
+          <a href="${h.url_for(controller='/document', action='globalDelete', id=f.id)}"
+             ><img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" 
+                   alt="${_('Delete')}" title="${_('Delete')}">
+          </a>
         % endif
     </td>
   </tr>
-  <% idset = 1 %>
-  % else:
-    <tr  class="table_row_h">
-      <td>
-        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank">${ f.getName() | F.shorten}</a>
-      </td>
-      <td class="number_field">
-        ${kb(f.size)} KB
-      </td>
-      <td class="table_action">
-        <a href="${h.url_for(controller='/document', action='globalShow', id=f.id, url=f.getName())}" target="_blank"><img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="${_('Show')}" 
-        title="${_('Show')}" title="${_('Show')}"></a>
-        % if h.hasRole(['admin_ka']):
-          <a href="${h.url_for(controller='/document', action='globalDelete', id=f.id)}"><img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" alt="${_('Delete')}" title="${_('Delete')}"></a>
-        % endif
-      </td>
-    </tr>
-    <% idset = 0 %>
-    % endif
-    % endfor
+  % endfor
 % else:
   <tr>
     <td colspan="3">



More information about the Mpuls-commits mailing list