Merge remote branch 'kc/new/enh/bug_3659' into kcmaster

This commit is contained in:
Chris Cormack 2011-03-15 15:58:26 +13:00
commit 76d52d89e4
14 changed files with 210 additions and 51 deletions

View file

@ -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");

View file

@ -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,

View file

@ -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);

View file

@ -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,

View file

@ -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');

View file

@ -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

View file

@ -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;
}
@ -1417,6 +1421,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 {
}

View file

@ -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",

View file

@ -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" -->&amp;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" -->
@ -77,7 +79,13 @@ function update_child() {
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"),
@ -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&amp;guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;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" -->&amp;print=page">Print Page</a></li>
<li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;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&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew Account</a></li>
<!-- TMPL_IF NAME="CAN_user_permissions" -->
<!-- TMPL_IF NAME="StaffMember" -->

View file

@ -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" -->

View file

@ -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" -->&amp;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")}} },
@ -70,6 +72,14 @@ function update_child() {
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"),
@ -109,10 +119,10 @@ function update_child() {
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF name="adultborrower" --><li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;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><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;category_type=<!-- TMPL_VAR NAME="category_type"-->">Duplicate</a></li>
<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">Print Page</a></li>
<li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;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&amp;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>

View file

@ -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}};

View file

@ -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,39 +30,6 @@ $(window).load(function() {
function Dopop(link) {
newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
}
$(document).ready(function() {
$('#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 -->
<!-- TMPL_IF NAME="virtualshelves" --><!-- TMPL_IF NAME="addbarshelves" -->
param1 += "<optgroup label=\""+_("Your Lists:")+"\">";<!-- TMPL_LOOP NAME="addbarshelvesloop" -->
param1 += "<option id=\"s<!-- TMPL_VAR NAME="shelfnumber" -->\" value=\"addtolist\"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html"--><\/option>";<!-- /TMPL_LOOP -->
param1 += "<\/optgroup>";<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="addpubshelves" -->param1 += "<optgroup label=\""+_("Public Lists:")+"\">"<!-- TMPL_LOOP NAME="addpubshelvesloop" -->+"<option id=\"s<!-- TMPL_VAR NAME="shelfnumber" -->\" value=\"addtolist\"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html"--><\/option>"<!-- /TMPL_LOOP -->
param1 +="<\/optgroup><option value=\"newlist\">"+_("[ New List ]")+"<\/option>"
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
param1 += "<\/select> <input 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>");
$("span.addto").html(param1);
$("#addto").change(function(){
cartList();
});
$(".addto").find("input:submit").click(function(){
cartList();
return false;
});
$("#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","");
@ -80,8 +47,41 @@ $(".addtocart").show();
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 -->
<!-- TMPL_IF NAME="virtualshelves" --><!-- TMPL_IF NAME="addbarshelves" -->
param1 += "<optgroup label=\""+_("Your Lists:")+"\">";<!-- TMPL_LOOP NAME="addbarshelvesloop" -->
param1 += "<option id=\"s<!-- TMPL_VAR NAME="shelfnumber" -->\" value=\"addtolist\"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html"--><\/option>";<!-- /TMPL_LOOP -->
param1 += "<\/optgroup>";<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="addpubshelves" -->param1 += "<optgroup label=\""+_("Public Lists:")+"\">"<!-- TMPL_LOOP NAME="addpubshelvesloop" -->+"<option id=\"s<!-- TMPL_VAR NAME="shelfnumber" -->\" value=\"addtolist\"><!-- TMPL_VAR NAME="shelfname" ESCAPE="html"--><\/option>"<!-- /TMPL_LOOP -->
param1 +="<\/optgroup><option value=\"newlist\">"+_("[ New List ]")+"<\/option>"
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
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>");
$("span.addto").html(param1);
$("#addto").change(function(){
cartList();
});
$(".addto").find("input:submit").click(function(){
cartList();
return false;
});
$("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>");
$("#selection_ops").show();
$(".selection").show();
@ -167,6 +167,41 @@ 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 holdFor = function (){
$("#holdFor").val("");
placeHold();
}
var holdForPatron = function () {
$("#holdFor").val("<!-- TMPL_VAR NAME="holdfor_cardnumber" -->");
placeHold();
}
var HoldForButtonMenu = [
{ text: "Place hold", onclick: { fn: holdFor }},
{ text: "Place hold for <!-- TMPL_VAR NAME="holdfor_firstname" --> <!-- TMPL_VAR NAME="holdfor_surname" --> (<!-- TMPL_VAR NAME="holdfor_cardnumber" -->)", onclick: { fn: holdForPatron }}
];
var HoldForButton = new YAHOO.widget.Button({
type: "split",
label: "Place hold",
name: "holdfor",
menu: HoldForButtonMenu,
container: "placeholdc",
onclick: { fn: holdFor }
});
<!-- 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 +266,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"/>
| <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 +487,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" -->&amp;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 +588,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="hidden" name="findborrower" id="holdFor" value="" />
<input type="hidden" name="multi_hold" value="1"/>
</form>

View file

@ -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; },