projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Falscher EK-Preis in Stammdaten-Berichte-Waren
[kivitendo-erp.git]
/
bin
/
mozilla
/
menunew.pl
diff --git
a/bin/mozilla/menunew.pl
b/bin/mozilla/menunew.pl
index
6b4f971
..
a1f9a8f
100644
(file)
--- a/
bin/mozilla/menunew.pl
+++ b/
bin/mozilla/menunew.pl
@@
-137,10
+137,24
@@
sub create_menu {
if ($menu_item->{submenu} || !defined($menu_item->{module}) || ($menu_item->{module} eq "menu.pl")) {
$item->{subitems} = [];
if ($menu_item->{submenu} || !defined($menu_item->{module}) || ($menu_item->{module} eq "menu.pl")) {
$item->{subitems} = [];
+ $item->{image} = _icon_path("$name.png");
create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1);
} else {
create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1);
} else {
+ $item->{image} = _icon_path("${parent}${name}.png");
$menu->menuitem_new("${parent}${name}", $item);
}
}
}
$menu->menuitem_new("${parent}${name}", $item);
}
}
}
+
+sub _icon_path {
+ my ($label, $size) = @_;
+
+ $size ||= 16;
+
+ my $img = "image/icons/${size}x${size}/$label";
+
+ return unless -f $img;
+ return $img;
+}
+