|
1 |
[%- USE LxERP -%]
|
|
2 |
[%- USE L %]
|
|
3 |
[%- USE HTML %]
|
|
4 |
[%- USE P %]
|
|
5 |
|
|
6 |
<h4>[% source.title | html %]</h4>
|
|
7 |
|
|
8 |
<div>
|
|
9 |
[%- FOREACH source = SOURCES %]
|
|
10 |
<table class="highlight striped">
|
|
11 |
<thead>
|
|
12 |
<tr>
|
|
13 |
[%- SET checkname = source.chk_action %]
|
|
14 |
[%- IF edit_attachments %]
|
|
15 |
<th>[% P.M.checkbox_tag(checkname _ '_checkall', label=source.chkall_title) %]
|
|
16 |
[%- END %]
|
|
17 |
<th>[% LxERP.t8('Date') | html %]</th>
|
|
18 |
<th>[% source.file_title | html %]</th>
|
|
19 |
[%- IF file_type == 'image' %]
|
|
20 |
<th>[% LxERP.t8('Title') %]</th>
|
|
21 |
<th>[% LxERP.t8('ImagePreview') %]</th>
|
|
22 |
<th>[% LxERP.t8('Description') %]</th>
|
|
23 |
[%- ELSE %]
|
|
24 |
<th></th>
|
|
25 |
[%- END %]
|
|
26 |
</tr>
|
|
27 |
</thead>
|
|
28 |
|
|
29 |
<tbody>
|
|
30 |
[%- FOREACH file = source.files %]
|
|
31 |
<tr>
|
|
32 |
[%- IF edit_attachments %]
|
|
33 |
<td>[%- P.M.checkbox_tag(checkname _ '[]', value=file.id _ '_' _ file.version, class=checkname, label=' ') %]</td>
|
|
34 |
[%- END %]
|
|
35 |
<td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td>
|
|
36 |
<td><a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]">
|
|
37 |
<span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span></a></td>
|
|
38 |
[%- IF file_type == 'image' %]
|
|
39 |
<td>[% file.title %]</td>
|
|
40 |
<td>
|
|
41 |
<img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px">
|
|
42 |
</td>
|
|
43 |
<td>[% file.description %]</td>
|
|
44 |
[%- ELSE %]
|
|
45 |
<td></td>
|
|
46 |
[%- END %]
|
|
47 |
</tr>
|
|
48 |
[%- END %]
|
|
49 |
</tbody>
|
|
50 |
</table>
|
|
51 |
<div>
|
|
52 |
[%- IF edit_attachments %]
|
|
53 |
[%- IF source.can_import %]
|
|
54 |
[% P.M.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %]
|
|
55 |
[%- ELSE %]
|
|
56 |
[%- IF source.can_delete %]
|
|
57 |
[% P.M.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %]
|
|
58 |
[%- END %]
|
|
59 |
[%- END %]
|
|
60 |
[%- END %]
|
|
61 |
[%- IF source.can_rename %]
|
|
62 |
[% P.M.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.rename_title ) %]
|
|
63 |
[%- END %]
|
|
64 |
[%- IF source.can_upload %]
|
|
65 |
[% P.M.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "');", source.upload_title ) %]
|
|
66 |
[%- END %]
|
|
67 |
[%- IF source.can_import %]
|
|
68 |
[% P.M.button_tag("kivi.File.import(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');", source.import_title ) %]
|
|
69 |
[%- END %]
|
|
70 |
</div>
|
|
71 |
[%- END %]
|
|
72 |
<div></div><div>
|
|
73 |
[% P.M.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "');", LxERP.t8('Update')) %]
|
|
74 |
</div>
|
|
75 |
</div>
|
Mobile: Templates für den File Dialog
- is_global ist noch nicht unterstützt
- json-loses direkt-rendern wird nicht unterstützt
- umbenennen ist noch nicht implementiert