diff options
| author | Mark Wells <mark@freeside.biz> | 2016-08-15 15:24:35 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2016-08-15 15:27:23 -0700 |
| commit | 819d82e8800b9ea271bfda7a2b49e224bb50c338 (patch) | |
| tree | 59db95d2173c5456714f471c38f262a3fd7dfc84 /httemplate/search/elements/grouped-search/core | |
| parent | fb7f2ed2a0f7d3d0569a675aa1d250ff4d177d29 (diff) | |
in grouped payment search, only show tabs when there's more than one group, #71364
Diffstat (limited to 'httemplate/search/elements/grouped-search/core')
| -rw-r--r-- | httemplate/search/elements/grouped-search/core | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/httemplate/search/elements/grouped-search/core b/httemplate/search/elements/grouped-search/core index ffa8cee39..3d38a8c7e 100644 --- a/httemplate/search/elements/grouped-search/core +++ b/httemplate/search/elements/grouped-search/core @@ -131,12 +131,14 @@ for my $i (0 .. scalar(@groups) - 1) { } if ( $opt{show_combined} ) { - # set up group 0 as a combined view - unshift @groups, $totals; - unshift @group_labels, 'All ' . PL($opt{name_singular}) . - ' (' . $totals->num_rows . ')'; - unshift @group_footers, []; # the total footer will suffice - unshift @queries, $base_query->clone; + if ( @groups > 1 ) { + # set up group 0 as a combined view + unshift @groups, $totals; + unshift @group_labels, 'All ' . PL($opt{name_singular}) . + ' (' . $totals->num_rows . ')'; + unshift @group_footers, []; # the total footer will suffice + unshift @queries, $base_query->clone; + } } my @total_footer; |
