From 0bdb141adbe196bc49b5f496aad476022dd8d47b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 26 Mar 2021 19:23:18 +0100 Subject: [PATCH] =?utf8?q?Mobile:=20Templates=20f=C3=BCr=20den=20File=20Di?= =?utf8?q?alog?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - is_global ist noch nicht unterstützt - json-loses direkt-rendern wird nicht unterstützt - umbenennen ist noch nicht implementiert --- templates/mobile_webpages/file/list.html | 75 +++++++++++++++++++ .../mobile_webpages/file/upload_dialog.html | 40 ++++++++++ 2 files changed, 115 insertions(+) create mode 100644 templates/mobile_webpages/file/list.html create mode 100644 templates/mobile_webpages/file/upload_dialog.html diff --git a/templates/mobile_webpages/file/list.html b/templates/mobile_webpages/file/list.html new file mode 100644 index 000000000..b6d1bcde2 --- /dev/null +++ b/templates/mobile_webpages/file/list.html @@ -0,0 +1,75 @@ +[%- USE LxERP -%] +[%- USE L %] +[%- USE HTML %] +[%- USE P %] + +

[% source.title | html %]

+ +
+[%- FOREACH source = SOURCES %] + + + + [%- SET checkname = source.chk_action %] + [%- IF edit_attachments %] + + + [%- IF file_type == 'image' %] + + + + [%- ELSE %] + + [%- END %] + + + + + [%- FOREACH file = source.files %] + + [%- IF edit_attachments %] + + [%- END %] + + + [%- IF file_type == 'image' %] + + + + [%- ELSE %] + + [%- END %] + + [%- END %] + +
[% P.M.checkbox_tag(checkname _ '_checkall', label=source.chkall_title) %] + [%- END %] + [% LxERP.t8('Date') | html %][% source.file_title | html %][% LxERP.t8('Title') %][% LxERP.t8('ImagePreview') %][% LxERP.t8('Description') %]
[%- P.M.checkbox_tag(checkname _ '[]', value=file.id _ '_' _ file.version, class=checkname, label=' ') %][% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %] + [% file.file_name %][% file.title %] + [% file.title %] + [% file.description %]
+
+ [%- IF edit_attachments %] + [%- IF source.can_import %] + [% P.M.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %] + [%- ELSE %] + [%- IF source.can_delete %] + [% P.M.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %] + [%- END %] + [%- END %] + [%- END %] + [%- IF source.can_rename %] + [% P.M.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.rename_title ) %] + [%- END %] + [%- IF source.can_upload %] + [% P.M.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "');", source.upload_title ) %] + [%- END %] + [%- IF source.can_import %] + [% P.M.button_tag("kivi.File.import(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');", source.import_title ) %] + [%- END %] +
+[%- END %] +
+[% P.M.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "');", LxERP.t8('Update')) %] +
+
diff --git a/templates/mobile_webpages/file/upload_dialog.html b/templates/mobile_webpages/file/upload_dialog.html new file mode 100644 index 000000000..47f63cfe2 --- /dev/null +++ b/templates/mobile_webpages/file/upload_dialog.html @@ -0,0 +1,40 @@ +[%- USE L -%] +[%- USE P -%] +[%- USE T8 -%] +[%- USE LxERP -%] +[%- USE JavaScript -%] + +
+ [% SET multiple = 'true' %] + [% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %] +
+
+
+ [% 'Filename' | $T8 %] + +
+
+ +
+
+ +
+ [% P.M.button_tag( + P.escape_js_call("kivi.File.upload_selected_files", SELF.object_id, SELF.object_type, SELF.file_type, SELF.maxsize, SELF.is_global), + LxERP.t8("Upload file"), + id="upload_selected_button", + disabled=1) + %] + [% P.M.button_tag("kivi.File.reset_upload_form()", LxERP.t8('Reset'), flat=1) %] +
+ +
+ + +
+ +
+
-- 2.20.1