X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fgrouped-search%2Fhtml;h=c1fd9bd5e5c25ebf16644e0a1baffe7a2225ee31;hp=aff17cea0b6b91940132ee8c770298b6f7875db4;hb=d8648be92fa4c30d9ca4377dc0ac8816438e1370;hpb=062f38f2f5d0da64c6fd0702d4df2e805473a1f5 diff --git a/httemplate/search/elements/grouped-search/html b/httemplate/search/elements/grouped-search/html index aff17cea0..c1fd9bd5e 100644 --- a/httemplate/search/elements/grouped-search/html +++ b/httemplate/search/elements/grouped-search/html @@ -11,8 +11,8 @@ my $redirect; 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'}); @@ -34,7 +34,7 @@ my $footer = $group_info->{group_footers}[$curr_group]; 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; } @@ -67,10 +67,29 @@ if ( $group->num_rows > scalar(@rows) ) { # 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 +# basis and then disable it for search/cust_pay.html, because it's redundant +# to see "Check Check #130108", "Credit card Card #401...", etc. + +## if this is the combined view, add a column for the group key +#if ( $curr_group == 0 and $opt{'show_combined'} ) { +# unshift @{$opt{'header'}}, ''; +# unshift @{$opt{'fields'}}, $opt{group_label}; +# unshift @{$opt{'sort_fields'}}, $opt{group_column} if $opt{'sort_fields'}; +# $opt{'align'} = 'c'.$opt{'align'}; +# foreach (qw(header2 links link_onclicks color size style cell_style xls_format)) { +# if ( $opt{$_} ) { +# unshift @{$opt{$_}}, ''; +# } +# } +#} + <& /elements/header.html, $opt{title} &> @@ -87,13 +106,18 @@ for (my $i = 0; $i < $group_info->{num}; $i++) { &>
+% if ( $group->num_rows > 0 ) { +

<% emt('[quant,_1,_2]', $group->num_rows, $opt{name_singular}) %> +

%# download links -

<% emt('Download full results') %>
+

<% emt('Download results:') %> % $cgi->param('type', 'xls'); -<% emt('as Excel spreadsheet') %>
+<% emt('Spreadsheet') %> |  % $cgi->param('type', 'html-print'); -<% emt('as printable copy') %>
+<% emt('webpage') %> +% $cgi->delete('type');

+% } <% $pager %>