Bugzilla – Attachment 2995 Details for
Bug 3659
Add place hold option from patron checkout tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-3659-Add-place-hold-option-from-patron-c.patch (text/plain), 29.30 KB, created by
Owen Leonard
on 2011-01-14 18:08:29 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-01-14 18:08:29 UTC
Size:
29.30 KB
patch
obsolete
>From d4d71dca5f1719e01d2a06562bc4a32a98866b5d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 10 Jan 2011 14:57:15 -0500 >Subject: [PATCH] Fix for Bug 3659, Add place hold option from patron checkout tab > >Adds a button on patron-related pages, "Search to hold" >Clicking search to hold sets a cookie with the patron's >borrowernumber and sends the user to the search page. > >On subsequent search results pages the user will have >the option to place holds specifically for the remembered >patron. This works on the search results page (single >and multiple hold) and on the detail page. > >The saved cookie will time out after 10 minutes or >be erased when a new patron is loaded by circulation.pl > >New jQuery plugin added: jquery.cookie.min.js >--- > catalogue/ISBDdetail.pl | 11 +++ > catalogue/MARCdetail.pl | 11 +++ > catalogue/detail.pl | 12 +++- > catalogue/labeledMARCdetail.pl | 11 +++ > catalogue/moredetail.pl | 11 +++ > catalogue/search.pl | 11 +++ > .../intranet-tmpl/prog/en/css/staff-global.css | 11 ++- > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 26 ++++++ > .../prog/en/includes/circ-toolbar.inc | 30 ++++--- > .../prog/en/includes/doc-head-close.inc | 1 + > .../prog/en/includes/members-toolbar.inc | 24 ++++-- > .../en/lib/jquery/plugins/jquery.cookie.min.js | 1 + > .../prog/en/modules/catalogue/results.tmpl | 94 +++++++++++++------ > .../prog/en/modules/circ/circulation.tmpl | 1 + > 14 files changed, 205 insertions(+), 50 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.cookie.min.js > >diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl >index 7ebe8e0..df84a3a 100755 >--- a/catalogue/ISBDdetail.pl >+++ b/catalogue/ISBDdetail.pl >@@ -43,6 +43,7 @@ use CGI; > use C4::Koha; > use C4::Biblio; > use C4::Items; >+use C4::Members; # to use GetMember > use C4::Branch; # GetBranchDetail > use C4::Serials; # CountSubscriptionFromBiblionumber > use C4::Search; # enabled_staff_search_views >@@ -66,6 +67,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >+if($query->cookie("holdfor")){ >+ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); >+ $template->param( >+ holdfor => $query->cookie("holdfor"), >+ holdfor_surname => $holdfor_patron->{'surname'}, >+ holdfor_firstname => $holdfor_patron->{'firstname'}, >+ holdfor_cardnumber => $holdfor_patron->{'cardnumber'}, >+ ); >+} >+ > # my @blocs = split /\@/,$ISBD; > # my @fields = $record->fields(); > my $res = GetISBDView($biblionumber, "intranet"); >diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl >index 2dc7b1d..89dd2ac 100755 >--- a/catalogue/MARCdetail.pl >+++ b/catalogue/MARCdetail.pl >@@ -54,6 +54,7 @@ use MARC::Record; > use C4::Biblio; > use C4::Items; > use C4::Acquisition; >+use C4::Members; # to use GetMember > use C4::Serials; #uses getsubscriptionsfrombiblionumber GetSubscriptionsFromBiblionumber > use C4::Search; # enabled_staff_search_views > >@@ -84,6 +85,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >+if($query->cookie("holdfor")){ >+ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); >+ $template->param( >+ holdfor => $query->cookie("holdfor"), >+ holdfor_surname => $holdfor_patron->{'surname'}, >+ holdfor_firstname => $holdfor_patron->{'firstname'}, >+ holdfor_cardnumber => $holdfor_patron->{'cardnumber'}, >+ ); >+} >+ > #count of item linked > my $itemcount = GetItemsCount($biblionumber); > $template->param( count => $itemcount, >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 6ee79e6..3d42326 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -30,7 +30,7 @@ use C4::Items; > use C4::Circulation; > use C4::Branch; > use C4::Reserves; >-use C4::Members; >+use C4::Members; # to use GetMember > use C4::Serials; > use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); > use C4::External::Amazon; >@@ -51,6 +51,16 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >+if($query->cookie("holdfor")){ >+ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); >+ $template->param( >+ holdfor => $query->cookie("holdfor"), >+ holdfor_surname => $holdfor_patron->{'surname'}, >+ holdfor_firstname => $holdfor_patron->{'firstname'}, >+ holdfor_cardnumber => $holdfor_patron->{'cardnumber'}, >+ ); >+} >+ > my $biblionumber = $query->param('biblionumber'); > my $fw = GetFrameworkCode($biblionumber); > >diff --git a/catalogue/labeledMARCdetail.pl b/catalogue/labeledMARCdetail.pl >index e72a6d1..8faecfc 100755 >--- a/catalogue/labeledMARCdetail.pl >+++ b/catalogue/labeledMARCdetail.pl >@@ -26,6 +26,7 @@ use C4::Context; > use C4::Output; > use C4::Biblio; > use C4::Items; >+use C4::Members; # to use GetMember > use C4::Search; # enabled_staff_search_views > > my $query = new CGI; >@@ -52,6 +53,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >+if($query->cookie("holdfor")){ >+ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); >+ $template->param( >+ holdfor => $query->cookie("holdfor"), >+ holdfor_surname => $holdfor_patron->{'surname'}, >+ holdfor_firstname => $holdfor_patron->{'firstname'}, >+ holdfor_cardnumber => $holdfor_patron->{'cardnumber'}, >+ ); >+} >+ > #count of item linked > my $itemcount = GetItemsCount($biblionumber); > $template->param( count => $itemcount, >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index d790c41..b5e6963 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -31,6 +31,7 @@ use C4::Auth; > use C4::Serials; > use C4::Dates qw/format_date/; > use C4::Circulation; # to use itemissues >+use C4::Members; # to use GetMember > use C4::Search; # enabled_staff_search_views > > my $query=new CGI; >@@ -48,6 +49,16 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ > flagsrequired => {catalogue => 1}, > }); > >+if($query->cookie("holdfor")){ >+ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); >+ $template->param( >+ holdfor => $query->cookie("holdfor"), >+ holdfor_surname => $holdfor_patron->{'surname'}, >+ holdfor_firstname => $holdfor_patron->{'firstname'}, >+ holdfor_cardnumber => $holdfor_patron->{'cardnumber'}, >+ ); >+} >+ > # get variables > > my $biblionumber=$query->param('biblionumber'); >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 8cb737d..791bba1 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -145,6 +145,7 @@ use C4::Auth qw(:DEFAULT get_session); > use C4::Search; > use C4::Languages qw(getAllLanguages); > use C4::Koha; >+use C4::Members qw(GetMember); > use C4::VirtualShelves qw(GetRecentShelves); > use POSIX qw(ceil floor); > use C4::Branch; # GetBranches >@@ -181,6 +182,16 @@ if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { > $template->param('UNIMARC' => 1); > } > >+if($cgi->cookie("holdfor")){ >+ my $holdfor_patron = GetMember('borrowernumber' => $cgi->cookie("holdfor")); >+ $template->param( >+ holdfor => $cgi->cookie("holdfor"), >+ holdfor_surname => $holdfor_patron->{'surname'}, >+ holdfor_firstname => $holdfor_patron->{'firstname'}, >+ holdfor_cardnumber => $holdfor_patron->{'cardnumber'}, >+ ); >+} >+ > ## URI Re-Writing > # Deprecated, but preserved because it's interesting :-) > # The same thing can be accomplished with mod_rewrite in >diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >index b6d439d..5a09fb6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >@@ -439,6 +439,7 @@ ul.toolbar { > > ul.toolbar button { > padding-bottom : 2px; >+ font-family: arial, verdana, helvetica, sans-serif; > } > .yui-menu-button { > >@@ -927,13 +928,16 @@ fieldset.rows .inputnote { > } > > #placehold a, >-#placehold button { >+#placehold button, >+#holdfor .first-child { > padding-left : 34px; > background-image: url("../../img/toolbar-hold.gif"); > background-position : center left; > background-repeat : no-repeat; > } > >+#holdfor .first-child { padding-left : 17px; } >+ > #editmenuc .first-child, #deleteshelf .first-child,#newmenuc .first-child, #addbiblio .first-child, #z3950search .first-child, #printmenuc .first-child, #newsupplier .first-child, #savemenuc .first-child, #budgets_menuc .first-child, #periods_menuc .first-child { > padding-left : 15px; > } >@@ -1413,6 +1417,11 @@ li.email { > padding : .1em 0 .1em 1em; > } > >+/* Hack just for Firefox */ >+html>/**/body #searchheader button, x:-moz-any-link, x:default { >+ padding-bottom : 3px; >+} >+ > #searchheader h3 { > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index 8d4e02e..af31769 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -148,7 +148,31 @@ function confirm_items_deletion() { > container: this, > onclick: {fn: printBiblio } > }); >+ <!-- TMPL_IF NAME="CAN_user_reserveforothers" --><!-- TMPL_UNLESS NAME="norequests" --> >+ <!-- TMPL_IF NAME="holdfor" --> >+ // Create an array of YAHOO.widget.MenuItem configuration properties >+ var onButtonClick = function () { >+ location.href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"; >+ } >+ var HoldForButtonMenu = [ >+ { text: "Place hold", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" }, >+ { text: "Place hold for <!-- TMPL_VAR NAME="holdfor_firstname" --> <!-- TMPL_VAR NAME="holdfor_surname" --> (<!-- TMPL_VAR NAME="holdfor_cardnumber" -->)", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&findborrower=<!-- TMPL_VAR NAME="holdfor_cardnumber" -->" } >+ ]; > >+ // Instantiate a Split Button using the array of YAHOO.widget.MenuItem >+ // configuration properties as the value for the "menu" >+ // configuration attribute. >+ >+ var HoldForButton = new YAHOO.widget.Button({ >+ id: "holdfor", >+ type: "split", >+ label: "Place hold", >+ name: "holdfor", >+ menu: HoldForButtonMenu, >+ container: this, >+ onclick: { fn: onButtonClick } >+ }); >+ <!-- TMPL_ELSE --> > new YAHOO.widget.Button({ > id: "placehold", > type: "link", >@@ -156,6 +180,8 @@ function confirm_items_deletion() { > container: this, > href: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" > }); >+ <!-- /TMPL_IF --> >+ <!-- /TMPL_IF --><!-- /TMPL_IF --> > <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> > new YAHOO.widget.Button({ > id: "z3950search", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >index 976de15..e14590d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >@@ -36,11 +36,8 @@ function update_child() { > // prepare DOM for YUI Toolbar > > $(document).ready(function() { >- $("#printslip").parent().remove(); >- $("#patronflags").parent().remove(); >- $("#deletepatron").parent().remove(); >- $("#moremenuc").empty(); >- $("#printmenuc").empty(); >+ $("#printslip,#patronflags,#deletepatron").parent().remove(); >+ $("#moremenuc,#printmenuc,#searchtoholdc").empty(); > yuiToolbar(); > }); > >@@ -49,7 +46,12 @@ function update_child() { > window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&print=" + print_type, "printwindow"); > return false; > } >- >+ function searchToHold(){ >+ var date = new Date(); >+ date.setTime(date.getTime() + (10 * 60 * 1000)); >+ $.cookie("holdfor", "<!-- TMPL_VAR NAME="borrowernumber" -->", { path: "/", expires: date }); >+ location.href="/cgi-bin/koha/catalogue/search.pl"; >+ } > function yuiToolbar() { > var printmenu = [ > <!-- TMPL_IF NAME="CAN_user_borrowers" --> >@@ -76,8 +78,14 @@ function update_child() { > name: "printmenubutton", > menu: printmenu, > container: "printmenuc" >- }); >- >+ }); >+ new YAHOO.widget.Button({ >+ id: "searchtohold", >+ type: "button", >+ label: _("Search to hold"), >+ container: "searchtoholdc", >+ onclick: {fn: searchToHold } >+ }); > new YAHOO.widget.Button({ > type: "menu", > label: _("More"), >@@ -85,7 +93,7 @@ function update_child() { > menu: moremenu, > container: "moremenuc" > }); >- >+ > <!-- TMPL_IF name="adultborrower" -->new YAHOO.widget.Button("addchild");<!-- /TMPL_IF --> > new YAHOO.widget.Button("editpatron"); > new YAHOO.widget.Button("addnote"); >@@ -93,7 +101,7 @@ function update_child() { > <!-- TMPL_ELSE--> new YAHOO.widget.Button("changepassword"); <!-- /TMPL_IF --> > new YAHOO.widget.Button("printslip"); > new YAHOO.widget.Button("printpage"); >- new YAHOO.widget.Button("renewpatron"); >+ new YAHOO.widget.Button("renewpatron"); > <!-- TMPL_IF NAME="CAN_user_permissions" --> > <!-- TMPL_IF NAME="StaffMember" --> > <!-- TMPL_IF NAME="CAN_user_staffaccess" --> >@@ -127,12 +135,12 @@ function update_child() { > <!-- /TMPL_IF --> > <!-- TMPL_IF NAME="CAN_user_borrowers" --> > <!-- TMPL_IF name="adultborrower" --><li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&category_type=C">Add child</a></li><!-- /TMPL_IF --> >-<!-- <li><a id="addnote" href="/cgi-bin/koha/members/addnotes.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Add Note</a></li> --> > <!-- TMPL_IF NAME="StaffMember" --><!-- TMPL_IF NAME="CAN_user_staffaccess" --> <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li><!-- /TMPL_IF--> > <!-- TMPL_ELSE--> <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li><!-- /TMPL_IF --> > <!-- /TMPL_IF --> > <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&print=page">Print Page</a></li> > <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&print=slip">Print Slip</a></li> >+ <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li> > <li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew Account</a></li> > <!-- TMPL_IF NAME="CAN_user_permissions" --> > <!-- TMPL_IF NAME="StaffMember" --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >index 42f9df2..39be321 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >@@ -30,6 +30,7 @@ > <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/jquery.js"></script> > <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/ui.tabs.js"></script> > <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.hotkeys.min.js"></script> >+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.cookie.min.js"></script> > <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js"></script> > > <!-- TMPL_IF NAME="js_libs" --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index 6f22d46..18a7a69 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -34,11 +34,8 @@ function update_child() { > // prepare DOM for YUI Toolbar > > $(document).ready(function() { >- $("#printslip").parent().remove(); >- $("#patronflags").parent().remove(); >- $("#deletepatron").parent().remove(); >- $("#moremenuc").empty(); >- $("#printmenuc").empty(); >+ $("#printslip,#patronflags,#deletepatron").parent().remove(); >+ $("#moremenuc,#printmenuc,#searchtoholdc").empty(); > yuiToolbar(); > }); > >@@ -47,7 +44,12 @@ function update_child() { > window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&print=" + print_type, "printwindow"); > return false; > } >- >+ function searchToHold(){ >+ var date = new Date(); >+ date.setTime(date.getTime() + (10 * 60 * 1000)); >+ $.cookie("holdfor", "<!-- TMPL_VAR NAME="borrowernumber" -->", { path: "/", expires: date }); >+ location.href="/cgi-bin/koha/catalogue/search.pl"; >+ } > function yuiToolbar() { > var printmenu = [ > { text: _("Print Page"), onclick: {fn: function(){printx_window("page")}} }, >@@ -71,6 +73,14 @@ function update_child() { > }); > > new YAHOO.widget.Button({ >+ id: "searchtohold", >+ type: "button", >+ label: _("Search to hold"), >+ container: "searchtoholdc", >+ onclick: {fn: searchToHold } >+ }); >+ >+ new YAHOO.widget.Button({ > type: "menu", > label: _("More"), > name: "moremenubutton", >@@ -108,9 +118,9 @@ function update_child() { > <!-- /TMPL_IF --> > <!-- /TMPL_IF --> > <!-- TMPL_IF name="adultborrower" --><li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&category_type=C">Add child</a></li><!-- /TMPL_IF --> >-<!-- <li><a id="addnote" href="/cgi-bin/koha/members/addnotes.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Add Note</a></li> --> > <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li> > <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&print=page">Print Page</a></li> > <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&print=slip">Print Slip</a></li> >+ <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li> > <li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew Account</a></li><!-- TMPL_IF NAME="CAN_user_permissions" --><li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Set Permissions</a></li><!-- /TMPL_IF --><li><a id="deletepatron" href="javascript:confirm_deletion();">Delete</a></li> > </ul></div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.cookie.min.js b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.cookie.min.js >new file mode 100644 >index 0000000..eb129db >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.cookie.min.js >@@ -0,0 +1 @@ >+jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}}; >\ No newline at end of file >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 592f3f4..8fee182 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl >@@ -5,7 +5,8 @@ > <script type="text/javascript"> > //<![CDATA[ > var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); >-var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be reserved."); >+var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold."); >+var q_array = new Array(); // will hold search terms, if present > <!-- TMPL_IF NAME="AmazonEnabled" --> > // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html > function verify_images() { >@@ -21,7 +22,6 @@ function verify_images() { > } > }); > } >-var q_array = new Array(); // will hold search terms, if present > > $(window).load(function() { > verify_images(); >@@ -30,13 +30,33 @@ $(window).load(function() { > function Dopop(link) { > newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes'); > } >+function cartList(){ >+ if($("#addto").find("option:selected").attr("value") == "addtolist"){ >+ var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s",""); >+ if (vShelfAdd()) { >+ Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vShelfAdd()); >+ } >+ return false; >+ } else if($("#addto").find("option:selected").attr("value") == "newlist"){ >+ if (vShelfAdd()) { >+ Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vShelfAdd()); >+ } >+ return false; >+ } >+ if($("#addto").find("option:selected").attr("value") == "addtocart"){ >+ addMultiple(); >+ return false; >+ } >+} >+$(window).load(function() { >+ new YAHOO.widget.Button("cartsubmit", { onclick: { fn: cartList }}); >+}); > $(document).ready(function() { >+$("#placeholdc").empty(); > $('#sortbyform').find("input:submit").hide(); > $('#sort_by').change(function() { > $('#sortbyform').submit(); > }); >- >- > $(".addtocart").show(); > var param1 = "<label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>"; > <!-- TMPL_IF name="intranetbookbag" --> param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; <!-- /TMPL_IF --> >@@ -48,7 +68,7 @@ $(".addtocart").show(); > param1 +="<\/optgroup><option value=\"newlist\">"+_("[ New List ]")+"<\/option>" > <!-- /TMPL_IF --> > <!-- /TMPL_IF --> >- param1 += "<\/select> <input type=\"submit\" class=\"submit\" value=\""+_("Save")+"\" />"; >+ param1 += "<\/select> <input id=\"cartsubmit\" type=\"submit\" class=\"submit\" value=\""+_("Save")+"\" />"; > $('#sortsubmit').hide(); > $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear All")+"<\/a>"); > $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select All")+"<\/a>"); >@@ -63,26 +83,6 @@ $(".addtocart").show(); > > $("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>"); > >- function cartList(){ >- if($("#addto").find("option:selected").attr("value") == "addtolist"){ >- var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s",""); >- if (vShelfAdd()) { >- Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vShelfAdd()); >- } >- return false; >- } else if($("#addto").find("option:selected").attr("value") == "newlist"){ >- if (vShelfAdd()) { >- Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vShelfAdd()); >- } >- return false; >- } >- if($("#addto").find("option:selected").attr("value") == "addtocart"){ >- addMultiple(); >- return false; >- } >- >- } >- > $("#selection_ops").show(); > $(".selection").show(); > <!-- TMPL_IF NAME="query_desc" --> >@@ -167,6 +167,37 @@ function GetZ3950Terms(){ > <!-- /TMPL_LOOP --> > return strQuery; > } >+ >+YAHOO.util.Event.onContentReady("searchheader", function () { >+ new YAHOO.widget.Button( "z3950submit", { onclick: { fn: PopupZ3950 }}); >+ <!-- TMPL_IF NAME="holdfor" --> >+ var onButtonClick = function () { >+ $("#holdFor").val("<!-- TMPL_VAR NAME="holdfor_cardnumber" -->"); >+ placeHold(); >+ } >+ var HoldForButtonMenu = [ >+ { text: "Place hold", onclick: { fn: placeHold }}, >+ { text: "Place hold for <!-- TMPL_VAR NAME="holdfor_firstname" --> <!-- TMPL_VAR NAME="holdfor_surname" --> (<!-- TMPL_VAR NAME="holdfor_cardnumber" -->)", onclick: { fn: onButtonClick }} >+ ]; >+ >+ var HoldForButton = new YAHOO.widget.Button({ >+ type: "split", >+ label: "Place hold", >+ name: "holdfor", >+ menu: HoldForButtonMenu, >+ container: "placeholdc", >+ onclick: { fn: placeHold } >+ }); >+ <!-- TMPL_ELSE --> >+ new YAHOO.widget.Button({ >+ id: "placehold", >+ type: "link", >+ label: _("Place hold"), >+ container: "placeholdc", >+ onclick: { fn: placeHold } >+ }); >+ <!-- /TMPL_IF --> >+}); // YAHOO onContentReady > //]]> > </script> > </head> >@@ -231,14 +262,15 @@ function GetZ3950Terms(){ > | > <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a> > <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a> >+ | >+ <span class="addto"></span> > <!-- TMPL_IF NAME="CAN_user_reserveforothers" --> >- <!-- TMPL_IF NAME="DisplayMultiPlaceHold" --> >- <input type="button" onclick="placeHold(); return false;" value="Place Hold"/> >- <!-- /TMPL_IF --> >+ <!-- TMPL_IF NAME="DisplayMultiPlaceHold" --> >+ | <span id="placeholdc"><input type="button" id="placehold" onclick="placeHold(); return false;" value="Place Hold"/></span> >+ <!-- /TMPL_IF --> > <!-- /TMPL_IF --> >- <span class="addto"></span> > >- <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --><input type="button" onclick="PopupZ3950(); return false;" value="Z39.50 Search"/><!-- /TMPL_IF --> >+ <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> | <input type="button" id="z3950submit" onclick="PopupZ3950(); return false;" value="Z39.50 Search"/><!-- /TMPL_IF --> > </div> > </div> > <!-- TMPL_IF NAME="stopwords_removed" --><div><p class="tip">Ignored the following common words: "<!-- TMPL_VAR NAME="stopwords_removed" -->"<p></div><!-- /TMPL_IF --> >@@ -451,6 +483,7 @@ function GetZ3950Terms(){ > <span class="noholdstext">No holds allowed</span> > <!-- TMPL_ELSE --> > <a id="reserve_<!-- TMPL_VAR NAME="biblionumber" -->" href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Holds</a> >+ <!-- TMPL_IF NAME="holdfor" --> | <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&findborrower=<!-- TMPL_VAR NAME="holdfor_cardnumber" -->">Hold for <!-- TMPL_VAR NAME="holdfor_firstname" --> <!-- TMPL_VAR NAME="holdfor_surname" --> (<!-- TMPL_VAR NAME="holdfor_cardnumber" -->)</a><!-- /TMPL_IF --> > <!-- /TMPL_IF --> > <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> > | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit record</a> >@@ -551,6 +584,7 @@ function GetZ3950Terms(){ > <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl"> > <!-- Value will be set here by placeHold() --> > <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" /> >+ <input type="text" name="findborrower" id="holdFor" value="" /> > <input type="hidden" name="multi_hold" value="1"/> > </form> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >index 71b19f0..a7ba730 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >@@ -9,6 +9,7 @@ > <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript"> > //<![CDATA[ >+if($.cookie("holdfor") != <!-- TMPL_VAR NAME="borrowernumber" -->){ $.cookie("holdfor",null, { path: "/", expires: 0 }); } > <!-- TMPL_IF NAME="UseTablesortForCirc" -->$.tablesorter.addParser({ > id: 'articles', > is: function(s) {return false; }, >-- >1.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3659
:
1490
|
1491
|
1492
|
2974
|
2975
|
2976
|
2977
|
2995
|
3043