From e4db6d3e30d4b455b4d790c51392d09186ef8959 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 8 Sep 2009 22:30:35 +0200 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 Signed-off-by: Henri-Damien LAURENT --- .../prog/en/modules/opac-basket.tmpl | 18 ++- .../prog/en/modules/opac-results.tmpl | 4 + .../prog/en/modules/opac-shelves.tmpl | 111 ++++++++++++++---- 3 files changed, 109 insertions(+), 24 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 be0459c97c..7a470319a7 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl @@ -30,6 +30,22 @@ ); return false; }); + + $(".holdsep").text("| "); + $(".hold").text("Place Hold"); + + + + + $(".tagsep").text("| "); + $("#tagsel_tag").text("Tag"); + $("#tagsel_button").click(function(){ + tagAdded(); + return false; + }); + $("#tablehead").attr("colspan", $("#tablehead").attr("colspan") + 1); + + }); //]]> @@ -252,4 +268,4 @@ - \ No newline at end of file + 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 c33a668ea8..027e67f75c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -475,6 +475,7 @@ $("span.addto").html(param1); Match: Actions: +<<<<<<< HEAD:koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -488,6 +489,9 @@ $("span.addto").html(param1); +======= + ">Place Hold +>>>>>>> 3fa269d... Bug 3173 Place Hold link visible in OPAC even if syspref turned off:koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl " 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 423ad2fa2d..d08b60c0fb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -9,30 +9,58 @@ $.tablesorter.addParser({ format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, type: 'text' }); +function holdSelections() { + var checkedBoxes = $(":checkbox:checked"); + if ($(checkedBoxes).size() == 0) { + alert(MSG_NO_RECORD_SELECTED); + } else { + var bibs = ""; + $(checkedBoxes).each(function(){ + var name = $(this).attr("name"); + bib = name.substr(4); + bibs += bib + "/"; + }); + document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs; + } +} - $(function() { - $("span.clearall").html("Clear All"); - $("span.checkall").html("Select All"); - $("#listcontents").tablesorter({ - widgets : ['zebra'], - - sortList: [[1,0]], - headers: { 0: { sorter: false },1:{sorter: 'articles'} - - sortList: [[0,0]], - headers: { 0:{sorter:'articles'} - - } - }); - $("#CheckAll").click(function(){ - $(".checkboxed").checkCheckboxes(); - return false; - }); - $("#CheckNone").click(function(){ - $(".checkboxed").unCheckCheckboxes(); - return false; - }); - }); + +$(function() { + $("span.clearall").html("Clear All"); + $("span.checkall").html("Select All"); + $("#listcontents").tablesorter({ + widgets : ['zebra'], + + sortList: [[1,0]], + headers: { 0: { sorter: false },1:{sorter: 'articles'} + + sortList: [[0,0]], + headers: { 0:{sorter:'articles'} + + } + }); + $("#CheckAll").click(function(){ + $(".checkboxed").checkCheckboxes(); + return false; + }); + $("#CheckNone").click(function(){ + $(".checkboxed").unCheckCheckboxes(); + return false; + }); +}); + +$(document).ready(function(){ + + $(".hold").html("Place Hold"); + + + $("#tagsel_tag").text("Tag"); + $("#tagsel_button").click(function(){ + tagAdded(); + return false; + }); + +}); //]]> @@ -81,6 +109,7 @@ $.tablesorter.addParser({ +<<<<<<< HEAD:koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
@@ -115,6 +144,42 @@ $.tablesorter.addParser({ +======= + +

Lists /../images/caret.gif" width="16" height="16" alt=">" border="0" />

+ + + + + +>>>>>>> 3fa269d... Bug 3173 Place Hold link visible in OPAC even if syspref turned off:koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl -- 2.39.5