projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
220746b
)
L.img_tag
author
Sven Schöling
<s.schoeling@linet-services.de>
Mon, 3 Sep 2012 16:53:23 +0000
(18:53 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Mon, 3 Sep 2012 16:54:53 +0000
(18:54 +0200)
weil L.html_tag aus templates heraus nicht in der lage ist undef als content zu übergeben
SL/Template/Plugin/L.pm
patch
|
blob
|
history
diff --git
a/SL/Template/Plugin/L.pm
b/SL/Template/Plugin/L.pm
index
b3eaac9
..
c341130
100644
(file)
--- a/
SL/Template/Plugin/L.pm
+++ b/
SL/Template/Plugin/L.pm
@@
-83,6
+83,15
@@
sub html_tag {
return "<${tag}${attributes}>${content}</${tag}>";
}
+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;