Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add <thead> and <tbody> to attachment list table. Also remove extra <…

…/td>
  • Loading branch information...
commit 899c9450784b2c84f1ed3a6f7ceb66549aa561c0 1 parent d5e31a7
@autarch autarch authored
Showing with 55 additions and 51 deletions.
  1. +55 −51 root/base/attachments/list.tt
View
106 root/base/attachments/list.tt
@@ -1,58 +1,62 @@
<table>
- <tr>
- <th id="filename-th">Filename</th>
- <th id="type-th">Type</th>
- <th id="size-th">Size</th>
- <th id="date-th">Date</th>
- <th id="actions-th"></th>
- </tr>
+ <thead>
+ <tr>
+ <th id="filename-th">Filename</th>
+ <th id="type-th">Type</th>
+ <th id="size-th">Size</th>
+ <th id="date-th">Date</th>
+ <th id="actions-th"></th>
+ </tr>
+ </thead>
+ <tbody>
[% FOR attachment IN page.attachments %]
- <tr>
- <td>
- <a href="[%c.uri_for('attachment',attachment.id,'download')%]" title="[%loc('download')%]">[%attachment.name%]</a>
- [% IF attachment.is_image %]
- <br />
-
- <a href="[%c.uri_for('attachment',attachment.id,'view')%]">
- <img src="[%c.uri_for('attachment',attachment.id,'thumb')%]" alt="thumbnail for [%attachment.name%]"/>
- </a>
- [% END %]
-
- </td>
- <td>
- [% loc(attachment.human_type) %]
- </td>
- <td>
- [%IF attachment.size%][%attachment.human_size%] [% ELSE %] Unknown[%END%]</td>
- </td>
- <td>
- [% attachment.uploaded.strftime('%Y-%m-%d') %]
- </td>
- <td>
- <ul id="actions">
+ <tr>
+ <td>
+ <a href="[%c.uri_for('attachment',attachment.id,'download')%]" title="[%loc('download')%]">[%attachment.name%]</a>
[% IF attachment.is_image %]
- <li>
- <a href="[%c.uri_for('attachment',attachment.id,'view')%]">[%loc('view full size')%]</a>
- </li>
- [% ELSIF attachment.is_text %]
- <li>
- <a href="[%c.uri_for('attachment',attachment.id,'view')%]">[%loc('view in your browser')%]</a>
- </li>
- [% END %]
- [% IF c.check_permissions(page.path,c.user).edit %]
- <li>
- <a href="[%c.uri_for('edit',{insert_attachment => attachment.id})%]">[%loc('insert link')%]</a>
- </li>
- [% END %]
- [% IF c.check_permissions(page.path,c.user).attachment %]
- <li>
- <a href="[%c.uri_for('attachment',attachment.id,'delete')%]" class="delete_attachment">[%loc('delete')%]</a>
- </li>
+ <br />
+
+ <a href="[%c.uri_for('attachment',attachment.id,'view')%]">
+ <img src="[%c.uri_for('attachment',attachment.id,'thumb')%]" alt="thumbnail for [%attachment.name%]"/>
+ </a>
[% END %]
- </ul>
- </td>
- </tr>
-[% END %]
+
+ </td>
+ <td>
+ [% loc(attachment.human_type) %]
+ </td>
+ <td>
+ [%IF attachment.size%][%attachment.human_size%] [% ELSE %] Unknown[%END%]
+ </td>
+ <td>
+ [% attachment.uploaded.strftime('%Y-%m-%d') %]
+ </td>
+ <td>
+ <ul id="actions">
+ [% IF attachment.is_image %]
+ <li>
+ <a href="[%c.uri_for('attachment',attachment.id,'view')%]">[%loc('view full size')%]</a>
+ </li>
+ [% ELSIF attachment.is_text %]
+ <li>
+ <a href="[%c.uri_for('attachment',attachment.id,'view')%]">[%loc('view in your browser')%]</a>
+ </li>
+ [% END %]
+ [% IF c.check_permissions(page.path,c.user).edit %]
+ <li>
+ <a href="[%c.uri_for('edit',{insert_attachment => attachment.id})%]">[%loc('insert link')%]</a>
+ </li>
+ [% END %]
+ [% IF c.check_permissions(page.path,c.user).attachment %]
+ <li>
+ <a href="[%c.uri_for('attachment',attachment.id,'delete')%]" class="delete_attachment">[%loc('delete')%]</a>
+ </li>
+ [% END %]
+ </ul>
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
</table>
<a href="[% c.uri_for('gallery') %]">[% loc('View as gallery') %]</a>
Please sign in to comment.
Something went wrong with that request. Please try again.