Revision 5cdb20ed
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
SL/Menu.pm | ||
---|---|---|
70 | 70 |
} $self->access_control; |
71 | 71 |
} |
72 | 72 |
|
73 |
sub menuitem { |
|
74 |
$main::lxdebug->enter_sub(); |
|
75 |
|
|
76 |
my ($self, $myconfig, $form, $item) = @_; |
|
77 |
|
|
78 |
my $module = $self->{$item}{module} || $form->{script}; |
|
79 |
my $action = $self->{$item}{action} || "section_menu"; |
|
80 |
my $target = $self->{$item}{target} || ""; |
|
81 |
my $level = $form->escape($item); |
|
82 |
my $target_token = ($target) ? "target='$target'" : ''; |
|
83 |
|
|
84 |
my $href = ($self->{$item}{href}) |
|
85 |
? $form->escape($self->{$item}{href}) |
|
86 |
: "$module?action=$action"; |
|
87 |
|
|
88 |
# add other params |
|
89 |
foreach my $key (keys %{ $self->{$item} }) { |
|
90 |
next if $key =~ /target|module|action/; |
|
91 |
$href .= "&" . $form->escape($key, 1) . "="; |
|
92 |
my ($value, $conf) = split(/=/, $self->{$item}{$key}, 2); |
|
93 |
$value = $myconfig->{$value} . "/$conf" if ($conf); |
|
94 |
$href .= $form->escape($value, 1); |
|
95 |
} |
|
96 |
|
|
97 |
my $str = "<a href='$href' $target_token>"; |
|
98 |
|
|
99 |
$main::lxdebug->leave_sub(); |
|
100 |
|
|
101 |
return $str; |
|
102 |
} |
|
103 |
|
|
104 | 73 |
sub menuitem_js { |
105 | 74 |
my ($self, $myconfig, $form, $item) = @_; |
106 | 75 |
|
Auch abrufbar als: Unified diff
weg mit menuitem in Menu.pm