Revision 6fd839ca
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
SL/Controller/Layout/MenuLeft.pm | ||
---|---|---|
7 | 7 |
|
8 | 8 |
use List::MoreUtils qw(apply); |
9 | 9 |
|
10 |
sub new { |
|
11 |
my ($class, @slurp) = @_; |
|
12 |
|
|
13 |
my $self = $class->SUPER::new(@slurp); |
|
14 |
|
|
15 |
$self; |
|
16 |
} |
|
17 |
|
|
18 | 10 |
sub stylesheets { |
19 | 11 |
qw(css/icons16.css css/icons24.css) |
20 | 12 |
} |
... | ... | |
73 | 65 |
|
74 | 66 |
my $anchor = $menuitem->{href}; |
75 | 67 |
|
76 |
my %common_args = ( |
|
77 |
l => $label, |
|
78 |
s => $spacer, |
|
79 |
id => "$id_prefix\_$id", |
|
80 |
); |
|
68 |
my @common_args = ($label, $spacer, "$id_prefix\_$id"); |
|
81 | 69 |
|
82 | 70 |
if (!$level) { # toplevel |
83 |
push @items, { %common_args, |
|
84 |
i => "icon24 $icon_class", # make_image(size => 24, label => $item), |
|
85 |
c => 'm', |
|
86 |
}; |
|
71 |
push @items, [ @common_args, "icon24 $icon_class", 'm' ]; |
|
72 |
# make_image(size => 24, label => $item), |
|
87 | 73 |
push @items, section_menu($menu, $item, "$id_prefix\_$id"); |
88 | 74 |
} elsif ($menuitem->{submenu}) { |
89 |
push @items, { %common_args, |
|
90 |
i => "icon16 submenu", #make_image(label => 'submenu'), |
|
91 |
c => 'sm', |
|
92 |
}; |
|
75 |
push @items, [ @common_args, "icon16 submenu", 'sm' ]; |
|
76 |
#make_image(label => 'submenu'), |
|
93 | 77 |
push @items, section_menu($menu, $item, "$id_prefix\_$id"); |
94 | 78 |
} elsif ($menuitem->{module}) { |
95 |
push @items, { %common_args, |
|
96 |
i => "icon16 $icon_class", #make_image(size => 16, label => $item), |
|
97 |
h => $anchor, |
|
98 |
c => 'i', |
|
99 |
}; |
|
79 |
push @items, [ @common_args, "icon16 $icon_class", 'i', $anchor ]; |
|
80 |
#make_image(size => 16, label => $item), |
|
100 | 81 |
} |
101 | 82 |
} continue { |
102 | 83 |
$id++; |
Auch abrufbar als: Unified diff
menu auf arrays umgestellt