summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2010-12-17 23:44:40 +0000
committerivan <ivan>2010-12-17 23:44:40 +0000
commit66e53a76d61ebda8f21c5dde982bd96a1e5cf198 (patch)
treef7e1d7d8195c17d46f24722d7db487eae50c76a5 /httemplate
parent94fecaba4b378a09d1536cbaee01f5292a996b28 (diff)
add cust_main-external_links and menu-prepend_links options for wisper NORM links, RT#10889
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/menu.html16
-rwxr-xr-xhttemplate/view/cust_main.cgi18
2 files changed, 29 insertions, 5 deletions
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'} =
[
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 0f9c1e250..c4c0b5726 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -93,14 +93,28 @@ function areyousure(href, message) {
<BR><BR>
+% my $br = 0;
% if ( $curuser->access_right('Billing event reports')
% || $curuser->access_right('View customer billing events')
% ) {
-
+% $br=1;
<A HREF="<% $p %>search/cust_event.html?custnum=<% $custnum %>">View billing events for this customer</A>
- <BR><BR>
+% }
+% if ( $conf->config('cust_main-external_links') ) {
+ <% $br++ ? ' | ' : '' %>
+% 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);
+ <A HREF="<% $url.$custnum %>" ALT="<% $alt |h %>"><% $label |h %></A>
+% }
+% }
+
+% if ( $br ) {
+ <BR><BR>
% }
+</%doc>
%my $signupurl = $conf->config('signupurl');
%if ( $signupurl ) {