From db34e1f51e65fb1239869f74250b6901941bdabe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 26 Feb 2021 11:37:49 +0100 Subject: [PATCH] =?utf8?q?Kosmetik:=20Filemanagement=20Web-Templates:=20Ei?= =?utf8?q?nr=C3=BCckung?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- templates/webpages/file/import_dialog.html | 26 ++-- templates/webpages/file/list.html | 166 +++++++++++---------- templates/webpages/file/rename_dialog.html | 28 ++-- templates/webpages/file/upload_dialog.html | 28 ++-- 4 files changed, 130 insertions(+), 118 deletions(-) diff --git a/templates/webpages/file/import_dialog.html b/templates/webpages/file/import_dialog.html index 48463eef5..974b7a146 100644 --- a/templates/webpages/file/import_dialog.html +++ b/templates/webpages/file/import_dialog.html @@ -6,31 +6,31 @@ [% L.checkbox_tag(source.chk_action _ '_checkall') %] [% source.chkall_title %] - [% LxERP.t8("Attached Filename") %] + [% LxERP.t8("Attached Filename") %] [%- FOREACH file = source.files %] - - [%- L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %] - - [% file.filename %] - + + [%- L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %] + + [% file.filename %] + [%- END %]

- [%- 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") %] - [%- L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %] + [%- 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") %] + [%- L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %]

diff --git a/templates/webpages/file/list.html b/templates/webpages/file/list.html index 04b476581..37ff6e5b3 100644 --- a/templates/webpages/file/list.html +++ b/templates/webpages/file/list.html @@ -1,99 +1,105 @@ [%- USE LxERP -%][% USE L %][% USE HTML %] [%- IF ! json %] -
+
[%- END %]
[% title %]
-[%- SET can_rename = 0 %] -[%- FOREACH source = SOURCES %] - - - - - [%- SET checkname = source.chk_action %] - [%- IF is_global %] - [%- SET checkname = object_type _ '_' _ source.chk_action %] - [%- END %] - [%- IF edit_attachments %] - - - - [%- END %] - - - [%- IF file_type == 'image' %] - - - - [%- ELSE %] - - [%- END %] - - + [%- SET can_rename = 0 %] + [%- FOREACH source = SOURCES %] +
[% source.title %]
[% L.checkbox_tag(checkname _ '_checkall') %][% source.chkall_title %][% LxERP.t8('Date') %][% source.file_title %][% LxERP.t8('Title') %] - [% LxERP.t8('ImagePreview') %] - [% LxERP.t8('Description') %]
+ + + + [%- SET checkname = source.chk_action %] + [%- IF is_global %] + [%- SET checkname = object_type _ '_' _ source.chk_action %] + [%- END %] + [%- IF edit_attachments %] + + + + [%- END %] + + + [%- IF file_type == 'image' %] + + + + [%- ELSE %] + + [%- END %] + + + + + [%- FOREACH file = source.files %] + + [%- IF edit_attachments %] + + + [%- END %] + + + [%- IF file_type == 'image' %] + + + + [%- ELSE %] + + [%- END %] + + [%- END # FOREACH file %] + +
[% source.title %]
[% L.checkbox_tag(checkname _ '_checkall') %][% source.chkall_title %][% LxERP.t8('Date') %][% source.file_title %][% LxERP.t8('Title') %] + [% LxERP.t8('ImagePreview') %] + [% LxERP.t8('Description') %]
[%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %][% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %] + + [% file.file_name %] + + [% file.title %] + [% file.title %] + [% file.description %]
- [%- FOREACH file = source.files %] - - [%- IF edit_attachments %] - [%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %] - - [%- END %] - [% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %] - - [% file.file_name %] - [%- IF file_type == 'image' %] - [% file.title %] - - [% file.title %] - - [% file.description %] - [%- ELSE %] - - [%- END %] - - [%- END %] - - - [%- IF edit_attachments %] + [%- IF edit_attachments %] [%- IF source.can_import %] - [% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %] + [% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %] [%- ELSE %] - [%- IF source.can_delete %] - [% L.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.chk_title) %] - [%- END %] + [%- IF source.can_delete %] + [% L.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.chk_title) %] + [%- END %] [%- END %] - [%- END %] - [%- IF source.can_rename %] + [%- END %] + [%- IF source.can_rename %] [%- can_rename = 1 %] [% L.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.rename_title ) %] - [%- END %] - [%- IF source.can_upload %] + [%- END %] + [%- IF source.can_upload %] [% L.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "'," _ is_global _ ");", source.upload_title ) %] - [%- END %] - [%- IF source.can_import %] + [%- END %] + [%- IF source.can_import %] [% L.button_tag("kivi.File.import(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');", source.import_title ) %] - [%- END %] -
-[%- END %] -
-[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %] + [%- END %]
+ [%- END # FOREACH source %] +
+
+ [% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %] +
+ [%- IF ! json %] -
-[%- UNLESS is_global %] -[%- IF can_rename %] -[% INCLUDE 'file/rename_dialog.html' -%] -[%- END %] -[%- END %] + + [%- UNLESS is_global %] + [%- IF can_rename %] + [% INCLUDE 'file/rename_dialog.html' -%] + [%- END %] + [%- END %] [%- END %] diff --git a/templates/webpages/file/rename_dialog.html b/templates/webpages/file/rename_dialog.html index c5dee2bf2..73306920d 100644 --- a/templates/webpages/file/rename_dialog.html +++ b/templates/webpages/file/rename_dialog.html @@ -1,18 +1,22 @@ [%- USE LxERP -%][%- USE L -%] -