From 94a5c2411d601257f8496a375056833ee1ab0b85 Mon Sep 17 00:00:00 2001 From: "Martin Helmling martin.helmling@octosoft.eu" Date: Fri, 16 Feb 2018 08:27:40 +0100 Subject: [PATCH] =?utf8?q?Filemanagement:=20Mandantenkonfig=20"Erzeugte=20?= =?utf8?q?Dokumente=20l=C3=B6schbar"=20wird=20nicht=20ber=C3=BCcksichtigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Dieses Flag wurde bisher noch nirgend berücksichtigt. fixed Issue #220 --- SL/Controller/File.pm | 6 +++++- templates/webpages/file/list.html | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SL/Controller/File.pm b/SL/Controller/File.pm index 7a8510691..846317467 100644 --- a/SL/Controller/File.pm +++ b/SL/Controller/File.pm @@ -495,7 +495,8 @@ sub _get_sources { 'chkall_title' => $main::locale->text('Delete all'), 'file_title' => $main::locale->text('filename'), 'confirm_text' => $main::locale->text('delete'), - 'can_rename' => 1, + 'can_delete' => $::instance_conf->get_doc_delete_printfiles, + 'can_rename' => $::instance_conf->get_doc_delete_printfiles, 'rename_title' => $main::locale->text('Rename Documents'), 'done_text' => $main::locale->text('deleted') }; @@ -515,6 +516,7 @@ sub _get_sources { 'can_rename' => 1, 'rename_title' => $main::locale->text('Rename Documents'), 'can_import' => 1, + 'can_delete' => 0, 'import_title' => $main::locale->text('Add Document from \'#1\'', $scanner_or_mailrx->{name}), 'path' => $scanner_or_mailrx->{directory}, 'done_text' => $main::locale->text('unimported') @@ -536,6 +538,7 @@ sub _get_sources { 'are_existing' => $self->existing ? 1 : 0, 'rename_title' => $main::locale->text('Rename Attachments'), 'can_upload' => 1, + 'can_delete' => 1, 'upload_title' => $main::locale->text('Upload Attachments'), 'done_text' => $main::locale->text('deleted') }; @@ -554,6 +557,7 @@ sub _get_sources { 'are_existing' => $self->existing ? 1 : 0, 'rename_title' => $main::locale->text('Rename Images'), 'can_upload' => 1, + 'can_delete' => 1, 'upload_title' => $main::locale->text('Upload Images'), 'done_text' => $main::locale->text('deleted') }; diff --git a/templates/webpages/file/list.html b/templates/webpages/file/list.html index 271ab8147..04b476581 100644 --- a/templates/webpages/file/list.html +++ b/templates/webpages/file/list.html @@ -68,7 +68,9 @@ $(function() { [%- IF source.can_import %] [% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %] [%- ELSE %] - [% L.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.chk_title) %] + [%- 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 %] -- 2.20.1