From: Martin Helmling martin.helmling@octosoft.eu Date: Fri, 16 Feb 2018 07:27:40 +0000 (+0100) Subject: Filemanagement: Mandantenkonfig "Erzeugte Dokumente löschbar" wird nicht berücksichtigt X-Git-Tag: release-3.5.4~211 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=94a5c2411d601257f8496a375056833ee1ab0b85;p=kivitendo-erp.git Filemanagement: Mandantenkonfig "Erzeugte Dokumente löschbar" wird nicht berücksichtigt Dieses Flag wurde bisher noch nirgend berücksichtigt. fixed Issue #220 --- 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 %]