From 86781543929f92b7408e4bf13fb698071bfa14e4 Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Sun, 6 Sep 2009 13:45:05 -0400 Subject: [PATCH 01/13] Bug 1934: Changed variables per request in bug report System preference now looking for brackets around variables. ex. {TITLE} instead of TITLE Signed-off-by: Galen Charlton --- installer/data/mysql/en/mandatory/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ opac/opac-detail.pl | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 0adefbc752..49db7bb8d2 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -256,4 +256,4 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'ReturnToShelvingCart', '0', '', 'If set, when any item is ''checked in'', it''s location code will be changed to CART.', 'YesNo'); INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'DisplayClearScreenButton', '0', '', 'If set to ON, a clear screen button will appear on the circulation page.', 'YesNo'); INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'If this is switched on, patron''s cardnumber will be shown instead of their name on the holds and catalog screens', 'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACSearchForTitleIn','
  • Other Libraries (WorldCat)
  • \n
  • Other Databases (Google Scholar)
  • \n
  • Online Stores (Bookfinder.com)
  • ','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter TITLE, AUTHOR, or ISBN in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','70|10','Textarea') +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACSearchForTitleIn','
  • Other Libraries (WorldCat)
  • \n
  • Other Databases (Google Scholar)
  • \n
  • Online Stores (Bookfinder.com)
  • ','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','70|10','Textarea') diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 80cce211d5..e5a3da4286 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2614,6 +2614,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (bug 1600, bug 3454: add altcontactcountry and B_address2 to borrowers and deletedborrowers)\n"; } +$DBversion = '3.01.00.XXX'; + if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE systempreferences set explanation='Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.', value='
  • Other Libraries (WorldCat)
  • \n
  • Other Databases (Google Scholar)
  • \n
  • Online Stores (Bookfinder.com)
  • ' WHERE variable='OPACSearchForTitleIn';"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (changed OPACSearchForTitleIn per requests in bug 1934)\n"; + } + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index cae305ae32..c3b104bf71 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -552,9 +552,9 @@ if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref #Search for title in links if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ - $search_for_title =~ s/AUTHOR/$dat->{author}/g; - $search_for_title =~ s/TITLE/$dat->{title}/g; - $search_for_title =~ s/ISBN/$isbn/g; + $search_for_title =~ s/{AUTHOR}/$dat->{author}/g; + $search_for_title =~ s/{TITLE}/$dat->{title}/g; + $search_for_title =~ s/{ISBN}/$isbn/g; $template->param('OPACSearchForTitleIn' => $search_for_title); } From e71c8a43439afc6652a2a5ea55b4fc8c2cdfcc24 Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Sun, 6 Sep 2009 13:45:06 -0400 Subject: [PATCH 02/13] Bug 1172: Added OPACPatronDetails system preference This patch allows library staff to disable the patron details tab on the OPAC. Signed-off-by: Galen Charlton --- C4/Auth.pm | 1 + admin/systempreferences.pl | 1 + installer/data/mysql/en/mandatory/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 8 ++++++++ koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 2 ++ 5 files changed, 13 insertions(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index 8f42d765f1..f05ec767d7 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -351,6 +351,7 @@ sub get_template_and_user { OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"), OpacNav => "" . C4::Context->preference("OpacNav"), OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), + OPACPatronDetails => C4::Context->preference("OPACPatronDetails"), OpacTopissue => C4::Context->preference("OpacTopissue"), RequestOnOpac => C4::Context->preference("RequestOnOpac"), TemplateEncoding => "". C4::Context->preference("TemplateEncoding"), diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 4c856da96b..b48f05517f 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -318,6 +318,7 @@ $tabsysprefs{OPACSearchForTitleIn} = "OPAC"; $tabsysprefs{OPACShelfBrowser} = "OPAC"; $tabsysprefs{OPACDisplayRequestPriority} = "OPAC"; $tabsysprefs{OPACAllowHoldDateInFuture} = "OPAC"; +$tabsysprefs{OPACPatronDetails} = "OPAC"; # OPAC $tabsysprefs{SearchMyLibraryFirst} = "OPAC"; diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 49db7bb8d2..52b3bd808a 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -257,3 +257,4 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'DisplayClearScreenButton', '0', '', 'If set to ON, a clear screen button will appear on the circulation page.', 'YesNo'); INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'If this is switched on, patron''s cardnumber will be shown instead of their name on the holds and catalog screens', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACSearchForTitleIn','
  • Other Libraries (WorldCat)
  • \n
  • Other Databases (Google Scholar)
  • \n
  • Online Stores (Bookfinder.com)
  • ','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','70|10','Textarea') +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e5a3da4286..55cb20d1f0 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2620,6 +2620,14 @@ $DBversion = '3.01.00.XXX'; SetVersion ($DBversion); print "Upgrade to $DBversion done (changed OPACSearchForTitleIn per requests in bug 1934)\n"; } + +$DBversion = '3.01.00.XXX'; + if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo');"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (Bug 1172 : Add OPACPatronDetails syspref)\n"; + } + =item DropAllForeignKeys($table) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc index 2efc1da3d8..d8f4adcb73 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc @@ -3,7 +3,9 @@
    • my summary
    • my fines
    • +
    • my personal details
    • +
    • my tags
    • From 6dd6af59c2d1dd4a11cf16608c4161d24e6cf18b Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Sun, 6 Sep 2009 13:45:07 -0400 Subject: [PATCH 03/13] Bug 2576: Added OPACFinesTab Syspref This preference allows library staff to decide whether to show the fines tab in the OPAC for logged in patrons. Signed-off-by: Galen Charlton --- C4/Auth.pm | 1 + admin/systempreferences.pl | 1 + installer/data/mysql/en/mandatory/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 6 ++++++ koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 2 ++ 5 files changed, 11 insertions(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index f05ec767d7..d73f19b692 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -352,6 +352,7 @@ sub get_template_and_user { OpacNav => "" . C4::Context->preference("OpacNav"), OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), OPACPatronDetails => C4::Context->preference("OPACPatronDetails"), + OPACFinesTab => C4::Context->preference("OPACFinesTab"), OpacTopissue => C4::Context->preference("OpacTopissue"), RequestOnOpac => C4::Context->preference("RequestOnOpac"), TemplateEncoding => "". C4::Context->preference("TemplateEncoding"), diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index b48f05517f..95c4b8aa08 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -319,6 +319,7 @@ $tabsysprefs{OPACShelfBrowser} = "OPAC"; $tabsysprefs{OPACDisplayRequestPriority} = "OPAC"; $tabsysprefs{OPACAllowHoldDateInFuture} = "OPAC"; $tabsysprefs{OPACPatronDetails} = "OPAC"; +$tabsysprefs{OPACFinesTab} = "OPAC"; # OPAC $tabsysprefs{SearchMyLibraryFirst} = "OPAC"; diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 52b3bd808a..caaf147bef 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -258,3 +258,4 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'If this is switched on, patron''s cardnumber will be shown instead of their name on the holds and catalog screens', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACSearchForTitleIn','
    • Other Libraries (WorldCat)
    • \n
    • Other Databases (Google Scholar)
    • \n
    • Online Stores (Bookfinder.com)
    • ','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','70|10','Textarea') INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo'); \ No newline at end of file diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 55cb20d1f0..24154eb36f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2628,6 +2628,12 @@ $DBversion = '3.01.00.XXX'; print "Upgrade to $DBversion done (Bug 1172 : Add OPACPatronDetails syspref)\n"; } +$DBversion = '3.01.00.XXX'; + if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo');"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (Bug 2576 : Add OPACFinesTab syspref)\n"; + } =item DropAllForeignKeys($table) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc index d8f4adcb73..a8fc320fcd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc @@ -2,7 +2,9 @@ @@ -1275,15 +1275,9 @@ $(document).ready(function() { " size="3" onkeypress="return check_input(event)" /> (enter amount in numerals) Required diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 9fd55d12f7..e6f9e83e67 100755 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -93,32 +93,19 @@ if ($op eq 'mod' || $op eq 'dup' || $op eq 'modsubscription') { $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ; $subs->{nextacquidate} = $nextexpected->{planneddate}->output() if($op eq 'mod'); unless($op eq 'modsubscription') { - if($subs->{numberlength} > 0){ - $sublength = $subs->{numberlength}; - $sub_on = $subscription_types[0]; - } elsif ($subs->{weeklength}>0){ - $sublength = $subs->{weeklength}; - $sub_on = $subscription_types[1]; - } else { - $sublength = $subs->{monthlength}; - $sub_on = $subscription_types[2]; - } - while (@subscription_types) { - my $sub_type = shift @subscription_types; - my %row = ( 'name' => $sub_type ); - if ( $sub_on eq $sub_type ) { - $row{'selected'} = ' selected'; - } else { - $row{'selected'} = ''; - } - push( @sub_type_data, \%row ); - } + foreach my $length_unit qw(numberlength weeklength monthlength){ + if ($subs->{$length_unit}){ + $sublength=$subs->{$length_unit}; + $sub_on=$length_unit; + last; + } + } $template->param($subs); $template->param("dow".$subs->{'dow'} => 1) if defined $subs->{'dow'}; $template->param( $op => 1, - subtype => \@sub_type_data, + "subtype_$sub_on" => 1, sublength =>$sublength, history => ($op eq 'mod' && $subs->{manualhistory} == 1 ), "periodicity".$subs->{'periodicity'} => 1, From 26878175769fec391cfd6a586371f88c4a9b77fb Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 1 Sep 2009 21:46:03 +0200 Subject: [PATCH 08/13] Adding strings to translate in tags.js Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/js/tags.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/js/tags.js b/koha-tmpl/opac-tmpl/prog/en/js/tags.js index 8d04761a30..d7dc5de19d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/tags.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/tags.js @@ -17,7 +17,7 @@ if (typeof(readCookie) == "undefined") { readCookie = function (name) { // from http://www.quirksmode.org/js/cookies.html var nameEQ = name + "="; var ca = document.cookie.split(';'); - for(var i=0;i < ca.length;i++) { + for (var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' '){ c = c.substring(1,c.length); } if (c.indexOf(nameEQ) == 0){ return c.substring(nameEQ.length,c.length); } @@ -54,9 +54,9 @@ KOHA.Tags = { }, common_status : function(addcount, delcount, errcount) { var cstat = ""; - if (addcount && addcount > 0) {cstat += "Added " + addcount + (addcount==1 ? " tag" : " tags") + ". " ;} - if (delcount && delcount > 0) {cstat += "Deleted " + delcount + (delcount==1 ? " tag" : " tags") + ". " ;} - if (errcount && errcount > 0) {cstat += (errcount==1 ? "ERROR" : errcount + " ERRORS") + " during operation.";} + if (addcount && addcount > 0) {cstat += _("Added ") + addcount + (addcount==1 ? _(" tag") : _(" tags")) + ". " ;} + if (delcount && delcount > 0) {cstat += _("Deleted ") + delcount + (delcount==1 ? _(" tag") : _(" tags")) + ". " ;} + if (errcount && errcount > 0) {cstat += (errcount==1 ? _("ERROR") : errcount + _(" ERRORS")) + _(" during operation.");} return cstat; }, set_tag_status : function(tagid, newstatus) { From 8b0ba909c0544a3364102285c6f775dfd6aa46f7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 28 Aug 2009 08:38:23 -0500 Subject: [PATCH 09/13] Display description, avoid broken itemtype image on holds page (Bug 3524) Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl index 8006e76f83..3ac7343883 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl @@ -293,9 +293,8 @@ - " - alt="" - title="" /> + " alt="" /> + out of @@ -436,9 +435,8 @@ - " - alt="" - title="" /> + " alt="" /> + From e50bc421c44a909c94143418d1c7328109b3be05 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 28 Aug 2009 08:12:28 -0500 Subject: [PATCH 10/13] Changes to make checkouts/holds display the same on circulation and patron detail screens (Bug 3106) Signed-off-by: Galen Charlton --- circ/circulation.pl | 12 +- .../prog/en/modules/circ/circulation.tmpl | 225 ++++++++++++++---- .../prog/en/modules/members/moremember.tmpl | 46 ++-- members/moremember.pl | 9 +- reserve/modrequest.pl | 2 + 5 files changed, 215 insertions(+), 79 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 6d791241f5..de6013a09e 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -425,13 +425,14 @@ my @previousissues; ## ADDED BY JF: new itemtype issuingrules counter stuff my $issued_itemtypes_count; my @issued_itemtypes_count_loop; +my $totalprice = 0; if ($borrower) { # get each issue of the borrower & separate them in todayissues & previous issues my ($issueslist) = GetPendingIssues($borrower->{'borrowernumber'}); - # split in 2 arrays for today & previous foreach my $it ( @$issueslist ) { + my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $it->{'itype'} : $it->{'itemtype'} ); # set itemtype per item-level_itype syspref - FIXME this is an ugly hack $it->{'itemtype'} = ( C4::Context->preference( 'item-level_itypes' ) ) ? $it->{'itype'} : $it->{'itemtype'}; @@ -447,8 +448,13 @@ if ($borrower) { $it->{'can_renew'} = $can_renew; $it->{'can_confirm'} = !$can_renew && !$restype; $it->{'renew_error'} = $restype; + $it->{'checkoutdate'} = C4::Dates->new($it->{'issuedate'},'iso')->output('syspref'); + $totalprice += $it->{'replacementprice'}; + $it->{'itemtype'} = $itemtypeinfo->{'description'}; + $it->{'itemtype_image'} = $itemtypeinfo->{'imageurl'}; $it->{'dd'} = format_date($it->{'date_due'}); + $it->{'issuedate'} = format_date($it->{'issuedate'}); $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ; ($it->{'author'} eq '') and $it->{'author'} = ' '; $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}}; @@ -619,6 +625,8 @@ foreach my $flag ( sort keys %$flags ) { my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0; $amountold =~ s/^.*\$//; # remove upto the $, if any +my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); + if ( $borrower->{'category_type'} eq 'C') { my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); my $cnt = scalar(@$catcodes); @@ -676,6 +684,8 @@ $template->param( duedatespec => $duedatespec, message => $message, CGIselectborrower => $CGIselectborrower, + totalprice => sprintf("%.2f", $totalprice), + totaldue => sprintf("%.2f", $total), todayissues => \@todaysissues, previssues => \@previousissues, inprocess => $inprocess, 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 013a30373d..c43201a96f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -21,7 +21,7 @@ $.tablesorter.addParser({ $.tablesorter.defaults.widgets = ['zebra']; $("#issuest").tablesorter({ dateFormat: 'uk', - headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false}} + headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false}} }); $("#issuest").bind("sortEnd",function() { $("#previous").parents("tr").remove(); // 'previous checkouts' header chokes table sorter @@ -41,14 +41,91 @@ $.tablesorter.addParser({ } } ).attr( 'checked', false ); - $("td").click(function(e){ - if(e.target.tagName.toLowerCase() == 'td'){ - $(this).find("input:checkbox").each( function() { - $(this).attr('checked', !$(this).attr('checked')); - }); - } - }); + +var allcheckboxes = $(".checkboxed"); + $("#renew_all").click(function(){ + $(allcheckboxes).checkCheckboxes(":input[name*=items]"); + $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); + }); + $("#return_all").click(function(){ + $(allcheckboxes).checkCheckboxes(":input[name*=barcodes]"); + $(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); + }); + $("#CheckAllitems").click(function(){ + $(allcheckboxes).checkCheckboxes(":input[name*=items]"); + $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false; + }); + $("#CheckNoitems").click(function(){ + $(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false; + }); + $("#CheckAllreturns").click(function(){ + $(allcheckboxes).checkCheckboxes(":input[name*=barcodes]"); + $(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false; + }); + $("#CheckNoreturns" ).click(function(){ + $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false; + }); + + + + $( '#override_limit' ).click( function () { + if ( this.checked ) { + $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide(); + } else { + $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show(); + } + } ).attr( 'checked', false ); + + + $("td").click(function(e){ + if(e.target.tagName.toLowerCase() == 'td'){ + $(this).find("input:checkbox").each( function() { + $(this).attr('checked', !$(this).attr('checked')); + if($(this).attr('checked')){ + $(this).parent().siblings().find("input:checkbox").each(function(){ + if($(this).attr('checked')){ $(this).attr('checked',''); } + }); + } + }); + } + }); + }); +function uncheck_sibling(me){ +nodename=me.getAttribute("name"); +if (nodename =="barcodes[]"){ + var Node=me.parentNode.previousSibling; + while (Node.nodeName!="TD"){Node=Node.previousSibling} + var Nodes=Node.childNodes; + for (var i=0;i @@ -428,7 +505,7 @@ No patron matched 0 Checkouts
    • - Holds(s) + Hold(s) 0 Holds
    • @@ -438,23 +515,54 @@ No patron matched
      -
      + " /> " /> " /> - - - - - - - - + + + + + + + + + + + + + + + + + @@ -464,17 +572,13 @@ No patron matched - - + + + - - - + + - + + + + + @@ -512,8 +622,8 @@ No patron matched - - + + @@ -525,17 +635,15 @@ No patron matched - + + - - - + + - + + + + + @@ -577,15 +691,16 @@ No patron matched
      Due dateTitleItem TypeCall noBarcodeRenewalsRenew?Check In?Due dateTitleItem TypeChecked out onCall noChargePriceRenew

      select all | none

      Check in

      select all | none

      Totals: +

      + Renewal due date: " /> + /lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" /> + +

      +

      + +

      +
      &type=intra">, by - - - - " /> - - &type=intra">, by - &itemnumber=#item"> " alt="" /> &itemnumber=#item"> + " checked="checked" style="display: none;" /> @@ -504,7 +608,13 @@ No patron matched ">Check InCheckin Failed" onclick="uncheck_sibling(this);" /> + " checked="checked" style="display: none;" /> + Renewal Failed
      Previous checkouts
      Previous checkouts
      Previous checkouts
      Previous checkouts
      &type=intra">
      -
      &type=intra">, by - &itemnumber=#item"> - - " /> - &itemnumber=#item"> + 0 " checked="checked" style="display: none;" /> @@ -565,7 +673,13 @@ No patron matched ">Check InCheckin Failed" onclick="uncheck_sibling(this);" /> + " checked="checked" style="display: none;" /> + Renewal Failed
      - + - - - -
      + + + + +
      @@ -596,21 +711,22 @@ No patron matched
      +
      + - + "> - - + +
      Hold date TitleItem Type Call Number Barcode PriorityDelete?
      ">, by ">, by Item waiting at @@ -621,15 +737,22 @@ No patron matched hasn't been transfered yet from - - Hold priority - + + " /> + " /> +
      +
      +
      -

      Patron has no pending holds.

      +

      Patron has nothing on hold.

      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl index 8e6b73c71e..240e75e44a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl @@ -14,10 +14,10 @@ $.tablesorter.addParser({ }); $(document).ready(function() { $('#finesholdsissues > ul').tabs(); + $.tablesorter.defaults.widgets = ['zebra']; $("#issuest").tablesorter({ dateFormat: 'uk', - sortList: [[1,0]], - headers: { 1: { sorter: 'articles' },4:{sorter:false},5: { sorter: false },6:{sorter:false},7:{sorter:false}} + headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false}} }); $("#holdst").tablesorter({ dateFormat: 'uk', @@ -368,13 +368,16 @@ if (nodename =="barcodes[]"){
      -

      Fines and Charges

      Total due:

      @@ -383,7 +386,6 @@ if (nodename =="barcodes[]"){
      -

      Checked Out

      " /> @@ -391,18 +393,19 @@ if (nodename =="barcodes[]"){ - + + - + - + - + @@ -433,13 +436,7 @@ if (nodename =="barcodes[]"){ - - - - + + + + - - + - @@ -529,7 +528,6 @@ if (nodename =="barcodes[]"){ -
      Item TypeDue date TitleItem Type Checked out onDate dueCall no Charge Price Renew

      select all | none

      Return

      select all | none

      Check in

      select all | none

      Totals:Totals: @@ -420,7 +423,7 @@ if (nodename =="barcodes[]"){

      - Forgive fines on return: +

      - " alt="" /> - - ">"> , by ; , &itemnumber=#item"> + class="od"> @@ -447,12 +444,16 @@ if (nodename =="barcodes[]"){ ">, by ; , &itemnumber=#item"> " alt="" /> Renewal Failed + Return FailedCheckin Failed " onclick="uncheck_sibling(this);" /> " checked="checked" style="display: none;" /> @@ -509,7 +510,6 @@ if (nodename =="barcodes[]"){
      -

      Patron current holds

      @@ -517,7 +517,6 @@ if (nodename =="barcodes[]"){
      Hold date TitleItem Type Call Number Barcode Priority ">, by Item is waiting diff --git a/members/moremember.pl b/members/moremember.pl index 67446d850d..3959c12b1a 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -216,13 +216,13 @@ $template->param( lib2 => $lib2 ) if ($lib2); # current issues # my $issue = GetPendingIssues($borrowernumber); -my $count = scalar(@$issue); +my $issuecount = scalar(@$issue); my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} ); my $today = POSIX::strftime("%Y-%m-%d", localtime); # iso format my @issuedata; my $overdues_exist = 0; my $totalprice = 0; -for ( my $i = 0 ; $i < $count ; $i++ ) { +for ( my $i = 0 ; $i < $issuecount ; $i++ ) { my $datedue = $issue->[$i]{'date_due'}; my $issuedate = $issue->[$i]{'issuedate'}; $issue->[$i]{'date_due'} = C4::Dates->new($issue->[$i]{'date_due'}, 'iso')->output('syspref'); @@ -347,7 +347,9 @@ if ($borrowernumber) { } # return result to the template - $template->param( reservloop => \@reservloop ); + $template->param( reservloop => \@reservloop, + countreserv => scalar @reservloop, + ); } # current alert subscriptions @@ -396,6 +398,7 @@ $template->param( totaldue => sprintf("%.2f", $total), totaldue_raw => $total, issueloop => \@issuedata, + issuecount => $issuecount, overdues_exist => $overdues_exist, error => $error, $error => 1, diff --git a/reserve/modrequest.pl b/reserve/modrequest.pl index 3b66623886..8b7d8ee918 100755 --- a/reserve/modrequest.pl +++ b/reserve/modrequest.pl @@ -72,6 +72,8 @@ else { my $from=$query->param('from'); if ($from eq 'borrower'){ print $query->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrower[0]"); + } elsif ($from eq 'circ'){ + print $query->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrower[0]"); } else { my $url = "/cgi-bin/koha/reserve/request.pl?"; if ($multi_hold) { From 53040ea9e8978efacb258b028e147d1600438b3d Mon Sep 17 00:00:00 2001 From: Wolfgang Heymans Date: Tue, 1 Sep 2009 10:28:06 +0200 Subject: [PATCH 11/13] Bug 3567: Display Alternate Graphic Representation (MARC21 880) in OPAC Signed-off-by: Galen Charlton --- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 90 +++++++++++++++++++ .../prog/en/xslt/MARC21slim2OPACResults.xsl | 43 +++++++++ .../prog/en/xslt/MARC21slimUtils.xsl | 89 +++++++++++++++++- 3 files changed, 221 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 2e18e4413b..fe108e8603 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -12,6 +12,10 @@ + + + + @@ -50,6 +54,16 @@ + + +

      + + 245 + abhfgknps + +

      +
      +

      @@ -75,6 +89,18 @@

      + + +
      + + 100,110,111,700,710,711 + abc + au + + +
      +
      +
      by @@ -138,6 +164,18 @@ + + + + + 440,490 + av + results_summary + Series: + se + + + Series: @@ -169,6 +207,17 @@ + + + + + 260 + abcg + results_summary + Publisher: + + + Publisher: @@ -183,6 +232,17 @@ + + + + + 250 + ab + results_summary + Edition: + + + Edition: @@ -198,6 +258,16 @@ + + + + 300 + abceg + results_summary + Description: + + + Description: @@ -234,6 +304,16 @@ + + + + 246 + abhfgnp + results_summary + Other Title: + + + Other Title: @@ -249,6 +329,16 @@ + + + + 130,240 + adfklmor + results_summary + Uniform Title: + + + Uniform titles: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl index c28ce175f4..6b1b823abd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl @@ -14,6 +14,10 @@ + + + + @@ -372,6 +376,16 @@ --> + + + + + 245 + abh + + + + /cgi-bin/koha/opac-detail.pl?biblionumber= @@ -409,6 +423,15 @@

      + + + + 100,110,111,700,710,711 + abc + term + + + @@ -797,6 +820,16 @@ + + + + 260 + abcg + results_summary + Publisher: + + + Publisher: @@ -808,6 +841,16 @@ + + + + 246 + ab + results_summary + Other Title: + + + Other title: diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl index 917c10d840..eed0e1f7a1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -64,7 +64,94 @@ - + + + + + + + + + + + + + + + + + + + display:block; text-align:right; float:right; width:50%; padding-left:20px + rtl + + + display:block; + + + + + + + + + + + + + + + + + + + /cgi-bin/koha/opac-detail.pl?biblionumber= + + + + + + /cgi-bin/koha/opac-search.pl?q=an: + + + + + + /cgi-bin/koha/opac-search.pl?q=: + + + + + + + + + + + + + + + +