From 3739496526683776afe3705cc0b6c2868d6ab702 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 2 Jan 2013 11:36:57 -0500 Subject: [PATCH] Bug 9257 - Add "groups" to normal search pulldown - Followup --- koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc | 53 ++++++++------------ koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 42 ++++++----------- opac/opac-search.pl | 16 ++++++ 3 files changed, 52 insertions(+), 59 deletions(-) diff --git a/koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc index 8b5353e..ac9d682 100644 --- a/koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc @@ -157,38 +157,27 @@
[% END %] - - [% IF BranchCategoriesLoop %] - - [% END %] + +
[% ELSE %] [% IF ( opac_limit_override ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index 825cd59..e7bc813 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -77,38 +77,26 @@
[% END %] [% IF ( OpacAddMastheadLibraryPulldown ) %] - - [% FOREACH BranchesLoo IN BranchesLoop %] - [% IF ( BranchesLoo.selected ) %] - [% ELSE %][% END %] - [% END %] + + [% FOREACH BranchesLoo IN BranchesLoop %] + [% IF ( BranchesLoo.selected ) %] + [% ELSE %][% END %] + [% END %] + [% IF BranchCategoriesLoop %] - - [% FOREACH bc IN BranchCategoriesLoop %] - [% IF ( bc.selected ) %] - - [% ELSE %] - + + [% FOREACH bc IN BranchCategoriesLoop %] + [% IF ( bc.selected ) %] + + [% ELSE %] + + [% END %] [% END %] - [% END %] + [% END %] - [% IF BranchCategoriesLoop %] - - [% END %] [% ELSE %] [% IF ( opac_limit_override ) %] [% IF ( opac_search_limit ) %] diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 9708176..9184113 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -63,6 +63,21 @@ my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold"); use CGI qw('-no_undef_params'); my $cgi = new CGI; +my $branch_group_limit = $cgi->param("branch_group_limit"); +if ( $branch_group_limit ) { + if ( $branch_group_limit =~ /^multibranchlimit/ ) { + $cgi->param( + -name => 'multibranchlimit', + -values => [ ( split( 'multibranchlimit-', $branch_group_limit ) )[1] ] + ); + } else { + $cgi->append( + -name => 'limit', + -values => [ $branch_group_limit ] + ); + } +} + BEGIN { if (C4::Context->preference('BakerTaylorEnabled')) { require C4::External::BakerTaylor; @@ -77,6 +92,7 @@ my $template_name; my $template_type = 'basic'; my @params = $cgi->param("limit"); + my $format = $cgi->param("format") || ''; my $build_grouped_results = C4::Context->preference('OPACGroupResults'); if ($format =~ /(rss|atom|opensearchdescription)/) { -- 1.7.2.5