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;
],
);
}
+
+ 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');
letter => 'briefe',
general_ledger => 'dialogbuchungen',
accounts_payable => 'kreditorenbuchungen',
+ customer => 'kunden',
+ vendor => 'lieferanten',
);
sub get_all_files {
[% IF show_deliveries %]
<li><a href="#deliveries">[% 'Supplies' | $T8 %]</a></li>
[% END %]
+ [%- IF INSTANCE_CONF.get_webdav %]
+ <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
+ [%- END %]
[%- IF INSTANCE_CONF.get_doc_storage %]
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% FORM.db == 'vendor' ? 'vendor' : 'customer' %]&object_id=[% SELF.cv.id %]">[% 'Attachments' | $T8 %]</a></li>
[%- END %]
[% 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" %]