1 package SL::Presenter::Dunning;
5 use SL::Presenter::EscapedText qw(escape is_escaped);
6 use SL::Presenter::Tag qw(link_tag);
8 use Exporter qw(import);
9 our @EXPORT_OK = qw(dunning);
14 my ($dunning, %params) = @_;
16 $params{display} ||= 'inline';
18 croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
20 my $text = escape($dunning->dunning_config->dunning_description);
22 if (! delete $params{no_link}) {
24 push @flags, 'showold=1';
25 push @flags, 'l_mails=1' if $::instance_conf->get_email_journal;
26 push @flags, 'l_webdav=1' if $::instance_conf->get_webdav;
27 push @flags, 'l_documents=1' if $::instance_conf->get_doc_storage;
29 my $href = 'dn.pl?action=show_dunning&dunning_id=' . $dunning->dunning_id;
30 $href .= '&' . join '&', @flags if @flags;
31 $text = link_tag($href, $text, %params);