Revision d6a9eb6c
Von Bernd Bleßmann vor fast 4 Jahren hinzugefügt
SL/Presenter/Tag.pm | ||
---|---|---|
11 | 11 |
html_tag input_tag hidden_tag javascript man_days_tag name_to_id select_tag |
12 | 12 |
checkbox_tag button_tag submit_tag ajax_submit_tag input_number_tag |
13 | 13 |
stringify_attributes restricted_html textarea_tag link_tag date_tag |
14 |
div_tag radio_button_tag); |
|
14 |
div_tag radio_button_tag img_tag);
|
|
15 | 15 |
our %EXPORT_TAGS = (ALL => \@EXPORT_OK); |
16 | 16 |
|
17 | 17 |
use Carp; |
... | ... | |
407 | 407 |
return html_tag('div', $content, %params); |
408 | 408 |
} |
409 | 409 |
|
410 |
sub img_tag { |
|
411 |
my (%params) = @_; |
|
412 |
|
|
413 |
$params{alt} ||= ''; |
|
414 |
|
|
415 |
return html_tag('img', undef, %params); |
|
416 |
} |
|
417 |
|
|
410 | 418 |
1; |
411 | 419 |
__END__ |
412 | 420 |
|
SL/Template/Plugin/L.pm | ||
---|---|---|
84 | 84 |
sub date_tag { return _call_presenter('date_tag', @_); } |
85 | 85 |
sub div_tag { return _call_presenter('div_tag', @_); } |
86 | 86 |
sub radio_button_tag { return _call_presenter('radio_button_tag', @_); } |
87 |
sub img_tag { return _call_presenter('img_tag', @_); } |
|
87 | 88 |
|
88 | 89 |
sub _set_id_attribute { |
89 | 90 |
my ($attributes, $name, $unique) = @_; |
90 | 91 |
SL::Presenter::Tag::_set_id_attribute($attributes, $name, $unique); |
91 | 92 |
} |
92 | 93 |
|
93 |
sub img_tag { |
|
94 |
my ($self, %options) = _hashify(1, @_); |
|
95 |
|
|
96 |
$options{alt} ||= ''; |
|
97 |
|
|
98 |
return $self->html_tag('img', undef, %options); |
|
99 |
} |
|
100 |
|
|
101 | 94 |
sub ul_tag { |
102 | 95 |
my ($self, $content, @slurp) = @_; |
103 | 96 |
return $self->html_tag('ul', $content, @slurp); |
Auch abrufbar als: Unified diff
Presenter::Tag: img_tag aus Plugin/L verschoben