Revision a581878d
Von Hans P. Schlaepfer vor fast 5 Jahren hinzugefügt
templates/webpages/file/import_dialog.html | ||
---|---|---|
3 | 3 |
[% USE JavaScript %] |
4 | 4 |
|
5 | 5 |
<form method="post" id="file_import_form" action="controller.pl"> |
6 |
<table> |
|
6 |
|
|
7 |
<table class="tbl-list"> |
|
7 | 8 |
<thead> |
8 |
<tr> |
|
9 |
<th class="listheading" width="3%">[% L.checkbox_tag(source.chk_action _ '_checkall') %]</th>
|
|
10 |
<th class="listheading" width="11%">[% source.chkall_title %]</th>
|
|
11 |
<th>[% LxERP.t8("Attached Filename") %]</th> |
|
12 |
</tr> |
|
9 |
<tr>
|
|
10 |
<th>[% L.checkbox_tag(source.chk_action _ '_checkall') %]</th>
|
|
11 |
<th>[% source.chkall_title %]</th>
|
|
12 |
<th>[% LxERP.t8("Attached Filename") %]</th>
|
|
13 |
</tr>
|
|
13 | 14 |
</thead> |
14 | 15 |
<tbody> |
15 |
[%- FOREACH file = source.files %]
|
|
16 |
<tr class="listrow[% loop.count % 2 %]"> |
|
17 |
<td>[%- L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %]</td>
|
|
18 |
<td></td> |
|
19 |
<td><span id="[% "filename_" _ file.name %]">[% file.filename %]</span></td> |
|
20 |
</tr> |
|
21 |
[%- END %]
|
|
16 |
[% FOREACH file = source.files %]
|
|
17 |
<tr class="listrow[% loop.count % 2 %]">
|
|
18 |
<td>[% L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %]</td>
|
|
19 |
<td></td>
|
|
20 |
<td><span id="[% "filename_" _ file.name %]">[% file.filename %]</span></td>
|
|
21 |
</tr>
|
|
22 |
[% END %] |
|
22 | 23 |
</tbody> |
23 |
</table>
|
|
24 |
</table> |
|
24 | 25 |
|
25 |
<p>
|
|
26 |
[%- 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>
|
|
27 |
[%- L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %]</td></tr>
|
|
28 |
</p>
|
|
26 |
<div class="buttons">
|
|
27 |
[% 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>
|
|
28 |
[% L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %]</td></tr>
|
|
29 |
</div>
|
|
29 | 30 |
|
30 | 31 |
</form> |
31 | 32 |
|
templates/webpages/file/list.html | ||
---|---|---|
1 |
[%- IF ! json %] |
|
2 |
<div id="[% file_type %]_list_[% object_type %]"> |
|
3 |
[%- END %] |
|
4 |
<div class="listtop">[% title %]</div> |
|
5 | 1 |
[% USE LxERP %] |
6 | 2 |
[% USE L %] |
7 | 3 |
[% USE HTML %] |
8 | 4 |
|
9 |
<div style="padding-bottom: 15px"> |
|
10 |
[%- SET can_rename = 0 %] |
|
11 |
[%- FOREACH source = SOURCES %] |
|
12 |
<table style="width: 100%" > |
|
5 |
<!-- PENDENT: Ueberpruefen, Tabelle und Buttons --> |
|
6 |
[% IF ! json %] |
|
7 |
<div id="[% file_type %]_list_[% object_type %]"> |
|
8 |
[% END %] |
|
9 |
|
|
10 |
<div class="wrapper"> |
|
11 |
<h2>[% title %]</h2> |
|
12 |
|
|
13 |
[% SET can_rename = 0 %] |
|
14 |
[% FOREACH source = SOURCES %] |
|
15 |
|
|
16 |
<table class="tbl-list"> |
|
17 |
<caption>[% source.title %]</caption> |
|
13 | 18 |
<thead> |
14 |
<tr><th class="listheading" colspan="6">[% source.title %]</th></tr> |
|
15 |
<tr> |
|
16 |
[%- SET checkname = source.chk_action %] |
|
17 |
[%- IF is_global %] |
|
18 |
[%- SET checkname = object_type _ '_' _ source.chk_action %] |
|
19 |
[%- END %] |
|
20 |
[%- IF edit_attachments %] |
|
21 |
<script type="text/javascript"> |
|
22 |
<!-- |
|
23 |
$(function() { |
|
24 |
$('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]'); |
|
25 |
}); |
|
26 |
--> |
|
27 |
</script> |
|
28 |
<th class="listheading" width="3%">[% L.checkbox_tag(checkname _ '_checkall') %]</th> |
|
29 |
<th class="listheading" width="7%">[% source.chkall_title %]</th> |
|
30 |
[%- END %] |
|
31 |
<th class="listheading" width="15%"><b>[% LxERP.t8('Date') %]</b></th> |
|
32 |
<th class="listheading" width="20%"><b>[% source.file_title %]</b></th> |
|
33 |
[%- IF file_type == 'image' %] |
|
34 |
<th class="listheading" width="15%"><b>[% LxERP.t8('Title') %]</b></th> |
|
35 |
<th class="listheading" width="10%"> |
|
36 |
<b>[% LxERP.t8('ImagePreview') %]</b> |
|
37 |
</th> |
|
38 |
<th class="listheading" width="30%"><b>[% LxERP.t8('Description') %]</b></th> |
|
39 |
[%- ELSE %] |
|
40 |
<th class="listheading" width="40%"></th> |
|
41 |
[%- END %] |
|
19 |
<tr> |
|
20 |
[% SET checkname = source.chk_action %] |
|
21 |
[% IF is_global %] |
|
22 |
[% SET checkname = object_type _ '_' _ source.chk_action %] |
|
23 |
[% END %] |
|
24 |
[% IF edit_attachments %] |
|
25 |
<th> |
|
26 |
<script type="text/javascript"><!-- |
|
27 |
$(function() { $('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]'); }); |
|
28 |
--></script> |
|
29 |
[% L.checkbox_tag(checkname _ '_checkall') %] |
|
30 |
</th> |
|
31 |
<th>[% source.chkall_title %]</th> |
|
32 |
[% END %] |
|
33 |
<th>[% LxERP.t8('Date') %]</th> |
|
34 |
<th>[% source.file_title %]</th> |
|
35 |
[% IF file_type == 'image' %] |
|
36 |
<th>[% LxERP.t8('Title') %]</th> |
|
37 |
<th>[% LxERP.t8('ImagePreview') %]</th> |
|
38 |
<th>[% LxERP.t8('Description') %]</th> |
|
39 |
[% ELSE %] |
|
40 |
<th></th> |
|
41 |
[% END %] |
|
42 | 42 |
</tr> |
43 | 43 |
</thead> |
44 |
|
|
45 | 44 |
<tbody> |
46 |
[%- FOREACH file = source.files %]
|
|
47 |
<tr class="listrow[% loop.count % 2 %]">
|
|
48 |
[%- IF edit_attachments %]
|
|
49 |
<td>[%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td>
|
|
50 |
<td></td> |
|
51 |
[%- END %]
|
|
52 |
<td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td> |
|
53 |
<td><a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]">
|
|
54 |
<span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span></a></td>
|
|
55 |
[%- IF file_type == 'image' %]
|
|
56 |
<td>[% file.title %]</td>
|
|
57 |
<td>
|
|
58 |
<img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px">
|
|
59 |
</td> |
|
60 |
<td>[% file.description %]</td> |
|
61 |
[%- ELSE %]
|
|
62 |
<td></td> |
|
63 |
[%- END %]
|
|
64 |
</tr> |
|
65 |
[%- END %]
|
|
45 |
[% FOREACH file = source.files %]
|
|
46 |
<tr>
|
|
47 |
[% IF edit_attachments %]
|
|
48 |
<td>[% L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td>
|
|
49 |
<td></td>
|
|
50 |
[% END %]
|
|
51 |
<td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td>
|
|
52 |
<td>
|
|
53 |
<a href="controller.pl?action=File/download&id=[% file.id %][% IF file.version %]&version=[% file.version %][% END %]">
|
|
54 |
<span id="[% "filename_" _ file.id %][% IF file.version %]_[% file.version %][% END %]">[% file.file_name %]</span></a>
|
|
55 |
</td>
|
|
56 |
[% IF file_type == 'image' %]
|
|
57 |
<td>[% file.title %]</td>
|
|
58 |
<td><img src="controller.pl?action=File/download&id=[% file.id %][% IF file.version %]&version=[% file.version %][% END %]" alt="[% file.title %]"></td>
|
|
59 |
<td>[% file.description %]</td>
|
|
60 |
[% ELSE %]
|
|
61 |
<td></td>
|
|
62 |
[% END %]
|
|
63 |
</tr>
|
|
64 |
[% END %]
|
|
66 | 65 |
</tbody> |
67 |
</table |
|
68 |
<div> |
|
69 |
[%- IF edit_attachments %] |
|
70 |
[%- IF source.can_import %] |
|
66 |
</table> |
|
67 |
|
|
68 |
<div class="buttons"> |
|
69 |
[% IF edit_attachments %] |
|
70 |
[% IF source.can_import %] |
|
71 | 71 |
[% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %] |
72 |
[%- ELSE %]
|
|
73 |
[%- IF source.can_delete %]
|
|
72 |
[% ELSE %] |
|
73 |
[% IF source.can_delete %] |
|
74 | 74 |
[% L.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.chk_title) %] |
75 |
[%- END %]
|
|
76 |
[%- END %]
|
|
77 |
[%- END %]
|
|
78 |
[%- IF source.can_rename %]
|
|
79 |
[%- can_rename = 1 %]
|
|
75 |
[% END %] |
|
76 |
[% END %] |
|
77 |
[% END %] |
|
78 |
[% IF source.can_rename %] |
|
79 |
[% can_rename = 1 %] |
|
80 | 80 |
[% L.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.rename_title ) %] |
81 |
[%- END %]
|
|
82 |
[%- IF source.can_upload %]
|
|
81 |
[% END %] |
|
82 |
[% IF source.can_upload %] |
|
83 | 83 |
[% L.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "'," _ is_global _ ");", source.upload_title ) %] |
84 |
[%- END %]
|
|
85 |
[%- IF source.can_import %]
|
|
84 |
[% END %] |
|
85 |
[% IF source.can_import %] |
|
86 | 86 |
[% L.button_tag("kivi.File.import(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');", source.import_title ) %] |
87 |
[%- END %] |
|
88 |
</div> |
|
89 |
[%- END %] |
|
90 |
<div></div><div> |
|
91 |
[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %] |
|
92 |
</div> |
|
93 |
</div> |
|
94 |
[%- IF ! json %] |
|
87 |
[% END %] |
|
88 |
</div><!-- /.buttons --> |
|
89 |
|
|
90 |
[% END #FOREACH SOURCES %] |
|
91 |
|
|
92 |
<div class="buttons"> |
|
93 |
[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %] |
|
95 | 94 |
</div> |
96 |
[%- UNLESS is_global %] |
|
97 |
[%- IF can_rename %] |
|
98 |
[% INCLUDE 'file/rename_dialog.html' -%] |
|
99 |
[%- END %] |
|
100 |
[%- END %] |
|
101 |
[%- END %] |
|
95 |
|
|
96 |
</div><!-- /.wrapper --> |
|
97 |
|
|
98 |
|
|
99 |
[% IF ! json %] |
|
100 |
</div> |
|
101 |
[% UNLESS is_global %] |
|
102 |
[% IF can_rename %] |
|
103 |
[% INCLUDE 'file/rename_dialog.html' %] |
|
104 |
[% END %] |
|
105 |
[% END %] |
|
106 |
[% END %] |
templates/webpages/file/rename_dialog.html | ||
---|---|---|
1 |
<div class="loading" id="rename_dialog_[% file_type %]" style="display:none" > |
|
2 |
<div style="padding-bottom: 15px"> |
|
3 |
<div> |
|
4 |
<table> |
|
5 |
<tr><td colspan="2" id="rename_extra_text_[% file_type %]"></td></tr> |
|
6 |
<tr><td colspan="2">[%- LxERP.t8("Please modify filename") %]:</td></tr> |
|
7 |
<tr><td colspan="2"><input size='40' name="newfilename" id="newfilename_id_[% file_type %]" value=""></td></tr> |
|
8 |
<tr><td><input type="hidden" name="next_ids" id="next_ids_id_[% file_type %]" value=""> |
|
9 |
<input type="hidden" name="sessionfile" id="sessionfile_id_[% file_type %]" value=""> |
|
10 |
<input type="hidden" name="rename_id" id="rename_id_id_[% file_type %]" value=""> |
|
11 |
<input type="hidden" name="is_global" id="is_global_id_[% file_type %]" value=""> |
|
12 |
[% L.button_tag("return kivi.File.renameaction('" _ file_type _ "');", LxERP.t8('Continue'), id => "rename_cont_btn") %]</td> |
|
13 |
<td>[% L.button_tag("return kivi.File.renameclose('" _ file_type _"');" , LxERP.t8('Cancel') , class => "submit") %]</td></tr> |
|
14 |
</table> |
|
15 |
</div> |
|
16 |
</div> |
|
17 |
</div> |
|
18 | 1 |
[% USE LxERP %] |
19 | 2 |
[% USE L %] |
3 |
|
|
4 |
<div class="loading" id="rename_dialog_[% file_type %]" style="display:none"> |
|
5 |
<div class="wrapper"> |
|
6 |
|
|
7 |
<table class="tbl-plain test"> |
|
8 |
<tbody> |
|
9 |
<tr> |
|
10 |
<td id="rename_extra_text_[% file_type %]"></td> |
|
11 |
</tr> |
|
12 |
<tr> |
|
13 |
<td> |
|
14 |
<span class="label above">[% LxERP.t8("Please modify filename") %]:</span> |
|
15 |
<input class="wi-lightwide" name="newfilename" id="newfilename_id_[% file_type %]" value=""> |
|
16 |
</td> |
|
17 |
</tr> |
|
18 |
<tr> |
|
19 |
<td> |
|
20 |
<input type="hidden" name="next_ids" id="next_ids_id_[% file_type %]" value=""> |
|
21 |
<input type="hidden" name="sessionfile" id="sessionfile_id_[% file_type %]" value=""> |
|
22 |
<input type="hidden" name="rename_id" id="rename_id_id_[% file_type %]" value=""> |
|
23 |
<input type="hidden" name="is_global" id="is_global_id_[% file_type %]" value=""> |
|
24 |
[% L.button_tag("return kivi.File.renameaction('" _ file_type _ "');", LxERP.t8('Continue'), id => "rename_cont_btn", class="button") %] |
|
25 |
[% L.button_tag("return kivi.File.renameclose('" _ file_type _"');" , LxERP.t8('Cancel') , class => "submit button neutral") %] |
|
26 |
</td> |
|
27 |
</tr> |
|
28 |
</tbody> |
|
29 |
</table> |
|
30 |
|
|
31 |
</div><!-- /.wrapper --> |
|
32 |
</div><!-- /.loading /Rename Dialog --> |
|
33 |
|
|
34 |
|
|
35 |
|
templates/webpages/file/upload_dialog.html | ||
---|---|---|
3 | 3 |
[% USE JavaScript %] |
4 | 4 |
|
5 | 5 |
<form method="post" id="upload_form" enctype="multipart/form-data" action="controller.pl"> |
6 |
[% SET multiple = 'true' %] |
|
7 |
[% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %] |
|
8 |
<table> |
|
9 |
<tr> |
|
10 |
<td>[%- LxERP.t8("Filename") %]:</td><td> |
|
11 |
<input type="file" name="uploadfiles[]" multiple="[% multiple %]" id="upload_files" size="45" accept="[% SELF.accept_types %]" onchange="kivi.File.allow_upload_submit();"></td> |
|
12 |
</tr> |
|
13 |
[% IF SELF.object_type == 'shop_image' %] |
|
6 |
[% SET multiple = 'true' %] |
|
7 |
[% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %] |
|
8 |
|
|
9 |
|
|
10 |
<table class="tbl-horizontal"> |
|
11 |
<tbody> |
|
14 | 12 |
<tr> |
15 |
<td>[% LxERP.t8("Title") %]</td> |
|
13 |
<th>[% LxERP.t8("Filename") %]:</th> |
|
14 |
<td><input type="file" name="uploadfiles[]" multiple="[% multiple %]" id="upload_files" size="45" accept="[% SELF.accept_types %]" onchange="kivi.File.allow_upload_submit();"></td> |
|
15 |
</tr> |
|
16 |
[% IF SELF.object_type == 'shop_image' %] |
|
17 |
<tr> |
|
18 |
<th>[% LxERP.t8("Title") %]</th> |
|
16 | 19 |
<td>[% L.input_tag("title",'') %]</td> |
17 | 20 |
</tr> |
18 | 21 |
<tr> |
19 |
<td>[% LxERP.t8("Description") %]</td>
|
|
22 |
<th>[% LxERP.t8("Description") %]</th>
|
|
20 | 23 |
<td>[% L.input_tag("description",'') %]</td> |
21 | 24 |
</tr> |
22 |
[% END %] |
|
23 |
</table> |
|
24 |
|
|
25 |
<p> |
|
26 |
<input value="[%- LxERP.t8("Upload file") %]" id="upload_selected_button" |
|
27 |
onclick="kivi.File.upload_selected_files([% SELF.object_id %],'[% SELF.object_type %]','[% SELF.file_type %]',[% SELF.maxsize %],[% SELF.is_global %]);" |
|
28 |
type="button" disabled > |
|
29 |
<a href="#" onclick="kivi.File.reset_upload_form();">[%- LxERP.t8("Reset") %]</a> |
|
30 |
<a href="#" onclick="$('#files_upload').dialog('close');">[% LxERP.t8("Cancel") %]</a> |
|
31 |
</p> |
|
25 |
[% END %] |
|
26 |
</tbody> |
|
27 |
</table> |
|
32 | 28 |
|
33 |
<hr> |
|
29 |
<div class="buttons"> |
|
30 |
<input value="[% LxERP.t8("Upload file") %]" id="upload_selected_button" onclick="kivi.File.upload_selected_files([% SELF.object_id %],'[% SELF.object_type %]','[% SELF.file_type %]',[% SELF.maxsize %],[% SELF.is_global %]);" type="button" disabled > |
|
31 |
<a href="#" onclick="kivi.File.reset_upload_form();" class="button neutral">[% LxERP.t8("Reset") %]</a> |
|
32 |
<a href="#" onclick="$('#files_upload').dialog('close');" class="button neutral">[% LxERP.t8("Cancel") %]</a> |
|
33 |
</div> |
|
34 | 34 |
|
35 |
<div id="upload_result"><p> </p></div>
|
|
35 |
<div id="upload_result"><p></p></div>
|
|
36 | 36 |
|
37 | 37 |
</form> |
Auch abrufbar als: Unified diff
Neues Design 2019 Standard-Code templates/webpages/file/