X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fgrouped-search%2Fhtml;h=9c2418af8fcf883e72d9c4ce09e41156d9a391d9;hp=2ecb688152001083156aed12aeee462edafc6891;hb=41fc6d0a8aa5921638ac2767265a7528855a5251;hpb=64aa9aa36d8b8636b4984de7d15cd7bd1a889542 diff --git a/httemplate/search/elements/grouped-search/html b/httemplate/search/elements/grouped-search/html index 2ecb68815..9c2418af8 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'}); @@ -67,8 +67,10 @@ 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 @@ -120,7 +122,7 @@ for (my $i = 0; $i < $group_info->{num}; $i++) { border-spacing: 0; } - +
<& /search/elements/search-html.html:header_row, 'header' => $opt{'header'},