Revision db34e1f5
Von Bernd Bleßmann vor etwa 3 Jahren hinzugefügt
templates/webpages/file/list.html | ||
---|---|---|
1 | 1 |
[%- USE LxERP -%][% USE L %][% USE HTML %] |
2 | 2 |
[%- IF ! json %] |
3 |
<div id="[% file_type %]_list_[% object_type %]"> |
|
3 |
<div id="[% file_type %]_list_[% object_type %]">
|
|
4 | 4 |
[%- END %] |
5 | 5 |
<div class="listtop">[% title %]</div> |
6 | 6 |
|
7 | 7 |
<div style="padding-bottom: 15px"> |
8 |
[%- SET can_rename = 0 %] |
|
9 |
[%- FOREACH source = SOURCES %] |
|
10 |
<table style="width: 100%" > |
|
11 |
<thead> |
|
12 |
<tr><th class="listheading" colspan="6">[% source.title %]</th></tr> |
|
13 |
<tr> |
|
14 |
[%- SET checkname = source.chk_action %] |
|
15 |
[%- IF is_global %] |
|
16 |
[%- SET checkname = object_type _ '_' _ source.chk_action %] |
|
17 |
[%- END %] |
|
18 |
[%- IF edit_attachments %] |
|
19 |
<script type="text/javascript"> |
|
20 |
<!-- |
|
21 |
$(function() { |
|
22 |
$('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]'); |
|
23 |
}); |
|
24 |
--> |
|
25 |
</script> |
|
26 |
<th class="listheading" width="3%">[% L.checkbox_tag(checkname _ '_checkall') %]</th> |
|
27 |
<th class="listheading" width="7%">[% source.chkall_title %]</th> |
|
28 |
[%- END %] |
|
29 |
<th class="listheading" width="15%"><b>[% LxERP.t8('Date') %]</b></th> |
|
30 |
<th class="listheading" width="20%"><b>[% source.file_title %]</b></th> |
|
31 |
[%- IF file_type == 'image' %] |
|
32 |
<th class="listheading" width="15%"><b>[% LxERP.t8('Title') %]</b></th> |
|
33 |
<th class="listheading" width="10%"> |
|
34 |
<b>[% LxERP.t8('ImagePreview') %]</b> |
|
35 |
</th> |
|
36 |
<th class="listheading" width="30%"><b>[% LxERP.t8('Description') %]</b></th> |
|
37 |
[%- ELSE %] |
|
38 |
<th class="listheading" width="40%"></th> |
|
39 |
[%- END %] |
|
40 |
</tr> |
|
41 |
</thead> |
|
8 |
[%- SET can_rename = 0 %] |
|
9 |
[%- FOREACH source = SOURCES %] |
|
10 |
<table style="width: 100%" > |
|
11 |
<thead> |
|
12 |
<tr><th class="listheading" colspan="6">[% source.title %]</th></tr> |
|
13 |
<tr> |
|
14 |
[%- SET checkname = source.chk_action %] |
|
15 |
[%- IF is_global %] |
|
16 |
[%- SET checkname = object_type _ '_' _ source.chk_action %] |
|
17 |
[%- END %] |
|
18 |
[%- IF edit_attachments %] |
|
19 |
<script type="text/javascript"> |
|
20 |
<!-- |
|
21 |
$(function() { |
|
22 |
$('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]'); |
|
23 |
}); |
|
24 |
--> |
|
25 |
</script> |
|
26 |
<th class="listheading" width="3%">[% L.checkbox_tag(checkname _ '_checkall') %]</th> |
|
27 |
<th class="listheading" width="7%">[% source.chkall_title %]</th> |
|
28 |
[%- END %] |
|
29 |
<th class="listheading" width="15%"><b>[% LxERP.t8('Date') %]</b></th> |
|
30 |
<th class="listheading" width="20%"><b>[% source.file_title %]</b></th> |
|
31 |
[%- IF file_type == 'image' %] |
|
32 |
<th class="listheading" width="15%"><b>[% LxERP.t8('Title') %]</b></th> |
|
33 |
<th class="listheading" width="10%"> |
|
34 |
<b>[% LxERP.t8('ImagePreview') %]</b> |
|
35 |
</th> |
|
36 |
<th class="listheading" width="30%"><b>[% LxERP.t8('Description') %]</b></th> |
|
37 |
[%- ELSE %] |
|
38 |
<th class="listheading" width="40%"></th> |
|
39 |
[%- END %] |
|
40 |
</tr> |
|
41 |
</thead> |
|
42 |
|
|
43 |
<tbody> |
|
44 |
[%- FOREACH file = source.files %] |
|
45 |
<tr class="listrow[% loop.count % 2 %]"> |
|
46 |
[%- IF edit_attachments %] |
|
47 |
<td>[%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td> |
|
48 |
<td></td> |
|
49 |
[%- END %] |
|
50 |
<td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td> |
|
51 |
<td> |
|
52 |
<a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]"> |
|
53 |
<span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span> |
|
54 |
</a> |
|
55 |
</td> |
|
56 |
[%- IF file_type == 'image' %] |
|
57 |
<td>[% file.title %]</td> |
|
58 |
<td> |
|
59 |
<img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px"> |
|
60 |
</td> |
|
61 |
<td>[% file.description %]</td> |
|
62 |
[%- ELSE %] |
|
63 |
<td></td> |
|
64 |
[%- END %] |
|
65 |
</tr> |
|
66 |
[%- END # FOREACH file %] |
|
67 |
</tbody> |
|
68 |
</table |
|
42 | 69 |
|
43 |
<tbody> |
|
44 |
[%- FOREACH file = source.files %] |
|
45 |
<tr class="listrow[% loop.count % 2 %]"> |
|
46 |
[%- IF edit_attachments %] |
|
47 |
<td>[%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td> |
|
48 |
<td></td> |
|
49 |
[%- END %] |
|
50 |
<td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td> |
|
51 |
<td><a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]"> |
|
52 |
<span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span></a></td> |
|
53 |
[%- IF file_type == 'image' %] |
|
54 |
<td>[% file.title %]</td> |
|
55 |
<td> |
|
56 |
<img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px"> |
|
57 |
</td> |
|
58 |
<td>[% file.description %]</td> |
|
59 |
[%- ELSE %] |
|
60 |
<td></td> |
|
61 |
[%- END %] |
|
62 |
</tr> |
|
63 |
[%- END %] |
|
64 |
</tbody> |
|
65 |
</table |
|
66 | 70 |
<div> |
67 |
[%- IF edit_attachments %] |
|
71 |
[%- IF edit_attachments %]
|
|
68 | 72 |
[%- IF source.can_import %] |
69 |
[% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %]
|
|
73 |
[% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %] |
|
70 | 74 |
[%- ELSE %] |
71 |
[%- IF source.can_delete %]
|
|
72 |
[% L.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.chk_title) %]
|
|
73 |
[%- END %]
|
|
75 |
[%- IF source.can_delete %] |
|
76 |
[% L.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.chk_title) %] |
|
77 |
[%- END %] |
|
74 | 78 |
[%- END %] |
75 |
[%- END %] |
|
76 |
[%- IF source.can_rename %] |
|
79 |
[%- END %]
|
|
80 |
[%- IF source.can_rename %]
|
|
77 | 81 |
[%- can_rename = 1 %] |
78 | 82 |
[% L.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.rename_title ) %] |
79 |
[%- END %] |
|
80 |
[%- IF source.can_upload %] |
|
83 |
[%- END %]
|
|
84 |
[%- IF source.can_upload %]
|
|
81 | 85 |
[% L.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "'," _ is_global _ ");", source.upload_title ) %] |
82 |
[%- END %] |
|
83 |
[%- IF source.can_import %] |
|
86 |
[%- END %]
|
|
87 |
[%- IF source.can_import %]
|
|
84 | 88 |
[% L.button_tag("kivi.File.import(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');", source.import_title ) %] |
85 |
[%- END %] |
|
86 |
</div> |
|
87 |
[%- END %] |
|
88 |
<div></div><div> |
|
89 |
[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %] |
|
89 |
[%- END %] |
|
90 | 90 |
</div> |
91 |
[%- END # FOREACH source %] |
|
92 |
<div></div> |
|
93 |
<div> |
|
94 |
[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %] |
|
95 |
</div> |
|
91 | 96 |
</div> |
97 |
|
|
92 | 98 |
[%- IF ! json %] |
93 |
</div> |
|
94 |
[%- UNLESS is_global %] |
|
95 |
[%- IF can_rename %] |
|
96 |
[% INCLUDE 'file/rename_dialog.html' -%] |
|
97 |
[%- END %] |
|
98 |
[%- END %] |
|
99 |
</div>
|
|
100 |
[%- UNLESS is_global %]
|
|
101 |
[%- IF can_rename %]
|
|
102 |
[% INCLUDE 'file/rename_dialog.html' -%]
|
|
103 |
[%- END %]
|
|
104 |
[%- END %]
|
|
99 | 105 |
[%- END %] |
Auch abrufbar als: Unified diff
Kosmetik: Filemanagement Web-Templates: Einrückung