From: Jan Büren Date: Fri, 23 Dec 2016 08:35:11 +0000 (+0100) Subject: Dialogbuchen um WebDAV-Funktion erweitert X-Git-Tag: release-3.5.4~1791 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b166ba3bdc7dbc69b5be36501905508fd3dce242;p=kivitendo-erp.git Dialogbuchen um WebDAV-Funktion erweitert --- diff --git a/SL/Webdav.pm b/SL/Webdav.pm index 505fef46d..22a402073 100644 --- a/SL/Webdav.pm +++ b/SL/Webdav.pm @@ -30,6 +30,7 @@ my %type_to_path = ( service => 'dienstleistungen', assembly => 'erzeugnisse', letter => 'briefe', + general_ledger => 'dialogbuchungen', ); sub get_all_files { diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 77591f5d2..2c5f74a7e 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -43,6 +43,8 @@ use SL::GL; use SL::IS; use SL::ReportGenerator; use SL::DBUtils qw(selectrow_query selectall_hashref_query); +use SL::Webdav; +use SL::Locale::String qw(t8); require "bin/mozilla/common.pl"; require "bin/mozilla/reportgenerator.pl"; @@ -200,6 +202,18 @@ sub edit { $form->{show_details} = $myconfig{show_form_details} unless defined $form->{show_details}; + if ($form->{reference} && $::instance_conf->get_webdav) { + my $webdav = SL::Webdav->new( + type => 'general_ledger', + number => $form->{reference}, + ); + my $webdav_path = $webdav->webdav_path; + my @all_objects = $webdav->get_all_objects; + @{ $form->{WEBDAV} } = map { { name => $_->filename, + type => t8('File'), + link => File::Spec->catdir($webdav_path, $_->filename), + } } @all_objects; + } form_header(); display_rows(); form_footer(); @@ -1168,6 +1182,11 @@ sub post { $form->{storno} = 0; post_transaction(); + if ($::instance_conf->get_webdav) { + SL::Webdav->new(type => 'general_ledger', + number => $form->{reference}, + )->webdav_path; + } $form->{callback} = build_std_url("action=add", "show_details"); $form->redirect($form->{callback}); diff --git a/templates/webpages/gl/form_footer.html b/templates/webpages/gl/form_footer.html index 1742ec34e..48bbbea62 100644 --- a/templates/webpages/gl/form_footer.html +++ b/templates/webpages/gl/form_footer.html @@ -14,7 +14,11 @@ + +[% PROCESS 'webdav/_list.html' %] + +
[%- IF id && follow_ups.size %] diff --git a/templates/webpages/gl/form_header.html b/templates/webpages/gl/form_header.html index 1ad7197e8..ec74206fd 100644 --- a/templates/webpages/gl/form_header.html +++ b/templates/webpages/gl/form_header.html @@ -49,6 +49,15 @@ function updateTaxes(row) +
+ +
+ [%- IF saved_message %]