From 66e53a76d61ebda8f21c5dde982bd96a1e5cf198 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 17 Dec 2010 23:44:40 +0000 Subject: add cust_main-external_links and menu-prepend_links options for wisper NORM links, RT#10889 --- httemplate/elements/menu.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'httemplate/elements/menu.html') diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 46f9a0ca6..339cc8be7 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -560,9 +560,19 @@ $help_menu{"About RT v$RT::VERSION"} = [ 'http://www.bestpractical.com/rt', 'Req if $conf->config('ticket_system') eq 'RT_Internal'; -tie my %menu, 'Tie::IxHash', - 'Billing Main' => [ $fsurl, 'Billing start page', ], -; +tie my %menu, 'Tie::IxHash'; + +if ( $conf->config('menu-prepend_links')) { + my @links = split(/\n/, $conf->config('menu-prepend_links')); + foreach my $link (@links) { + $link =~ /^\s*(\S+)\s+(.*?)(\s*\(([^\)]*)\))?$/ or next; + my($url, $label, $alt) = ($1, $2, $4); + $menu{$label} = [ $url, $alt ]; + } +} + +$menu{'Billing Main'} = [ $fsurl, 'Billing start page', ]; + if ( $conf->config('ticket_system') ) { $menu{'Ticketing Main'} = [ -- cgit v1.2.1