X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ff424b75f8f66c796eae294d0239f0440741e578..c37fb9ef8fda87c074eb7585c458f1400d326af0:/SL/Layout/ActionBar/Link.pm diff --git a/SL/Layout/ActionBar/Link.pm b/SL/Layout/ActionBar/Link.pm new file mode 100644 index 000000000..49243dec9 --- /dev/null +++ b/SL/Layout/ActionBar/Link.pm @@ -0,0 +1,24 @@ +package SL::Layout::ActionBar::Link; + +use strict; +use parent qw(SL::Layout::ActionBar::Action); + +sub from_params { + my ($class, $data) = @_; + + my ($text, %params) = @$data; + return SL::Layout::ActionBar::Link->new(text => $text, params => \%params); +} + +sub render { + my ($self) = @_; + + return $self->p->html_tag( + 'a', $self->text, + %{ $self->params // {} }, + id => $self->id, + class => 'layout-actionbar-link', + ); +} + +1;