if ( $group_info->{num} == 0 ) {
$redirect = $opt{'redirect_empty'};
+ $redirect = &$redirect($cgi) if $redirect && ref($redirect) eq 'CODE';
if ($redirect) {
- $redirect = &$redirect($cgi) if ref($redirect) eq 'CODE';
redirect( $redirect );
} else { # just print this stuff and exit
$m->comp('/elements/header.html', $opt{'title'});
my $total_footer = $group_info->{total_footer} || [];
# pagination
my ($limit, $offset);
-my $maxrecords = $conf->config('maxsearchrecordsperpage') || 50;
+my $maxrecords = $conf->config('maxsearchrecordsperpage') || 100;
if ( $cgi->param('maxrecords') =~ /^(\d+)$/ ) {
$maxrecords = $1;
}
# set up tab bar
my @menubar;
-for (my $i = 0; $i < $group_info->{num}; $i++) {
- push @menubar, $group_info->{group_labels}[$i], ";group=$i";
+if ($group_info->{num} > 1) {
+ for (my $i = 0; $i < $group_info->{num}; $i++) {
+ push @menubar, $group_info->{group_labels}[$i], ";group=$i";
+ }
}
# not enabled yet; if we need this at some point, enable it on a per-report
# }
#}
+my $conf = FS::Conf->new;
+my $money = $conf->config('money_char') || '$';
</%init>
<& /elements/header.html, $opt{title} &>
&>
<DIV CLASS="fstabcontainer">
+% if ( $group->num_rows > 0 ) {
+<P><% emt('[quant,_1,_2]', $group->num_rows, $opt{name_singular}) %> for <% emt($money.$group->paid) %>
+</P>
%# download links
-<P><% emt('Download full results') %><BR>
+<P><% emt('Download results:') %>
% $cgi->param('type', 'xls');
-<A HREF="<% $cgi->self_url %>"><% emt('as Excel spreadsheet') %></A><BR>
+<A HREF="<% $cgi->self_url %>"><% emt('Spreadsheet') %></A> |
% $cgi->param('type', 'html-print');
-<A HREF="<% $cgi->self_url %>"><% emt('as printable copy') %></A><BR>
+<A HREF="<% $cgi->self_url %>"><% emt('webpage') %></A>
% $cgi->delete('type');
</P>
+% }
<% $pager %>