move POP to browse template; whew, its paged
[freeside.git] / httemplate / elements / menu.html
index 25dd619..9565ff2 100644 (file)
@@ -1,6 +1,17 @@
 <script type="text/javascript" src="<%$fsurl%>elements/cssexpr.js"></script>
-<script type="text/javascript" src="<%$fsurl%>elements/xmenu.js"></script>
-<link href="<%$fsurl%>elements/xmenu.css" type="text/css" rel="stylesheet">
+
+% if ( $opt{'position'} eq 'top' ) {
+
+  <script type="text/javascript" src="<%$fsurl%>elements/xmenu.top.js"></script>
+  <link href="<%$fsurl%>elements/xmenu.top.css" type="text/css" rel="stylesheet">
+
+% } else {  # elsif ( $opt{'position'} eq 'left' ) {
+
+  <script type="text/javascript" src="<%$fsurl%>elements/xmenu.js"></script>
+  <link href="<%$fsurl%>elements/xmenu.css" type="text/css" rel="stylesheet">
+
+% }
+
 <link href="<%$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet">
 
 <SCRIPT TYPE="text/javascript">
@@ -55,15 +66,16 @@ tie my %report_customers_lists, 'Tie::IxHash',
 $report_customers_lists{'by active trouble tickets'} = [ $fsurl. 'search/cust_main.cgi?browse=tickets', '' ]
   if $conf->config('ticket_system');
 
-tie my %report_customers_search, 'Tie::IxHash',
-  'by ordering employee' => [ $fsurl. 'search/cust_main-otaker.cgi' ],
-;
+tie my %report_customers_search, 'Tie::IxHash';
+$report_customers_search{'by ordering employee'} = [ $fsurl. 'search/cust_main-otaker.cgi' ]
+  if $curuser->access_right('Configuration');
 
 tie my %report_customers, 'Tie::IxHash',
   'List customers' => [ \%report_customers_lists, 'List customers' ],
-  'Search customers' => [ \%report_customers_search, 'Search customers' ],
-  'Zip code distribution' => [ $fsurl.'search/report_cust_main-zip.html', 'Zip codes by number of customers' ],
 ;
+$report_customers{'Search customers'} = [ \%report_customers_search, 'Search customers' ]
+  if keys %report_customers_search;
+$report_customers{'Zip code distribution'} = [ $fsurl.'search/report_cust_main-zip.html', 'Zip codes by number of customers' ];
 
 tie my %report_invoices_open, 'Tie::IxHash',
   'All open invoices' => [ $fsurl.'search/cust_bill.html?OPEN_date', 'All invoices with an unpaid balance' ],