Filemanagement: Mandantenkonfig "Erzeugte Dokumente löschbar" wird nicht berücksichtigt
authorMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Fri, 16 Feb 2018 07:27:40 +0000 (08:27 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 19 Nov 2018 13:08:30 +0000 (14:08 +0100)
Dieses Flag wurde bisher noch nirgend berücksichtigt.

fixed Issue #220

SL/Controller/File.pm
templates/webpages/file/list.html

index 7a85106..8463174 100644 (file)
@@ -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')
     };
index 271ab81..04b4765 100644 (file)
@@ -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 %]