- bring prepaid support into this century (close: Bug#1124)
[freeside.git] / httemplate / search / elements / search.html
index 85e5af2..53aa309 100644 (file)
@@ -77,7 +77,7 @@
     http_header('Content-Type' => 'text/plain' );
 
     my $csv = new Text::CSV_XS { 'always_quote' => 1,
-                                 #'eol'          => "\015\012", #"\012"
+                                 'eol'          => "\n", #"\015\012", #"\012"
                                };
 
     $csv->combine(@$header); #or die $csv->status;
   } elsif ( $type =~ /\.xls$/ ) {
 
     #http_header('Content-Type' => 'application/excel' ); #eww
-    http_header('Content-Type' => 'application/vnd.ms-excel' ); #alas
+    http_header('Content-Type' => 'application/vnd.ms-excel' );
     #http_header('Content-Type' => 'application/msexcel' ); #alas
 
     my $data = '';
     } else {
       ( my $xlsname = $opt{'name'} ) =~ s/\W//g;
       $opt{'name'} =~ s/s$// if $total == 1;
+
+      my @menubar = ();
+      if ( $opt{'menubar'} ) {
+        @menubar = @{ $opt{'menubar'} };
+      } else {
+        @menubar = ( 'Main menu' => $p );
+      }
   %>
   <%= include( '/elements/header.html', $opt{'title'},
-                 include( '/elements/menubar.html', 'Main menu' => $p )
+                 include( '/elements/menubar.html', @menubar )
              )
   %>
   <% my $pager = include ( '/elements/pager.html',
   
     <TABLE>
       <TR>
-        <TD>
+        <TD VALIGN="bottom">
           <%= $total %> total <%= $opt{'name'} %><BR>
           <% if ( $opt{'count_addl'} ) { %>
             <% my $n=0; foreach my $count ( @{$opt{'count_addl'}} ) { %>
         <TD ALIGN="right">
           <% $cgi->param('_type', "$xlsname.xls" ); %>
           Download full results<BR>
-          as <A HREF="<%= $cgi->self_url %>">Excel spreadsheet</A>
-          <BR>
+          as <A HREF="<%= $cgi->self_url %>">Excel spreadsheet</A><BR>
           <% $cgi->param('_type', 'csv'); %>
           as <A HREF="<%= $cgi->self_url %>">CSV file</A>
         </TD>