1 package SL::Presenter::WebdavObject;
5 use SL::Presenter::Tag qw(link_tag);
6 use SL::Presenter::EscapedText qw(escape is_escaped);
8 use Exporter qw(import);
9 our @EXPORT_OK = qw(webdav_object);
14 my ($webdav_object, %params) = @_;
17 my $text = escape($webdav_object->filename);
18 if (! delete $params{no_link}) {
19 my $href = SL::Presenter::EscapedText::escape($webdav_object->full_filedescriptor);
20 $text = link_tag($href, $text, %params);
37 SL::Presenter::WebdavObject - Presenter module for SL::Webdav::Object(s).
41 my $webdav = SL::Webdav->new(
42 type => 'sales_order',
45 my @all_objects = $webdav->get_all_objects;
46 my $html = SL::Presenter::WebdavObject::webdav_object($all_objects[0], no_link => 1);
52 =item C<webdav_object $webdav_object, %params>
54 Returns a rendered version (actually an instance of
55 L<SL::Presenter::EscapedText>) of the webdav object
58 C<%params> can include:
64 If falsish (the default) then the file name of the object will be linked
65 to the download path for that file.
77 Bernd Bleßmann E<lt>bernd@kivitendo-premium.deE<gt>