Revision db34e1f5
Von Bernd Bleßmann vor fast 4 Jahren hinzugefügt
templates/webpages/file/import_dialog.html | ||
---|---|---|
6 | 6 |
<tr> |
7 | 7 |
<th class="listheading" width="3%">[% L.checkbox_tag(source.chk_action _ '_checkall') %]</th> |
8 | 8 |
<th class="listheading" width="11%">[% source.chkall_title %]</th> |
9 |
<th>[% LxERP.t8("Attached Filename") %]</th>
|
|
9 |
<th>[% LxERP.t8("Attached Filename") %]</th> |
|
10 | 10 |
</tr> |
11 | 11 |
</thead> |
12 | 12 |
<tbody> |
13 | 13 |
[%- FOREACH file = source.files %] |
14 |
<tr class="listrow[% loop.count % 2 %]"> |
|
15 |
<td>[%- L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %]</td> |
|
16 |
<td></td> |
|
17 |
<td><span id="[% "filename_" _ file.name %]">[% file.filename %]</span></td> |
|
18 |
</tr> |
|
14 |
<tr class="listrow[% loop.count % 2 %]">
|
|
15 |
<td>[%- L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %]</td>
|
|
16 |
<td></td>
|
|
17 |
<td><span id="[% "filename_" _ file.name %]">[% file.filename %]</span></td>
|
|
18 |
</tr>
|
|
19 | 19 |
[%- END %] |
20 | 20 |
</tbody> |
21 | 21 |
</table> |
22 | 22 |
|
23 | 23 |
<p> |
24 |
[%- L.button_tag("kivi.File.importaction(" _ SELF.object_id _ ",'" _ SELF.object_type _ "','" _ SELF.file_type _ "','" _ source.name _ "','" _ source.path _ "','"_ source.chk_action _ "');", LxERP.t8('Continue'), id => "import_cont_btn") %]</td>
|
|
25 |
[%- L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %]</td></tr>
|
|
24 |
[%- L.button_tag("kivi.File.importaction(" _ SELF.object_id _ ",'" _ SELF.object_type _ "','" _ SELF.file_type _ "','" _ source.name _ "','" _ source.path _ "','"_ source.chk_action _ "');", LxERP.t8('Continue'), id => "import_cont_btn") %]</td> |
|
25 |
[%- L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %]</td></tr> |
|
26 | 26 |
</p> |
27 | 27 |
|
28 | 28 |
</form> |
29 | 29 |
|
30 | 30 |
<script type="text/javascript"> |
31 |
<!-- |
|
32 |
$(function() { |
|
33 |
$('#[% source.chk_action %]_checkall').checkall('INPUT[name="[% source.chk_action %][]"]'); |
|
34 |
}); |
|
35 |
--> |
|
31 |
<!--
|
|
32 |
$(function() {
|
|
33 |
$('#[% source.chk_action %]_checkall').checkall('INPUT[name="[% source.chk_action %][]"]');
|
|
34 |
});
|
|
35 |
-->
|
|
36 | 36 |
</script> |
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 %] |
templates/webpages/file/rename_dialog.html | ||
---|---|---|
1 | 1 |
[%- USE LxERP -%][%- USE L -%] |
2 |
<div class="loading" id="rename_dialog_[% file_type %]" style="display:none" >
|
|
2 |
<div class="loading" id="rename_dialog_[% file_type %]" style="display:none"> |
|
3 | 3 |
<div style="padding-bottom: 15px"> |
4 | 4 |
<div> |
5 |
<table> |
|
6 |
<tr><td colspan="2" id="rename_extra_text_[% file_type %]"></td></tr> |
|
7 |
<tr><td colspan="2">[%- LxERP.t8("Please modify filename") %]:</td></tr> |
|
8 |
<tr><td colspan="2"><input size='40' name="newfilename" id="newfilename_id_[% file_type %]" value=""></td></tr> |
|
9 |
<tr><td><input type="hidden" name="next_ids" id="next_ids_id_[% file_type %]" value=""> |
|
10 |
<input type="hidden" name="sessionfile" id="sessionfile_id_[% file_type %]" value=""> |
|
11 |
<input type="hidden" name="rename_id" id="rename_id_id_[% file_type %]" value=""> |
|
12 |
<input type="hidden" name="is_global" id="is_global_id_[% file_type %]" value=""> |
|
13 |
[% L.button_tag("return kivi.File.renameaction('" _ file_type _ "');", LxERP.t8('Continue'), id => "rename_cont_btn") %]</td> |
|
14 |
<td>[% L.button_tag("return kivi.File.renameclose('" _ file_type _"');" , LxERP.t8('Cancel') , class => "submit") %]</td></tr> |
|
15 |
</table> |
|
5 |
<table> |
|
6 |
<tr><td colspan="2" id="rename_extra_text_[% file_type %]"></td></tr> |
|
7 |
<tr><td colspan="2">[%- LxERP.t8("Please modify filename") %]:</td></tr> |
|
8 |
<tr><td colspan="2"><input size='40' name="newfilename" id="newfilename_id_[% file_type %]" value=""></td></tr> |
|
9 |
<tr> |
|
10 |
<td> |
|
11 |
<input type="hidden" name="next_ids" id="next_ids_id_[% file_type %]" value=""> |
|
12 |
<input type="hidden" name="sessionfile" id="sessionfile_id_[% file_type %]" value=""> |
|
13 |
<input type="hidden" name="rename_id" id="rename_id_id_[% file_type %]" value=""> |
|
14 |
<input type="hidden" name="is_global" id="is_global_id_[% file_type %]" value=""> |
|
15 |
[% L.button_tag("return kivi.File.renameaction('" _ file_type _ "');", LxERP.t8('Continue'), id => "rename_cont_btn") %] |
|
16 |
</td> |
|
17 |
<td>[% L.button_tag("return kivi.File.renameclose('" _ file_type _"');" , LxERP.t8('Cancel') , class => "submit") %]</td> |
|
18 |
</tr> |
|
19 |
</table> |
|
16 | 20 |
</div> |
17 | 21 |
</div> |
18 | 22 |
</div> |
templates/webpages/file/upload_dialog.html | ||
---|---|---|
1 | 1 |
[%- USE L -%][%- USE LxERP -%][%- USE JavaScript -%] |
2 | 2 |
|
3 | 3 |
<form method="post" id="upload_form" enctype="multipart/form-data" action="controller.pl"> |
4 |
[% SET multiple = 'true' %]
|
|
5 |
[% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %]
|
|
4 |
[% SET multiple = 'true' %] |
|
5 |
[% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %] |
|
6 | 6 |
<table> |
7 | 7 |
<tr> |
8 |
<td>[%- LxERP.t8("Filename") %]:</td><td> |
|
9 |
<input type="file" name="uploadfiles[]" multiple="[% multiple %]" id="upload_files" size="45" accept="[% SELF.accept_types %]" onchange="kivi.File.allow_upload_submit();"></td> |
|
8 |
<td>[%- LxERP.t8("Filename") %]:</td> |
|
9 |
<td> |
|
10 |
<input type="file" name="uploadfiles[]" multiple="[% multiple %]" id="upload_files" size="45" accept="[% SELF.accept_types %]" onchange="kivi.File.allow_upload_submit();"> |
|
11 |
</td> |
|
10 | 12 |
</tr> |
11 | 13 |
[% IF SELF.object_type == 'shop_image' %] |
12 |
<tr>
|
|
13 |
<td>[% LxERP.t8("Title") %]</td>
|
|
14 |
<td>[% L.input_tag("title",'') %]</td>
|
|
15 |
</tr>
|
|
16 |
<tr>
|
|
17 |
<td>[% LxERP.t8("Description") %]</td>
|
|
18 |
<td>[% L.input_tag("description",'') %]</td>
|
|
19 |
</tr>
|
|
14 |
<tr> |
|
15 |
<td>[% LxERP.t8("Title") %]</td> |
|
16 |
<td>[% L.input_tag("title",'') %]</td> |
|
17 |
</tr> |
|
18 |
<tr> |
|
19 |
<td>[% LxERP.t8("Description") %]</td> |
|
20 |
<td>[% L.input_tag("description",'') %]</td> |
|
21 |
</tr> |
|
20 | 22 |
[% END %] |
21 | 23 |
</table> |
22 | 24 |
|
23 | 25 |
<p> |
24 | 26 |
<input value="[%- LxERP.t8("Upload file") %]" id="upload_selected_button" |
25 | 27 |
onclick="kivi.File.upload_selected_files([% SELF.object_id %],'[% SELF.object_type %]','[% SELF.file_type %]',[% SELF.maxsize %],[% SELF.is_global %]);" |
26 |
type="button" disabled >
|
|
28 |
type="button" disabled> |
|
27 | 29 |
<a href="#" onclick="kivi.File.reset_upload_form();">[%- LxERP.t8("Reset") %]</a> |
28 | 30 |
<a href="#" onclick="$('#files_upload').dialog('close');">[% LxERP.t8("Cancel") %]</a> |
29 | 31 |
</p> |
Auch abrufbar als: Unified diff
Kosmetik: Filemanagement Web-Templates: Einrückung