From 2894555f5c9f7c63054042f5c334f37839fa8aa0 Mon Sep 17 00:00:00 2001 From: Jane Wagner Date: Wed, 11 Nov 2009 10:47:07 -0500 Subject: [PATCH] Bug 3093 add syspref to turn off multiholds button Having the place multiple holds button at the top of the OPAC and staff search results has caused problems for some sites with tight holds policies; this syspref allows those sites to turn off the button. --- admin/systempreferences.pl | 1 + catalogue/search.pl | 2 ++ .../intranet-tmpl/prog/en/modules/catalogue/results.tmpl | 4 +++- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl | 2 ++ opac/opac-search.pl | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index b39a9225a4..ecdfa05302 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -241,6 +241,7 @@ $tabsysprefs{sortbynonfiling} = "Searching"; $tabsysprefs{QueryAutoTruncate} = "Searching"; $tabsysprefs{QueryRemoveStopwords} = "Searching"; $tabsysprefs{AdvancedSearchTypes} = "Searching"; +$tabsysprefs{DisplayMultiPlaceHold} = "Searching"; # EnhancedContent $tabsysprefs{AmazonEnabled} = "EnhancedContent"; diff --git a/catalogue/search.pl b/catalogue/search.pl index ba0d044a38..5f0286b611 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -149,6 +149,7 @@ use C4::VirtualShelves qw(GetRecentShelves); use POSIX qw(ceil floor); use C4::Branch; # GetBranches +my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold"); # create a new CGI object # FIXME: no_undef_params needs to be tested use CGI qw('-no_undef_params'); @@ -541,6 +542,7 @@ for (my $i=0;$i<@servers;$i++) { $template->param(query_cgi => $query_cgi); $template->param(query_desc => $query_desc); $template->param(limit_desc => $limit_desc); + $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold); $template->param (z3950_search_params => C4::Search::z3950_search_args($query_desc)); if ($query_desc || $limit_desc) { $template->param(searchdesc => 1); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl index bfc51fbd3c..8ad3609afc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl @@ -232,7 +232,9 @@ function GetZ3950Terms(){ Unhighlight Highlight - | Place Hold + + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index aa9f45e167..040de4036e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -180,12 +180,14 @@ $(document).ready(function(){ }); + $("#placehold").html(""); $("#placehold").find("input:submit").click(function(){ holdMultiple(); return false; }); + $("#holdDetails").hide(); diff --git a/opac/opac-search.pl b/opac/opac-search.pl index e1d61fa4f9..34491c355d 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -40,6 +40,7 @@ use URI::Escape; use Storable qw(thaw freeze); +my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold"); # create a new CGI object # FIXME: no_undef_params needs to be tested use CGI qw('-no_undef_params'); @@ -533,6 +534,7 @@ for (my $i=0;$i<=@servers;$i++) { $template->param(query_cgi => $query_cgi); $template->param(query_desc => $query_desc); $template->param(limit_desc => $limit_desc); + $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold); if ($query_desc || $limit_desc) { $template->param(searchdesc => 1); } -- 2.39.2