From 3fa269da6ca4ba060f056a185f152ffd7d15bee4 Mon Sep 17 00:00:00 2001 From: Jane Wagner Date: Thu, 30 Apr 2009 10:58:39 -0400 Subject: [PATCH] Bug 3173 Place Hold link visible in OPAC even if syspref turned off If the syspref RequestOnOpac is turned off, the link to place a hold does not show in the detail page. However, the link is still present in the results list as well as in the basket and in lists. Modified templates to check for the syspref and to obey it. NOTE: This does not turn off the display of the Holds tab in the OPAC user account. I think there are situations where library staff may be allowed to place holds but users are not allowed to do so through the OPAC. Leaving the Holds tab visible shows users what they have on hold, but does not allow them to place holds. It does allow users to cancel holds. If there is a need to hide this tab, that would probably be best accomplished by a separate syspref. Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl | 4 +++- koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tmpl | 5 ++++- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl | 5 ++++- koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl | 5 ++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl index a102457bb8..cef26888f9 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl @@ -76,8 +76,10 @@ function tagAdded() { ); return false; }); + $(".holdsep").text("| "); $(".hold").text("Place Hold"); + @@ -350,4 +352,4 @@ function tagAdded() { - \ No newline at end of file + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tmpl index beeb750b50..773f208a2c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tmpl @@ -44,7 +44,10 @@ . , . -

/cgi-bin/koha/opac-reserve.pl?biblionumber=">Place Hold on

+

+ +/cgi-bin/koha/opac-reserve.pl?biblionumber=">Place Hold on

+ ]]> /cgi-bin/koha/opac-detail.pl?biblionumber= 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 60c7858646..1d592d1211 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -134,11 +134,13 @@ $(document).ready(function(){ $("#bookbag_form").unCheckCheckboxes(); return false; }); + $("#placehold").html(""); $("#placehold").find("input:submit").click(function(){ holdMultiple(); return false; }); + $("#holdDetails").hide(); @@ -414,7 +416,8 @@ $(document).ready(function(){ Match: Actions: - ">Place Hold + ">Place Hold + " onclick="Dopop('opac-addbybiblionumber.pl?biblionumber='); return false;">Save to Lists diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index 18ebcf2f73..0046652232 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -96,8 +96,9 @@ $(function() { }); $(document).ready(function(){ + $(".hold").html("Place Hold"); - + $("#tagsel_tag").text("Tag"); $("#tagsel_button").click(function(){ @@ -177,7 +178,9 @@ $(document).ready(function(){ ','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100')">Send List + +