-[%- SET can_rename = 0 %]
-[%- FOREACH source = SOURCES %]
- <table style="width: 100%" >
- <thead>
- <tr><th class="listheading" colspan="6">[% source.title %]</th></tr>
- <tr>
- [%- SET checkname = source.chk_action %]
- [%- IF is_global %]
- [%- SET checkname = object_type _ '_' _ source.chk_action %]
- [%- END %]
- [%- IF edit_attachments %]
- <script type="text/javascript">
- <!--
-$(function() {
- $('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]');
-});
- -->
-</script>
- <th class="listheading" width="3%">[% L.checkbox_tag(checkname _ '_checkall') %]</th>
- <th class="listheading" width="7%">[% source.chkall_title %]</th>
- [%- END %]
- <th class="listheading" width="15%"><b>[% LxERP.t8('Date') %]</b></th>
- <th class="listheading" width="20%"><b>[% source.file_title %]</b></th>
- [%- IF file_type == 'image' %]
- <th class="listheading" width="15%"><b>[% LxERP.t8('Title') %]</b></th>
- <th class="listheading" width="10%">
- <b>[% LxERP.t8('ImagePreview') %]</b>
- </th>
- <th class="listheading" width="30%"><b>[% LxERP.t8('Description') %]</b></th>
- [%- ELSE %]
- <th class="listheading" width="40%"></th>
- [%- END %]
- </tr>
- </thead>
+ [%- SET can_rename = 0 %]
+ [%- FOREACH source = SOURCES %]
+ <table style="width: 100%" >
+ <thead>
+ <tr><th class="listheading" colspan="6">[% source.title %]</th></tr>
+ <tr>
+ [%- SET checkname = source.chk_action %]
+ [%- IF is_global %]
+ [%- SET checkname = object_type _ '_' _ source.chk_action %]
+ [%- END %]
+ [%- IF edit_attachments %]
+ <script type="text/javascript">
+ <!--
+ $(function() {
+ $('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]');
+ });
+ -->
+ </script>
+ <th class="listheading" width="3%">[% L.checkbox_tag(checkname _ '_checkall') %]</th>
+ <th class="listheading" width="7%">[% source.chkall_title %]</th>
+ [%- END %]
+ <th class="listheading" width="15%"><b>[% LxERP.t8('Date') %]</b></th>
+ <th class="listheading" width="20%"><b>[% source.file_title %]</b></th>
+ [%- IF file_type == 'image' %]
+ <th class="listheading" width="15%"><b>[% LxERP.t8('Title') %]</b></th>
+ <th class="listheading" width="10%">
+ <b>[% LxERP.t8('ImagePreview') %]</b>
+ </th>
+ <th class="listheading" width="30%"><b>[% LxERP.t8('Description') %]</b></th>
+ [%- ELSE %]
+ <th class="listheading" width="40%"></th>
+ [%- END %]
+ </tr>
+ </thead>
+
+ <tbody>
+ [%- FOREACH file = source.files %]
+ <tr class="listrow[% loop.count % 2 %]">
+ [%- IF edit_attachments %]
+ <td>[%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td>
+ <td></td>
+ [%- END %]
+ <td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td>
+ <td>
+ <a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]">
+ <span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span>
+ </a>
+ </td>
+ [%- IF file_type == 'image' %]
+ <td>[% file.title %]</td>
+ <td>
+ <img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px">
+ </td>
+ <td>[% file.description %]</td>
+ [%- ELSE %]
+ <td></td>
+ [%- END %]
+ </tr>
+ [%- END # FOREACH file %]
+ </tbody>
+ </table