From: Sven Schöling Date: Mon, 3 Sep 2012 16:53:23 +0000 (+0200) Subject: L.img_tag X-Git-Tag: release-3.0.0beta1~251^2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6c558186df86df6d26832282701805af83b272b3;p=kivitendo-erp.git L.img_tag weil L.html_tag aus templates heraus nicht in der lage ist undef als content zu übergeben --- diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index b3eaac9e7..c3411305a 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -83,6 +83,15 @@ sub html_tag { return "<${tag}${attributes}>${content}"; } +sub img_tag { + my ($self, @slurp) = @_; + my %options = _hashify(@slurp); + + $options{alt} ||= ''; + + return $self->html_tag('img', undef, %options); +} + sub select_tag { my $self = shift; my $name = shift;