From: Bernd Bleßmann Date: Tue, 1 Sep 2020 14:21:21 +0000 (+0200) Subject: Kunden-/Lieferantenstamm: Anzeige WebDAV-Reiter X-Git-Tag: release-3.5.6.1~45 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ac7caac13e4a18ee4e2aa3f5f43882a3f3d79299;p=kivitendo-erp.git Kunden-/Lieferantenstamm: Anzeige WebDAV-Reiter --- diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 2c0b0895a..8b10f2ca3 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -10,6 +10,7 @@ use SL::DBUtils; use SL::Helper::Flash; use SL::Locale::String; use SL::Util qw(trim); +use SL::Webdav; use SL::Controller::Helper::GetModels; use SL::Controller::Helper::ReportGenerator; use SL::Controller::Helper::ParseFilter; @@ -1046,6 +1047,21 @@ sub _pre_render { ], ); } + + if ($self->{cv}->number && $::instance_conf->get_webdav) { + my $webdav = SL::Webdav->new( + type => $self->is_customer ? 'customer' + : $self->is_vendor ? 'vendor' + : undef, + number => $self->{cv}->number, + ); + my @all_objects = $webdav->get_all_objects; + @{ $self->{template_args}->{WEBDAV} } = map { { name => $_->filename, + type => t8('File'), + link => File::Spec->catfile($_->full_filedescriptor), + } } @all_objects; + } + $self->{template_args} ||= {}; $::request->{layout}->add_javascripts('kivi.CustomerVendor.js'); diff --git a/SL/Webdav.pm b/SL/Webdav.pm index 946f2bffd..c513925e0 100644 --- a/SL/Webdav.pm +++ b/SL/Webdav.pm @@ -32,6 +32,8 @@ my %type_to_path = ( letter => 'briefe', general_ledger => 'dialogbuchungen', accounts_payable => 'kreditorenbuchungen', + customer => 'kunden', + vendor => 'lieferanten', ); sub get_all_files { diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html index c53cce437..4fdc8a329 100644 --- a/templates/webpages/customer_vendor/form.html +++ b/templates/webpages/customer_vendor/form.html @@ -26,6 +26,9 @@ [% IF show_deliveries %]
  • [% 'Supplies' | $T8 %]
  • [% END %] + [%- IF INSTANCE_CONF.get_webdav %] +
  • [% 'WebDAV' | $T8 %]
  • + [%- END %] [%- IF INSTANCE_CONF.get_doc_storage %]
  • [% 'Attachments' | $T8 %]
  • [%- END %] @@ -64,6 +67,7 @@ [% IF show_deliveries %] [% PROCESS "customer_vendor/tabs/deliveries.html" %] [% END %] + [% PROCESS 'webdav/_list.html' %] [% PROCESS "customer_vendor/tabs/vcnotes.html" %] [% IF ( cv_cvars.size ) %] [% PROCESS "customer_vendor/tabs/custom_variables.html" %]