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:
76a39ab
)
ActionBar: Unterstützung für »only_if«/»not_if« bei Links
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 17 Mar 2017 14:45:19 +0000
(15:45 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 21 Mar 2017 11:53:09 +0000
(12:53 +0100)
SL/Layout/ActionBar/Link.pm
patch
|
blob
|
history
diff --git
a/SL/Layout/ActionBar/Link.pm
b/SL/Layout/ActionBar/Link.pm
index
31560c4
..
e6df8b2
100644
(file)
--- a/
SL/Layout/ActionBar/Link.pm
+++ b/
SL/Layout/ActionBar/Link.pm
@@
-7,6
+7,9
@@
sub from_params {
my ($class, $data) = @_;
my ($text, %params) = @$data;
+
+ return if exists($params{only_if}) && !$params{only_if};
+ return if exists($params{not_if}) && $params{not_if};
return SL::Layout::ActionBar::Link->new(text => $text, params => \%params);
}