From chrisc at catalyst.net.nz Thu Dec 1 02:36:35 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 1 Dec 2011 14:36:35 +1300 Subject: [Koha-patches] [PATCH 2/2] Bug 7278 : Additional Materials In-Reply-To: <1322703395-14153-1-git-send-email-chrisc@catalyst.net.nz> References: <1322703395-14153-1-git-send-email-chrisc@catalyst.net.nz> Message-ID: <1322703395-14153-2-git-send-email-chrisc@catalyst.net.nz> Part 2: This patch shows the message at checkout and checkin How to test: * Add a note in cataloguing * Check it displays at checkout and checkin * Check items without a note don't display anything --- circ/circulation.pl | 1 + circ/returns.pl | 1 + .../prog/en/modules/circ/circulation.tt | 7 +++++++ .../intranet-tmpl/prog/en/modules/circ/returns.tt | 6 ++++++ 4 files changed, 15 insertions(+), 0 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index fa043dd..b6bc700 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -296,6 +296,7 @@ if ($barcode) { unless($issueconfirmed){ # Get the item title for more information my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode); + $template->{VARS}->{'additional_materials'} = $getmessageiteminfo->{'materials'}; $template->param( itemhomebranch => $getmessageiteminfo->{'homebranch'} ); # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed. diff --git a/circ/returns.pl b/circ/returns.pl index 98d310e..167bc5f 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -238,6 +238,7 @@ if ($barcode) { itemtype => $biblio->{'itemtype'}, ccode => $biblio->{'ccode'}, itembiblionumber => $biblio->{'biblionumber'}, + additional_materials => $biblio->{'materials'} ); my %input = ( diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 5627109..f5ce307 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -226,6 +226,13 @@ function refocus(calendar) { [% IF ( dateexpiry ) %]
Patron's account has been renewed until [% dateexpiry %]
[% END %] + +[% IF additional_materials %] +
This item contains multiple parts:
+ [% additional_materials %] +
+[% END %] + [% IF ( NEEDSCONFIRMATION ) %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 70367ae..583af1b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -54,6 +54,12 @@ function Dopop(link) {
+[% IF additional_materials %] +
This item contains multiple parts:
+ [% additional_materials %] +
+[% END %] + [% IF ( collectionItemNeedsTransferred ) %]
This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]
[% END %] -- 1.7.5.4 From chrisc at catalyst.net.nz Thu Dec 1 02:36:34 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 1 Dec 2011 14:36:34 +1300 Subject: [Koha-patches] [PATCH 1/2] Bug 7728 : Materials Specified field made larger and displayed Message-ID: <1322703395-14153-1-git-send-email-chrisc@catalyst.net.nz> This first page makes the database change, and displays the field on the detail.pl and moredetail.pl pages in the staff client How to Test: * Add a note to the materials specified page in cataloguing (952 subfield 3 for MARC21, but it shouldn't matter as long as you have a field mapped to items.materials * Check it displays at catalogue/detail.pl * Check it displays at catalogue/moredetail.pl Patch to follow to have the note display at checkin/checkout http://bugs.koha-community.org/show_bug.cgi?id=7278 --- catalogue/detail.pl | 6 +++++- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ .../prog/en/modules/catalogue/detail.tt | 4 ++++ .../prog/en/modules/catalogue/moredetail.tt | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 580949d..a700b95 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -174,6 +174,7 @@ my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw); my $authvalcode_items_damaged = GetAuthValCode('items.damaged', $fw); my $analytics_flag; +my $materials_flag; # set this if the items have anything in the materials field foreach my $item (@items) { $item->{homebranch} = GetBranchName($item->{homebranch}); @@ -251,7 +252,9 @@ foreach my $item (@items) { $analytics_flag=1; $item->{countanalytics} = $countanalytics; } - + if ($item->{'materials'} ne ''){ + $materials_flag = 1; + } push @itemloop, $item; } @@ -276,6 +279,7 @@ $template->param( hostrecords => $hostrecords, analytics_flag => $analytics_flag, C4::Search::enabled_staff_search_views, + materials => $materials_flag, ); if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) { diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 452173d..494b0cb 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1031,7 +1031,7 @@ CREATE TABLE `items` ( `cn_source` varchar(10) default NULL, `cn_sort` varchar(30) default NULL, `ccode` varchar(10) default NULL, - `materials` varchar(10) default NULL, + `materials` text default NULL, `uri` varchar(255) default NULL, `itype` varchar(10) default NULL, `more_subfields_xml` longtext default NULL, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index efa9898..4c616ab 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4564,6 +4564,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.07.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE items MODIFY materials text;"); + print "Upgrade to $DBversion done alter items.material from varchar(10) to text \n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 019fa10..2a4a975 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -243,6 +243,7 @@ function verify_images() { Status Last seen Barcode + [% IF materials %]Materials Specified[% END %] [% IF ( volinfo ) %]Publication Details[% END %] [% IF ( itemdata_uri ) %]url[% END %] [% IF ( itemdata_copynumber ) %]Copy No.[% END %] @@ -372,6 +373,9 @@ function verify_images() { [% IF ( itemdata_copynumber ) %] [% itemloo.copynumber %] [% END %] + [% IF itemloo.materials %] + [% itemloo.materials %] + [% END %] [% IF ( itemdata_itemnotes ) %]
[% itemloo.itemnotes %]
[% END %] [% IF ( SpineLabelShowPrintOnBibDetails ) %] Print Label diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 36e7149..59bcb35 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -57,6 +57,7 @@
  • Item Callnumber: [% ITEM_DAT.itemcallnumber %] 
  • [% IF ( ITEM_DAT.copyvol ) %]
  • Copy / Vol : [% ITEM_DAT.copyvol %] 
  • [% END %] [% IF ( ITEM_DAT.replacementprice ) %]
  • Replacement Price: [% ITEM_DAT.replacementprice %] 
  • [% END %] + [% IF ITEM_DAT.materials %]
  • Materials Specified: [% ITEM_DAT.materials %]
  • [% END %]

    Statuses [% IF ( ITEM_DAT.status_advisory ) %]( [% IF ( ITEM_DAT.notforloantext ) %][% ITEM_DAT.notforloantext %] [% END %] -- 1.7.5.4 From srdjan at catalyst.net.nz Fri Dec 2 01:34:48 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Fri, 2 Dec 2011 13:34:48 +1300 Subject: [Koha-patches] [PATCH] bug_5211: LostItem() - added charge_fee param to control fee charging In-Reply-To: References: Message-ID: <1322786088-5727-1-git-send-email-srdjan@catalyst.net.nz> Pass charge_fee = yes wherever is LostItem() called, which effectively means tha there's no change. --- C4/Circulation.pm | 5 +++-- catalogue/updateitem.pl | 2 +- misc/cronjobs/longoverdue.pl | 2 +- tools/batchMod.pl | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index debef01..3d63224 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3021,7 +3021,7 @@ sub ReturnLostItem{ sub LostItem{ - my ($itemnumber, $mark_returned) = @_; + my ($itemnumber, $mark_returned, $charge_fee) = @_; my $dbh = C4::Context->dbh(); my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title @@ -3036,7 +3036,8 @@ sub LostItem{ # if a borrower lost the item, add a replacement cost to the their record if ( my $borrowernumber = $issues->{borrowernumber} ){ - C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}"); + C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}") + if $charge_fee; #FIXME : Should probably have a way to distinguish this from an item that really was returned. #warn " $issues->{'borrowernumber'} / $itemnumber "; MarkIssueReturned($borrowernumber,$itemnumber) if $mark_returned; diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 379c12c..7f93ee1 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -74,6 +74,6 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form ModItem($item_changes, $biblionumber, $itemnumber); -LostItem($itemnumber, 'MARK RETURNED') if $itemlost; +LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $itemlost; print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl index 2179d10..3843544 100755 --- a/misc/cronjobs/longoverdue.pl +++ b/misc/cronjobs/longoverdue.pl @@ -154,7 +154,7 @@ foreach my $startrange (sort keys %$lost) { printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose); if($confirm) { ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); - LostItem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); + LostItem($row->{'itemnumber'}, undef, 'CHARGE FEE') if( $charge && $charge eq $lostvalue); } $count++; } diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 701d421..94cfa69 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -177,7 +177,7 @@ if ($op eq "action") { UpdateMarcWith( $marcitem, $localmarcitem ); eval{ if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) { - LostItem($itemnumber, 'MARK RETURNED') if $item->{itemlost}; + LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $item->{itemlost}; } }; } -- 1.6.5 From srdjan at catalyst.net.nz Fri Dec 2 05:05:12 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Fri, 2 Dec 2011 17:05:12 +1300 Subject: [Koha-patches] [PATCH] bug_6489: Do not raise WrongTransfer if it is transrerring to reserve branch In-Reply-To: References: Message-ID: <1322798712-4615-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Circulation.pm | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index debef01..6a1e9cd 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1606,6 +1606,14 @@ sub AddReturn { # check if we have a transfer for this document my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} ); + # find reserves..... + # if we don't have a reserve with the status W, we launch the Checkreserves routine + my ($resfound, $resrec) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); + if ($resfound) { + $resrec->{'ResFound'} = $resfound; + $messages->{'ResFound'} = $resrec; + } + # if we have a transfer to do, we update the line of transfers with the datearrived if ($datesent) { if ( $tobranch eq $branch ) { @@ -1615,7 +1623,8 @@ sub AddReturn { $sth->execute( $item->{'itemnumber'} ); # if we have a reservation with valid transfer, we can set it's status to 'W' C4::Reserves::ModReserveStatus($item->{'itemnumber'}, 'W'); - } else { + } elsif ( !($resrec && $resrec->{branchcode} eq $tobranch) ) { + # Do not raise WrongTransfer if it is transrerring to reserve branch $messages->{'WrongTransfer'} = $tobranch; $messages->{'WrongTransferItem'} = $item->{'itemnumber'}; } @@ -1638,14 +1647,6 @@ sub AddReturn { $messages->{'Debarred'} = $debardate if ($debardate); } - # find reserves..... - # if we don't have a reserve with the status W, we launch the Checkreserves routine - my ($resfound, $resrec) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); - if ($resfound) { - $resrec->{'ResFound'} = $resfound; - $messages->{'ResFound'} = $resrec; - } - # update stats? # Record the fact that this book was returned. UpdateStats( -- 1.6.5 From alex.arnaud at biblibre.com Fri Dec 2 09:19:55 2011 From: alex.arnaud at biblibre.com (alex.arnaud at biblibre.com) Date: Fri, 2 Dec 2011 09:19:55 +0100 Subject: [Koha-patches] [PATCH] bug/7285 Use C4::Auth::checkpw instead of checkpw only Message-ID: <1322813995-29673-1-git-send-email-alex.arnaud@biblibre.com> From: Alex Arnaud --- C4/ILSDI/Services.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 90f741a..067afd7 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -315,7 +315,7 @@ sub AuthenticatePatron { my ($cgi) = @_; # Check if borrower exists, using a C4::Auth function... - unless( checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) { + unless( C4::Auth::checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) { return { code => 'PatronNotFound' }; } -- 1.7.0.4 From alex.arnaud at biblibre.com Fri Dec 2 10:53:35 2011 From: alex.arnaud at biblibre.com (alex.arnaud at biblibre.com) Date: Fri, 2 Dec 2011 10:53:35 +0100 Subject: [Koha-patches] [PATCH] Bug 7299 - Changes AddReserve parameters in HoldItem ILSDI service Message-ID: <1322819615-31160-1-git-send-email-alex.arnaud@biblibre.com> From: Alex Arnaud --- C4/ILSDI/Services.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 90f741a..0722888 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -700,8 +700,8 @@ sub HoldItem { } # Add the reserve - # $branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found - AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, $rank, undef, $title, $itemnumber, $found ); + # $branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$resdate,$expdate,$notes,$title,$checkitem,$found + AddReserve( $branch, $borrowernumber, $biblionumber, 'a', [$biblionumber], $rank, '', '', '', $title, $itemnumber, $found ); # Hashref building my $out; -- 1.7.0.4 From julian.maurice at biblibre.com Fri Dec 2 12:38:22 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 2 Dec 2011 12:38:22 +0100 Subject: [Koha-patches] [PATCH 1/4] Bug 6836: Add jQuery dataTables plugin Message-ID: <1322825905-18185-1-git-send-email-julian.maurice@biblibre.com> This patch add the javascript library, a CSS (and image files from datatables.net) and another javascript file which provides some extra features. It also add a Perl module C4::Utils::Datatables which provides helpful functions for server-side processing --- C4/Utils/DataTables.pm | 306 ++++++++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/css/datatables.css | 114 ++++++++ .../prog/en/includes/datatables-strings.inc | 17 + koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 281 ++++++++++++++++++ .../en/lib/jquery/plugins/jquery.dataTables.min.js | 153 ++++++++++ .../prog/img/datatables/back_disabled.jpg | Bin 0 -> 612 bytes .../prog/img/datatables/back_enabled.jpg | Bin 0 -> 807 bytes .../prog/img/datatables/forward_disabled.jpg | Bin 0 -> 635 bytes .../prog/img/datatables/forward_enabled.jpg | Bin 0 -> 852 bytes .../intranet-tmpl/prog/img/datatables/sort_asc.png | Bin 0 -> 263 bytes .../prog/img/datatables/sort_asc_disabled.png | Bin 0 -> 252 bytes .../prog/img/datatables/sort_both.png | Bin 0 -> 282 bytes .../prog/img/datatables/sort_desc.png | Bin 0 -> 260 bytes .../prog/img/datatables/sort_desc_disabled.png | Bin 0 -> 251 bytes koha-tmpl/opac-tmpl/prog/en/css/datatables.css | 114 ++++++++ .../prog/en/includes/datatables-strings.inc | 17 + koha-tmpl/opac-tmpl/prog/en/js/datatables.js | 281 ++++++++++++++++++ .../en/lib/jquery/plugins/jquery.dataTables.min.js | 153 ++++++++++ .../prog/images/datatables/back_disabled.jpg | Bin 0 -> 612 bytes .../prog/images/datatables/back_enabled.jpg | Bin 0 -> 807 bytes .../prog/images/datatables/forward_disabled.jpg | Bin 0 -> 635 bytes .../prog/images/datatables/forward_enabled.jpg | Bin 0 -> 852 bytes .../opac-tmpl/prog/images/datatables/sort_asc.png | Bin 0 -> 263 bytes .../prog/images/datatables/sort_asc_disabled.png | Bin 0 -> 252 bytes .../opac-tmpl/prog/images/datatables/sort_both.png | Bin 0 -> 282 bytes .../opac-tmpl/prog/images/datatables/sort_desc.png | Bin 0 -> 260 bytes .../prog/images/datatables/sort_desc_disabled.png | Bin 0 -> 251 bytes 27 files changed, 1436 insertions(+), 0 deletions(-) create mode 100644 C4/Utils/DataTables.pm create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/datatables.css create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/js/datatables.js create mode 100644 koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/back_disabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/back_enabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/forward_disabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/forward_enabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc_disabled.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_both.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc_disabled.png create mode 100644 koha-tmpl/opac-tmpl/prog/en/css/datatables.css create mode 100644 koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc create mode 100644 koha-tmpl/opac-tmpl/prog/en/js/datatables.js create mode 100644 koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/back_disabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/back_enabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/forward_disabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/forward_enabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc_disabled.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_both.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc_disabled.png diff --git a/C4/Utils/DataTables.pm b/C4/Utils/DataTables.pm new file mode 100644 index 0000000..901cafc --- /dev/null +++ b/C4/Utils/DataTables.pm @@ -0,0 +1,306 @@ +package C4::Utils::DataTables; + +# Copyright 2011 BibLibre +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use Modern::Perl; +require Exporter; + +use vars qw($VERSION @ISA @EXPORT); + +BEGIN { + $VERSION = 3.04, + + @ISA = qw(Exporter); + @EXPORT = qw(dt_build_orderby dt_build_having dt_get_params dt_build_query); +} + +=head1 NAME + +C4::Utils::DataTables - Utility subs for building query when DataTables source is AJAX + +=head1 SYNOPSYS + + use CGI; + use C4::Context; + use C4::Utils::DataTables; + + my $input = new CGI; + my $vars = $input->Vars; + + my $query = qq{ + SELECT surname, firstname + FROM borrowers + WHERE borrowernumber = ? + }; + my ($having, $having_params) = dt_build_having($vars); + $query .= $having; + $query .= dt_build_orderby($vars); + $query .= " LIMIT ?,? "; + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare($query); + $sth->execute( + $vars->{'borrowernumber'}, + @$having_params, + $vars->{'iDisplayStart'}, + $vars->{'iDisplayLength'} + ); + ... + +=head1 DESCRIPTION + + This module provide two utility functions to build a part of the SQL query, + depending on DataTables parameters. + One function build the 'ORDER BY' part, and the other the 'HAVING' part. + +=head1 FUNCTIONS + +=over 2 + +=item dt_build_orderby + + my $orderby = dt_build_orderby($dt_param); + + This function takes a reference to a hash containing DataTables parameters + and build the corresponding 'ORDER BY' clause. + This hash must contains the following keys: + + iSortCol_N, where N is a number from 0 to the number of columns to sort on minus 1 + + sSortDir_N is the sorting order ('asc' or 'desc) for the corresponding column + + mDataProp_N is a mapping between the column index, and the name of a SQL field + +=cut + +sub dt_build_orderby { + my $param = shift; + + my $i = 0; + my @orderbys; + while(exists $param->{'iSortCol_'.$i}){ + my $iSortCol = $param->{'iSortCol_'.$i}; + my $sSortDir = $param->{'sSortDir_'.$i}; + my $mDataProp = $param->{'mDataProp_'.$iSortCol}; + my @sort_fields = $param->{$mDataProp.'_sorton'} + ? split(' ', $param->{$mDataProp.'_sorton'}) + : (); + if(@sort_fields > 0) { + push @orderbys, "$_ $sSortDir" foreach (@sort_fields); + } else { + push @orderbys, "$mDataProp $sSortDir"; + } + $i++; + } + + my $orderby = " ORDER BY " . join(',', @orderbys) . " " if @orderbys; + return $orderby; +} + +=item dt_build_having + + my ($having, $having_params) = dt_build_having($dt_params) + + This function takes a reference to a hash containing DataTables parameters + and build the corresponding 'HAVING' clause. + This hash must contains the following keys: + + sSearch is the text entered in the global filter + + iColumns is the number of columns + + bSearchable_N is a boolean value that is true if the column is searchable + + mDataProp_N is a mapping between the column index, and the name of a SQL field + + sSearch_N is the text entered in individual filter for column N + +=back + +=cut + +sub dt_build_having { + my $param = shift; + + my @filters; + my @params; + + # Global filter + if($param->{'sSearch'}) { + my $sSearch = $param->{'sSearch'}; + my $i = 0; + my @gFilters; + my @gParams; + while($i < $param->{'iColumns'}) { + if($param->{'bSearchable_'.$i} eq 'true') { + my $mDataProp = $param->{'mDataProp_'.$i}; + my @filter_fields = $param->{$mDataProp.'_filteron'} + ? split(' ', $param->{$mDataProp.'_filteron'}) + : (); + if(@filter_fields > 0) { + foreach my $field (@filter_fields) { + push @gFilters, " $field LIKE ? "; + push @gParams, "%$sSearch%"; + } + } else { + push @gFilters, " $mDataProp LIKE ? "; + push @gParams, "%$sSearch%"; + } + } + $i++; + } + push @filters, " (" . join(" OR ", @gFilters) . ") "; + push @params, @gParams; + } + + # Individual filters + my $i = 0; + while($i < $param->{'iColumns'}) { + my $sSearch = $param->{'sSearch_'.$i}; + if($sSearch) { + my $mDataProp = $param->{'mDataProp_'.$i}; + my @filter_fields = $param->{$mDataProp.'_filteron'} + ? split(' ', $param->{$mDataProp.'_filteron'}) + : (); + if(@filter_fields > 0) { + my @localfilters; + foreach my $field (@filter_fields) { + push @localfilters, " $field LIKE ? "; + push @params, "%$sSearch%"; + } + push @filters, " ( ". join(" OR ", @localfilters) ." ) "; + } else { + push @filters, " $mDataProp LIKE ? "; + push @params, "%$sSearch%"; + } + } + $i++; + } + + return (\@filters, \@params); +} + +=item dt_get_params + + my %dtparam = = dt_get_params( $input ) + + This function takes a reference to a new CGI object. + + It prepares a hash containing Datatable parameters. + +=back + +=cut +sub dt_get_params { + my $input = shift; + my %dtparam; + my $vars = $input->Vars; + + foreach(qw/ iDisplayStart iDisplayLength iColumns sSearch bRegex iSortingCols sEcho /) { + $dtparam{$_} = $input->param($_); + } + foreach(grep /(?:_sorton|_filteron)$/, keys %$vars) { + $dtparam{$_} = $vars->{$_}; + } + for(my $i=0; $i<$dtparam{'iColumns'}; $i++) { + foreach(qw/ bSearchable sSearch bRegex bSortable iSortCol mDataProp sSortDir /) { + my $key = $_ . '_' . $i; + $dtparam{$key} = $input->param($key) if defined $input->param($key); + } + } + return %dtparam; +} + +=item dt_build_query_simple + + my ( $query, $params )= dt_build_query_simple( $value, $field ) + + This function takes a value and a field (table.field). + + It returns (undef, []) if not $value. + Else, returns a SQL where string and an arrayref containing parameters + for the execute method of the statement. + +=back + +=cut +sub dt_build_query_simple { + my ( $value, $field ) = @_; + my $query; + my @params; + if( $value ) { + $query .= " AND $field = ? "; + push @params, $value; + } + return ( $query, \@params ); +} + +=item dt_build_query_dates + + my ( $query, $params )= dt_build_query_dates( $datefrom, $dateto, $field) + + This function takes a datefrom, dateto and a field (table.field). + + It returns (undef, []) if not $value. + Else, returns a SQL where string and an arrayref containing parameters + for the execute method of the statement. + +=back + +=cut +sub dt_build_query_dates { + my ( $datefrom, $dateto, $field ) = @_; + my $query; + my @params; + if ( $datefrom ) { + $query .= " AND $field >= ? "; + push @params, C4::Dates->new($datefrom)->output('iso'); + } + if ( $dateto ) { + $query .= " AND $field <= ? "; + push @params, C4::Dates->new($dateto)->output('iso'); + } + return ( $query, \@params ); +} + +=item dt_build_query + + my ( $query, $filter ) = dt_build_query( $type, @params ) + + This function takes a value and a list of parameters. + + It calls dt_build_query_dates or dt_build_query_simple fonction of $type. + + $type can be 'simple' or 'rage_dates'. + +=back + +=cut +sub dt_build_query { + my ( $type, @params ) = @_; + given ( $type ) { + when ( /simple/ ) { + return dt_build_query_simple( @params ); + } + when ( /range_dates/ ) { + return dt_build_query_dates( @params ); + } + } +} + +1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css new file mode 100644 index 0000000..e069b93 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css @@ -0,0 +1,114 @@ +input.search_init { + color: #999999; +} +.sorting_asc { + padding-right: 19px; + background: url("../../img/datatables/sort_asc.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc { + padding-right: 19px; + background: url("../../img/datatables/sort_desc.png") no-repeat scroll right center #EEEEEE; +} +.sorting { + padding-right: 19px; + background: url("../../img/datatables/sort_both.png") no-repeat scroll right center #EEEEEE; +} +.sorting_asc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_disabled { + padding-right: 19px; + background-color: #EEEEEE; +} + +table.display { + width: 100%; +} +table.display thead th { + border-bottom: 1px solid black; + cursor: pointer; + font-weight: bold; + padding: 3px 18px 3px 10px; +} +.dataTables_wrapper { + clear: both; + position: relative; +} +.dataTables_processing { + background-color: white; + border: 1px solid #DDDDDD; + color: #999999; + font-size: 14px; + height: 30px; + left: 50%; + margin-left: -125px; + margin-top: -15px; + padding: 14px 0 2px; + position: fixed; + text-align: center; + top: 50%; + width: 250px; +} +.dataTables_info { + float: left; + width: 60%; +} +.dataTables_paginate { + float: right; + text-align: right; + width: 44px; +} +.paging_full_numbers { + height: 22px; + line-height: 22px; + width: 400px; +} +.paging_full_numbers span.paginate_button, + .paging_full_numbers span.paginate_active { + border: 1px solid #aaa; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + padding: 2px 5px; + margin: 0 3px; + cursor: pointer; + *cursor: hand; +} + +.paging_full_numbers span.paginate_button { + background-color: #ddd; +} + +.paging_full_numbers span.paginate_button:hover { + background-color: #ccc; +} + +.paging_full_numbers span.paginate_active { + background-color: #99B3FF; +} +.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { + float: left; + height: 19px; + margin-left: 3px; + width: 19px; +} +.paginate_disabled_previous { + background-image: url("../../img/datatables/back_disabled.jpg"); +} +.paginate_enabled_previous { + background-image: url("../../img/datatables/back_enabled.jpg"); +} +.paginate_disabled_next { + background-image: url("../../img/datatables/forward_disabled.jpg"); +} +.paginate_enabled_next { + background-image: url("../../img/datatables/forward_enabled.jpg"); +} +.spacer { + clear: both; + height: 20px; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc new file mode 100644 index 0000000..183f511 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc @@ -0,0 +1,17 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js new file mode 100644 index 0000000..38dd1d5 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js @@ -0,0 +1,281 @@ +// These default options are for translation but can be used +// for any other datatables settings +// MSG_DT_* variables comes from datatables-strings.inc +// To use it, write: +// $("#table_id").dataTable($.extend(true, {}, dataTableDefaults, { +// // other settings +// } ) ); +var dataTablesDefaults = { + "oLanguage": { + "oPaginate": { + "sFirst" : window.MSG_DT_FIRST || "First", + "sLast" : window.MSG_DT_LAST || "Last", + "sNext" : window.MSG_DT_NEXT || "Next", + "sPrevious" : window.MSG_DT_PREVIOUS || "Previous" + }, + "sEmptyTable" : window.MSG_DT_EMPTY_TABLE || "No data available in table", + "sInfo" : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries", + "sInfoEmpty" : window.MSG_DT_INFO_EMPTY || "No entries to show", + "sInfoFiltered" : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)", + "sLengthMenu" : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries", + "sLoadingRecords" : window.MSG_DT_LOADING_RECORDS || "Loading...", + "sProcessing" : window.MSG_DT_PROCESSING || "Processing...", + "sSearch" : window.MSG_DT_SEARCH || "Search:", + "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" + } +}; + + +// Return an array of string containing the values of a particular column +$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { + // check that we have a column id + if ( typeof iColumn == "undefined" ) return new Array(); + // by default we only wany unique data + if ( typeof bUnique == "undefined" ) bUnique = true; + // by default we do want to only look at filtered data + if ( typeof bFiltered == "undefined" ) bFiltered = true; + // by default we do not wany to include empty values + if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true; + // list of rows which we're going to loop through + var aiRows; + // use only filtered rows + if (bFiltered == true) aiRows = oSettings.aiDisplay; + // use all rows + else aiRows = oSettings.aiDisplayMaster; // all row numbers + + // set up data array + var asResultData = new Array(); + for (var i=0,c=aiRows.length; i -1) continue; + // else push the value onto the result data array + else asResultData.push(sValue); + } + return asResultData; +} + +// List of unbind keys (Ctrl, Alt, Direction keys, etc.) +// These keys must not launch filtering +var blacklist_keys = new Array(0, 16, 17, 18, 37, 38, 39, 40); + +// Set a filtering delay for global search field +jQuery.fn.dataTableExt.oApi.fnSetFilteringDelay = function ( oSettings, iDelay ) { + /* + * Inputs: object:oSettings - dataTables settings object - automatically given + * integer:iDelay - delay in milliseconds + * Usage: $('#example').dataTable().fnSetFilteringDelay(250); + * Author: Zygimantas Berziunas (www.zygimantas.com) and Allan Jardine + * License: GPL v2 or BSD 3 point style + * Contact: zygimantas.berziunas /AT\ hotmail.com + */ + var + _that = this, + iDelay = (typeof iDelay == 'undefined') ? 250 : iDelay; + + this.each( function ( i ) { + $.fn.dataTableExt.iApiIndex = i; + var + $this = this, + oTimerId = null, + sPreviousSearch = null, + anControl = $( 'input', _that.fnSettings().aanFeatures.f ); + + anControl.unbind( 'keyup.DT' ).bind( 'keyup.DT', function(event) { + var $$this = $this; + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( $(this).val() ); + } else { + if (sPreviousSearch === null || sPreviousSearch != anControl.val()) { + window.clearTimeout(oTimerId); + sPreviousSearch = anControl.val(); + oTimerId = window.setTimeout(function() { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( anControl.val() ); + }, iDelay); + } + } + }); + + return this; + } ); + return this; +} + +// Add a filtering delay on general search and on all input (with a class 'filter') +jQuery.fn.dataTableExt.oApi.fnAddFilters = function ( oSettings, sClass, iDelay ) { + var table = this; + this.fnSetFilteringDelay(iDelay); + var filterTimerId = null; + $("input."+sClass).keyup(function(event) { + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + table.fnFilter( $(this).val(), $(this).attr('data-column_num') ); + } else { + window.clearTimeout(filterTimerId); + var input = this; + filterTimerId = window.setTimeout(function() { + table.fnFilter($(input).val(), $(input).attr('data-column_num')); + }, iDelay); + } + }); +} + +// Useful if you want to filter on dates with 2 inputs (start date and end date) +// You have to include calendar.inc to use it +function dt_add_rangedate_filter(begindate_id, enddate_id, dateCol) { + $.fn.dataTableExt.afnFiltering.push( + function( oSettings, aData, iDataIndex ) { + + var beginDate = Date_from_syspref($("#"+begindate_id).val()).getTime(); + var endDate = Date_from_syspref($("#"+enddate_id).val()).getTime(); + + var data = Date_from_syspref(aData[dateCol]).getTime(); + + if ( !parseInt(beginDate) && ! parseInt(endDate) ) { + return true; + } + else if ( beginDate <= data && !parseInt(endDate) ) { + return true; + } + else if ( data <= endDate && !parseInt(beginDate) ) { + return true; + } + else if ( beginDate <= data && data <= endDate) { + return true; + } + return false; + } + ); +} + +//Sorting for dates (uk format) +function dt_add_type_uk_date() { + jQuery.fn.dataTableExt.aTypes.unshift( + function ( sData ) + { + if (sData.match(/(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20|21)\d\d/)) + { + return 'uk_date'; + } + return null; + } + ); + + jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }; + + jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }; +} + +// Sorting on html contains +// bar sort on 'bar' +function dt_overwrite_html_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['html-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['html-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Sorting on string without accentued characters +function dt_overwrite_string_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['string-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['string-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Replace a node with a html and js contain. +function replace_html( original_node, type ) { + switch ( $(original_node).attr('data-type') ) { + case "range_dates": + var id = $(original_node).attr("data-id"); + var format = $(original_node).attr("data-format"); + replace_html_date( original_node, id, format ); + break; + default: + alert("_(This node can't be replaced)"); + } +} + +// Replace a node with a "From [date] To [date]" element +// Used on tfoot > td +function replace_html_date( original_node, id, format ) { + var node = $('' + _("From") + '×
    ' + _("To") + '×'); + $(original_node).replaceWith(node); + var script = document.createElement( 'script' ); + script.type = 'text/javascript'; + var script_content = "Calendar.setup({"; + script_content += " inputField: \"" + id + "from\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "from\","; + script_content += " onClose: function(){ $(\"#" + id + "from\").change(); this.hide();}"; + script_content += " });"; + script_content += " Calendar.setup({"; + script_content += " inputField: \"" + id + "to\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "to\","; + script_content += " onClose: function(){ $(\"#" + id + "to\").change(); this.hide();}"; + script_content += " });"; + script.text = script_content; + $(original_node).append( script ); +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js new file mode 100644 index 0000000..9035a2e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js @@ -0,0 +1,153 @@ +/* + * File: jquery.dataTables.min.js + * Version: 1.8.1 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Info: www.datatables.net + * + * Copyright 2008-2010 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + */ +(function(i,wa,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var o=i.fn.dataTableExt;o.sVersion="1.8.1";o.sErrMode="alert";o.iApiIndex=0;o.oApi={};o.afnFiltering=[];o.aoFeatures=[];o.ofnSearch={};o.afnSortData=[];o.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", +sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", +sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};o.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left", +sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled", +sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default", +sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll", +sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};o.oPagination={two_button:{fnInit:function(g,l,r){var s,w,y;if(g.bJUI){s=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev; +s.appendChild(y)}else{s=p.createElement("div");w=p.createElement("div")}s.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;s.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(s);l.appendChild(w);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(s).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false}); +if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,r=0,s=l.length;r=w-s){s=w-r+1;x=w}else{s=y-Math.ceil(r/2)+1;x=s+r-1}for(r=s;r<=x;r++)G+=y!=r?''+r+"":''+r+"";x=g.aanFeatures.p;var z,Y=function(L){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);L.preventDefault()},V=function(){return false};r=0;for(s=x.length;rl?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return gl?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g< +l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return gl?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l- +g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};o.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,r=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var s=1;s")!=-1)return"html";return null}];o.fnVersionCheck=function(g){var l=function(x,v){for(;x.length=parseInt(w,10)};o._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal= +function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance= +this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table", +sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false, +bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button"; +this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})}; +this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;dtr>th",a.nTFoot).addClass(a.oClasses.sFooterTH);if(a.nTFoot!==null){c=S(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!za(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h=h;htr",a.nTHead)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback== +"function"&&a.fnFooterCallback.call(a.oInstance,i(">tr",a.nTFoot)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function ba(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);else{E(a);C(a)}}function za(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d,f;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ha(a)}); +c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:-1});for(f=0;f")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ca(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Da(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ea(a);e=1}else if(h=="t"){f=Fa(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ga(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=Ha(a);e=1}else if(o.aoFeatures.length!== +0){j=o.aoFeatures;t=0;for(k=j.length;tcaption",a.nTable);h=0;for(k=d.length;hi(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true); +a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var O=S(a,h);f=0;for(e=O.length;ff-a.oScroll.iBarWidth)a.nTable.style.width=u(f)}else a.nTable.style.width=u(f);f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){d.style.width=u(f+a.oScroll.iBarWidth);b.parentNode.style.width=u(f+a.oScroll.iBarWidth)}e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop= +"0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},j,k);i(j).height(0)}P(function(B){B.innerHTML="";B.style.width=u(I.shift())},h);a.nTFoot!==null&&P(function(B){B.innerHTML= +"";B.style.width=u(I.shift())},j);if(i(a.nTable).outerWidth()d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight'):b===""?'':b+' '; +var c=p.createElement("div");c.className=a.oClasses.sFilter;c.innerHTML="";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f=0;d--){f=ma(H(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Ka(a,b,c,d,f){var e=la(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(o.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length> +b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);ka(a,1);for(c=0;c/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=o.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!== +null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c=h)for(b=0;b=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart= +0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function Ga(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Na,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Na(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j= +a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_", +e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]== +"object"){c=0;for(d=a.aLengthMenu[0].length;c'+a.aLengthMenu[1][c]+""}else{c=0;for(d=a.aLengthMenu.length;c'+a.aLengthMenu[c]+""}b+="";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");f.className=a.oClasses.sLength;f.innerHTML="";i('select option[value="'+ +a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;ca.aiDisplay.length|| +a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Oa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=u(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th",a.nTHead);for(e=0;etd",b);h=S(a,e);for(e=d=0;e0)a.aoColumns[e].sWidth=u(c);d++}a.nTable.style.width=u(i(b).outerWidth());b.parentNode.removeChild(b)}}function Qa(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=u(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=u(i(b).outerWidth())}function Pa(a,b){var c= +Ra(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=H(a,c,b,"");return d}return Q(a,c)[b]}function Ra(a,b){for(var c=-1,d=-1,f=0;f/g,"");if(e.length>c){c=e.length;d=f}}return d}function u(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+"px"}function Va(a,b){if(a.length!=b.length)return 1;for(var c= +0;cb&&a[d]--;c!=-1&&a.splice(c,1)}function Ba(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d4096){a=p.cookie.split(";");for(var j=0,k=a.length;j=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[o.iApiIndex]);ia(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[o.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=X(d);if(typeof b.jquery!="undefined"||typeof b== +"object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[o.iApiIndex]),c=0;c=X(d);if(!j)for(f=a;ftr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();if(a.nTable!=a.nTHead.parentNode){i(">thead",a.nTable).remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&& +a.nTable!=a.nTFoot.parentNode){i(">tfoot",a.nTable).remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];T(a);i($(a)).removeClass(a.asStripClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oJUIClasses.sSortableAsc,o.oJUIClasses.sSortableDesc,o.oJUIClasses.sSortableNone].join(" "));i("th span."+o.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e= +i("div."+o.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oStdClasses.sSortableAsc,o.oStdClasses.sSortableDesc,o.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;dtr:even",c).addClass(a.asDestoryStrips[0]);i(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;dt<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ua();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart= +g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ta(e,g);e.aoDrawCallback.push({fn:sa,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!== +""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(t){y(e,t,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=i(">tbody>tr",this);a=0;for(b=e.asStripClasses.length;a=0;a--){var m=g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c=0){for(;e.aoColumns.length<=m[c];)G(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]== +"number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&& +typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;cthead",this);if(a.length===0){a=[p.createElement("thead")];this.appendChild(a[0])}e.nTHead=a[0];a=i(">tbody",this);if(a.length===0){a=[p.createElement("tbody")];this.appendChild(a[0])}e.nTBody=a[0];a=i(">tfoot",this);if(a.length>0){e.nTFoot=a[0];W(e.aoFooter,e.nTFoot)}if(j)for(a=0;aC5UDGKfoZ!!63{a%*-grz$D1XEXer(2tyUn z+02YUSHb}sD?0}l&^EXLguy7lz`(-H!phDIlVN0HVHIR%V-ON%S2Pq6HFFG{Xryc+ zmRQ($@S#&sld*HEn>dFcBLmQ_$YwDLDjGT#PW*q1fd^^;oX+iLI)z|@;wX;U8Xr> zT8Qgxn;R!Cottl}#(8Ri${a3d=J*$R5qBRbK9bRJe*4BYwq9(uIM4mLS9%TSY?*y6 zE==owYH)vf>dq6(Uzum+IyVJqc3N&dRPD57vW(=l(=(DZ-K_!LSx zwPk@>bN at 4B-OI9gCf>Wc_;CDAS%c at BJZ}kBlbDz~@y-*&Y^_U+@};q`xNUthN} On^Cj9W}Eu@|2F})$f79# literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/back_enabled.jpg b/koha-tmpl/intranet-tmpl/prog/img/datatables/back_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a6d764c79c7a2047b6bf65bf9d96fcafd5161e38 GIT binary patch literal 807 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2*U&h z1}0{pBN2d|gO!bok%5r~RhW^Pm5qg+Lx6#Sm5Gs^od+h%$i&RTD#*spplB#0EW!~u z(MZ`u)XXulu<_tSr=TWdXR%Z_aiE1jZ7eM8Fl&IpCkWK1$Y$s$#2&a&N#sM~M5iWU z<^Q)Bc$gW1&SMs2uxGfw`}E06etb^r9k|jMc at Dlk(IlSD-Wwx*G{%4ThHhR%HnTsw zbu3z!=BtbC=-In5f5nt;je{+vrKZdWckk$U`c^FEYC6}Jn=lG)17QB>6z3khm7PHhg<-pEGSO0F>VA}N6`w53!8pr$>MbUW| zMEsFn=(%w+^5v0yp7Lmb+~3PpI4(#G~bQ$y_;t)oo+U5`bnSHZcn){CH~m7Ys2rz z2!R at xgGrCtcPz?eOPOzKr2P26p~(mTGjR1-c3?psA>uUGsyt|R2Ts3~!B zN71DGSrW%W*`w8#2{O$LX)%%8*<4Ycyr;tN(Hm8|M=_HtvR>P P+Rcr(b5Xx$|NkZcT0jT? literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_disabled.jpg b/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_disabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..28a9dc53fa232919299ac980dc9b61167c1868bd GIT binary patch literal 635 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tySE z1JEp>E8&2Nm4%I+g9~UMTnNHo6kuRrVP;|B;)Y2uGBL9Vva&GlzGLeh=CM*_u2I6%$1L~6;-1yGa|?*FvavCW+Av>{Flt>+*?d?iZ`9)^O?_H|D3t8;Og6lD<#WHQvW(mo1ETsD>A at mr8@sqg(?1R z%d at qrmWLWmIn1#pQuo}{brVW*C8t%EDXbOt_DabwXgGW3;wDX1;~7hWrYL+ZX=qre z&-y^2q0zm?-FJb#(AWJTHOJ-3`S`D|JEhzC{KvY_h0kZinXP-?w!g_L at p#JQO^!z$ mYCgVwS7#SryXs@?>&L&t^Z(SozHVt~@Z#>58}s)6zX<@qORf(9 literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_enabled.jpg b/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..598c075f13ab0e4bbe05a4eeea7cf777ba73cf03 GIT binary patch literal 852 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tywO z0~0eN(3Nn&%Fe>Z!NthH$ciG&$iU3P%Em6hz`z1zu=B#yGcqx=2(q#<2(fb*3M-3< zDh5t8G7&R#Oe}1C=oHjs?40T*F37+LbR`oj+(bq}CT0c}Rz*W0Hg?Cv#)(EB0yioN zi~PUEzyov)lOVGogFVA5dn3uE%Z<*rn&ugY^FIG9<<=87L*?mOy^~u`Rq(Eg+UDw^ z@^Uh}zJ$t~P2YpRT#sm2p`oEt8zJ-EBRfY;>b?DxZo!24Z)Q(O&}!Mbt}27`dKa(x zr)AHkZg5MjKa&4$syaupXWNXgp32dQs_rj-?|M=Q9pN^hZg^mV7=UWs>}D5 z$40(ME7Q1T4h8p}ZJ8O!G-Xk84;P~#ci!&o`A5I3kG at gLm*VlJbn%kvSqIh?3Y?HQ zAX0NL>XIkpf=MN83*!%}9-aN5)p7^py2Am>F9gW&pFSp#V0dxX#ZPW;UoD(gaI at 8E z(rNQz1DBIiM13!LtZ|85lHB@$wW~n0fhRz-$?R&m{@z;uI}N|35As;}zdXB<I#+N1k=r*G-&mI78vJ_Ezs!yIV%J}l7d*c9>7Bn;xyLT84V&`$ z at 9WMTAJ6DZyR)~=FS6P2e3MDv7lHB>{C&1H^7EJ9PIf=EdUwUYtGE9%$X9(m*ZWLf M_rC2^{;K~s0TRp{r2qf` literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc.png new file mode 100644 index 0000000000000000000000000000000000000000..a56d0e21902ce620cd57f87fa58a6d3e804135cf GIT binary patch literal 263 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl&hzUV at SoVE9Xw~GAQscA1s)^?0*rXqM}DeLv7?|BU8z at QCOGupVzP9Hek5&L+Gnl%BD>~0~tJB{an^LB{Ts5b0m7= literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc_disabled.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..b7e621ef1c68da839ce077cec6e201a55c1ba168 GIT binary patch literal 252 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnW*L z7srr_TUXBQ7GeV6G?@}f$7k6Jhw{qGm$-QDzD`qrDaZ3s$b2XF;fBBPU nqjNDy&Nw~puHFA+-v&m8`?>-yUFVHK{$ucT^>bP0l+XkKhw^g= literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_both.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_both.png new file mode 100644 index 0000000000000000000000000000000000000000..839ac4bb5b0b414834c950de9deafff6dd94ed2d GIT binary patch literal 282 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0K#2rT z7srr_TRjsz`4|*ASOSl%eg6Ob+(JtRwX|O at S}a^IESQCgTe~DWM4fR9b+X literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc.png new file mode 100644 index 0000000000000000000000000000000000000000..90b295159df995329b3a84340d32761f3d1dbade GIT binary patch literal 260 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl#{26V at SoVqz8vtc$~v}dc~O{CLEF2anNavMpdMP)0v(X&o(k0opIq!LdvtJ wj~up7 at 0`wiSoe($&y07EkGxK6U|?nlJSz0{?wJWUfu=Edy85}Sb4q9e0C9MGu>b%7 literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc_disabled.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..2409653dc94cd21a281a31c0e3819323b84704b7 GIT binary patch literal 251 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnX`r z7srr_TS*TNvhX;E^>j)zMNBv%VR68zN24n8K+>5N&kUJbBQCy4c=qgBiu3mAQ)hD? n)_oJhGvi(If!Apb49pB3GXz|UGFKJ=4P)?h^>bP0l+XkK*57ji literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/en/css/datatables.css b/koha-tmpl/opac-tmpl/prog/en/css/datatables.css new file mode 100644 index 0000000..e069b93 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/css/datatables.css @@ -0,0 +1,114 @@ +input.search_init { + color: #999999; +} +.sorting_asc { + padding-right: 19px; + background: url("../../img/datatables/sort_asc.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc { + padding-right: 19px; + background: url("../../img/datatables/sort_desc.png") no-repeat scroll right center #EEEEEE; +} +.sorting { + padding-right: 19px; + background: url("../../img/datatables/sort_both.png") no-repeat scroll right center #EEEEEE; +} +.sorting_asc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_disabled { + padding-right: 19px; + background-color: #EEEEEE; +} + +table.display { + width: 100%; +} +table.display thead th { + border-bottom: 1px solid black; + cursor: pointer; + font-weight: bold; + padding: 3px 18px 3px 10px; +} +.dataTables_wrapper { + clear: both; + position: relative; +} +.dataTables_processing { + background-color: white; + border: 1px solid #DDDDDD; + color: #999999; + font-size: 14px; + height: 30px; + left: 50%; + margin-left: -125px; + margin-top: -15px; + padding: 14px 0 2px; + position: fixed; + text-align: center; + top: 50%; + width: 250px; +} +.dataTables_info { + float: left; + width: 60%; +} +.dataTables_paginate { + float: right; + text-align: right; + width: 44px; +} +.paging_full_numbers { + height: 22px; + line-height: 22px; + width: 400px; +} +.paging_full_numbers span.paginate_button, + .paging_full_numbers span.paginate_active { + border: 1px solid #aaa; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + padding: 2px 5px; + margin: 0 3px; + cursor: pointer; + *cursor: hand; +} + +.paging_full_numbers span.paginate_button { + background-color: #ddd; +} + +.paging_full_numbers span.paginate_button:hover { + background-color: #ccc; +} + +.paging_full_numbers span.paginate_active { + background-color: #99B3FF; +} +.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { + float: left; + height: 19px; + margin-left: 3px; + width: 19px; +} +.paginate_disabled_previous { + background-image: url("../../img/datatables/back_disabled.jpg"); +} +.paginate_enabled_previous { + background-image: url("../../img/datatables/back_enabled.jpg"); +} +.paginate_disabled_next { + background-image: url("../../img/datatables/forward_disabled.jpg"); +} +.paginate_enabled_next { + background-image: url("../../img/datatables/forward_enabled.jpg"); +} +.spacer { + clear: both; + height: 20px; +} diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc b/koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc new file mode 100644 index 0000000..183f511 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc @@ -0,0 +1,17 @@ + diff --git a/koha-tmpl/opac-tmpl/prog/en/js/datatables.js b/koha-tmpl/opac-tmpl/prog/en/js/datatables.js new file mode 100644 index 0000000..38dd1d5 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/js/datatables.js @@ -0,0 +1,281 @@ +// These default options are for translation but can be used +// for any other datatables settings +// MSG_DT_* variables comes from datatables-strings.inc +// To use it, write: +// $("#table_id").dataTable($.extend(true, {}, dataTableDefaults, { +// // other settings +// } ) ); +var dataTablesDefaults = { + "oLanguage": { + "oPaginate": { + "sFirst" : window.MSG_DT_FIRST || "First", + "sLast" : window.MSG_DT_LAST || "Last", + "sNext" : window.MSG_DT_NEXT || "Next", + "sPrevious" : window.MSG_DT_PREVIOUS || "Previous" + }, + "sEmptyTable" : window.MSG_DT_EMPTY_TABLE || "No data available in table", + "sInfo" : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries", + "sInfoEmpty" : window.MSG_DT_INFO_EMPTY || "No entries to show", + "sInfoFiltered" : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)", + "sLengthMenu" : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries", + "sLoadingRecords" : window.MSG_DT_LOADING_RECORDS || "Loading...", + "sProcessing" : window.MSG_DT_PROCESSING || "Processing...", + "sSearch" : window.MSG_DT_SEARCH || "Search:", + "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" + } +}; + + +// Return an array of string containing the values of a particular column +$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { + // check that we have a column id + if ( typeof iColumn == "undefined" ) return new Array(); + // by default we only wany unique data + if ( typeof bUnique == "undefined" ) bUnique = true; + // by default we do want to only look at filtered data + if ( typeof bFiltered == "undefined" ) bFiltered = true; + // by default we do not wany to include empty values + if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true; + // list of rows which we're going to loop through + var aiRows; + // use only filtered rows + if (bFiltered == true) aiRows = oSettings.aiDisplay; + // use all rows + else aiRows = oSettings.aiDisplayMaster; // all row numbers + + // set up data array + var asResultData = new Array(); + for (var i=0,c=aiRows.length; i -1) continue; + // else push the value onto the result data array + else asResultData.push(sValue); + } + return asResultData; +} + +// List of unbind keys (Ctrl, Alt, Direction keys, etc.) +// These keys must not launch filtering +var blacklist_keys = new Array(0, 16, 17, 18, 37, 38, 39, 40); + +// Set a filtering delay for global search field +jQuery.fn.dataTableExt.oApi.fnSetFilteringDelay = function ( oSettings, iDelay ) { + /* + * Inputs: object:oSettings - dataTables settings object - automatically given + * integer:iDelay - delay in milliseconds + * Usage: $('#example').dataTable().fnSetFilteringDelay(250); + * Author: Zygimantas Berziunas (www.zygimantas.com) and Allan Jardine + * License: GPL v2 or BSD 3 point style + * Contact: zygimantas.berziunas /AT\ hotmail.com + */ + var + _that = this, + iDelay = (typeof iDelay == 'undefined') ? 250 : iDelay; + + this.each( function ( i ) { + $.fn.dataTableExt.iApiIndex = i; + var + $this = this, + oTimerId = null, + sPreviousSearch = null, + anControl = $( 'input', _that.fnSettings().aanFeatures.f ); + + anControl.unbind( 'keyup.DT' ).bind( 'keyup.DT', function(event) { + var $$this = $this; + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( $(this).val() ); + } else { + if (sPreviousSearch === null || sPreviousSearch != anControl.val()) { + window.clearTimeout(oTimerId); + sPreviousSearch = anControl.val(); + oTimerId = window.setTimeout(function() { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( anControl.val() ); + }, iDelay); + } + } + }); + + return this; + } ); + return this; +} + +// Add a filtering delay on general search and on all input (with a class 'filter') +jQuery.fn.dataTableExt.oApi.fnAddFilters = function ( oSettings, sClass, iDelay ) { + var table = this; + this.fnSetFilteringDelay(iDelay); + var filterTimerId = null; + $("input."+sClass).keyup(function(event) { + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + table.fnFilter( $(this).val(), $(this).attr('data-column_num') ); + } else { + window.clearTimeout(filterTimerId); + var input = this; + filterTimerId = window.setTimeout(function() { + table.fnFilter($(input).val(), $(input).attr('data-column_num')); + }, iDelay); + } + }); +} + +// Useful if you want to filter on dates with 2 inputs (start date and end date) +// You have to include calendar.inc to use it +function dt_add_rangedate_filter(begindate_id, enddate_id, dateCol) { + $.fn.dataTableExt.afnFiltering.push( + function( oSettings, aData, iDataIndex ) { + + var beginDate = Date_from_syspref($("#"+begindate_id).val()).getTime(); + var endDate = Date_from_syspref($("#"+enddate_id).val()).getTime(); + + var data = Date_from_syspref(aData[dateCol]).getTime(); + + if ( !parseInt(beginDate) && ! parseInt(endDate) ) { + return true; + } + else if ( beginDate <= data && !parseInt(endDate) ) { + return true; + } + else if ( data <= endDate && !parseInt(beginDate) ) { + return true; + } + else if ( beginDate <= data && data <= endDate) { + return true; + } + return false; + } + ); +} + +//Sorting for dates (uk format) +function dt_add_type_uk_date() { + jQuery.fn.dataTableExt.aTypes.unshift( + function ( sData ) + { + if (sData.match(/(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20|21)\d\d/)) + { + return 'uk_date'; + } + return null; + } + ); + + jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }; + + jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }; +} + +// Sorting on html contains +// bar sort on 'bar' +function dt_overwrite_html_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['html-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['html-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Sorting on string without accentued characters +function dt_overwrite_string_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['string-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['string-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Replace a node with a html and js contain. +function replace_html( original_node, type ) { + switch ( $(original_node).attr('data-type') ) { + case "range_dates": + var id = $(original_node).attr("data-id"); + var format = $(original_node).attr("data-format"); + replace_html_date( original_node, id, format ); + break; + default: + alert("_(This node can't be replaced)"); + } +} + +// Replace a node with a "From [date] To [date]" element +// Used on tfoot > td +function replace_html_date( original_node, id, format ) { + var node = $('' + _("From") + '×
    ' + _("To") + '×'); + $(original_node).replaceWith(node); + var script = document.createElement( 'script' ); + script.type = 'text/javascript'; + var script_content = "Calendar.setup({"; + script_content += " inputField: \"" + id + "from\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "from\","; + script_content += " onClose: function(){ $(\"#" + id + "from\").change(); this.hide();}"; + script_content += " });"; + script_content += " Calendar.setup({"; + script_content += " inputField: \"" + id + "to\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "to\","; + script_content += " onClose: function(){ $(\"#" + id + "to\").change(); this.hide();}"; + script_content += " });"; + script.text = script_content; + $(original_node).append( script ); +} diff --git a/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js new file mode 100644 index 0000000..9035a2e --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js @@ -0,0 +1,153 @@ +/* + * File: jquery.dataTables.min.js + * Version: 1.8.1 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Info: www.datatables.net + * + * Copyright 2008-2010 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + */ +(function(i,wa,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var o=i.fn.dataTableExt;o.sVersion="1.8.1";o.sErrMode="alert";o.iApiIndex=0;o.oApi={};o.afnFiltering=[];o.aoFeatures=[];o.ofnSearch={};o.afnSortData=[];o.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", +sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", +sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};o.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left", +sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled", +sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default", +sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll", +sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};o.oPagination={two_button:{fnInit:function(g,l,r){var s,w,y;if(g.bJUI){s=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev; +s.appendChild(y)}else{s=p.createElement("div");w=p.createElement("div")}s.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;s.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(s);l.appendChild(w);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(s).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false}); +if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,r=0,s=l.length;r=w-s){s=w-r+1;x=w}else{s=y-Math.ceil(r/2)+1;x=s+r-1}for(r=s;r<=x;r++)G+=y!=r?''+r+"":''+r+"";x=g.aanFeatures.p;var z,Y=function(L){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);L.preventDefault()},V=function(){return false};r=0;for(s=x.length;rl?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return gl?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g< +l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return gl?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l- +g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};o.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,r=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var s=1;s")!=-1)return"html";return null}];o.fnVersionCheck=function(g){var l=function(x,v){for(;x.length=parseInt(w,10)};o._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal= +function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance= +this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table", +sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false, +bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button"; +this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})}; +this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;dtr>th",a.nTFoot).addClass(a.oClasses.sFooterTH);if(a.nTFoot!==null){c=S(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!za(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h=h;htr",a.nTHead)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback== +"function"&&a.fnFooterCallback.call(a.oInstance,i(">tr",a.nTFoot)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function ba(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);else{E(a);C(a)}}function za(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d,f;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ha(a)}); +c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:-1});for(f=0;f")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ca(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Da(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ea(a);e=1}else if(h=="t"){f=Fa(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ga(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=Ha(a);e=1}else if(o.aoFeatures.length!== +0){j=o.aoFeatures;t=0;for(k=j.length;tcaption",a.nTable);h=0;for(k=d.length;hi(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true); +a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var O=S(a,h);f=0;for(e=O.length;ff-a.oScroll.iBarWidth)a.nTable.style.width=u(f)}else a.nTable.style.width=u(f);f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){d.style.width=u(f+a.oScroll.iBarWidth);b.parentNode.style.width=u(f+a.oScroll.iBarWidth)}e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop= +"0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},j,k);i(j).height(0)}P(function(B){B.innerHTML="";B.style.width=u(I.shift())},h);a.nTFoot!==null&&P(function(B){B.innerHTML= +"";B.style.width=u(I.shift())},j);if(i(a.nTable).outerWidth()d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight'):b===""?'':b+' '; +var c=p.createElement("div");c.className=a.oClasses.sFilter;c.innerHTML="";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f=0;d--){f=ma(H(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Ka(a,b,c,d,f){var e=la(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(o.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length> +b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);ka(a,1);for(c=0;c/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=o.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!== +null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c=h)for(b=0;b=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart= +0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function Ga(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Na,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Na(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j= +a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_", +e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]== +"object"){c=0;for(d=a.aLengthMenu[0].length;c'+a.aLengthMenu[1][c]+""}else{c=0;for(d=a.aLengthMenu.length;c'+a.aLengthMenu[c]+""}b+="";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");f.className=a.oClasses.sLength;f.innerHTML="";i('select option[value="'+ +a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;ca.aiDisplay.length|| +a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Oa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=u(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th",a.nTHead);for(e=0;etd",b);h=S(a,e);for(e=d=0;e0)a.aoColumns[e].sWidth=u(c);d++}a.nTable.style.width=u(i(b).outerWidth());b.parentNode.removeChild(b)}}function Qa(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=u(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=u(i(b).outerWidth())}function Pa(a,b){var c= +Ra(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=H(a,c,b,"");return d}return Q(a,c)[b]}function Ra(a,b){for(var c=-1,d=-1,f=0;f/g,"");if(e.length>c){c=e.length;d=f}}return d}function u(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+"px"}function Va(a,b){if(a.length!=b.length)return 1;for(var c= +0;cb&&a[d]--;c!=-1&&a.splice(c,1)}function Ba(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d4096){a=p.cookie.split(";");for(var j=0,k=a.length;j=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[o.iApiIndex]);ia(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[o.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=X(d);if(typeof b.jquery!="undefined"||typeof b== +"object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[o.iApiIndex]),c=0;c=X(d);if(!j)for(f=a;ftr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();if(a.nTable!=a.nTHead.parentNode){i(">thead",a.nTable).remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&& +a.nTable!=a.nTFoot.parentNode){i(">tfoot",a.nTable).remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];T(a);i($(a)).removeClass(a.asStripClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oJUIClasses.sSortableAsc,o.oJUIClasses.sSortableDesc,o.oJUIClasses.sSortableNone].join(" "));i("th span."+o.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e= +i("div."+o.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oStdClasses.sSortableAsc,o.oStdClasses.sSortableDesc,o.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;dtr:even",c).addClass(a.asDestoryStrips[0]);i(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;dt<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ua();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart= +g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ta(e,g);e.aoDrawCallback.push({fn:sa,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!== +""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(t){y(e,t,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=i(">tbody>tr",this);a=0;for(b=e.asStripClasses.length;a=0;a--){var m=g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c=0){for(;e.aoColumns.length<=m[c];)G(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]== +"number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&& +typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;cthead",this);if(a.length===0){a=[p.createElement("thead")];this.appendChild(a[0])}e.nTHead=a[0];a=i(">tbody",this);if(a.length===0){a=[p.createElement("tbody")];this.appendChild(a[0])}e.nTBody=a[0];a=i(">tfoot",this);if(a.length>0){e.nTFoot=a[0];W(e.aoFooter,e.nTFoot)}if(j)for(a=0;aC5UDGKfoZ!!63{a%*-grz$D1XEXer(2tyUn z+02YUSHb}sD?0}l&^EXLguy7lz`(-H!phDIlVN0HVHIR%V-ON%S2Pq6HFFG{Xryc+ zmRQ($@S#&sld*HEn>dFcBLmQ_$YwDLDjGT#PW*q1fd^^;oX+iLI)z|@;wX;U8Xr> zT8Qgxn;R!Cottl}#(8Ri${a3d=J*$R5qBRbK9bRJe*4BYwq9(uIM4mLS9%TSY?*y6 zE==owYH)vf>dq6(Uzum+IyVJqc3N&dRPD57vW(=l(=(DZ-K_!LSx zwPk@>bN at 4B-OI9gCf>Wc_;CDAS%c at BJZ}kBlbDz~@y-*&Y^_U+@};q`xNUthN} On^Cj9W}Eu@|2F})$f79# literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/back_enabled.jpg b/koha-tmpl/opac-tmpl/prog/images/datatables/back_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a6d764c79c7a2047b6bf65bf9d96fcafd5161e38 GIT binary patch literal 807 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2*U&h z1}0{pBN2d|gO!bok%5r~RhW^Pm5qg+Lx6#Sm5Gs^od+h%$i&RTD#*spplB#0EW!~u z(MZ`u)XXulu<_tSr=TWdXR%Z_aiE1jZ7eM8Fl&IpCkWK1$Y$s$#2&a&N#sM~M5iWU z<^Q)Bc$gW1&SMs2uxGfw`}E06etb^r9k|jMc at Dlk(IlSD-Wwx*G{%4ThHhR%HnTsw zbu3z!=BtbC=-In5f5nt;je{+vrKZdWckk$U`c^FEYC6}Jn=lG)17QB>6z3khm7PHhg<-pEGSO0F>VA}N6`w53!8pr$>MbUW| zMEsFn=(%w+^5v0yp7Lmb+~3PpI4(#G~bQ$y_;t)oo+U5`bnSHZcn){CH~m7Ys2rz z2!R at xgGrCtcPz?eOPOzKr2P26p~(mTGjR1-c3?psA>uUGsyt|R2Ts3~!B zN71DGSrW%W*`w8#2{O$LX)%%8*<4Ycyr;tN(Hm8|M=_HtvR>P P+Rcr(b5Xx$|NkZcT0jT? literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/forward_disabled.jpg b/koha-tmpl/opac-tmpl/prog/images/datatables/forward_disabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..28a9dc53fa232919299ac980dc9b61167c1868bd GIT binary patch literal 635 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tySE z1JEp>E8&2Nm4%I+g9~UMTnNHo6kuRrVP;|B;)Y2uGBL9Vva&GlzGLeh=CM*_u2I6%$1L~6;-1yGa|?*FvavCW+Av>{Flt>+*?d?iZ`9)^O?_H|D3t8;Og6lD<#WHQvW(mo1ETsD>A at mr8@sqg(?1R z%d at qrmWLWmIn1#pQuo}{brVW*C8t%EDXbOt_DabwXgGW3;wDX1;~7hWrYL+ZX=qre z&-y^2q0zm?-FJb#(AWJTHOJ-3`S`D|JEhzC{KvY_h0kZinXP-?w!g_L at p#JQO^!z$ mYCgVwS7#SryXs@?>&L&t^Z(SozHVt~@Z#>58}s)6zX<@qORf(9 literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/forward_enabled.jpg b/koha-tmpl/opac-tmpl/prog/images/datatables/forward_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..598c075f13ab0e4bbe05a4eeea7cf777ba73cf03 GIT binary patch literal 852 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tywO z0~0eN(3Nn&%Fe>Z!NthH$ciG&$iU3P%Em6hz`z1zu=B#yGcqx=2(q#<2(fb*3M-3< zDh5t8G7&R#Oe}1C=oHjs?40T*F37+LbR`oj+(bq}CT0c}Rz*W0Hg?Cv#)(EB0yioN zi~PUEzyov)lOVGogFVA5dn3uE%Z<*rn&ugY^FIG9<<=87L*?mOy^~u`Rq(Eg+UDw^ z@^Uh}zJ$t~P2YpRT#sm2p`oEt8zJ-EBRfY;>b?DxZo!24Z)Q(O&}!Mbt}27`dKa(x zr)AHkZg5MjKa&4$syaupXWNXgp32dQs_rj-?|M=Q9pN^hZg^mV7=UWs>}D5 z$40(ME7Q1T4h8p}ZJ8O!G-Xk84;P~#ci!&o`A5I3kG at gLm*VlJbn%kvSqIh?3Y?HQ zAX0NL>XIkpf=MN83*!%}9-aN5)p7^py2Am>F9gW&pFSp#V0dxX#ZPW;UoD(gaI at 8E z(rNQz1DBIiM13!LtZ|85lHB@$wW~n0fhRz-$?R&m{@z;uI}N|35As;}zdXB<I#+N1k=r*G-&mI78vJ_Ezs!yIV%J}l7d*c9>7Bn;xyLT84V&`$ z at 9WMTAJ6DZyR)~=FS6P2e3MDv7lHB>{C&1H^7EJ9PIf=EdUwUYtGE9%$X9(m*ZWLf M_rC2^{;K~s0TRp{r2qf` literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc.png new file mode 100644 index 0000000000000000000000000000000000000000..a56d0e21902ce620cd57f87fa58a6d3e804135cf GIT binary patch literal 263 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl&hzUV at SoVE9Xw~GAQscA1s)^?0*rXqM}DeLv7?|BU8z at QCOGupVzP9Hek5&L+Gnl%BD>~0~tJB{an^LB{Ts5b0m7= literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc_disabled.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..b7e621ef1c68da839ce077cec6e201a55c1ba168 GIT binary patch literal 252 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnW*L z7srr_TUXBQ7GeV6G?@}f$7k6Jhw{qGm$-QDzD`qrDaZ3s$b2XF;fBBPU nqjNDy&Nw~puHFA+-v&m8`?>-yUFVHK{$ucT^>bP0l+XkKhw^g= literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_both.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_both.png new file mode 100644 index 0000000000000000000000000000000000000000..839ac4bb5b0b414834c950de9deafff6dd94ed2d GIT binary patch literal 282 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0K#2rT z7srr_TRjsz`4|*ASOSl%eg6Ob+(JtRwX|O at S}a^IESQCgTe~DWM4fR9b+X literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc.png new file mode 100644 index 0000000000000000000000000000000000000000..90b295159df995329b3a84340d32761f3d1dbade GIT binary patch literal 260 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl#{26V at SoVqz8vtc$~v}dc~O{CLEF2anNavMpdMP)0v(X&o(k0opIq!LdvtJ wj~up7 at 0`wiSoe($&y07EkGxK6U|?nlJSz0{?wJWUfu=Edy85}Sb4q9e0C9MGu>b%7 literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc_disabled.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..2409653dc94cd21a281a31c0e3819323b84704b7 GIT binary patch literal 251 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnX`r z7srr_TS*TNvhX;E^>j)zMNBv%VR68zN24n8K+>5N&kUJbBQCy4c=qgBiu3mAQ)hD? n)_oJhGvi(If!Apb49pB3GXz|UGFKJ=4P)?h^>bP0l+XkK*57ji literal 0 HcmV?d00001 -- 1.7.7.3 From julian.maurice at biblibre.com Fri Dec 2 12:40:07 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 2 Dec 2011 12:40:07 +0100 Subject: [Koha-patches] [PATCH 1/4] Bug 6836: Add jQuery dataTables plugin Message-ID: <1322826009-18320-1-git-send-email-julian.maurice@biblibre.com> This patch add the javascript library, a CSS (and image files from datatables.net) and another javascript file which provides some extra features. It also add a Perl module C4::Utils::Datatables which provides helpful functions for server-side processing --- C4/Utils/DataTables.pm | 306 ++++++++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/css/datatables.css | 114 ++++++++ .../prog/en/includes/datatables-strings.inc | 17 + koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 281 ++++++++++++++++++ .../en/lib/jquery/plugins/jquery.dataTables.min.js | 153 ++++++++++ .../prog/img/datatables/back_disabled.jpg | Bin 0 -> 612 bytes .../prog/img/datatables/back_enabled.jpg | Bin 0 -> 807 bytes .../prog/img/datatables/forward_disabled.jpg | Bin 0 -> 635 bytes .../prog/img/datatables/forward_enabled.jpg | Bin 0 -> 852 bytes .../intranet-tmpl/prog/img/datatables/sort_asc.png | Bin 0 -> 263 bytes .../prog/img/datatables/sort_asc_disabled.png | Bin 0 -> 252 bytes .../prog/img/datatables/sort_both.png | Bin 0 -> 282 bytes .../prog/img/datatables/sort_desc.png | Bin 0 -> 260 bytes .../prog/img/datatables/sort_desc_disabled.png | Bin 0 -> 251 bytes koha-tmpl/opac-tmpl/prog/en/css/datatables.css | 114 ++++++++ .../prog/en/includes/datatables-strings.inc | 17 + koha-tmpl/opac-tmpl/prog/en/js/datatables.js | 281 ++++++++++++++++++ .../en/lib/jquery/plugins/jquery.dataTables.min.js | 153 ++++++++++ .../prog/images/datatables/back_disabled.jpg | Bin 0 -> 612 bytes .../prog/images/datatables/back_enabled.jpg | Bin 0 -> 807 bytes .../prog/images/datatables/forward_disabled.jpg | Bin 0 -> 635 bytes .../prog/images/datatables/forward_enabled.jpg | Bin 0 -> 852 bytes .../opac-tmpl/prog/images/datatables/sort_asc.png | Bin 0 -> 263 bytes .../prog/images/datatables/sort_asc_disabled.png | Bin 0 -> 252 bytes .../opac-tmpl/prog/images/datatables/sort_both.png | Bin 0 -> 282 bytes .../opac-tmpl/prog/images/datatables/sort_desc.png | Bin 0 -> 260 bytes .../prog/images/datatables/sort_desc_disabled.png | Bin 0 -> 251 bytes 27 files changed, 1436 insertions(+), 0 deletions(-) create mode 100644 C4/Utils/DataTables.pm create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/datatables.css create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/js/datatables.js create mode 100644 koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/back_disabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/back_enabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/forward_disabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/forward_enabled.jpg create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc_disabled.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_both.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc_disabled.png create mode 100644 koha-tmpl/opac-tmpl/prog/en/css/datatables.css create mode 100644 koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc create mode 100644 koha-tmpl/opac-tmpl/prog/en/js/datatables.js create mode 100644 koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/back_disabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/back_enabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/forward_disabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/forward_enabled.jpg create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc_disabled.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_both.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc.png create mode 100644 koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc_disabled.png diff --git a/C4/Utils/DataTables.pm b/C4/Utils/DataTables.pm new file mode 100644 index 0000000..901cafc --- /dev/null +++ b/C4/Utils/DataTables.pm @@ -0,0 +1,306 @@ +package C4::Utils::DataTables; + +# Copyright 2011 BibLibre +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use Modern::Perl; +require Exporter; + +use vars qw($VERSION @ISA @EXPORT); + +BEGIN { + $VERSION = 3.04, + + @ISA = qw(Exporter); + @EXPORT = qw(dt_build_orderby dt_build_having dt_get_params dt_build_query); +} + +=head1 NAME + +C4::Utils::DataTables - Utility subs for building query when DataTables source is AJAX + +=head1 SYNOPSYS + + use CGI; + use C4::Context; + use C4::Utils::DataTables; + + my $input = new CGI; + my $vars = $input->Vars; + + my $query = qq{ + SELECT surname, firstname + FROM borrowers + WHERE borrowernumber = ? + }; + my ($having, $having_params) = dt_build_having($vars); + $query .= $having; + $query .= dt_build_orderby($vars); + $query .= " LIMIT ?,? "; + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare($query); + $sth->execute( + $vars->{'borrowernumber'}, + @$having_params, + $vars->{'iDisplayStart'}, + $vars->{'iDisplayLength'} + ); + ... + +=head1 DESCRIPTION + + This module provide two utility functions to build a part of the SQL query, + depending on DataTables parameters. + One function build the 'ORDER BY' part, and the other the 'HAVING' part. + +=head1 FUNCTIONS + +=over 2 + +=item dt_build_orderby + + my $orderby = dt_build_orderby($dt_param); + + This function takes a reference to a hash containing DataTables parameters + and build the corresponding 'ORDER BY' clause. + This hash must contains the following keys: + + iSortCol_N, where N is a number from 0 to the number of columns to sort on minus 1 + + sSortDir_N is the sorting order ('asc' or 'desc) for the corresponding column + + mDataProp_N is a mapping between the column index, and the name of a SQL field + +=cut + +sub dt_build_orderby { + my $param = shift; + + my $i = 0; + my @orderbys; + while(exists $param->{'iSortCol_'.$i}){ + my $iSortCol = $param->{'iSortCol_'.$i}; + my $sSortDir = $param->{'sSortDir_'.$i}; + my $mDataProp = $param->{'mDataProp_'.$iSortCol}; + my @sort_fields = $param->{$mDataProp.'_sorton'} + ? split(' ', $param->{$mDataProp.'_sorton'}) + : (); + if(@sort_fields > 0) { + push @orderbys, "$_ $sSortDir" foreach (@sort_fields); + } else { + push @orderbys, "$mDataProp $sSortDir"; + } + $i++; + } + + my $orderby = " ORDER BY " . join(',', @orderbys) . " " if @orderbys; + return $orderby; +} + +=item dt_build_having + + my ($having, $having_params) = dt_build_having($dt_params) + + This function takes a reference to a hash containing DataTables parameters + and build the corresponding 'HAVING' clause. + This hash must contains the following keys: + + sSearch is the text entered in the global filter + + iColumns is the number of columns + + bSearchable_N is a boolean value that is true if the column is searchable + + mDataProp_N is a mapping between the column index, and the name of a SQL field + + sSearch_N is the text entered in individual filter for column N + +=back + +=cut + +sub dt_build_having { + my $param = shift; + + my @filters; + my @params; + + # Global filter + if($param->{'sSearch'}) { + my $sSearch = $param->{'sSearch'}; + my $i = 0; + my @gFilters; + my @gParams; + while($i < $param->{'iColumns'}) { + if($param->{'bSearchable_'.$i} eq 'true') { + my $mDataProp = $param->{'mDataProp_'.$i}; + my @filter_fields = $param->{$mDataProp.'_filteron'} + ? split(' ', $param->{$mDataProp.'_filteron'}) + : (); + if(@filter_fields > 0) { + foreach my $field (@filter_fields) { + push @gFilters, " $field LIKE ? "; + push @gParams, "%$sSearch%"; + } + } else { + push @gFilters, " $mDataProp LIKE ? "; + push @gParams, "%$sSearch%"; + } + } + $i++; + } + push @filters, " (" . join(" OR ", @gFilters) . ") "; + push @params, @gParams; + } + + # Individual filters + my $i = 0; + while($i < $param->{'iColumns'}) { + my $sSearch = $param->{'sSearch_'.$i}; + if($sSearch) { + my $mDataProp = $param->{'mDataProp_'.$i}; + my @filter_fields = $param->{$mDataProp.'_filteron'} + ? split(' ', $param->{$mDataProp.'_filteron'}) + : (); + if(@filter_fields > 0) { + my @localfilters; + foreach my $field (@filter_fields) { + push @localfilters, " $field LIKE ? "; + push @params, "%$sSearch%"; + } + push @filters, " ( ". join(" OR ", @localfilters) ." ) "; + } else { + push @filters, " $mDataProp LIKE ? "; + push @params, "%$sSearch%"; + } + } + $i++; + } + + return (\@filters, \@params); +} + +=item dt_get_params + + my %dtparam = = dt_get_params( $input ) + + This function takes a reference to a new CGI object. + + It prepares a hash containing Datatable parameters. + +=back + +=cut +sub dt_get_params { + my $input = shift; + my %dtparam; + my $vars = $input->Vars; + + foreach(qw/ iDisplayStart iDisplayLength iColumns sSearch bRegex iSortingCols sEcho /) { + $dtparam{$_} = $input->param($_); + } + foreach(grep /(?:_sorton|_filteron)$/, keys %$vars) { + $dtparam{$_} = $vars->{$_}; + } + for(my $i=0; $i<$dtparam{'iColumns'}; $i++) { + foreach(qw/ bSearchable sSearch bRegex bSortable iSortCol mDataProp sSortDir /) { + my $key = $_ . '_' . $i; + $dtparam{$key} = $input->param($key) if defined $input->param($key); + } + } + return %dtparam; +} + +=item dt_build_query_simple + + my ( $query, $params )= dt_build_query_simple( $value, $field ) + + This function takes a value and a field (table.field). + + It returns (undef, []) if not $value. + Else, returns a SQL where string and an arrayref containing parameters + for the execute method of the statement. + +=back + +=cut +sub dt_build_query_simple { + my ( $value, $field ) = @_; + my $query; + my @params; + if( $value ) { + $query .= " AND $field = ? "; + push @params, $value; + } + return ( $query, \@params ); +} + +=item dt_build_query_dates + + my ( $query, $params )= dt_build_query_dates( $datefrom, $dateto, $field) + + This function takes a datefrom, dateto and a field (table.field). + + It returns (undef, []) if not $value. + Else, returns a SQL where string and an arrayref containing parameters + for the execute method of the statement. + +=back + +=cut +sub dt_build_query_dates { + my ( $datefrom, $dateto, $field ) = @_; + my $query; + my @params; + if ( $datefrom ) { + $query .= " AND $field >= ? "; + push @params, C4::Dates->new($datefrom)->output('iso'); + } + if ( $dateto ) { + $query .= " AND $field <= ? "; + push @params, C4::Dates->new($dateto)->output('iso'); + } + return ( $query, \@params ); +} + +=item dt_build_query + + my ( $query, $filter ) = dt_build_query( $type, @params ) + + This function takes a value and a list of parameters. + + It calls dt_build_query_dates or dt_build_query_simple fonction of $type. + + $type can be 'simple' or 'rage_dates'. + +=back + +=cut +sub dt_build_query { + my ( $type, @params ) = @_; + given ( $type ) { + when ( /simple/ ) { + return dt_build_query_simple( @params ); + } + when ( /range_dates/ ) { + return dt_build_query_dates( @params ); + } + } +} + +1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css new file mode 100644 index 0000000..e069b93 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css @@ -0,0 +1,114 @@ +input.search_init { + color: #999999; +} +.sorting_asc { + padding-right: 19px; + background: url("../../img/datatables/sort_asc.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc { + padding-right: 19px; + background: url("../../img/datatables/sort_desc.png") no-repeat scroll right center #EEEEEE; +} +.sorting { + padding-right: 19px; + background: url("../../img/datatables/sort_both.png") no-repeat scroll right center #EEEEEE; +} +.sorting_asc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_disabled { + padding-right: 19px; + background-color: #EEEEEE; +} + +table.display { + width: 100%; +} +table.display thead th { + border-bottom: 1px solid black; + cursor: pointer; + font-weight: bold; + padding: 3px 18px 3px 10px; +} +.dataTables_wrapper { + clear: both; + position: relative; +} +.dataTables_processing { + background-color: white; + border: 1px solid #DDDDDD; + color: #999999; + font-size: 14px; + height: 30px; + left: 50%; + margin-left: -125px; + margin-top: -15px; + padding: 14px 0 2px; + position: fixed; + text-align: center; + top: 50%; + width: 250px; +} +.dataTables_info { + float: left; + width: 60%; +} +.dataTables_paginate { + float: right; + text-align: right; + width: 44px; +} +.paging_full_numbers { + height: 22px; + line-height: 22px; + width: 400px; +} +.paging_full_numbers span.paginate_button, + .paging_full_numbers span.paginate_active { + border: 1px solid #aaa; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + padding: 2px 5px; + margin: 0 3px; + cursor: pointer; + *cursor: hand; +} + +.paging_full_numbers span.paginate_button { + background-color: #ddd; +} + +.paging_full_numbers span.paginate_button:hover { + background-color: #ccc; +} + +.paging_full_numbers span.paginate_active { + background-color: #99B3FF; +} +.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { + float: left; + height: 19px; + margin-left: 3px; + width: 19px; +} +.paginate_disabled_previous { + background-image: url("../../img/datatables/back_disabled.jpg"); +} +.paginate_enabled_previous { + background-image: url("../../img/datatables/back_enabled.jpg"); +} +.paginate_disabled_next { + background-image: url("../../img/datatables/forward_disabled.jpg"); +} +.paginate_enabled_next { + background-image: url("../../img/datatables/forward_enabled.jpg"); +} +.spacer { + clear: both; + height: 20px; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc new file mode 100644 index 0000000..183f511 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc @@ -0,0 +1,17 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js new file mode 100644 index 0000000..38dd1d5 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js @@ -0,0 +1,281 @@ +// These default options are for translation but can be used +// for any other datatables settings +// MSG_DT_* variables comes from datatables-strings.inc +// To use it, write: +// $("#table_id").dataTable($.extend(true, {}, dataTableDefaults, { +// // other settings +// } ) ); +var dataTablesDefaults = { + "oLanguage": { + "oPaginate": { + "sFirst" : window.MSG_DT_FIRST || "First", + "sLast" : window.MSG_DT_LAST || "Last", + "sNext" : window.MSG_DT_NEXT || "Next", + "sPrevious" : window.MSG_DT_PREVIOUS || "Previous" + }, + "sEmptyTable" : window.MSG_DT_EMPTY_TABLE || "No data available in table", + "sInfo" : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries", + "sInfoEmpty" : window.MSG_DT_INFO_EMPTY || "No entries to show", + "sInfoFiltered" : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)", + "sLengthMenu" : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries", + "sLoadingRecords" : window.MSG_DT_LOADING_RECORDS || "Loading...", + "sProcessing" : window.MSG_DT_PROCESSING || "Processing...", + "sSearch" : window.MSG_DT_SEARCH || "Search:", + "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" + } +}; + + +// Return an array of string containing the values of a particular column +$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { + // check that we have a column id + if ( typeof iColumn == "undefined" ) return new Array(); + // by default we only wany unique data + if ( typeof bUnique == "undefined" ) bUnique = true; + // by default we do want to only look at filtered data + if ( typeof bFiltered == "undefined" ) bFiltered = true; + // by default we do not wany to include empty values + if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true; + // list of rows which we're going to loop through + var aiRows; + // use only filtered rows + if (bFiltered == true) aiRows = oSettings.aiDisplay; + // use all rows + else aiRows = oSettings.aiDisplayMaster; // all row numbers + + // set up data array + var asResultData = new Array(); + for (var i=0,c=aiRows.length; i -1) continue; + // else push the value onto the result data array + else asResultData.push(sValue); + } + return asResultData; +} + +// List of unbind keys (Ctrl, Alt, Direction keys, etc.) +// These keys must not launch filtering +var blacklist_keys = new Array(0, 16, 17, 18, 37, 38, 39, 40); + +// Set a filtering delay for global search field +jQuery.fn.dataTableExt.oApi.fnSetFilteringDelay = function ( oSettings, iDelay ) { + /* + * Inputs: object:oSettings - dataTables settings object - automatically given + * integer:iDelay - delay in milliseconds + * Usage: $('#example').dataTable().fnSetFilteringDelay(250); + * Author: Zygimantas Berziunas (www.zygimantas.com) and Allan Jardine + * License: GPL v2 or BSD 3 point style + * Contact: zygimantas.berziunas /AT\ hotmail.com + */ + var + _that = this, + iDelay = (typeof iDelay == 'undefined') ? 250 : iDelay; + + this.each( function ( i ) { + $.fn.dataTableExt.iApiIndex = i; + var + $this = this, + oTimerId = null, + sPreviousSearch = null, + anControl = $( 'input', _that.fnSettings().aanFeatures.f ); + + anControl.unbind( 'keyup.DT' ).bind( 'keyup.DT', function(event) { + var $$this = $this; + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( $(this).val() ); + } else { + if (sPreviousSearch === null || sPreviousSearch != anControl.val()) { + window.clearTimeout(oTimerId); + sPreviousSearch = anControl.val(); + oTimerId = window.setTimeout(function() { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( anControl.val() ); + }, iDelay); + } + } + }); + + return this; + } ); + return this; +} + +// Add a filtering delay on general search and on all input (with a class 'filter') +jQuery.fn.dataTableExt.oApi.fnAddFilters = function ( oSettings, sClass, iDelay ) { + var table = this; + this.fnSetFilteringDelay(iDelay); + var filterTimerId = null; + $("input."+sClass).keyup(function(event) { + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + table.fnFilter( $(this).val(), $(this).attr('data-column_num') ); + } else { + window.clearTimeout(filterTimerId); + var input = this; + filterTimerId = window.setTimeout(function() { + table.fnFilter($(input).val(), $(input).attr('data-column_num')); + }, iDelay); + } + }); +} + +// Useful if you want to filter on dates with 2 inputs (start date and end date) +// You have to include calendar.inc to use it +function dt_add_rangedate_filter(begindate_id, enddate_id, dateCol) { + $.fn.dataTableExt.afnFiltering.push( + function( oSettings, aData, iDataIndex ) { + + var beginDate = Date_from_syspref($("#"+begindate_id).val()).getTime(); + var endDate = Date_from_syspref($("#"+enddate_id).val()).getTime(); + + var data = Date_from_syspref(aData[dateCol]).getTime(); + + if ( !parseInt(beginDate) && ! parseInt(endDate) ) { + return true; + } + else if ( beginDate <= data && !parseInt(endDate) ) { + return true; + } + else if ( data <= endDate && !parseInt(beginDate) ) { + return true; + } + else if ( beginDate <= data && data <= endDate) { + return true; + } + return false; + } + ); +} + +//Sorting for dates (uk format) +function dt_add_type_uk_date() { + jQuery.fn.dataTableExt.aTypes.unshift( + function ( sData ) + { + if (sData.match(/(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20|21)\d\d/)) + { + return 'uk_date'; + } + return null; + } + ); + + jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }; + + jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }; +} + +// Sorting on html contains +// bar sort on 'bar' +function dt_overwrite_html_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['html-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['html-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Sorting on string without accentued characters +function dt_overwrite_string_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['string-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['string-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Replace a node with a html and js contain. +function replace_html( original_node, type ) { + switch ( $(original_node).attr('data-type') ) { + case "range_dates": + var id = $(original_node).attr("data-id"); + var format = $(original_node).attr("data-format"); + replace_html_date( original_node, id, format ); + break; + default: + alert("_(This node can't be replaced)"); + } +} + +// Replace a node with a "From [date] To [date]" element +// Used on tfoot > td +function replace_html_date( original_node, id, format ) { + var node = $('' + _("From") + '×
    ' + _("To") + '×'); + $(original_node).replaceWith(node); + var script = document.createElement( 'script' ); + script.type = 'text/javascript'; + var script_content = "Calendar.setup({"; + script_content += " inputField: \"" + id + "from\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "from\","; + script_content += " onClose: function(){ $(\"#" + id + "from\").change(); this.hide();}"; + script_content += " });"; + script_content += " Calendar.setup({"; + script_content += " inputField: \"" + id + "to\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "to\","; + script_content += " onClose: function(){ $(\"#" + id + "to\").change(); this.hide();}"; + script_content += " });"; + script.text = script_content; + $(original_node).append( script ); +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js new file mode 100644 index 0000000..9035a2e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js @@ -0,0 +1,153 @@ +/* + * File: jquery.dataTables.min.js + * Version: 1.8.1 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Info: www.datatables.net + * + * Copyright 2008-2010 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + */ +(function(i,wa,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var o=i.fn.dataTableExt;o.sVersion="1.8.1";o.sErrMode="alert";o.iApiIndex=0;o.oApi={};o.afnFiltering=[];o.aoFeatures=[];o.ofnSearch={};o.afnSortData=[];o.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", +sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", +sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};o.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left", +sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled", +sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default", +sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll", +sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};o.oPagination={two_button:{fnInit:function(g,l,r){var s,w,y;if(g.bJUI){s=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev; +s.appendChild(y)}else{s=p.createElement("div");w=p.createElement("div")}s.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;s.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(s);l.appendChild(w);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(s).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false}); +if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,r=0,s=l.length;r=w-s){s=w-r+1;x=w}else{s=y-Math.ceil(r/2)+1;x=s+r-1}for(r=s;r<=x;r++)G+=y!=r?''+r+"":''+r+"";x=g.aanFeatures.p;var z,Y=function(L){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);L.preventDefault()},V=function(){return false};r=0;for(s=x.length;rl?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return gl?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g< +l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return gl?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l- +g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};o.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,r=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var s=1;s")!=-1)return"html";return null}];o.fnVersionCheck=function(g){var l=function(x,v){for(;x.length=parseInt(w,10)};o._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal= +function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance= +this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table", +sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false, +bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button"; +this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})}; +this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;dtr>th",a.nTFoot).addClass(a.oClasses.sFooterTH);if(a.nTFoot!==null){c=S(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!za(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h=h;htr",a.nTHead)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback== +"function"&&a.fnFooterCallback.call(a.oInstance,i(">tr",a.nTFoot)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function ba(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);else{E(a);C(a)}}function za(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d,f;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ha(a)}); +c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:-1});for(f=0;f")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ca(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Da(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ea(a);e=1}else if(h=="t"){f=Fa(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ga(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=Ha(a);e=1}else if(o.aoFeatures.length!== +0){j=o.aoFeatures;t=0;for(k=j.length;tcaption",a.nTable);h=0;for(k=d.length;hi(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true); +a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var O=S(a,h);f=0;for(e=O.length;ff-a.oScroll.iBarWidth)a.nTable.style.width=u(f)}else a.nTable.style.width=u(f);f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){d.style.width=u(f+a.oScroll.iBarWidth);b.parentNode.style.width=u(f+a.oScroll.iBarWidth)}e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop= +"0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},j,k);i(j).height(0)}P(function(B){B.innerHTML="";B.style.width=u(I.shift())},h);a.nTFoot!==null&&P(function(B){B.innerHTML= +"";B.style.width=u(I.shift())},j);if(i(a.nTable).outerWidth()d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight'):b===""?'':b+' '; +var c=p.createElement("div");c.className=a.oClasses.sFilter;c.innerHTML="";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f=0;d--){f=ma(H(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Ka(a,b,c,d,f){var e=la(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(o.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length> +b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);ka(a,1);for(c=0;c/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=o.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!== +null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c=h)for(b=0;b=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart= +0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function Ga(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Na,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Na(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j= +a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_", +e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]== +"object"){c=0;for(d=a.aLengthMenu[0].length;c'+a.aLengthMenu[1][c]+""}else{c=0;for(d=a.aLengthMenu.length;c'+a.aLengthMenu[c]+""}b+="";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");f.className=a.oClasses.sLength;f.innerHTML="";i('select option[value="'+ +a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;ca.aiDisplay.length|| +a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Oa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=u(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th",a.nTHead);for(e=0;etd",b);h=S(a,e);for(e=d=0;e0)a.aoColumns[e].sWidth=u(c);d++}a.nTable.style.width=u(i(b).outerWidth());b.parentNode.removeChild(b)}}function Qa(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=u(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=u(i(b).outerWidth())}function Pa(a,b){var c= +Ra(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=H(a,c,b,"");return d}return Q(a,c)[b]}function Ra(a,b){for(var c=-1,d=-1,f=0;f/g,"");if(e.length>c){c=e.length;d=f}}return d}function u(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+"px"}function Va(a,b){if(a.length!=b.length)return 1;for(var c= +0;cb&&a[d]--;c!=-1&&a.splice(c,1)}function Ba(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d4096){a=p.cookie.split(";");for(var j=0,k=a.length;j=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[o.iApiIndex]);ia(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[o.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=X(d);if(typeof b.jquery!="undefined"||typeof b== +"object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[o.iApiIndex]),c=0;c=X(d);if(!j)for(f=a;ftr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();if(a.nTable!=a.nTHead.parentNode){i(">thead",a.nTable).remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&& +a.nTable!=a.nTFoot.parentNode){i(">tfoot",a.nTable).remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];T(a);i($(a)).removeClass(a.asStripClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oJUIClasses.sSortableAsc,o.oJUIClasses.sSortableDesc,o.oJUIClasses.sSortableNone].join(" "));i("th span."+o.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e= +i("div."+o.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oStdClasses.sSortableAsc,o.oStdClasses.sSortableDesc,o.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;dtr:even",c).addClass(a.asDestoryStrips[0]);i(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;dt<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ua();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart= +g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ta(e,g);e.aoDrawCallback.push({fn:sa,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!== +""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(t){y(e,t,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=i(">tbody>tr",this);a=0;for(b=e.asStripClasses.length;a=0;a--){var m=g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c=0){for(;e.aoColumns.length<=m[c];)G(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]== +"number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&& +typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;cthead",this);if(a.length===0){a=[p.createElement("thead")];this.appendChild(a[0])}e.nTHead=a[0];a=i(">tbody",this);if(a.length===0){a=[p.createElement("tbody")];this.appendChild(a[0])}e.nTBody=a[0];a=i(">tfoot",this);if(a.length>0){e.nTFoot=a[0];W(e.aoFooter,e.nTFoot)}if(j)for(a=0;aC5UDGKfoZ!!63{a%*-grz$D1XEXer(2tyUn z+02YUSHb}sD?0}l&^EXLguy7lz`(-H!phDIlVN0HVHIR%V-ON%S2Pq6HFFG{Xryc+ zmRQ($@S#&sld*HEn>dFcBLmQ_$YwDLDjGT#PW*q1fd^^;oX+iLI)z|@;wX;U8Xr> zT8Qgxn;R!Cottl}#(8Ri${a3d=J*$R5qBRbK9bRJe*4BYwq9(uIM4mLS9%TSY?*y6 zE==owYH)vf>dq6(Uzum+IyVJqc3N&dRPD57vW(=l(=(DZ-K_!LSx zwPk@>bN at 4B-OI9gCf>Wc_;CDAS%c at BJZ}kBlbDz~@y-*&Y^_U+@};q`xNUthN} On^Cj9W}Eu@|2F})$f79# literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/back_enabled.jpg b/koha-tmpl/intranet-tmpl/prog/img/datatables/back_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a6d764c79c7a2047b6bf65bf9d96fcafd5161e38 GIT binary patch literal 807 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2*U&h z1}0{pBN2d|gO!bok%5r~RhW^Pm5qg+Lx6#Sm5Gs^od+h%$i&RTD#*spplB#0EW!~u z(MZ`u)XXulu<_tSr=TWdXR%Z_aiE1jZ7eM8Fl&IpCkWK1$Y$s$#2&a&N#sM~M5iWU z<^Q)Bc$gW1&SMs2uxGfw`}E06etb^r9k|jMc at Dlk(IlSD-Wwx*G{%4ThHhR%HnTsw zbu3z!=BtbC=-In5f5nt;je{+vrKZdWckk$U`c^FEYC6}Jn=lG)17QB>6z3khm7PHhg<-pEGSO0F>VA}N6`w53!8pr$>MbUW| zMEsFn=(%w+^5v0yp7Lmb+~3PpI4(#G~bQ$y_;t)oo+U5`bnSHZcn){CH~m7Ys2rz z2!R at xgGrCtcPz?eOPOzKr2P26p~(mTGjR1-c3?psA>uUGsyt|R2Ts3~!B zN71DGSrW%W*`w8#2{O$LX)%%8*<4Ycyr;tN(Hm8|M=_HtvR>P P+Rcr(b5Xx$|NkZcT0jT? literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_disabled.jpg b/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_disabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..28a9dc53fa232919299ac980dc9b61167c1868bd GIT binary patch literal 635 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tySE z1JEp>E8&2Nm4%I+g9~UMTnNHo6kuRrVP;|B;)Y2uGBL9Vva&GlzGLeh=CM*_u2I6%$1L~6;-1yGa|?*FvavCW+Av>{Flt>+*?d?iZ`9)^O?_H|D3t8;Og6lD<#WHQvW(mo1ETsD>A at mr8@sqg(?1R z%d at qrmWLWmIn1#pQuo}{brVW*C8t%EDXbOt_DabwXgGW3;wDX1;~7hWrYL+ZX=qre z&-y^2q0zm?-FJb#(AWJTHOJ-3`S`D|JEhzC{KvY_h0kZinXP-?w!g_L at p#JQO^!z$ mYCgVwS7#SryXs@?>&L&t^Z(SozHVt~@Z#>58}s)6zX<@qORf(9 literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_enabled.jpg b/koha-tmpl/intranet-tmpl/prog/img/datatables/forward_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..598c075f13ab0e4bbe05a4eeea7cf777ba73cf03 GIT binary patch literal 852 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tywO z0~0eN(3Nn&%Fe>Z!NthH$ciG&$iU3P%Em6hz`z1zu=B#yGcqx=2(q#<2(fb*3M-3< zDh5t8G7&R#Oe}1C=oHjs?40T*F37+LbR`oj+(bq}CT0c}Rz*W0Hg?Cv#)(EB0yioN zi~PUEzyov)lOVGogFVA5dn3uE%Z<*rn&ugY^FIG9<<=87L*?mOy^~u`Rq(Eg+UDw^ z@^Uh}zJ$t~P2YpRT#sm2p`oEt8zJ-EBRfY;>b?DxZo!24Z)Q(O&}!Mbt}27`dKa(x zr)AHkZg5MjKa&4$syaupXWNXgp32dQs_rj-?|M=Q9pN^hZg^mV7=UWs>}D5 z$40(ME7Q1T4h8p}ZJ8O!G-Xk84;P~#ci!&o`A5I3kG at gLm*VlJbn%kvSqIh?3Y?HQ zAX0NL>XIkpf=MN83*!%}9-aN5)p7^py2Am>F9gW&pFSp#V0dxX#ZPW;UoD(gaI at 8E z(rNQz1DBIiM13!LtZ|85lHB@$wW~n0fhRz-$?R&m{@z;uI}N|35As;}zdXB<I#+N1k=r*G-&mI78vJ_Ezs!yIV%J}l7d*c9>7Bn;xyLT84V&`$ z at 9WMTAJ6DZyR)~=FS6P2e3MDv7lHB>{C&1H^7EJ9PIf=EdUwUYtGE9%$X9(m*ZWLf M_rC2^{;K~s0TRp{r2qf` literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc.png new file mode 100644 index 0000000000000000000000000000000000000000..a56d0e21902ce620cd57f87fa58a6d3e804135cf GIT binary patch literal 263 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl&hzUV at SoVE9Xw~GAQscA1s)^?0*rXqM}DeLv7?|BU8z at QCOGupVzP9Hek5&L+Gnl%BD>~0~tJB{an^LB{Ts5b0m7= literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc_disabled.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_asc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..b7e621ef1c68da839ce077cec6e201a55c1ba168 GIT binary patch literal 252 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnW*L z7srr_TUXBQ7GeV6G?@}f$7k6Jhw{qGm$-QDzD`qrDaZ3s$b2XF;fBBPU nqjNDy&Nw~puHFA+-v&m8`?>-yUFVHK{$ucT^>bP0l+XkKhw^g= literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_both.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_both.png new file mode 100644 index 0000000000000000000000000000000000000000..839ac4bb5b0b414834c950de9deafff6dd94ed2d GIT binary patch literal 282 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0K#2rT z7srr_TRjsz`4|*ASOSl%eg6Ob+(JtRwX|O at S}a^IESQCgTe~DWM4fR9b+X literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc.png new file mode 100644 index 0000000000000000000000000000000000000000..90b295159df995329b3a84340d32761f3d1dbade GIT binary patch literal 260 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl#{26V at SoVqz8vtc$~v}dc~O{CLEF2anNavMpdMP)0v(X&o(k0opIq!LdvtJ wj~up7 at 0`wiSoe($&y07EkGxK6U|?nlJSz0{?wJWUfu=Edy85}Sb4q9e0C9MGu>b%7 literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc_disabled.png b/koha-tmpl/intranet-tmpl/prog/img/datatables/sort_desc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..2409653dc94cd21a281a31c0e3819323b84704b7 GIT binary patch literal 251 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnX`r z7srr_TS*TNvhX;E^>j)zMNBv%VR68zN24n8K+>5N&kUJbBQCy4c=qgBiu3mAQ)hD? n)_oJhGvi(If!Apb49pB3GXz|UGFKJ=4P)?h^>bP0l+XkK*57ji literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/en/css/datatables.css b/koha-tmpl/opac-tmpl/prog/en/css/datatables.css new file mode 100644 index 0000000..e069b93 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/css/datatables.css @@ -0,0 +1,114 @@ +input.search_init { + color: #999999; +} +.sorting_asc { + padding-right: 19px; + background: url("../../img/datatables/sort_asc.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc { + padding-right: 19px; + background: url("../../img/datatables/sort_desc.png") no-repeat scroll right center #EEEEEE; +} +.sorting { + padding-right: 19px; + background: url("../../img/datatables/sort_both.png") no-repeat scroll right center #EEEEEE; +} +.sorting_asc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_desc_disabled { + padding-right: 19px; + background: url("../../img/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE; +} +.sorting_disabled { + padding-right: 19px; + background-color: #EEEEEE; +} + +table.display { + width: 100%; +} +table.display thead th { + border-bottom: 1px solid black; + cursor: pointer; + font-weight: bold; + padding: 3px 18px 3px 10px; +} +.dataTables_wrapper { + clear: both; + position: relative; +} +.dataTables_processing { + background-color: white; + border: 1px solid #DDDDDD; + color: #999999; + font-size: 14px; + height: 30px; + left: 50%; + margin-left: -125px; + margin-top: -15px; + padding: 14px 0 2px; + position: fixed; + text-align: center; + top: 50%; + width: 250px; +} +.dataTables_info { + float: left; + width: 60%; +} +.dataTables_paginate { + float: right; + text-align: right; + width: 44px; +} +.paging_full_numbers { + height: 22px; + line-height: 22px; + width: 400px; +} +.paging_full_numbers span.paginate_button, + .paging_full_numbers span.paginate_active { + border: 1px solid #aaa; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + padding: 2px 5px; + margin: 0 3px; + cursor: pointer; + *cursor: hand; +} + +.paging_full_numbers span.paginate_button { + background-color: #ddd; +} + +.paging_full_numbers span.paginate_button:hover { + background-color: #ccc; +} + +.paging_full_numbers span.paginate_active { + background-color: #99B3FF; +} +.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { + float: left; + height: 19px; + margin-left: 3px; + width: 19px; +} +.paginate_disabled_previous { + background-image: url("../../img/datatables/back_disabled.jpg"); +} +.paginate_enabled_previous { + background-image: url("../../img/datatables/back_enabled.jpg"); +} +.paginate_disabled_next { + background-image: url("../../img/datatables/forward_disabled.jpg"); +} +.paginate_enabled_next { + background-image: url("../../img/datatables/forward_enabled.jpg"); +} +.spacer { + clear: both; + height: 20px; +} diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc b/koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc new file mode 100644 index 0000000..183f511 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/includes/datatables-strings.inc @@ -0,0 +1,17 @@ + diff --git a/koha-tmpl/opac-tmpl/prog/en/js/datatables.js b/koha-tmpl/opac-tmpl/prog/en/js/datatables.js new file mode 100644 index 0000000..38dd1d5 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/js/datatables.js @@ -0,0 +1,281 @@ +// These default options are for translation but can be used +// for any other datatables settings +// MSG_DT_* variables comes from datatables-strings.inc +// To use it, write: +// $("#table_id").dataTable($.extend(true, {}, dataTableDefaults, { +// // other settings +// } ) ); +var dataTablesDefaults = { + "oLanguage": { + "oPaginate": { + "sFirst" : window.MSG_DT_FIRST || "First", + "sLast" : window.MSG_DT_LAST || "Last", + "sNext" : window.MSG_DT_NEXT || "Next", + "sPrevious" : window.MSG_DT_PREVIOUS || "Previous" + }, + "sEmptyTable" : window.MSG_DT_EMPTY_TABLE || "No data available in table", + "sInfo" : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries", + "sInfoEmpty" : window.MSG_DT_INFO_EMPTY || "No entries to show", + "sInfoFiltered" : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)", + "sLengthMenu" : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries", + "sLoadingRecords" : window.MSG_DT_LOADING_RECORDS || "Loading...", + "sProcessing" : window.MSG_DT_PROCESSING || "Processing...", + "sSearch" : window.MSG_DT_SEARCH || "Search:", + "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" + } +}; + + +// Return an array of string containing the values of a particular column +$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { + // check that we have a column id + if ( typeof iColumn == "undefined" ) return new Array(); + // by default we only wany unique data + if ( typeof bUnique == "undefined" ) bUnique = true; + // by default we do want to only look at filtered data + if ( typeof bFiltered == "undefined" ) bFiltered = true; + // by default we do not wany to include empty values + if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true; + // list of rows which we're going to loop through + var aiRows; + // use only filtered rows + if (bFiltered == true) aiRows = oSettings.aiDisplay; + // use all rows + else aiRows = oSettings.aiDisplayMaster; // all row numbers + + // set up data array + var asResultData = new Array(); + for (var i=0,c=aiRows.length; i -1) continue; + // else push the value onto the result data array + else asResultData.push(sValue); + } + return asResultData; +} + +// List of unbind keys (Ctrl, Alt, Direction keys, etc.) +// These keys must not launch filtering +var blacklist_keys = new Array(0, 16, 17, 18, 37, 38, 39, 40); + +// Set a filtering delay for global search field +jQuery.fn.dataTableExt.oApi.fnSetFilteringDelay = function ( oSettings, iDelay ) { + /* + * Inputs: object:oSettings - dataTables settings object - automatically given + * integer:iDelay - delay in milliseconds + * Usage: $('#example').dataTable().fnSetFilteringDelay(250); + * Author: Zygimantas Berziunas (www.zygimantas.com) and Allan Jardine + * License: GPL v2 or BSD 3 point style + * Contact: zygimantas.berziunas /AT\ hotmail.com + */ + var + _that = this, + iDelay = (typeof iDelay == 'undefined') ? 250 : iDelay; + + this.each( function ( i ) { + $.fn.dataTableExt.iApiIndex = i; + var + $this = this, + oTimerId = null, + sPreviousSearch = null, + anControl = $( 'input', _that.fnSettings().aanFeatures.f ); + + anControl.unbind( 'keyup.DT' ).bind( 'keyup.DT', function(event) { + var $$this = $this; + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( $(this).val() ); + } else { + if (sPreviousSearch === null || sPreviousSearch != anControl.val()) { + window.clearTimeout(oTimerId); + sPreviousSearch = anControl.val(); + oTimerId = window.setTimeout(function() { + $.fn.dataTableExt.iApiIndex = i; + _that.fnFilter( anControl.val() ); + }, iDelay); + } + } + }); + + return this; + } ); + return this; +} + +// Add a filtering delay on general search and on all input (with a class 'filter') +jQuery.fn.dataTableExt.oApi.fnAddFilters = function ( oSettings, sClass, iDelay ) { + var table = this; + this.fnSetFilteringDelay(iDelay); + var filterTimerId = null; + $("input."+sClass).keyup(function(event) { + if (blacklist_keys.indexOf(event.keyCode) != -1) { + return this; + }else if ( event.keyCode == '13' ) { + table.fnFilter( $(this).val(), $(this).attr('data-column_num') ); + } else { + window.clearTimeout(filterTimerId); + var input = this; + filterTimerId = window.setTimeout(function() { + table.fnFilter($(input).val(), $(input).attr('data-column_num')); + }, iDelay); + } + }); +} + +// Useful if you want to filter on dates with 2 inputs (start date and end date) +// You have to include calendar.inc to use it +function dt_add_rangedate_filter(begindate_id, enddate_id, dateCol) { + $.fn.dataTableExt.afnFiltering.push( + function( oSettings, aData, iDataIndex ) { + + var beginDate = Date_from_syspref($("#"+begindate_id).val()).getTime(); + var endDate = Date_from_syspref($("#"+enddate_id).val()).getTime(); + + var data = Date_from_syspref(aData[dateCol]).getTime(); + + if ( !parseInt(beginDate) && ! parseInt(endDate) ) { + return true; + } + else if ( beginDate <= data && !parseInt(endDate) ) { + return true; + } + else if ( data <= endDate && !parseInt(beginDate) ) { + return true; + } + else if ( beginDate <= data && data <= endDate) { + return true; + } + return false; + } + ); +} + +//Sorting for dates (uk format) +function dt_add_type_uk_date() { + jQuery.fn.dataTableExt.aTypes.unshift( + function ( sData ) + { + if (sData.match(/(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20|21)\d\d/)) + { + return 'uk_date'; + } + return null; + } + ); + + jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }; + + jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) { + var re = /(\d{2}\/\d{2}\/\d{4})/; + a.match(re); + var ukDatea = RegExp.$1.split("/"); + b.match(re); + var ukDateb = RegExp.$1.split("/"); + + var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; + var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; + + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }; +} + +// Sorting on html contains +// bar sort on 'bar' +function dt_overwrite_html_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['html-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['html-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Sorting on string without accentued characters +function dt_overwrite_string_sorting_localeCompare() { + jQuery.fn.dataTableExt.oSort['string-asc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if (typeof(a.localeCompare == "function")) { + return a.localeCompare(b); + } else { + return (a > b) ? 1 : ((a < b) ? -1 : 0); + } + }; + + jQuery.fn.dataTableExt.oSort['string-desc'] = function(a,b) { + a = a.replace(/<.*?>/g, "").replace(/\s+/g, " "); + b = b.replace(/<.*?>/g, "").replace(/\s+/g, " "); + if(typeof(b.localeCompare == "function")) { + return b.localeCompare(a); + } else { + return (b > a) ? 1 : ((b < a) ? -1 : 0); + } + }; +} + +// Replace a node with a html and js contain. +function replace_html( original_node, type ) { + switch ( $(original_node).attr('data-type') ) { + case "range_dates": + var id = $(original_node).attr("data-id"); + var format = $(original_node).attr("data-format"); + replace_html_date( original_node, id, format ); + break; + default: + alert("_(This node can't be replaced)"); + } +} + +// Replace a node with a "From [date] To [date]" element +// Used on tfoot > td +function replace_html_date( original_node, id, format ) { + var node = $('' + _("From") + '×
    ' + _("To") + '×'); + $(original_node).replaceWith(node); + var script = document.createElement( 'script' ); + script.type = 'text/javascript'; + var script_content = "Calendar.setup({"; + script_content += " inputField: \"" + id + "from\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "from\","; + script_content += " onClose: function(){ $(\"#" + id + "from\").change(); this.hide();}"; + script_content += " });"; + script_content += " Calendar.setup({"; + script_content += " inputField: \"" + id + "to\","; + script_content += " ifFormat: \"" + format + "\","; + script_content += " button: \"" + id + "to\","; + script_content += " onClose: function(){ $(\"#" + id + "to\").change(); this.hide();}"; + script_content += " });"; + script.text = script_content; + $(original_node).append( script ); +} diff --git a/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js new file mode 100644 index 0000000..9035a2e --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js @@ -0,0 +1,153 @@ +/* + * File: jquery.dataTables.min.js + * Version: 1.8.1 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Info: www.datatables.net + * + * Copyright 2008-2010 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + */ +(function(i,wa,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var o=i.fn.dataTableExt;o.sVersion="1.8.1";o.sErrMode="alert";o.iApiIndex=0;o.oApi={};o.afnFiltering=[];o.aoFeatures=[];o.ofnSearch={};o.afnSortData=[];o.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", +sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", +sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};o.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left", +sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled", +sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default", +sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll", +sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};o.oPagination={two_button:{fnInit:function(g,l,r){var s,w,y;if(g.bJUI){s=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev; +s.appendChild(y)}else{s=p.createElement("div");w=p.createElement("div")}s.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;s.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(s);l.appendChild(w);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(s).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false}); +if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,r=0,s=l.length;r=w-s){s=w-r+1;x=w}else{s=y-Math.ceil(r/2)+1;x=s+r-1}for(r=s;r<=x;r++)G+=y!=r?''+r+"":''+r+"";x=g.aanFeatures.p;var z,Y=function(L){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);L.preventDefault()},V=function(){return false};r=0;for(s=x.length;rl?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return gl?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g< +l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return gl?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l- +g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};o.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,r=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var s=1;s")!=-1)return"html";return null}];o.fnVersionCheck=function(g){var l=function(x,v){for(;x.length=parseInt(w,10)};o._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal= +function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance= +this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table", +sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false, +bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button"; +this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})}; +this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;dtr>th",a.nTFoot).addClass(a.oClasses.sFooterTH);if(a.nTFoot!==null){c=S(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!za(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h=h;htr",a.nTHead)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback== +"function"&&a.fnFooterCallback.call(a.oInstance,i(">tr",a.nTFoot)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function ba(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);else{E(a);C(a)}}function za(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d,f;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ha(a)}); +c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:-1});for(f=0;f")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ca(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Da(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ea(a);e=1}else if(h=="t"){f=Fa(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ga(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=Ha(a);e=1}else if(o.aoFeatures.length!== +0){j=o.aoFeatures;t=0;for(k=j.length;tcaption",a.nTable);h=0;for(k=d.length;hi(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true); +a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var O=S(a,h);f=0;for(e=O.length;ff-a.oScroll.iBarWidth)a.nTable.style.width=u(f)}else a.nTable.style.width=u(f);f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){d.style.width=u(f+a.oScroll.iBarWidth);b.parentNode.style.width=u(f+a.oScroll.iBarWidth)}e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop= +"0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},j,k);i(j).height(0)}P(function(B){B.innerHTML="";B.style.width=u(I.shift())},h);a.nTFoot!==null&&P(function(B){B.innerHTML= +"";B.style.width=u(I.shift())},j);if(i(a.nTable).outerWidth()d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight'):b===""?'':b+' '; +var c=p.createElement("div");c.className=a.oClasses.sFilter;c.innerHTML="";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f=0;d--){f=ma(H(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Ka(a,b,c,d,f){var e=la(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(o.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length> +b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);ka(a,1);for(c=0;c/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=o.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!== +null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c=h)for(b=0;b=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart= +0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function Ga(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Na,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Na(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j= +a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_", +e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]== +"object"){c=0;for(d=a.aLengthMenu[0].length;c'+a.aLengthMenu[1][c]+""}else{c=0;for(d=a.aLengthMenu.length;c'+a.aLengthMenu[c]+""}b+="";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");f.className=a.oClasses.sLength;f.innerHTML="";i('select option[value="'+ +a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;ca.aiDisplay.length|| +a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Oa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=u(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th",a.nTHead);for(e=0;etd",b);h=S(a,e);for(e=d=0;e0)a.aoColumns[e].sWidth=u(c);d++}a.nTable.style.width=u(i(b).outerWidth());b.parentNode.removeChild(b)}}function Qa(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=u(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=u(i(b).outerWidth())}function Pa(a,b){var c= +Ra(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=H(a,c,b,"");return d}return Q(a,c)[b]}function Ra(a,b){for(var c=-1,d=-1,f=0;f/g,"");if(e.length>c){c=e.length;d=f}}return d}function u(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+"px"}function Va(a,b){if(a.length!=b.length)return 1;for(var c= +0;cb&&a[d]--;c!=-1&&a.splice(c,1)}function Ba(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d4096){a=p.cookie.split(";");for(var j=0,k=a.length;j=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[o.iApiIndex]);ia(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[o.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=X(d);if(typeof b.jquery!="undefined"||typeof b== +"object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[o.iApiIndex]),c=0;c=X(d);if(!j)for(f=a;ftr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();if(a.nTable!=a.nTHead.parentNode){i(">thead",a.nTable).remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&& +a.nTable!=a.nTFoot.parentNode){i(">tfoot",a.nTable).remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];T(a);i($(a)).removeClass(a.asStripClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oJUIClasses.sSortableAsc,o.oJUIClasses.sSortableDesc,o.oJUIClasses.sSortableNone].join(" "));i("th span."+o.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e= +i("div."+o.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oStdClasses.sSortableAsc,o.oStdClasses.sSortableDesc,o.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;dtr:even",c).addClass(a.asDestoryStrips[0]);i(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;dt<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ua();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart= +g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ta(e,g);e.aoDrawCallback.push({fn:sa,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!== +""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(t){y(e,t,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=i(">tbody>tr",this);a=0;for(b=e.asStripClasses.length;a=0;a--){var m=g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c=0){for(;e.aoColumns.length<=m[c];)G(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]== +"number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&& +typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;cthead",this);if(a.length===0){a=[p.createElement("thead")];this.appendChild(a[0])}e.nTHead=a[0];a=i(">tbody",this);if(a.length===0){a=[p.createElement("tbody")];this.appendChild(a[0])}e.nTBody=a[0];a=i(">tfoot",this);if(a.length>0){e.nTFoot=a[0];W(e.aoFooter,e.nTFoot)}if(j)for(a=0;aC5UDGKfoZ!!63{a%*-grz$D1XEXer(2tyUn z+02YUSHb}sD?0}l&^EXLguy7lz`(-H!phDIlVN0HVHIR%V-ON%S2Pq6HFFG{Xryc+ zmRQ($@S#&sld*HEn>dFcBLmQ_$YwDLDjGT#PW*q1fd^^;oX+iLI)z|@;wX;U8Xr> zT8Qgxn;R!Cottl}#(8Ri${a3d=J*$R5qBRbK9bRJe*4BYwq9(uIM4mLS9%TSY?*y6 zE==owYH)vf>dq6(Uzum+IyVJqc3N&dRPD57vW(=l(=(DZ-K_!LSx zwPk@>bN at 4B-OI9gCf>Wc_;CDAS%c at BJZ}kBlbDz~@y-*&Y^_U+@};q`xNUthN} On^Cj9W}Eu@|2F})$f79# literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/back_enabled.jpg b/koha-tmpl/opac-tmpl/prog/images/datatables/back_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a6d764c79c7a2047b6bf65bf9d96fcafd5161e38 GIT binary patch literal 807 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2*U&h z1}0{pBN2d|gO!bok%5r~RhW^Pm5qg+Lx6#Sm5Gs^od+h%$i&RTD#*spplB#0EW!~u z(MZ`u)XXulu<_tSr=TWdXR%Z_aiE1jZ7eM8Fl&IpCkWK1$Y$s$#2&a&N#sM~M5iWU z<^Q)Bc$gW1&SMs2uxGfw`}E06etb^r9k|jMc at Dlk(IlSD-Wwx*G{%4ThHhR%HnTsw zbu3z!=BtbC=-In5f5nt;je{+vrKZdWckk$U`c^FEYC6}Jn=lG)17QB>6z3khm7PHhg<-pEGSO0F>VA}N6`w53!8pr$>MbUW| zMEsFn=(%w+^5v0yp7Lmb+~3PpI4(#G~bQ$y_;t)oo+U5`bnSHZcn){CH~m7Ys2rz z2!R at xgGrCtcPz?eOPOzKr2P26p~(mTGjR1-c3?psA>uUGsyt|R2Ts3~!B zN71DGSrW%W*`w8#2{O$LX)%%8*<4Ycyr;tN(Hm8|M=_HtvR>P P+Rcr(b5Xx$|NkZcT0jT? literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/forward_disabled.jpg b/koha-tmpl/opac-tmpl/prog/images/datatables/forward_disabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..28a9dc53fa232919299ac980dc9b61167c1868bd GIT binary patch literal 635 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tySE z1JEp>E8&2Nm4%I+g9~UMTnNHo6kuRrVP;|B;)Y2uGBL9Vva&GlzGLeh=CM*_u2I6%$1L~6;-1yGa|?*FvavCW+Av>{Flt>+*?d?iZ`9)^O?_H|D3t8;Og6lD<#WHQvW(mo1ETsD>A at mr8@sqg(?1R z%d at qrmWLWmIn1#pQuo}{brVW*C8t%EDXbOt_DabwXgGW3;wDX1;~7hWrYL+ZX=qre z&-y^2q0zm?-FJb#(AWJTHOJ-3`S`D|JEhzC{KvY_h0kZinXP-?w!g_L at p#JQO^!z$ mYCgVwS7#SryXs@?>&L&t^Z(SozHVt~@Z#>58}s)6zX<@qORf(9 literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/forward_enabled.jpg b/koha-tmpl/opac-tmpl/prog/images/datatables/forward_enabled.jpg new file mode 100644 index 0000000000000000000000000000000000000000..598c075f13ab0e4bbe05a4eeea7cf777ba73cf03 GIT binary patch literal 852 zcmex=C5UDGKfoZ!!63{a%*-grz$D1XEXer(2tywO z0~0eN(3Nn&%Fe>Z!NthH$ciG&$iU3P%Em6hz`z1zu=B#yGcqx=2(q#<2(fb*3M-3< zDh5t8G7&R#Oe}1C=oHjs?40T*F37+LbR`oj+(bq}CT0c}Rz*W0Hg?Cv#)(EB0yioN zi~PUEzyov)lOVGogFVA5dn3uE%Z<*rn&ugY^FIG9<<=87L*?mOy^~u`Rq(Eg+UDw^ z@^Uh}zJ$t~P2YpRT#sm2p`oEt8zJ-EBRfY;>b?DxZo!24Z)Q(O&}!Mbt}27`dKa(x zr)AHkZg5MjKa&4$syaupXWNXgp32dQs_rj-?|M=Q9pN^hZg^mV7=UWs>}D5 z$40(ME7Q1T4h8p}ZJ8O!G-Xk84;P~#ci!&o`A5I3kG at gLm*VlJbn%kvSqIh?3Y?HQ zAX0NL>XIkpf=MN83*!%}9-aN5)p7^py2Am>F9gW&pFSp#V0dxX#ZPW;UoD(gaI at 8E z(rNQz1DBIiM13!LtZ|85lHB@$wW~n0fhRz-$?R&m{@z;uI}N|35As;}zdXB<I#+N1k=r*G-&mI78vJ_Ezs!yIV%J}l7d*c9>7Bn;xyLT84V&`$ z at 9WMTAJ6DZyR)~=FS6P2e3MDv7lHB>{C&1H^7EJ9PIf=EdUwUYtGE9%$X9(m*ZWLf M_rC2^{;K~s0TRp{r2qf` literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc.png new file mode 100644 index 0000000000000000000000000000000000000000..a56d0e21902ce620cd57f87fa58a6d3e804135cf GIT binary patch literal 263 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl&hzUV at SoVE9Xw~GAQscA1s)^?0*rXqM}DeLv7?|BU8z at QCOGupVzP9Hek5&L+Gnl%BD>~0~tJB{an^LB{Ts5b0m7= literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc_disabled.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_asc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..b7e621ef1c68da839ce077cec6e201a55c1ba168 GIT binary patch literal 252 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnW*L z7srr_TUXBQ7GeV6G?@}f$7k6Jhw{qGm$-QDzD`qrDaZ3s$b2XF;fBBPU nqjNDy&Nw~puHFA+-v&m8`?>-yUFVHK{$ucT^>bP0l+XkKhw^g= literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_both.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_both.png new file mode 100644 index 0000000000000000000000000000000000000000..839ac4bb5b0b414834c950de9deafff6dd94ed2d GIT binary patch literal 282 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0K#2rT z7srr_TRjsz`4|*ASOSl%eg6Ob+(JtRwX|O at S}a^IESQCgTe~DWM4fR9b+X literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc.png new file mode 100644 index 0000000000000000000000000000000000000000..90b295159df995329b3a84340d32761f3d1dbade GIT binary patch literal 260 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>l2Ka=y{`vF&J9*~+_wWBdfBFCW_y37A{>@tOZ^^2EJ(K_a|Nno&o$%d2jr=7+e!)O45 at 5J; zXU0OHl#{26V at SoVqz8vtc$~v}dc~O{CLEF2anNavMpdMP)0v(X&o(k0opIq!LdvtJ wj~up7 at 0`wiSoe($&y07EkGxK6U|?nlJSz0{?wJWUfu=Edy85}Sb4q9e0C9MGu>b%7 literal 0 HcmV?d00001 diff --git a/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc_disabled.png b/koha-tmpl/opac-tmpl/prog/images/datatables/sort_desc_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..2409653dc94cd21a281a31c0e3819323b84704b7 GIT binary patch literal 251 zcmeAS at N?(olHy`uVBq!ia0vp^!XV7S3?yCqj{O5tEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=)2l#}z{`>du$&)AV- at pIyd9;k)4B*-rq$b|z2+ZRf0KnX`r z7srr_TS*TNvhX;E^>j)zMNBv%VR68zN24n8K+>5N&kUJbBQCy4c=qgBiu3mAQ)hD? n)_oJhGvi(If!Apb49pB3GXz|UGFKJ=4P)?h^>bP0l+XkK*57ji literal 0 HcmV?d00001 -- 1.7.7.3 From julian.maurice at biblibre.com Fri Dec 2 12:40:08 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 2 Dec 2011 12:40:08 +0100 Subject: [Koha-patches] [PATCH 2/4] Bug 6836: followup CSS work In-Reply-To: <1322826009-18320-1-git-send-email-julian.maurice@biblibre.com> References: <1322826009-18320-1-git-send-email-julian.maurice@biblibre.com> Message-ID: <1322826009-18320-2-git-send-email-julian.maurice@biblibre.com> From: Owen Leonard --- koha-tmpl/intranet-tmpl/prog/en/css/datatables.css | 157 +++++++++++++++++++- koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 105 +++++++++++++- koha-tmpl/opac-tmpl/prog/en/css/datatables.css | 157 +++++++++++++++++++- koha-tmpl/opac-tmpl/prog/en/js/datatables.js | 105 +++++++++++++- 4 files changed, 516 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css index e069b93..e7b11bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css @@ -3,15 +3,15 @@ input.search_init { } .sorting_asc { padding-right: 19px; - background: url("../../img/datatables/sort_asc.png") no-repeat scroll right center #EEEEEE; + background: url("../../img/asc.gif") no-repeat scroll right center #EEEEEE; } .sorting_desc { padding-right: 19px; - background: url("../../img/datatables/sort_desc.png") no-repeat scroll right center #EEEEEE; + background: url("../../img/desc.gif") no-repeat scroll right center #EEEEEE; } .sorting { padding-right: 19px; - background: url("../../img/datatables/sort_both.png") no-repeat scroll right center #EEEEEE; + background: url("../../img/ascdesc.gif") no-repeat scroll right center #EEEEEE; } .sorting_asc_disabled { padding-right: 19px; @@ -26,6 +26,157 @@ input.search_init { background-color: #EEEEEE; } +div.top {clear : both; } + +div.top.pager, +div.bottom.pager { + background-color : #E5E5E5; + padding : 0; +} + +div.bottom.pager div.dataTables_paginate.paging_full_numbers, +div.bottom.pager div.dataTables_paginate.paging_four_button { + border-right-width : 0; +} + +div.dataTables_filter, +div.dataTables_length, +div.dataTables_info, +div.dataTables_paginate { + float: left; + padding : .3em .5em .3em .5em; + +} +div.dataTables_length { + border-right : 1px solid #686868; + line-height:1.9em; +} +div.dataTables_info { + border-right : 1px solid #AAA; + line-height:1.9em; +} +div.dataTables_length, +div.dataTables_filter { + border-left : 1px solid #FFF; +} +div.dataTables_filter { + line-height : 1.9em; +} +div.dataTables_paginate { + background-color : #F4F4F4; + font-size: 110%; + padding : 0; +} + +.paging_full_numbers span.paginate_button, +.paging_full_numbers span.paginate_active { + border-right : 1px solid #AAA; + border-left : 1px solid #FFF; + display : block; + float : left; + line-height:1.6em; + padding: .3em .7em; + cursor: pointer; +} + +.paging_full_numbers span.paginate_button { + color : #0000CC; +} +.paging_full_numbers span.paginate_button.first { + background-image : url('../../img/first.png'); + background-repeat: no-repeat; + background-position : 2px center; + padding-left : 2em; +} +.paging_full_numbers span.paginate_button.previous { + background-image : url('../../img/prev.png'); + background-repeat: no-repeat; + background-position : 2px center; + padding-left : 2em; +} +.paging_full_numbers span.paginate_button.next { + background-image : url('../../img/next.png'); + background-repeat: no-repeat; + background-position : right center; + padding-right : 2em; +} +.paging_full_numbers span.paginate_button.last { + background-image : url('../../img/last.png'); + background-repeat: no-repeat; + background-position : right center; + border-right : 1px solid #686868; + padding-right : 2em; +} +div.bottom.pager .paging_full_numbers span.paginate_button.last { + border-right-width : 0; +} +.paging_full_numbers span.paginate_active { + background-color : #FFFFEA; + color : #000; + font-weight: bold; +} + +.paging_full_numbers span.paginate_button:hover { + background-color: #FFC; +} + +.paging_full_numbers span.paginate_button.paginate_button_disabled { + color : #666; +} + +/* Two-button version */ + +div.dataTables_paginate.paging_two_button, +div.dataTables_paginate.paging_four_button { + background-color : transparent; + border-right : 1px solid #686868; + border-left : 1px solid #FFF; + line-height : 1.8em; +} +.paginate_disabled_first, +.paginate_enabled_first, +.paginate_disabled_previous, +.paginate_enabled_previous, +.paginate_disabled_next, +.paginate_enabled_next, +.paginate_disabled_last, +.paginate_enabled_last { + float: left; + height: 16px; + margin: .5em; + width: 16px; +} +.paginate_disabled_first { + background-image: url("../../img/first-disabled.png"); +} +.paginate_enabled_first { + background-image: url("../../img/first.png"); + cursor: pointer; +} +.paginate_disabled_previous { + background-image: url("../../img/prev-disabled.png"); +} +.paginate_enabled_previous { + background-image: url("../../img/prev.png"); + cursor: pointer; +} +.paginate_disabled_next { + background-image: url("../../img/next-disabled.png"); +} +.paginate_enabled_next { + background-image: url("../../img/next.png"); + cursor: pointer; +} +.paginate_disabled_last { + background-image: url("../../img/last-disabled.png"); +} +.paginate_enabled_last { + background-image: url("../../img/last.png"); + cursor: pointer; +} + + +/* table.display { width: 100%; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js index 38dd1d5..e0cc888 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js @@ -22,7 +22,8 @@ var dataTablesDefaults = { "sProcessing" : window.MSG_DT_PROCESSING || "Processing...", "sSearch" : window.MSG_DT_SEARCH || "Search:", "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" - } + }, + "sDom": '<"top pager"ilpf>t<"bottom pager"ip>' }; @@ -279,3 +280,105 @@ function replace_html_date( original_node, id, format ) { script.text = script_content; $(original_node).append( script ); } + +$.fn.dataTableExt.oPagination.four_button = { + /* + * Function: oPagination.four_button.fnInit + * Purpose: Initalise dom elements required for pagination with a list of the pages + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * node:nPaging - the DIV which contains this pagination control + * function:fnCallbackDraw - draw function which must be called on update + */ + "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) + { + nFirst = document.createElement( 'span' ); + nPrevious = document.createElement( 'span' ); + nNext = document.createElement( 'span' ); + nLast = document.createElement( 'span' ); + +/* nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) ); + nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) ); + nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) ); + nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) );*/ + + nFirst.className = "paginate_button first"; + nPrevious.className = "paginate_button previous"; + nNext.className="paginate_button next"; + nLast.className = "paginate_button last"; + + nPaging.appendChild( nFirst ); + nPaging.appendChild( nPrevious ); + nPaging.appendChild( nNext ); + nPaging.appendChild( nLast ); + + $(nFirst).click( function () { + oSettings.oApi._fnPageChange( oSettings, "first" ); + fnCallbackDraw( oSettings ); + } ); + + $(nPrevious).click( function() { + oSettings.oApi._fnPageChange( oSettings, "previous" ); + fnCallbackDraw( oSettings ); + } ); + + $(nNext).click( function() { + oSettings.oApi._fnPageChange( oSettings, "next" ); + fnCallbackDraw( oSettings ); + } ); + + $(nLast).click( function() { + oSettings.oApi._fnPageChange( oSettings, "last" ); + fnCallbackDraw( oSettings ); + } ); + + /* Disallow text selection */ + $(nFirst).bind( 'selectstart', function () { return false; } ); + $(nPrevious).bind( 'selectstart', function () { return false; } ); + $(nNext).bind( 'selectstart', function () { return false; } ); + $(nLast).bind( 'selectstart', function () { return false; } ); + }, + + /* + * Function: oPagination.four_button.fnUpdate + * Purpose: Update the list of page buttons shows + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * function:fnCallbackDraw - draw function which must be called on update + */ + "fnUpdate": function ( oSettings, fnCallbackDraw ) + { + if ( !oSettings.aanFeatures.p ) + { + return; + } + + /* Loop over each instance of the pager */ + var an = oSettings.aanFeatures.p; + for ( var i=0, iLen=an.length ; it<"bottom pager"ip>' }; @@ -279,3 +280,105 @@ function replace_html_date( original_node, id, format ) { script.text = script_content; $(original_node).append( script ); } + +$.fn.dataTableExt.oPagination.four_button = { + /* + * Function: oPagination.four_button.fnInit + * Purpose: Initalise dom elements required for pagination with a list of the pages + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * node:nPaging - the DIV which contains this pagination control + * function:fnCallbackDraw - draw function which must be called on update + */ + "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) + { + nFirst = document.createElement( 'span' ); + nPrevious = document.createElement( 'span' ); + nNext = document.createElement( 'span' ); + nLast = document.createElement( 'span' ); + +/* nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) ); + nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) ); + nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) ); + nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) );*/ + + nFirst.className = "paginate_button first"; + nPrevious.className = "paginate_button previous"; + nNext.className="paginate_button next"; + nLast.className = "paginate_button last"; + + nPaging.appendChild( nFirst ); + nPaging.appendChild( nPrevious ); + nPaging.appendChild( nNext ); + nPaging.appendChild( nLast ); + + $(nFirst).click( function () { + oSettings.oApi._fnPageChange( oSettings, "first" ); + fnCallbackDraw( oSettings ); + } ); + + $(nPrevious).click( function() { + oSettings.oApi._fnPageChange( oSettings, "previous" ); + fnCallbackDraw( oSettings ); + } ); + + $(nNext).click( function() { + oSettings.oApi._fnPageChange( oSettings, "next" ); + fnCallbackDraw( oSettings ); + } ); + + $(nLast).click( function() { + oSettings.oApi._fnPageChange( oSettings, "last" ); + fnCallbackDraw( oSettings ); + } ); + + /* Disallow text selection */ + $(nFirst).bind( 'selectstart', function () { return false; } ); + $(nPrevious).bind( 'selectstart', function () { return false; } ); + $(nNext).bind( 'selectstart', function () { return false; } ); + $(nLast).bind( 'selectstart', function () { return false; } ); + }, + + /* + * Function: oPagination.four_button.fnUpdate + * Purpose: Update the list of page buttons shows + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * function:fnCallbackDraw - draw function which must be called on update + */ + "fnUpdate": function ( oSettings, fnCallbackDraw ) + { + if ( !oSettings.aanFeatures.p ) + { + return; + } + + /* Loop over each instance of the pager */ + var an = oSettings.aanFeatures.p; + for ( var i=0, iLen=an.length ; i References: <1322826009-18320-1-git-send-email-julian.maurice@biblibre.com> Message-ID: <1322826009-18320-3-git-send-email-julian.maurice@biblibre.com> --- .../prog/en/modules/members/readingrec.tt | 26 +++++++------------- 1 files changed, 9 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index 7469096..b4f8ebb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -1,21 +1,16 @@ [% INCLUDE 'doc-head-open.inc' %] Circulation History for [% firstname %] [% surname %] [% INCLUDE 'doc-head-close.inc' %] - - + + +[% INCLUDE 'datatables-strings.inc' %] + @@ -34,9 +29,6 @@ [% IF ( loop_reading ) %]
    -
    -[% INCLUDE 'table-pager.inc' perpage='20' %] -
    -- 1.7.7.3 From julian.maurice at biblibre.com Fri Dec 2 13:33:19 2011 From: julian.maurice at biblibre.com (Julian Maurice) Date: Fri, 2 Dec 2011 13:33:19 +0100 Subject: [Koha-patches] [PATCH] Bug 6147 : Correcting invalid RSS Message-ID: <1322829199-20700-1-git-send-email-julian.maurice@biblibre.com> From: Christophe Croullebois --- .../opac-tmpl/prog/en/modules/opac-opensearch.tt | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt index 0710344..14a5f3e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt @@ -14,11 +14,12 @@ [% IF ( rss2 ) %] <![CDATA[[% LibraryName |html %] Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc |html %]'[% END %]]]> [% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&format=rss2 - + [% total %] [% offset %] @@ -27,20 +28,19 @@ [% ELSE %] 20 [% END %] -
    Date
    - - - - - - [% FOREACH available_attribute_type IN available_attribute_types %] - - - - - - [% END %] -
    CodeDescriptionActions
    [% available_attribute_type.code |html %][% available_attribute_type.description %] - Edit - Delete -
    [% ELSE %]

    There are no saved patron attribute types.

    [% END %] +[% IF ( available_attribute_types ) %] + + + + + + + + + + + [% FOREACH available_attribute_type IN available_attribute_types %] + + + + + + + [% END %] + +
    ClassCodeDescriptionActions
    [% available_attribute_type.class |html %][% available_attribute_type.code |html %][% available_attribute_type.description %] + Edit + Delete +
    +[% ELSE %] +

    There are no saved patron attribute types.

    +[% END %]
    [% pagination_bar %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index b9371b6..9c31271 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -23,6 +23,16 @@ document.form.state.value=RegExp.$3; document.form.country.value=RegExp.$4; }); + + [% IF category_type %] + update_category_code( "[% category_type %]" ); + [% ELSE %] + if ( $("#categorycode").length > 0 ){ + var category_type = $("#categorycode").find("option:selected").attr("data-typename"); + update_category_code( category_type ); + } + [% END %] + }); function clear_entry(node) { @@ -51,6 +61,23 @@ $("select#patron_attr_" + newId, clone).attr('value',''); original.parentNode.insertBefore(clone, original.nextSibling); } + + function update_category_code(category_type) { + var mytable = $("#attributes_table>tbody"); + + mytable.find("tr").each(function(){ + $(this).hide() + }); + + mytable.find("tr[data-category_type="+category_type+"]").each(function(){ + $(this).show(); + }); + mytable.find("tr[data-category_type='']").each(function(){ + $(this).show(); + }); + + } + var MSG_SEPARATOR = _("Separator must be / in field "); var MSG_INCORRECT_DAY = _("Invalid day entered in field "); var MSG_INCORRECT_MONTH = _("Invalid month entered in field "); @@ -890,25 +917,25 @@
  • - [% FOREACH typeloo IN typeloop %] - [% FOREACH categoryloo IN typeloo.categoryloop %] - [% IF ( loop.first ) %] - [% IF ( categoryloo.typename_C ) %][% END %] - [% IF ( categoryloo.typename_A ) %][% END %] - [% IF ( categoryloo.typename_S ) %][% END %] - [% IF ( categoryloo.typename_I ) %][% END %] - [% IF ( categoryloo.typename_P ) %][% END %] - [% IF ( categoryloo.typename_X ) %][% END %] - [% END %] - [% IF ( categoryloo.categorycodeselected ) %] - - [% ELSE %] - - [% END %] - [% IF ( loop.last ) %] - - [% END %] + [% FOREACH categoryloo IN typeloo.categoryloop %] + [% IF ( loop.first ) %] + [% IF ( categoryloo.typename_C ) %][% END %] + [% IF ( categoryloo.typename_A ) %][% END %] + [% IF ( categoryloo.typename_S ) %][% END %] + [% IF ( categoryloo.typename_I ) %][% END %] + [% IF ( categoryloo.typename_P ) %][% END %] + [% IF ( categoryloo.typename_X ) %][% END %] + [% END %] + [% IF ( categoryloo.categorycodeselected ) %] + + [% ELSE %] + + [% END %] + [% IF ( loop.last ) %] + + [% END %] [% END %] [% END %] @@ -1180,14 +1207,20 @@
    Additional attributes and identifiers - - - - - +
    TypeValue
    + + + + + + + + [% FOREACH patron_attribute IN patron_attributes %] - - + + [% END %] +
    ClassTypeValue
    [% patron_attribute.code %] ([% patron_attribute.description %]) +
    [% patron_attribute.class %] + [% patron_attribute.code %] ([% patron_attribute.description %]) @@ -1228,6 +1261,7 @@
    [% END %][% END %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 454032c..439689f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -285,22 +285,35 @@ function validate1(date) { [% UNLESS ( no_patron_attribute_types ) %]

    Additional attributes and identifiers

    - - - - - - [% FOREACH extendedattribute IN extendedattributes %] - - - - +[% FOREACH attribute IN attributes_loop %] + [% IF attribute.class %] +

    [% attribute.class %]

    +
    TypeValue
    [% extendedattribute.code %] ([% extendedattribute.description %])[% extendedattribute.value %] - [% IF ( extendedattribute.value_description ) %] - ([% extendedattribute.value_description %]) - [% END %] -
    + [% ELSE %] +
    [% END %] -
    + + + Type + Description + Value + + + + [% FOREACH item IN attribute.items %] + + [% item.code %] + [% item.description %] + [% item.value %] + [% IF ( item.value_description ) %] + ([% item.value_description %]) + [% END %] + + + [% END %] + + +[% END %]
    [% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index d169dbd..0997888 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -407,6 +407,9 @@ if ($op eq 'add'){ if ($op eq "modify") { $template->param( updtype => 'M',modify => 1 ); $template->param( step_1=>1, step_2=>1, step_3=>1, step_4=>1, step_5 => 1, step_6 => 1) unless $step; + if ( $step = 4 ) { + $template->param( category_type => $borrower_data->{'categorycode'} ); + } } if ( $op eq "duplicate" ) { $template->param( updtype => 'I' ); @@ -760,11 +763,13 @@ sub patron_attributes_form { foreach my $type_code (map { $_->{code} } @types) { my $attr_type = C4::Members::AttributeTypes->fetch($type_code); my $entry = { + class => $attr_type->class(), code => $attr_type->code(), description => $attr_type->description(), repeatable => $attr_type->repeatable(), password_allowed => $attr_type->password_allowed(), category => $attr_type->authorised_value_category(), + category_type => $attr_type->category_type(), password => '', }; if (exists $attr_hash{$attr_type->code()}) { diff --git a/members/moremember.pl b/members/moremember.pl index 6e5407c..e48538e 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -252,7 +252,6 @@ my $issuecount = @{$issue}; my $relissuecount = @{$relissue}; my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} ); my $today = POSIX::strftime("%Y-%m-%d", localtime); # iso format -my @issuedata; my @borrowers_with_issues; my $overdues_exist = 0; my $totalprice = 0; @@ -432,11 +431,25 @@ my $branch=C4::Context->userenv->{'branch'}; $template->param(%$data); if (C4::Context->preference('ExtendedPatronAttributes')) { - my $attributes = GetBorrowerAttributes($borrowernumber); + my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber); + my @classes = uniq( map {$_->{class}} @$attributes ); + my @attributes_loop; + for my $class (@classes) { + my @items; + for my $attr (@$attributes) { + push @items, $attr if $attr->{class} eq $class + } + push @attributes_loop, { + class => $class, + items => \@items + }; + } + $template->param( ExtendedPatronAttributes => 1, - extendedattributes => $attributes + attributes_loop => \@attributes_loop ); + my @types = C4::Members::AttributeTypes::GetAttributeTypes(); if (scalar(@types) == 0) { $template->param(no_patron_attribute_types => 1); -- 1.7.7.3 From jonathan.druart at biblibre.com Fri Dec 2 16:33:13 2011 From: jonathan.druart at biblibre.com (Jonathan Druart) Date: Fri, 2 Dec 2011 16:33:13 +0100 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_5347=3A_Adds_columns_cla?= =?utf-8?q?ims=5Fcount_and_claimed=5Fdate_in_aqorders?= Message-ID: <1322839993-25575-1-git-send-email-jonathan.druart@biblibre.com> This patch adds 2 columns in the aqorders table : - claims_count : number of claims for an orders - claimed_date : date of the lastest claim In the lateorders.pl table, you can not select orders from different supplier because there is just one letter sent after clicking the "Claim order" button. So, it's logic that you want to select only orders from this supplier. Modification in C4/Letters.pm: refactoring code for claimacquisition and claimissues letter type. Now, fields for theses letters check the table name. It's not possible to chooce aqorders.title, this field doesn't exist ! Furthermore, you can add a tag around your item fields, like this : -- Begin example <> <> <> <> <> <> <> Library : <> In your possesssion : <>. <>. <>, <>. Callnumber : <>. doc type : <> Barcode : <> Date for the return : <>. <> -- End example --- C4/Acquisition.pm | 30 +++ C4/Letters.pm | 198 ++++++++------------ acqui/lateorders.pl | 18 ++- .../data/mysql/en/mandatory/sample_notices.sql | 2 +- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 2 +- installer/data/mysql/kohastructure.sql | 2 + .../data/mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/optional/sample_notices.sql | 2 +- .../data/mysql/uk-UA/mandatory/sample_notices.sql | 2 +- .../data/mysql/uk-UA/optional/sample_notices.sql | 2 +- installer/data/mysql/updatedatabase.pl | 6 + .../intranet-tmpl/prog/en/css/staff-global.css | 10 +- .../prog/en/modules/acqui/lateorders.tt | 39 ++++- 14 files changed, 185 insertions(+), 132 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 7127f24..e1d18f5 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -61,6 +61,8 @@ BEGIN { &GetContracts &GetContract &GetItemnumbersFromOrder + + &AddClaim ); } @@ -1416,9 +1418,12 @@ sub GetLateOrders { DATE(aqbasket.closedate) AS orderdate, aqorders.rrp AS unitpricesupplier, aqorders.ecost AS unitpricelib, + aqorders.claims_count AS claims_count, + aqorders.claimed_date AS claimed_date, aqbudgets.budget_name AS budget, borrowers.branchcode AS branch, aqbooksellers.name AS supplier, + aqbooksellers.id AS supplierid, biblio.author, biblio.title, biblioitems.publishercode AS publisher, biblioitems.publicationyear, @@ -1742,6 +1747,31 @@ sub GetContract { return $result; } +=head3 AddClaim + +=over 4 + +&AddClaim($ordernumber); + +Add a claim for an order + +=back + +=cut +sub AddClaim { + my ($ordernumber) = @_; + my $dbh = C4::Context->dbh; + my $query = " + UPDATE aqorders SET + claims_count = claims_count + 1, + claimed_date = CURDATE() + WHERE ordernumber = ? + "; + my $sth = $dbh->prepare($query); + $sth->execute($ordernumber); + +} + 1; __END__ diff --git a/C4/Letters.pm b/C4/Letters.pm index 6846a00..edd93a1 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -243,6 +243,7 @@ sub findrelatedto ($$) { sub SendAlerts { my ( $type, $externalid, $letter ) = @_; my $dbh = C4::Context->dbh; + my $strsth; if ( $type eq 'issue' ) { # warn "sending issues..."; @@ -290,99 +291,56 @@ sub SendAlerts { ); sendmail(%mail) or carp $Mail::Sendmail::error; -# warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; } } } elsif ( $type eq 'claimacquisition' ) { - # warn "sending issues..."; - my $letter = getletter( 'claimacquisition', $letter ); + $letter = getletter( 'claimacquisition', $letter ); # prepare the letter... # search the biblionumber - my $strsth = -"select aqorders.*,aqbasket.*,biblio.*,biblioitems.* from aqorders LEFT JOIN aqbasket on aqbasket.basketno=aqorders.basketno LEFT JOIN biblio on aqorders.biblionumber=biblio.biblionumber LEFT JOIN biblioitems on aqorders.biblioitemnumber=biblioitems.biblioitemnumber where aqorders.ordernumber IN (" - . join( ",", @$externalid ) . ")"; - my $sthorders = $dbh->prepare($strsth); - $sthorders->execute; - my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{booksellerid} ); - my $sthbookseller = - $dbh->prepare("select * from aqbooksellers where id=?"); - $sthbookseller->execute( $dataorders->[0]->{booksellerid} ); - my $databookseller = $sthbookseller->fetchrow_hashref; - - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; - } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; - } - } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; - - # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) - { - my %mail = ( - To => $databookseller->{bookselleremail} - . ( - $databookseller->{contemail} - ? "," . $databookseller->{contemail} - : "" - ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - } - if ( C4::Context->preference("LetterLog") ) { - logaction( - "ACQUISITION", - "Send Acquisition claim letter", - "", - "order list : " - . join( ",", @$externalid ) - . "\n$innerletter->{title}\n$innerletter->{content}" - ); + $strsth = qq{ + SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.*,aqbooksellers.* + FROM aqorders + LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno + LEFT JOIN biblio ON aqorders.biblionumber=biblio.biblionumber + LEFT JOIN biblioitems ON aqorders.biblioitemnumber=biblioitems.biblioitemnumber + LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id + WHERE aqorders.ordernumber IN ( } + . join( ",", @$externalid ) . ")"; } elsif ( $type eq 'claimissues' ) { - # warn "sending issues..."; - my $letter = getletter( 'claimissues', $letter ); + $letter = getletter( 'claimissues', $letter ); # prepare the letter... # search the biblionumber - my $strsth = -"select serial.*,subscription.*, biblio.* from serial LEFT JOIN subscription on serial.subscriptionid=subscription.subscriptionid LEFT JOIN biblio on serial.biblionumber=biblio.biblionumber where serial.serialid IN (" + $strsth = qq{ + SELECT serial.*,subscription.*, biblio.*, aqbooksellers.* + FROM serial + LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid + LEFT JOIN biblio ON serial.biblionumber=biblio.biblionumber + LEFT JOIN aqbooksellers ON subscription.aqbooksellerid=aqbooksellers.id + WHERE serial.serialid IN ( + } . join( ",", @$externalid ) . ")"; + } + + if ( $type eq 'claimacquisition' or $type eq 'claimissues' ) { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; - my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{aqbooksellerid} ); - my $sthbookseller = - $dbh->prepare("select * from aqbooksellers where id=?"); - $sthbookseller->execute( $dataorders->[0]->{aqbooksellerid} ); - my $databookseller = $sthbookseller->fetchrow_hashref; + my @fields = map { + $sthorders->{mysql_table}[$_] . "." . $sthorders->{NAME}[$_] } + (0 .. $#{$sthorders->{NAME}} ) ; + + my @orders_infos; + while ( my $row = $sthorders->fetchrow_arrayref() ) { + my %rec = (); + @rec{@fields} = @$row; + push @orders_infos, \%rec; + } # parsing branch info my $userenv = C4::Context->userenv; @@ -391,59 +349,65 @@ sub SendAlerts { # parsing librarian name $letter->{content} =~ s/<>/$userenv->{firstname}/g; $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; + $letter->{content} =~ s/<>/$userenv->{emailaddress}/g; + + # Get Fields remplacement + my $item_format = $1 if ( $letter->{content} =~ m/(.*<\/item>)/xms ); + + # Foreach field to remplace + while ( $letter->{content} =~ m/<<([^>]*)>>/g ) { + my $field = $1; + my $value = $orders_infos[0]->{$field} || ""; + $value = sprintf("%.2f", $value) if $field =~ /price/; + $letter->{content} =~ s/<<$field>>/$value/g; + } + + if ( $item_format ) { + # For each order + foreach my $infos ( @orders_infos ) { + my $order_content = $item_format; + # We replace by value + while ( $order_content =~ m/<<([^>]*)>>/g ) { + my $field = $1; + my $value = $infos->{$field} || ""; + $value = sprintf("%.2f", $value) if $field =~ /price/; + $order_content =~ s/(<<$field>>)/$value/g; } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; + $order_content =~ s/<\/{0,1}?item>//g; + $letter->{content} =~ s/.*<\/item>/$order_content\n$item_format/xms; } + $letter->{content} =~ s/.*<\/item>//xms; } - $letter->{content} =~ s/<<[^>]*>>//g; + my $innerletter = $letter; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) { - my $mail_to = $databookseller->{bookselleremail}; - if ($databookseller->{contemail}) { - if (!$mail_to) { - $mail_to = $databookseller->{contemail}; - } else { - $mail_to .= q|,|; - $mail_to .= $databookseller->{contemail}; - } - } - my $mail_subj = $innerletter->{title}; - my $mail_msg = $innerletter->{content}; - $mail_msg ||= q{}; - $mail_subj ||= q{}; - + if ( $orders_infos[0]->{'aqbooksellers.bookselleremail'} + || $orders_infos[0]->{'aqbooksellers.contemail'} ) { + my $to = $orders_infos[0]->{'aqbooksellers.bookselleremail'}; + $to .= ", " if $to; + $to .= $orders_infos[0]->{'aqbooksellers.contemail'} || ""; my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, + To => $to, + From => $userenv->{emailaddress}, + Subject => "" . $innerletter->{title}, + Message => "" . $innerletter->{content}, 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail) or carp $Mail::Sendmail::error; - logaction( - "ACQUISITION", - "CLAIM ISSUE", - undef, - "To=" - . $databookseller->{contemail} - . " Title=" - . $innerletter->{title} - . " Content=" - . $innerletter->{content} - ) if C4::Context->preference("LetterLog"); + warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; + if ( C4::Context->preference("LetterLog") ) { + logaction( "ACQUISITION", "Send Acquisition claim letter", "", "order list : " . join( ",", @$externalid ) . "\n$innerletter->{title}\n$innerletter->{content}" ) if $type eq 'claimacquisition'; + logaction( "ACQUISITION", "CLAIM ISSUE", undef, "To=" . $mail{To} . " Title=" . $innerletter->{title} . " Content=" . $innerletter->{content} ) if $type eq 'claimissues'; + } + } else { + die "This bookseller have no email\n"; } - } - # send an "account details" notice to a newly created user + + warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}"; + } + + # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { # must parse the password special, before it's hashed. $letter->{content} =~ s/<>/$externalid->{'password'}/g; diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 810f665..fe27de4 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -76,6 +76,19 @@ unless ($delay =~ /^\d{1,3}$/) { $delay = 30; #default value for delay } +if ($op and $op eq "send_alert"){ + my @ordernums = $input->param("claim_for");# FIXME: Fallback values? + eval { + SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value? + AddClaim ( $_ ) for @ordernums; + }; + if ( $@ ) { + $template->param(error_claim => $@); + } else { + $template->param(info_claim => "Emails have been sent"); + } +} + my %supplierlist = GetBooksellersWithLateOrders($delay); my (@sloopy); # supplier loop foreach (keys %supplierlist){ @@ -100,11 +113,6 @@ foreach (keys %$letters){ } $template->param(letters=>\@letters) if (@letters); -if ($op and $op eq "send_alert"){ - my @ordernums = $input->param("claim_for"); # FIXME: Fallback values? - SendAlerts('claimacquisition',\@ordernums,$input->param("letter_code")); # FIXME: Fallback value? -} - $template->param(ERROR_LOOP => \@errors) if (@errors); $template->param( lateorders => \@lateorders, diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..0c9e860 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..09dc641 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -2,7 +2,7 @@ INSERT IGNORE INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 452173d..c79c4b9 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2631,6 +2631,8 @@ CREATE TABLE `aqorders` ( `sort1_authcat` varchar(10) default NULL, `sort2_authcat` varchar(10) default NULL, `uncertainprice` tinyint(1), + `claims_count` int(11) default 0, + `claimed_date` date default NULL, PRIMARY KEY (`ordernumber`), KEY `basketno` (`basketno`), KEY `biblionumber` (`biblionumber`), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..287730a 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -2,7 +2,7 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice', 'Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..0c9e860 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/ru-RU/optional/sample_notices.sql b/installer/data/mysql/ru-RU/optional/sample_notices.sql index 4f2001e..d6537e1 100644 --- a/installer/data/mysql/ru-RU/optional/sample_notices.sql +++ b/installer/data/mysql/ru-RU/optional/sample_notices.sql @@ -5,7 +5,7 @@ INSERT INTO `letter` VALUES ('circulation','ODUE','??????????? ? ?????????','??????? ???????????','???????? <> <>,\r\n\r\n?? ????? ???????? ???????, ? ??? ???? ????????????? ??????????. ???? ?????????? ?? ??????? ?????? ?? ?????????, ??, ??????????, ????????? ??? ???????? ?? ??? ????? ??????.\r\n\r\n<><><><><><><>???? ?? ???????????????? ?????? ? ??????????, ?? ?????? ???????????? ??? ? ????? ??????? ????????????? ?????? ??? ??????????? ??????. ???? ????????? ????? ????????? ????? ??? ?? 30 ????, ?? ?? ??????? ???????????? ??? ???????????? ????? ???? ?? ??????? ?????????. ????????? ????????? ? ????????? ????? ???????? ????????????:\r\n\r\n<>'), -('claimacquisition','ACQCLAIM','?????????? ????????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????? <> (<>) (<> ??????) ???????? ?? ????.'), +('claimacquisition','ACQCLAIM','?????????? ????????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????? <> (<>) (<> ??????) ???????? ?? ????.'), ('serial','RLIST','?????? ??????????','?????????? ??????? ??? ?????????','<> <>,\r\n\r\n????????? ?????? ??? ????????:\r\n\r\n<>\r\n\r\n??????? ??????? ??? ? ????? ??????? ??? ??? ?????.'), diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..dc5a54d 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/uk-UA/optional/sample_notices.sql b/installer/data/mysql/uk-UA/optional/sample_notices.sql index 6df324b..0e1e1f4 100644 --- a/installer/data/mysql/uk-UA/optional/sample_notices.sql +++ b/installer/data/mysql/uk-UA/optional/sample_notices.sql @@ -5,7 +5,7 @@ INSERT INTO `letter` VALUES ('circulation','ODUE','???????????? ??? ????????????','??????? ???????????','???????? <> <>,\r\n\r\n?? ????? ???????? ???????, ? ??? ? ??????????? ??????????. ???? ?????????? ?? ?????? ?????? ?? ??????????, ???, ???? ?????, ????????? ??? ??????? ?? ?? ????? ??????.\r\n\r\n<><><><><><><>???? ?? ????????????? ?????? ? ??????????, ?? ?????? ??????????????? ???? ? ????? ??????? ????????????? ?????? ??? ??????????? ??????. ???? ????????? ??? ???????????? ????? ??? ?? 30 ????, ?? ?? ??????? ??????????????? ??? ????????? ?????? ???? ?? ????????? ?????????. ????????? ????????? ? ????? ??? ? ????????????:\r\n\r\n<>'), -('claimacquisition','ACQCLAIM','?????? ?????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????????? <> (<>) (<> ?????????) (<> ??????) ???????? ?? ????.'), +('claimacquisition','ACQCLAIM','?????? ?????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????????? <> (<>) (<> ?????????) (<> ??????) ???????? ?? ????.'), ('serial','RLIST','?????? ???????????','????????? ??????? ??? ????????','<> <>,\r\n\r\n????????? ?????? ??? ?????????:\r\n\r\n<>\r\n\r\n???????? ??????? ???? ? ????-???? ??????? ??? ??? ???.'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9ae0060..f46d33b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4571,6 +4571,12 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("ALTER TABLE `aqorders` ADD COLUMN `claims_count` INT(11) DEFAULT 0, ADD COLUMN `claimed_date` DATE DEFAULT NULL AFTER `claims_count`"); + print "Upgrade to $DBversion done (Add claims_count and claimed_date fields in aqorders table)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS 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 7b38062..7557f58 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2080,4 +2080,12 @@ div.pager input.pagedisplay { background-color : transparent; font-weight: bold; text-align : center; -} \ No newline at end of file +} + +div.info { + border : 2px dashed #990000; + background-color : #99FFCC; + padding : .5em; + margin : 1em; +} + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 1e64e1f..545d9c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -1,6 +1,20 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Late orders [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'header.inc' %] @@ -17,6 +31,12 @@

    [% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders

    +[% IF error_claim %] +
    [% error_claim %]
    +[% END %] +[% IF info_claim %] +
    [% info_claim %]
    +[% END %] [% IF ( lateorders ) %]
    @@ -35,12 +55,20 @@ Information Total cost Basket -   + claims count + claimed date + + [% IF Supplier %] + + [% ELSE %] + + [% END %] [% FOREACH lateorder IN lateorders %] [% UNLESS ( loop.odd ) %] [% ELSE %][% END %] + ([% lateorder.supplierid %]) [% lateorder.orderdate %] ([% lateorder.latesince %] days) @@ -69,8 +97,13 @@

    [% lateorder.branch %]

    + [% lateorder.claims_count %] + [% lateorder.claimed_date %] - + [% UNLESS lateorder.budget_lock %] + + [% END %] + [% END %] @@ -79,6 +112,8 @@   [% total %]   +   +   -- 1.7.7.3 From magnus at enger.priv.no Fri Dec 2 17:37:03 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Fri, 2 Dec 2011 16:37:03 +0000 Subject: [Koha-patches] =?utf-8?q?=5BPATCH_3/3=5D_Bug_7309_-_Add_NORMARCsl?= =?utf-8?q?im2intranetDetail=2Exsl_for_detail_view_in_intranet?= Message-ID: <1322843823-19570-1-git-send-email-magnus@enger.priv.no> Adds two files, to enable XSLT for the detail view in the intranet: koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl To test: - Set sysprefs: marcflavour = NORMARC and XSLTDetailsDisplay = "using XSLT stylesheet" - Make sure OPACBaseURL is set correctly - Check that detail display looks ok - Check that automatic links for author, subjects etc work - Check that the "Open in new window" link works as expected - Empty the OPACBaseURL syspref and check that "Open in new window" does not display --- .../prog/en/xslt/NORMARCslim2intranetDetail.xsl | 535 ++++++++++++++++++++ .../prog/en/xslt/NORMARCslimUtils.xsl | 205 ++++++++ 2 files changed, 740 insertions(+), 0 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl new file mode 100644 index 0000000..163ed29 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl @@ -0,0 +1,535 @@ + + + + + + + + + + + + + + + + + + + + + + + Mon + FV + Mus + Kar + gra + Fil + kom + trd + + + Mon + Per + + + + + + + Bok + Film og video + Musikalier + Kart + Grafisk materiale + Fil + Kombidokument + Tredimensjonal gjenstand + + + Bok + Periodikum + + + + + + + + +

    + + + a + + + : + + b + + + + + ( + h + ) + + + + np + + +

    +
    + + + + + +
    av + + + + + /cgi-bin/koha/catalogue/search.pl?q=an: + + + /cgi-bin/koha/catalogue/search.pl?q=au: + + + + + .; + + + + + + + /cgi-bin/koha/catalogue/search.pl?q=an: + + + /cgi-bin/koha/catalogue/search.pl?q=au: + + + + .; + + + + + + + /cgi-bin/koha/catalogue/search.pl?q=an: + + + /cgi-bin/koha/catalogue/search.pl?q=au: + + + + .; + + +
    +
    +
    + + + + Materialtype: + /opac-tmpl/prog/famfamfam/.png + + + + + + + Series: + + + + + + av + + + + + + .; + + + + + + + + av + + + + + + .; + + + + + + + + Utgiver: + + + + + bcg + + + + .; + + + + + + + + Utgave: + + + + + ab + + + + .; + + + + + + + + Beskrivelse: + + + + + abceg + + + + .; + + + + + + + + ISBN: + + + + .; + + + + + + ISSN: + + + .; + + + + + + + + Parallelltittel: + + + + + abhfgnp + + + + .; + + + + + + + + Standardtittel: + + + + + + + + + + + + + + + + .; + + + + + + Emner: + + + + + /cgi-bin/koha/catalogue/search.pl?q=an: + + + /cgi-bin/koha/catalogue/search.pl?q=su: + + + + + + abcdvxyz + vxyz + -- + + + + + + | + + + + + + + + Nettbasert ressurs: + + + + + + y3z + + + + Klikk her for tilgang + + + + + + | + + + + + + + + + a + + + + + + + + + + Fortsettelse av: + + + Delvis fortsettelse av: + + + Avl?ser: + + + Avl?ser delvis: + + + Sammensl?ing av: ... ; og ... + + + Har tatt opp: + + + Har delvis tatt opp: + + + Utskilt fra: + + + + + + a_t + + + /cgi-bin/koha/catalogue/search.pl?q= + + + + + + + + + + + + + + + + + + + + Fortsettelse i: + + + Fortsettes delvis i: + + + Avl?st av: + + + Delvis avl?st av: + + + G?tt inn i: + + + Delvis g?tt inn i: + + + Fortsettes av: ...; og ... + + + Sl?tt sammen med: .., til: ... + + + + + + a_t + + + + /cgi-bin/koha/catalogue/search.pl?q= + + + + + + + + + +

    OPAC View: + http:///cgi-bin/koha/opac-detail.pl?biblionumber= + _blank + Open in new window +

    +
    + +
    + + + + + n + n + fghkdlmor + + + + + p + p + fghkdlmor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl new file mode 100644 index 0000000..7c2bf21 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +aq + + + +:,;/ + + + + + + + + + + + + + + + + +cdn + + + + + + +acdeq + + + + + + + + +bc + + + + + + + + + + + + + + + + + + + + + + + + + + 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=: + + + + + + + + + + + + + + + + -- 1.7.2.5 From stephane.delaune at biblibre.com Fri Dec 2 18:16:15 2011 From: stephane.delaune at biblibre.com (=?UTF-8?q?St=C3=A9phane=20Delaune?=) Date: Fri, 2 Dec 2011 18:16:15 +0100 Subject: [Koha-patches] [PATCH] Bug 7286: fix rebuild_zebra.pl to add rebuild_zebra_sliced.zsh Message-ID: <1322846175-24187-1-git-send-email-stephane.delaune@biblibre.com> Signed-off-by: St?phane Delaune --- misc/migration_tools/rebuild_zebra.pl | 54 ++++++++++- misc/migration_tools/rebuild_zebra_sliced.zsh | 127 +++++++++++++++++++++++++ 2 files changed, 176 insertions(+), 5 deletions(-) create mode 100755 misc/migration_tools/rebuild_zebra_sliced.zsh diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index fa87f22..8264121 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -34,6 +34,10 @@ my $want_help; my $as_xml; my $process_zebraqueue; my $do_not_clear_zebraqueue; +my $item_limit; +my $min; +my $where; +my $ofset; my $verbose_logging; my $zebraidx_log_opt = " -v none,fatal,warn "; my $result = GetOptions( @@ -51,6 +55,10 @@ my $result = GetOptions( 'x' => \$as_xml, 'y' => \$do_not_clear_zebraqueue, 'z' => \$process_zebraqueue, + 'l:i' => \$item_limit, + 'where:s' => \$where, + 'min:i' => \$min, + 'ofset:i' => \$ofset, 'v' => \$verbose_logging, ); @@ -78,6 +86,12 @@ if ( !$as_xml and $nosanitize ) { die $msg; } +if ( $nosanitize and $item_limit ) { + my $msg = "Cannot specify both -item_limit and -nosanitize\n"; + $msg .= "Please do '$0 --help' to see usage.\n"; + die $msg; +} + if ($process_zebraqueue and ($skip_export or $reset)) { my $msg = "Cannot specify -r or -s if -z is specified\n"; $msg .= "Please do '$0 --help' to see usage.\n"; @@ -294,13 +308,21 @@ sub select_all_records { } sub select_all_authorities { - my $sth = $dbh->prepare("SELECT authid FROM auth_header"); + my $strsth=qq{SELECT authid from auth_header}; + $strsth.=qq{ WHERE $where } if ($where); + $strsth.=qq{ LIMIT $min } if ($min && !$ofset); + $strsth.=qq{ LIMIT $min,$ofset } if ($min && $ofset); + my $sth = $dbh->prepare($strsth); $sth->execute(); return $sth; } sub select_all_biblios { - my $sth = $dbh->prepare("SELECT biblionumber FROM biblioitems ORDER BY biblionumber"); + my $strsth = qq{ SELECT biblionumber FROM biblioitems }; + $strsth.=qq{ WHERE $where } if ($where); + $strsth.=qq{ LIMIT $min } if ($min && !$ofset); + $strsth.=qq{ LIMIT $min,$ofset } if ($ofset); + my $sth = $dbh->prepare($strsth); $sth->execute(); return $sth; } @@ -406,6 +428,7 @@ sub generate_deleted_marc_records { my $marc = MARC::Record->new(); if ($record_type eq 'biblio') { fix_biblio_ids($marc, $record_number, $record_number); + fix_biblio_items( $marc ) if $item_limit; } else { fix_authority_id($marc, $record_number); } @@ -431,10 +454,14 @@ sub get_corrected_marc_record { if (defined $marc) { fix_leader($marc); - if ($record_type eq 'authority') { - fix_authority_id($marc, $record_number); + if ( $record_type eq 'biblio' ) { + my $succeeded = fix_biblio_ids( $marc, $record_number ); + fix_biblio_items( $marc ) if $item_limit; + return unless $succeeded; + } else { + fix_authority_id( $marc, $record_number ); } - if (C4::Context->preference("marcflavour") eq "UNIMARC") { + if ( C4::Context->preference("marcflavour") eq "UNIMARC" ) { fix_unimarc_100($marc); } } @@ -498,6 +525,18 @@ sub fix_leader { $marc->leader(substr($leader, 0, 24)); } +sub fix_biblio_items { + my $marc = shift; + + my ($itemtagfield, $itemtagsubfield) = GetMarcFromKohaField('items.itemnumber',''); + + my $i = 0; + for my $itemfield ( $marc->field($itemtagfield) ) { + $marc->delete_field($itemfield) if $i >= $item_limit; + $i++; + } +} + sub fix_biblio_ids { # FIXME - it is essential to ensure that the biblionumber is present, # otherwise, Zebra will choke on the record. However, this @@ -635,9 +674,14 @@ Parameters: the same records - specify -y to override this. Cannot be used with -z. + -l set a maximum number of exported items per biblio. + Doesn't work with -nosanitize. + -v increase the amount of logging. Normally only warnings and errors from the indexing are shown. + -min 1234 minimum biblionumber + -ofset 1243 count biblios to process -munge-config Deprecated option to try to fix Zebra config files. --help or -h show this message. diff --git a/misc/migration_tools/rebuild_zebra_sliced.zsh b/misc/migration_tools/rebuild_zebra_sliced.zsh new file mode 100755 index 0000000..1e9554d --- /dev/null +++ b/misc/migration_tools/rebuild_zebra_sliced.zsh @@ -0,0 +1,127 @@ +#!/usr/bin/zsh + +# Copyright 2011 BibLibre SARL +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +INCREMENT=$1 +BIBLIOSTART=$2 +BIBLIOEND=$3 + +#echo " | $INCREMENT , $BIBLIOSTART , $BIBLIOEND | "; +# this script rebuild the zebra index recursively +# BIBLIOSTART is the record number to BIBLIOSTART on +# BIBLIOEND is the record number to BIBLIOEND on +# increment specify how many records we must try at once +# At the BIBLIOEND of each "chunk", this script checks if the indexing process has been OK +# if it hasn't, the slice is splitted in 10, and the reindexing is called again on each smaller chunk +# if the increment goes to 1, it means we tried to reindex 1 by 1, and the failing indexing concern wrong records + +# the logs are stored in a directory called logs/ that must be a subdirectory of reindex.zsh + +# at the BIBLIOEND of the script, just type : +#grep -l "previous transaction" `ls rebuild1.*.err` +# the result contains all the biblios that have not been indexed +# WARNING : the numbers are not the biblionumber but the record number, they can be reached by : +# SELECT biblionumber FROM biblio LIMIT YourNumberHere,1; + +# EXAMPLE to run the script on a 800 000 biblios database : +# ./reindex.zsh 50000 0 800000 +# will reindex the DB, BIBLIOSTARTing with chunks of 50k biblios +#if { grep -E "previous transaction" `dirname $0`/logs/rebuild$INCREMENT.$i.err } ; then + +lastbiblionumber=`perl -e '#!/usr/bin/perl +use C4::Context; +my $dbh = C4::Context->dbh; +my $querylastbiblionumber = "SELECT max(biblionumber) FROM biblio;"; +my $sthlastbiblionumber = $dbh->prepare($querylastbiblionumber); +$sthlastbiblionumber->execute(); +my ( $lastbiblionumber ) = $sthlastbiblionumber->fetchrow_array; print $lastbiblionumber;'` +#echo $lastbiblionumber; +let "maxbiblionumber = $lastbiblionumber + 1" +if [ $# = 2 ] +then + BIBLIOEND=$lastbiblionumber +elif [ $# = 1 ] +then + BIBLIOSTART=0 + BIBLIOEND=$lastbiblionumber +elif [ $# = 0 ] +then + INCREMENT=10000 + BIBLIOSTART=0 + BIBLIOEND=$lastbiblionumber +fi +if [[ $INCREMENT =~ ^10*$ ]] +then +else + echo "The first argument (INCREMENT) must be 1 or a multiple of 10" + exit 2 +fi +if [[ $BIBLIOSTART =~ ^[0-9]*$ ]] +then +else + echo "The second argument (BIBLIOSTART) must be an integer" + exit 2 +fi +if [[ $BIBLIOEND =~ ^[0-9]*$ ]] +then +else + echo "The third argument (BIBLIOEND) must be an integer" + exit 2 +fi +if [ $BIBLIOSTART -lt $BIBLIOEND ] +then +else + echo "The second argument (BIBLIOSTART) must be lower than the third argument (BIBLIOEND)" + exit 2 +fi +if [ $BIBLIOEND -lt $maxbiblionumber ] +then +else + echo "end" + exit 1 +fi + ls `dirname $0`/logs/ >/dev/null 2>&1 + if [ $? != 0 ] + then + mkdir `dirname $0`/logs + else + rm `dirname $0`/logs/* + fi + #/home/koha/src/misc/migration_tools/rebuild_zebra.pl -r -b -v -x -nosanitize -ofset 1 -min 1 + for ((i=$BIBLIOSTART ; i<$BIBLIOEND ; i=i+$INCREMENT)) + do + echo "I = " $i "with increment " $INCREMENT + `dirname $0`/rebuild_zebra.pl -b -v -x -nosanitize -d /tmp/rebuild -k -ofset $INCREMENT -min $i > `dirname $0`/logs/rebuild$INCREMENT.$i.log 2> `dirname $0`/logs/rebuild$INCREMENT.$i.err + if (($INCREMENT >1 )); + then + if { grep -q "previous transaction" `dirname $0`/logs/rebuild$INCREMENT.$i.err } ; + then + echo "I must split $i (increment $INCREMENT) because previous transaction didn't reach commit" + ((subincrement=$INCREMENT/10)) + ((newBIBLIOEND=$i+$INCREMENT)) + $0 $subincrement $i $newBIBLIOEND + elif { ! grep -q "Records: $INCREMENT" `dirname $0`/logs/rebuild$INCREMENT.$i.err } ; + then + echo "I must split $i (increment $INCREMENT) because index was uncomplete, less than $INCREMENT records indexed" + ((subincrement=$INCREMENT/10)) + ((newBIBLIOEND=$i+$INCREMENT)) + $0 $subincrement $i $newBIBLIOEND + fi + fi + done +exit 0 -- 1.7.0.4 From oleonard at myacpl.org Fri Dec 2 20:14:45 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 2 Dec 2011 14:14:45 -0500 Subject: [Koha-patches] [PATCH] Bug 6865 - Replace image-based gradient backgrounds with CSS3 gradients Message-ID: <1322853286-12896-1-git-send-email-oleonard@myacpl.org> Replaces image-based gradients in: OPAC search bar OPAC submit buttons OPAC lists menu background OPAC alert and message boxes OPAC user menu tabs Staff client alert and message boxes Staff client side menu tabs Removes obsoleted background image files. Cross-browser background-gradients created using: http://www.colorzilla.com/gradient-editor/ --- .../intranet-tmpl/prog/en/css/staff-global.css | 68 ++++++++++--- koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif | Bin 2255 -> 0 bytes koha-tmpl/intranet-tmpl/prog/img/bg-tab.png | Bin 115 -> 0 bytes koha-tmpl/intranet-tmpl/prog/img/button-bg.gif | Bin 582 -> 0 bytes koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif | Bin 1922 -> 0 bytes koha-tmpl/intranet-tmpl/prog/img/fade-butt.png | Bin 785 -> 0 bytes koha-tmpl/intranet-tmpl/prog/img/message-bg.gif | Bin 966 -> 0 bytes .../prog/img/side-tab-gradient-hover.gif | Bin 92 -> 0 bytes .../intranet-tmpl/prog/img/side-tab-gradient.gif | Bin 92 -> 0 bytes koha-tmpl/opac-tmpl/prog/en/css/opac.css | 105 +++++++++++++++----- koha-tmpl/opac-tmpl/prog/images/alert-bg.gif | Bin 2255 -> 0 bytes .../prog/images/listmenu-container-bg.gif | Bin 347 -> 0 bytes .../opac-tmpl/prog/images/menu-background.gif | Bin 3048 -> 0 bytes koha-tmpl/opac-tmpl/prog/images/message-bg.gif | Bin 966 -> 0 bytes .../prog/images/side-tab-gradient-hover.gif | Bin 92 -> 0 bytes .../opac-tmpl/prog/images/side-tab-gradient.gif | Bin 92 -> 0 bytes koha-tmpl/opac-tmpl/prog/images/submit-bg.gif | Bin 2899 -> 0 bytes 17 files changed, 134 insertions(+), 39 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/bg-tab.png delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/button-bg.gif delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/fade-butt.png delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/message-bg.gif delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient-hover.gif delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient.gif delete mode 100644 koha-tmpl/opac-tmpl/prog/images/alert-bg.gif delete mode 100644 koha-tmpl/opac-tmpl/prog/images/listmenu-container-bg.gif delete mode 100644 koha-tmpl/opac-tmpl/prog/images/menu-background.gif delete mode 100644 koha-tmpl/opac-tmpl/prog/images/message-bg.gif delete mode 100644 koha-tmpl/opac-tmpl/prog/images/side-tab-gradient-hover.gif delete mode 100644 koha-tmpl/opac-tmpl/prog/images/side-tab-gradient.gif delete mode 100644 koha-tmpl/opac-tmpl/prog/images/submit-bg.gif 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 7b38062..bad6835 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1113,12 +1113,14 @@ div.first fieldset { } .dialog { - border: 1px solid #bcbcbc; + -moz-border-radius : 2px; + border-radius : 2px; padding : .5em; margin : 1em auto; - width: 65%; - } - + text-align : center; + width: 65%; +} + .dialog table { margin : .5em auto; } @@ -1192,20 +1194,27 @@ td input.approve { background-color : #ffc; } +div.dialog { + border: 1px solid #bcbcbc; +} + div.alert { - background : #FFC url(../../img/alert-bg.gif) repeat-x left 0; - text-align : center; + background: #fef8d3; /* Old browsers */ + background: -moz-linear-gradient(top, #fef8d3 0%, #ffec91 9%, #ffed87 89%, #f9dc00 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fef8d3), color-stop(9%,#ffec91), color-stop(89%,#ffed87), color-stop(100%,#f9dc00)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fef8d3', endColorstr='#f9dc00',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* W3C */ + text-align : center; + border: 1px solid #E0C726; } div.alert strong { color : #900; } -div.dialog { - background : #FFC url(../../img/dialog-bg.gif) repeat-x left 0; - text-align : center; -} - a.document { background-position : left middle; background-repeat : no-repeat; @@ -1225,7 +1234,14 @@ a.xml { } div.message { - background : white url("../../img/message-bg.gif") repeat-x left 0; + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #f4f6fa 2%, #eaeef5 23%, #e8edf6 94%, #cddbf2 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(2%,#f4f6fa), color-stop(23%,#eaeef5), color-stop(94%,#e8edf6), color-stop(100%,#cddbf2)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */ border : 1px solid #bcbcbc; text-align: center; width : 55%; @@ -1307,7 +1323,14 @@ div#menu { div#menu li a { text-decoration: none; display: block; - background : #EEE url(../../img/side-tab-gradient.gif) repeat-y top right; + background: #eeeeee; /* Old browsers */ + background: -moz-linear-gradient(left, #eeeeee 0%, #eeeeee 96%, #e6e6e6 97%, #cccccc 99%, #c1c1c1 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eeeeee), color-stop(96%,#eeeeee), color-stop(97%,#e6e6e6), color-stop(99%,#cccccc), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */ + background: linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* W3C */ border: 1px solid #000; font-size: 111%; margin: .5em 0; @@ -1316,7 +1339,14 @@ div#menu li a { } div#menu li a:hover { - background : #E8F0F6 url(../../img/side-tab-gradient-hover.gif) repeat-y top right; + background: #e8f0f6; /* Old browsers */ + background: -moz-linear-gradient(left, #e8f0f6 0%, #e8f0f6 96%, #c1c1c1 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#e8f0f6), color-stop(96%,#e8f0f6), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8f0f6', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */ + background: linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* W3C */ } div#menu li.active a:hover { @@ -1605,8 +1635,16 @@ input[type=submit], input[type=reset], input[type=button], input.submit, button. border: 1px outset #999999; border-top-color: #666; border-left-color: #666; + -moz-border-radius : 2px; padding: 0.25em; - background : #E8E8E8 url(../../img/button-bg.gif) top left repeat-x; + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #f7f7f7 35%, #e0e0e0 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(35%,#f7f7f7), color-stop(100%,#e0e0e0)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* W3C */ color: #333333; } diff --git a/koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif b/koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif deleted file mode 100644 index 44625a2ec273b20a2708ba2c8f3489b92113a480..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2255 zcmcJM>sOP99e|^CKp}W+=YYd(OD}_nh^})$(RLo&LI{C6yNQQ-$!seeK;(3-c&ObF zkWfev1qlrxfdB~*NVo>WRc^Th0ul@$cM=GJklPz_`Mq2BKkWJNe0;t<;SpgWAN}K9 zOu at c&30l&GU!o`q=p>+0K*s at n0q88iQ$VKy6$9E0 z=meljKt+Jc0UZNV2B6OX9RcV9TRA`{pu>PF0G$JL0PJ;u3Q=?(ERO)m2g^f1s9-4o znjI&xi(;CYN^nZLP)yDZ{W4wBt}z?b2htA_J_cQ1ZU)XWqE)>?V#pG(zq;#SsJ#m8|jZxPzq&zYZpi at PFetD9s+ zRpQGD?e#Aj{{Aq2Ueey6;9mJE=dH*N&db(s6WLd!9gVa6o9Ne~@<@KueAf?|>Uk-j zyU_R3W0$vyoxG*N`+vnK|R at UZLGJ)`nqmKTJc3+uft|BXcor$`rx-1C){HC0gw2_ zdoI2u0~y#L^W_H z5!?#peyH>O&K|=Dodf0RONTp>r_wfnm1Gx=}wZk z!&x2)>dGA7H1%tgpiMQiAk2TGy69rUMor0$gbnAi+nXCKMz;SZySg}GvyNSx;Qtz@ zV{@~CH{!41v`r^y8avk$G)~>-O%1o->DU%;$Rly9S>&6T9UfsE!gVNY2zV;DVyY#GMRoOstb{+Z`Z$0jOm)?pFVvn#Bd{7Jmn9I^hY_ZdBa*x7}@(i-H~5K~W5rfpNz7 z at Apng$KV>#1Q)dySY5{@5uldj9c5i4C| zL<1fI-Tjl4N^Bf{(0g>;HAGf*3D#t*&cy_({}SnSf-Z{Kk{MzAKl`KOmBr~BuKDJO`$N4sPMv2ZH%*)<(o?c*FFI_Iq~$RSq0=P4G2h3X#`P^v%hix3l{^{yqdYTsb7I66&_ z7Ba9kxbO(c1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fa)9yqt8TX|_f2t2-w*tNSJM3N>-bdTm*8aj}!XM(n9AD=#k( zSnM^|D>Sofb;RbZyQj9UzP>);aF?w2wlz05XIx$tdwSd2+uI8spPK8vecj#N6`x<- oJ-vPX{rwHh+;ToUHatAsA*>yDX2-_I$0sOz&-2-tE5Kk40Ck{39RL6T diff --git a/koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif b/koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif deleted file mode 100644 index b70cf23925f9b4234c9d4f83102d1b396333265f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1922 zcmWlX`BxHn0>IhorLUn~ccwRDGqX|CD4CU8ZPL^$tr;bTuBlDha%$SvD>Zkfr%tEk zS)o}P;*BDLsb#51o**bnXch`6D$0G|a;aZ-`~2|v2R@&uW0A=Hzix)?|C15|0fK*m z$)5rLXJ8}&Lk-YZ0L at dNE(EH_U at jR<#Q at QTrOE#+O=3cYTTK|2fVz0T>Z z75*9fJQ+-1TAV8f+7cj1af$Luq=@HZg44d(x=*Q;Dp zx80%}9$}Jgp;@m}0AoGS;(>__q^z(Hp=^&@H<=>x}ExggeusG<+eBSDW^#2 zD)eIJWD~Y6ahBWBBz)yN at aUVLXw6e?@%$H~3|fo0Gu12Wi;3ubIoq9Kn;RVHd?o46 zTs at l1W&Jfr`ukRvTsFx`Mt{H83t5Yp&s_5*ih18RkUIYW z8Z6>u`9&fYvNxdBtQ=S at bs_ibMAT3oJQpF&--?fyK1ASarH?{rYU$%0=ioBjUO~L9 z0I8(P3OCu+vM1qdw{0ytwIM`z zmvgr%30Lt6%Ch)|#)0xAnnqcX+Vys@@`fNmRh2QVVN~CCXjC{XZ5wfTWB z)OEOhS~aOCk{b^#IhUv*6Jl>BKq}L;8VWHtSWB(PCu$q(XtmlG%`~mHspSM**W4~h z)V0u+FLW<^99rEg#@g-rR=Vd`{p;btCjA at UKApa8JaW6Ced63TLx(7KJA*cprZaTT z=WaLB<@jqU^b_?>#x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xh{bg97mO^W~b at aosrU8k@a3GdX+De+L6- za3+9R-8cPH*f8b~KDeF6Iv|7(4UD)7Bq<02RVXNmg6H!LO&2+?R4U1`OcDggapiKE zFY+wIunf!d#VW*b2^}-T9V2H+?-(*rOF(SfEtt}NrEU;s|w4ql}aU_%l$QMw*#Qsc019L z`$qxet-2wzufeA~GdF29GQ(3k#HwpP=Tp5>sTUs~bbFp^79H8|jwMGn{Nu=E4WHV@ z<`Pj1OGKNZ!frxXz at l>r$fB|FiN4r)-$3m7_{6|c6Ou{+s8EME>s@=BuaUFM*eAr; zY2XyDLos!9uJm+8Ui3todx6%dF|QjeX0yfetkJS=SZ+O-Jgk9eC?1L*hC<0?DEZSH ziYJrFcpRuw8!vzFO2-wvIO)u`0SmbDZ3PihhCn+Q-Xj2f-scY3wf=tci0 Zqyhce4|i>ku8hL(3f!(i=T4U|@(=9Ekd*)c diff --git a/koha-tmpl/intranet-tmpl/prog/img/message-bg.gif b/koha-tmpl/intranet-tmpl/prog/img/message-bg.gif deleted file mode 100644 index 553546f9b52df90ae0db48554d586f49c0663a03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 966 zcmcJL=}(#m0LEEth&{HLv at xb}J<`P>nyyP19uq*2+d;F#+a^I zsC0^=)mBSwMGjHqP(eVTf`YRuf{Ke(+acu=cn|L51;oPY{)asuo)5ndzvOv-xPUAD z=I4{Bu20rcs6aUG55?g?EEq|6gNQGPL}JM(vJ;9X!qKERfPnrO96-W*FbVr(p-93P zLUvNSnM@`eP3-Qb8NCPn;$Sq3$eLXk7pr1QpTv}c+t*&IRy;yw`D`|4wk78jo>4wNFh|Qf zOWe|ra~C>KoV)s_OggyOjk&@+q>~OApP#vHU|f*#mitQYLR*WnVN- at xMyk!j%lUtE z%R6v22DxBu_%avYkDnl~i)v&kWdlqtwlJKK>p7oSkLp!tJi}xpmu5$_oVBPb*8n?e5FCLRZg^)pf3CHMIg4{aOR) zdVZ_9(B1nBz0UoDz!SJ%-cf+=zWVt>598iOou|LiE$}cOAfSguMq>f?qg*1up&Al1 z1MMXc!0p0e!NHztA~@7rD+GCr1_&HxH)A3GAe{&a_&gyb98o}!NHULwN8}qscvR&U k!ebf)g2g&?kyr9Mm*gGS7l^#lr4raHTg8z`IjHac1(BF02mk;8 diff --git a/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient-hover.gif b/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient-hover.gif deleted file mode 100644 index 9fcdc96598c37f44e362daa191df3afb2a8d3c7b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHb=sn33fe#H{mdLCo8uGj-QXv&DIdPkX$4;+0iZi=+>)h>7N8um%A7aU}8p diff --git a/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient.gif b/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient.gif deleted file mode 100644 index af3addbcdaef7bbd180682f490dedb1fa96e0da2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHb=sn2}|u!m9IZLCo8uGj-QXv&DIdPkX$4;+0iZi=+>)h>7N8um%7F^(68D diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 11c434f..a783bd0 100755 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -220,9 +220,21 @@ h6 { font-size : 100%; } -input[type=submit], input[type=button], input[type=reset] { - background : #b8d0e6 url(../../images/submit-bg.gif) repeat-x 0 0; - background-color : #b8d0e6; +input[type=submit], +input[type=button], +input[type=reset], +fieldset.brief input[type=submit], +fieldset.brief input[type=button], +fieldset.brief input[type=reset] +{ + background: #f4f9fc; /* Old browsers */ + background: -moz-linear-gradient(top, #f4f9fc 0%, #dfeefa 4%, #bfd5ea 93%, #a1c4e2 97%, #b8d0e6 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f4f9fc), color-stop(4%,#dfeefa), color-stop(93%,#bfd5ea), color-stop(97%,#a1c4e2), color-stop(100%,#b8d0e6)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f9fc', endColorstr='#b8d0e6',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* W3C */ border-top: 1px solid #cccccc; border-left: 1px solid #cccccc; border-right: 1px solid #eeeeee; @@ -233,7 +245,7 @@ input[type=submit], input[type=button], input[type=reset] { padding : 4px; } -input[type=submit]:active, input[type=button], input[type=reset] { +input[type=submit]:active, input[type=button]:active, input[type=reset]:active { border: 1px inset #666666; } @@ -760,10 +772,14 @@ body#advsearch #listsmenulink { } #opac-main-search { - background-image : url( ../../images/menu-background.gif); - background-repeat : repeat-x; - background-color : #739ACF; - background-position : -10px top; + background: #8fb4e8; /* Old browsers */ + background: -moz-linear-gradient(top, #8fb4e8 0%, #8cb1e5 19%, #80a8dc 48%, #7da5d8 52%, #7198cf 83%, #618ac0 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8fb4e8), color-stop(19%,#8cb1e5), color-stop(48%,#80a8dc), color-stop(52%,#7da5d8), color-stop(83%,#7198cf), color-stop(100%,#618ac0)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* IE10+ */ + background: linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8fb4e8', endColorstr='#618ac0',GradientType=0 ); /* IE6-9 */ border-top : 1px solid #335599; border-bottom : 1px solid #335599; margin-left : -10px; @@ -1340,8 +1356,15 @@ padding-left : .4em; } div.alert { - background : #FFC url(../../images/alert-bg.gif) repeat-x left 0; - text-align : center; + background: #fef8d3; /* Old browsers */ + background: -moz-linear-gradient(top, #fef8d3 0%, #ffec91 9%, #ffed87 89%, #f9dc00 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fef8d3), color-stop(9%,#ffec91), color-stop(89%,#ffed87), color-stop(100%,#f9dc00)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fef8d3', endColorstr='#f9dc00',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* W3C */ + text-align : center; } div.alert strong { @@ -1349,8 +1372,15 @@ div.alert strong { } div.message { - background : white url("../../images/message-bg.gif") repeat-x left 0; - border : 1px solid #bcbcbc; + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #f4f6fa 2%, #eaeef5 23%, #e8edf6 94%, #cddbf2 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(2%,#f4f6fa), color-stop(23%,#eaeef5), color-stop(94%,#e8edf6), color-stop(100%,#cddbf2)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */ + border : 1px solid #bcbcbc; width : 55%; } @@ -1388,11 +1418,15 @@ div.message { } #opac-main-search #listsmenu .bd { - background-color : #f3f3f3; + background: #eef4fe; /* Old browsers */ + background: -moz-linear-gradient(left, #eef4fe 0%, #eef4fe 88%, #f6f9fe 98%, #ffffff 99%, #a5c2f6 99%, #e6eefe 100%, #cbdefe 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eef4fe), color-stop(88%,#eef4fe), color-stop(98%,#f6f9fe), color-stop(99%,#ffffff), color-stop(99%,#a5c2f6), color-stop(100%,#e6eefe), color-stop(100%,#cbdefe)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eef4fe', endColorstr='#cbdefe',GradientType=1 ); /* IE6-9 */ + background: linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* W3C */ border : 1px solid #739acf; - background-image : url("../../images/listmenu-container-bg.gif"); - background-position : top right; - background-repeat : repeat-y; padding : .3em 1em 0 0; } @@ -1474,12 +1508,21 @@ div#changelanguage li.yuimenuitem a.yuimenuitemlabel { } #opac-main-search input.submit { - background : #b8d0e6 url(../../images/submit-bg.gif) repeat-x 0 0; - background-color : #b8d0e6; - border-top: 1px solid #cccccc; - border-left: 1px solid #cccccc; - border-right: 1px solid #eeeeee; - border-bottom: 1px solid #eeeeee; + background: #e6f3fe; /* Old browsers */ + background: -moz-linear-gradient(top, #e6f3fe 0%, #dfeefa 8%, #bfd5ea 49%, #b8d0e6 52%, #b8d0e6 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e6f3fe), color-stop(8%,#dfeefa), color-stop(49%,#bfd5ea), color-stop(52%,#b8d0e6), color-stop(100%,#b8d0e6)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e6f3fe', endColorstr='#b8d0e6',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* W3C */ + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 1px 1px 1px 1px , , .3); + -moz-box-shadow: 1px 1px 1px 1px , , .3); + box-shadow: 1px 1px 1px 1px , , .3); + color : #333; font-weight : normal; font-size : 80%; @@ -1495,9 +1538,16 @@ div#menu { } div#menu li a { + background: #eeeeee; /* Old browsers */ + background: -moz-linear-gradient(left, #eeeeee 0%, #eeeeee 96%, #e6e6e6 97%, #cccccc 99%, #c1c1c1 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eeeeee), color-stop(96%,#eeeeee), color-stop(97%,#e6e6e6), color-stop(99%,#cccccc), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* IE10+ */ + background: linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */ text-decoration : none; display : block; - background : #EEE url(../../images/side-tab-gradient.gif) repeat-y top right; border : 1px solid #979797; font-size : 111%; margin : .5em 0; @@ -1506,7 +1556,14 @@ div#menu li a { } div#menu li a:hover { - background : #E8F0F6 url(../../images/side-tab-gradient-hover.gif) repeat-y top right; + background: #eaeef5; /* Old browsers */ + background: -moz-linear-gradient(left, #eaeef5 0%, #dee6f4 96%, #c4d5ef 98%, #a2bee8 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eaeef5), color-stop(96%,#dee6f4), color-stop(98%,#c4d5ef), color-stop(100%,#a2bee8)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* IE10+ */ + background: linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeef5', endColorstr='#a2bee8',GradientType=1 ); /* IE6-9 */ } div#menu li.active a:hover { diff --git a/koha-tmpl/opac-tmpl/prog/images/alert-bg.gif b/koha-tmpl/opac-tmpl/prog/images/alert-bg.gif deleted file mode 100644 index 44625a2ec273b20a2708ba2c8f3489b92113a480..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2255 zcmcJM>sOP99e|^CKp}W+=YYd(OD}_nh^})$(RLo&LI{C6yNQQ-$!seeK;(3-c&ObF zkWfev1qlrxfdB~*NVo>WRc^Th0ul@$cM=GJklPz_`Mq2BKkWJNe0;t<;SpgWAN}K9 zOu at c&30l&GU!o`q=p>+0K*s at n0q88iQ$VKy6$9E0 z=meljKt+Jc0UZN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eVUFg2!78!oE|3W3tpbVuHB6_F^OrY&*P-8m%Z$e96eGcPBK zbKO%qGZJcUE}(M0 at r!&Zi8Z&B{FLMsBz-xWW^QG;H^zrYDktdXHg;5FLX1>7Eikw9 zsEtW+k+aGH4{WErF*#K_`^swO_q#WxkR#`oy^&5)RMU4f>D+oK@^qZq^nK}%S(~wl zU`F0_yZKo5b{f*P=+3<(jC`f1Bi-sKZkj^+$}B*7bX4wLRpf$IiS%09cf8Ef1+XH0 zn1j4 at XX4`i-&^`!qInsfvPGxUmS>0Zc>!5|#3k3SECXJnJWP;m>EMr+L7#)oIpM_R ZH%l!;xaj8G7}>H%mu2{ag9k9D{{x||N9OVPW at Xx9}hPlZg=;VhSxPjEx>DJORwD7iYN0O=ZnJ z{kCfVgAb>tUH-^sm*C)GqBPYfJ;ZBk($+_N>dwDEe!djtB*CQVGBJA at 9n#ECF|OPf}5u%+`0ey&D4j7u5Nm| d_4$(9%isR|mH2-B$D^HRR5wr8^X6c%1^~1?xI+K{ diff --git a/koha-tmpl/opac-tmpl/prog/images/menu-background.gif b/koha-tmpl/opac-tmpl/prog/images/menu-background.gif deleted file mode 100644 index 7d0743f8a1fb1f036cf6c7451dd535a457dab4c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3048 zcmVE{tl)>O;d-IgbDPk6qSt4S#f-A%i?QT=q}hh8;BlDF zh_B*wo6w4}=giNS1?$ytH9 zS%SJ%eYJ6!&TEp%XpqNYiNIHXw|1V>jk4xoh`?lw!i1~dY?R7^sNIaS<#(Udb)C{! zfVhFD+-;T0gsR_ak;r(U)N7K+ex=!puj7KL+9*k#fh-wim~Nnjl+($=vsogX_CizpwwH0yJ?Zfi?HN~uj5^XylRrj zd7sr*f3{$Wzg2#>d!g2iv*n1b;d-LiYm>@*q1SVp(T%d at iLT;mlgMU`#CV_8d7so) zezsPAw^x6-cAU~wezu3K;c1e{S%JEawB~i2(PoduT7tV;gS%UUx?+jISb(`%fw)|S zy=#-mex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q&JfpeK z$OJ54F$;F+0}F@%FBZl-UPOeq8{_Q#PcZei5<}aM>s+p9cXckQ#|7mqxb*`-~f(yoPc at gSjY32M*7r;8zxOTNH z-XM!!zk%1i_B9E9z3X7_8rZ*n0~yvp25VG<4A5pa8LGkTHAs8e&87yn*FX(xui+Jh z2=^-nkpXf;;}sb|Hz6{x2578d-5DUnAmAPDL3E)GgQ!CnvY~H#+dBhY064z8K=6WR zgWLkIL>CxPhdNY(0hOo&1F*qx1~9x56o+`jBkpjCD}n(Z*ugSB{sBdNU>P6906EB0 zj&h5K+~g)N`3`2Di<#T}=8Cwv&TDS-Tqt4}yHJKGMBxJ;?4an%*o6<0;RB@)o#{Tv z1<{q^gLWi?=sqY!(Y4-;qWhp3T+h1Jz3u}P6k_Z}- at pd`adx)*;2&x)gxXQ?kGIzy z?q|>YKiIzazWe>}fDgRj2T%CI8~*T!PrTw6&-lhW{_&8HyyPcO`N~`V@|e%O<~Psz q&U^mzpbx$1M^F0FoBs5uPrd3_&-&K8{`Ihrz3gXC``Z5_AOJfS7U$gn diff --git a/koha-tmpl/opac-tmpl/prog/images/message-bg.gif b/koha-tmpl/opac-tmpl/prog/images/message-bg.gif deleted file mode 100644 index 553546f9b52df90ae0db48554d586f49c0663a03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 966 zcmcJL=}(#m0LEEth&{HLv at xb}J<`P>nyyP19uq*2+d;F#+a^I zsC0^=)mBSwMGjHqP(eVTf`YRuf{Ke(+acu=cn|L51;oPY{)asuo)5ndzvOv-xPUAD z=I4{Bu20rcs6aUG55?g?EEq|6gNQGPL}JM(vJ;9X!qKERfPnrO96-W*FbVr(p-93P zLUvNSnM@`eP3-Qb8NCPn;$Sq3$eLXk7pr1QpTv}c+t*&IRy;yw`D`|4wk78jo>4wNFh|Qf zOWe|ra~C>KoV)s_OggyOjk&@+q>~OApP#vHU|f*#mitQYLR*WnVN- at xMyk!j%lUtE z%R6v22DxBu_%avYkDnl~i)v&kWdlqtwlJKK>p7oSkLp!tJi}xpmu5$_oVBPb*8n?e5FCLRZg^)pf3CHMIg4{aOR) zdVZ_9(B1nBz0UoDz!SJ%-cf+=zWVt>598iOou|LiE$}cOAfSguMq>f?qg*1up&Al1 z1MMXc!0p0e!NHztA~@7rD+GCr1_&HxH)A3GAe{&a_&gyb98o}!NHULwN8}qscvR&U k!ebf)g2g&?kyr9Mm*gGS7l^#lr4raHTg8z`IjHac1(BF02mk;8 diff --git a/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient-hover.gif b/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient-hover.gif deleted file mode 100644 index 9fcdc96598c37f44e362daa191df3afb2a8d3c7b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHb=sn33fe#H{mdLCo8uGj-QXv&DIdPkX$4;+0iZi=+>)h>7N8um%A7aU}8p diff --git a/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient.gif b/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient.gif deleted file mode 100644 index af3addbcdaef7bbd180682f490dedb1fa96e0da2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHb=sn2}|u!m9IZLCo8uGj-QXv&DIdPkX$4;+0iZi=+>)h>7N8um%7F^(68D diff --git a/koha-tmpl/opac-tmpl/prog/images/submit-bg.gif b/koha-tmpl/opac-tmpl/prog/images/submit-bg.gif deleted file mode 100644 index ef5635bcdd02292a307edf8e6cb05c1919ce4031..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2899 zcmd^8=~vQ;0{wvtqLk3MYldk`jTuc->C*@-m&qk9Gsi7To0^sxCreAm4w7cOTQ#<; zS!3&vS&Cbbxnzo<0wRK_D7$PX2&k`l|Hiu??x%asUCy~-KZW`S9Lxk_0384{(x<1j ziyb2h=JeN=LGifKNM*}fha?j!6I(pTk?5v03+==5-Z9nKjDgG$b&bw^<|&2h1)hAK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~@`+YoNit11 z^*45IrKxY^nkJF9 The pop-up menu's "Import" link did not correctly pick up the existing record's biblionumber, if present. --- .../prog/en/modules/cataloguing/z3950_search.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index 20150ac..6eb4b50 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -146,7 +146,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% IF ( breeding_loo.breedingid ) %] - [% breeding_loo.server %] + [% breeding_loo.server %] [% breeding_loo.title |html %] [% breeding_loo.author %] [% breeding_loo.date %] -- 1.7.3 From Katrin.Fischer.83 at web.de Sat Dec 3 09:56:37 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sat, 3 Dec 2011 09:56:37 +0100 Subject: [Koha-patches] [PATCH] Bug 7313: Untranslatable strings in 'Search to hold' feature Message-ID: <1322902597-11737-1-git-send-email-Katrin.Fischer.83@web.de> Changed the javascript to include markup for translation _(...) in result list and detail page tool bars. Also changed the text shown for each result to match the text in the toolbar to make things more consistent. To test: - Apply patch - Run "perl translate update " - Open .po file for staff and check for "Place hold on" and "Forget" - Translate those - Run "perl translate install " - Activate "Search for hold" feature in patron account - Do a search and check tool bar on top of result list - Check link text shown in result list - Check detail page --- .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 6 +++--- .../prog/en/modules/catalogue/results.tt | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) 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 6c7ffae..5ae91ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -158,8 +158,8 @@ function confirm_items_deletion() { location.href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]"; } var HoldForButtonMenu = [ - { text: "Place hold", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" }, - { text: "Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]" } + { text: _("Place hold"), url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" }, + { text: _("Place hold for")+ " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]" } ]; // Instantiate a Split Button using the array of YAHOO.widget.MenuItem @@ -169,7 +169,7 @@ function confirm_items_deletion() { var HoldForButton = new YAHOO.widget.Button({ id: "holdfor", type: "split", - label: "Place hold", + label: _("Place hold"), name: "holdfor", menu: HoldForButtonMenu, container: this, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 2bed51c..9ea3fae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -194,13 +194,13 @@ YAHOO.util.Event.onContentReady("searchheader", function () { placeHold(); } var HoldForButtonMenu = [ - { text: "Place hold", onclick: { fn: holdFor }}, - { text: "Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: holdForPatron }}, - { text: "Forget [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: forgetPatron }}]; + { text: _("Place hold"), onclick: { fn: holdFor }}, + { text: _("Place hold for") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: holdForPatron }}, + { text: _("Forget") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: forgetPatron }}]; var HoldForButton = new YAHOO.widget.Button({ type: "split", - label: "Place hold", + label: _("Place hold"), name: "holdfor", menu: HoldForButtonMenu, container: "placeholdc", @@ -513,7 +513,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () { No holds allowed [% ELSE %] Holds - [% IF ( holdfor ) %] | Hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])[% END %] + [% IF ( holdfor ) %] | Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])[% END %] [% END %] [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] | Edit record -- 1.7.5.4 From christophe.croullebois at biblibre.com Sun Dec 4 22:03:46 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Sun, 4 Dec 2011 22:03:46 +0100 Subject: [Koha-patches] [PATCH 1/1] Bug 6663: Features for holidays.pl with datepicker Message-ID: <1323032626-15500-1-git-send-email-christophe.croullebois@biblibre.com> Allow to select a range between 2 dates and in one "submit" creates holidays only on these days. I have added also Holidays repeated yearly on a range. On suggestions I have added a datepicker for "To Date". --- .../intranet-tmpl/prog/en/css/staff-global.css | 2 + .../prog/en/modules/tools/holidays.tt | 27 +++++- tools/holidays.pl | 1 + tools/newHolidays.pl | 98 ++++++++++++++++--- 4 files changed, 111 insertions(+), 17 deletions(-) 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 7b38062..493a757 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -554,6 +554,8 @@ div.yui-b fieldset.brief li.radio { padding : .7em 0; } div.yui-b fieldset.brief li.radio label, +div.yui-b fieldset.brief li.dateinsert label, +div.yui-b fieldset.brief li.dateinsert span.label, div.yui-b fieldset.brief li.radio span.label { display : inline; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt index ac867fe..83fcc7f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt @@ -103,6 +103,7 @@ $("a.helptext").click(function(){ $(this).parent().find(".hint").toggle(); return false; }); + $("#dateofrange").each(function () { this.value = "" }); }); //]]> @@ -209,7 +210,7 @@
  • - Date: + From Date: , [% IF ( dateformat_us ) %]//[% ELSIF ( dateformat_metric ) %]//[% ELSE %]//[% END %] @@ -220,6 +221,20 @@
  • +
  • + To Date : + + Show Calendar + +
  • @@ -239,6 +254,16 @@ [?]
    This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.
  • +
  • + . + [?] +
    Make a single holiday on a range. For example, selecting August 1st, 2012 and August 10st, 2012 will make all days between 1st and 10st holiday, but will not affect August 1st-10st in other years.
    +
  • +
  • + . + [?] +
    Make a single holiday on a range repeated yearly. For example, selecting August 1st, 2012 and August 10st, 2012 will make all days between 1st and 10st holiday, and will affect August 1st-10st in other years.
    +
  • . diff --git a/tools/holidays.pl b/tools/holidays.pl index 90ef56a..b3912eb 100755 --- a/tools/holidays.pl +++ b/tools/holidays.pl @@ -147,6 +147,7 @@ $template->param(WEEK_DAYS_LOOP => \@week_days, keydate => $keydate, branchcodes => $branchcodes, branch => $branch, + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), branchname => $branchname ); diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl index 34469d8..c36d328 100755 --- a/tools/newHolidays.pl +++ b/tools/newHolidays.pl @@ -10,25 +10,44 @@ use C4::Output; use C4::Calendar; +use DateTime; -my $input = new CGI; -my $dbh = C4::Context->dbh(); +my $input = new CGI; +my $dbh = C4::Context->dbh(); -my $branchcode = $input->param('newBranchName'); -my $originalbranchcode = $branchcode; -my $weekday = $input->param('newWeekday'); -my $day = $input->param('newDay'); -my $month = $input->param('newMonth'); -my $year = $input->param('newYear'); -my $title = $input->param('newTitle'); -my $description = $input->param('newDescription'); -my $newoperation = $input->param('newOperation'); -my $allbranches = $input->param('allBranches'); +my $branchcode = $input->param('newBranchName'); +my $originalbranchcode = $branchcode; +my $weekday = $input->param('newWeekday'); +my $day = $input->param('newDay'); +my $month = $input->param('newMonth'); +my $year = $input->param('newYear'); +my $day1; +my $month1; +my $year1; +my $dateofrange = $input->param('dateofrange'); +my $title = $input->param('newTitle'); +my $description = $input->param('newDescription'); +my $newoperation = $input->param('newOperation'); +my $allbranches = $input->param('allBranches'); -my $calendardate = sprintf("%04d-%02d-%02d", $year, $month, $day); -my $isodate = C4::Dates->new($calendardate, 'iso'); -$calendardate = $isodate->output('syspref'); +my $calendardate = sprintf("%04d-%02d-%02d", $year, $month, $day); +my $isodate = C4::Dates->new($calendardate, 'iso'); +$calendardate = $isodate->output('syspref'); +my @dateend = split(/[\/-]/, $dateofrange); +if (C4::Context->preference("dateformat") eq "metric") { + $day1 = $dateend[0]; + $month1 = $dateend[1]; + $year1 = $dateend[2]; +}elsif (C4::Context->preference("dateformat") eq "us") { + $month1 = $dateend[0]; + $day1 = $dateend[1]; + $year1 = $dateend[2]; +} else { + $year1 = $dateend[0]; + $month1 = $dateend[1]; + $day1 = $dateend[2]; +} $title || ($title = ''); if ($description) { $description =~ s/\r/\\r/g; @@ -80,5 +99,52 @@ sub add_holiday { description => $description); } - } + } elsif ( $newoperation eq 'holidayrange' ) { + #Make an array with holiday's days + my $first_dt = DateTime->new(year => $year, month => $month, day => $day); + my $end_dt = DateTime->new(year => $year1, month => $month1, day => $day1); + my @holiday_list = (); + + for (my $dt = $first_dt->clone(); + $dt <= $end_dt; + $dt->add(days => 1) ) + { + push @holiday_list, $dt->clone(); + } + + foreach my $date (@holiday_list){ + unless ( $calendar->isHoliday( $date->{local_c}->{day}, $date->{local_c}->{month}, $date->{local_c}->{year} ) ) { + $calendar->insert_single_holiday( + day => $date->{local_c}->{day}, + month => $date->{local_c}->{month}, + year => $date->{local_c}->{year}, + title => $title, + description => $description + ); + } + } + } elsif ( $newoperation eq 'holidayrangerepeat' ) { + #Make an array with holiday's days + my $first_dt = DateTime->new(year => $year, month => $month, day => $day); + my $end_dt = DateTime->new(year => $year1, month => $month1, day => $day1); + my @holiday_list = (); + + for (my $dt = $first_dt->clone(); + $dt <= $end_dt; + $dt->add(days => 1) ) + { + push @holiday_list, $dt->clone(); + } + + foreach my $date (@holiday_list){ + unless ( $calendar->isHoliday( $date->{local_c}->{day}, $date->{local_c}->{month}, $date->{local_c}->{year} ) ) { + $calendar->insert_day_month_holiday( + day => $date->{local_c}->{day}, + month => $date->{local_c}->{month}, + title => $title, + description => $description + ); + } + } + } } -- 1.7.5.4 From M.de.Rooy at rijksmuseum.nl Mon Dec 5 08:45:58 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 5 Dec 2011 07:45:58 +0000 Subject: [Koha-patches] [PATCH] Bug 6786: Follow up fixing index names with hyphens Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3137CE93@S-MAIL-1B.rijksmuseum.intra> Adds hyphen to regex looking for index names in buildQuery. Test by searching on Control-number=... --- C4/Search.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 98db887..fdb3479 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1075,7 +1075,7 @@ sub buildQuery { my $cclq = 0; my $cclindexes = getIndexes(); if ( $query !~ /\s*ccl=/ ) { - while ( !$cclq && $query =~ /(?:^|\W)(\w+)(,\w+)*[:=]/g ) { + while ( !$cclq && $query =~ /(?:^|\W)([\w-]+)(,[\w-]+)*[:=]/g ) { my $dx = lc($1); $cclq = grep { lc($_) eq $dx } @$cclindexes; } -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon Dec 5 09:23:21 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 5 Dec 2011 08:23:21 +0000 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 2616: Remove unnecessary 'use HTML::Template' calls Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3137CF4C@S-MAIL-1B.rijksmuseum.intra> From: Ian Walls Removes deprecated calls to HTML::Template or HTML::Template::Pro from: C4/Output.pm catalogue/export.pl reports/issues_by_borrower_category.plugin reports/itemtypes.plugin Only remaining calls are in misc/cronjobs/rss/rss.pl, misc/cronjobs/smsoverdues.pl, and t/test_template.pl. These scripts still legitimately depend on H:T:P Signed-off-by: Marcel de Rooy --- C4/Output.pm | 1 - catalogue/export.pl | 1 - reports/issues_by_borrower_category.plugin | 1 - reports/itemtypes.plugin | 1 - 4 files changed, 0 insertions(+), 4 deletions(-) diff --git a/C4/Output.pm b/C4/Output.pm index 41a0a28..6ab16d9 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -33,7 +33,6 @@ use C4::Dates qw(format_date); use C4::Budgets qw(GetCurrency); use C4::Templates; -#use HTML::Template::Pro; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); BEGIN { diff --git a/catalogue/export.pl b/catalogue/export.pl index 3efdb21..2b55d9f 100755 --- a/catalogue/export.pl +++ b/catalogue/export.pl @@ -1,5 +1,4 @@ #!/usr/bin/perl -use HTML::Template::Pro; use strict; #use warnings; FIXME - Bug 2505 diff --git a/reports/issues_by_borrower_category.plugin b/reports/issues_by_borrower_category.plugin index 5b43023..825a492 100755 --- a/reports/issues_by_borrower_category.plugin +++ b/reports/issues_by_borrower_category.plugin @@ -22,7 +22,6 @@ use strict; use C4::Auth; use CGI; use C4::Context; -use HTML::Template::Pro; use C4::Search; use C4::Output; use C4::Koha; diff --git a/reports/itemtypes.plugin b/reports/itemtypes.plugin index d541429..f543f2d 100755 --- a/reports/itemtypes.plugin +++ b/reports/itemtypes.plugin @@ -22,7 +22,6 @@ use strict; use C4::Auth; use CGI; use C4::Context; -use HTML::Template::Pro; use C4::Search; use C4::Output; use C4::Koha; -- 1.6.0.6 From jonathan.druart at biblibre.com Mon Dec 5 09:49:49 2011 From: jonathan.druart at biblibre.com (Jonathan Druart) Date: Mon, 5 Dec 2011 09:49:49 +0100 Subject: [Koha-patches] [PATCH] Bug 7154: Modification in borrower attributes Message-ID: <1323074989-6763-1-git-send-email-jonathan.druart@biblibre.com> * group some attributes for a more friendly display * allow a link between a borrower category and an attribute to display it only for the specified category this patch add 2 fields in borrower_attribute_types : category_type class --- C4/Members/AttributeTypes.pm | 55 ++++++++++++- C4/Members/Attributes.pm | 4 +- admin/patron-attr-types.pl | 9 ++ installer/data/mysql/kohastructure.sql | 2 + installer/data/mysql/updatedatabase.pl | 7 ++ .../prog/en/modules/admin/patron-attr-types.tt | 62 +++++++++++---- .../prog/en/modules/members/memberentrygen.tt | 84 ++++++++++++++------ .../prog/en/modules/members/moremember.tt | 43 +++++++---- members/memberentry.pl | 5 + members/moremember.pl | 19 ++++- 10 files changed, 224 insertions(+), 66 deletions(-) diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm index e36557b..6a6b16d 100644 --- a/C4/Members/AttributeTypes.pm +++ b/C4/Members/AttributeTypes.pm @@ -70,7 +70,7 @@ If $all_fields is true, then each hashref also contains the other fields from bo sub GetAttributeTypes { my ($all) = @_; - my $select = $all ? '*' : 'code, description'; + my $select = $all ? '*' : 'code, description, class'; my $dbh = C4::Context->dbh; my $sth = $dbh->prepare("SELECT $select FROM borrower_attribute_types ORDER by code"); $sth->execute(); @@ -120,6 +120,8 @@ sub new { $self->{'staff_searchable'} = 0; $self->{'display_checkout'} = 0; $self->{'authorised_value_category'} = ''; + $self->{'category_type'} = ''; + $self->{'class'} = ''; bless $self, $class; return $self; @@ -155,6 +157,8 @@ sub fetch { $self->{'staff_searchable'} = $row->{'staff_searchable'}; $self->{'display_checkout'} = $row->{'display_checkout'}; $self->{'authorised_value_category'} = $row->{'authorised_value_category'}; + $self->{'category_type'} = $row->{'category_type'}; + $self->{'class'} = $row->{'class'}; bless $self, $class; return $self; @@ -185,14 +189,16 @@ sub store { password_allowed = ?, staff_searchable = ?, authorised_value_category = ?, - display_checkout = ? + display_checkout = ?, + category_type = ?, + class = ? WHERE code = ?"); } else { $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types (description, repeatable, unique_id, opac_display, password_allowed, - staff_searchable, authorised_value_category, display_checkout, code) + staff_searchable, authorised_value_category, display_checkout, category_type, class, code) VALUES (?, ?, ?, ?, ?, - ?, ?, ?, ?)"); + ?, ?, ?, ?, ?, ?)"); } $sth->bind_param(1, $self->{'description'}); $sth->bind_param(2, $self->{'repeatable'}); @@ -202,7 +208,9 @@ sub store { $sth->bind_param(6, $self->{'staff_searchable'}); $sth->bind_param(7, $self->{'authorised_value_category'}); $sth->bind_param(8, $self->{'display_checkout'}); - $sth->bind_param(9, $self->{'code'}); + $sth->bind_param(9, $self->{'category_type'}); + $sth->bind_param(10, $self->{'class'}); + $sth->bind_param(11, $self->{'code'}); $sth->execute; } @@ -341,6 +349,43 @@ sub authorised_value_category { @_ ? $self->{'authorised_value_category'} = shift : $self->{'authorised_value_category'}; } +=head2 category_type + +=over 4 + +my $category_type = $attr_type->category_type(); +$attr_type->category_type($category_type); + +=back + +Accessor. + +=cut + +sub category_type { + my $self = shift; + @_ ? $self->{'category_type'} = shift : $self->{'category_type'}; +} + +=head2 class + +=over 4 + +my $category_type = $attr_type->class(); +$attr_type->class($class); + +=back + +Accessor. + +=cut + +sub class { + my $self = shift; + @_ ? $self->{'class'} = shift : $self->{'class'}; +} + + =head2 delete $attr_type->delete(); diff --git a/C4/Members/Attributes.pm b/C4/Members/Attributes.pm index 4ae5600..137b11e 100644 --- a/C4/Members/Attributes.pm +++ b/C4/Members/Attributes.pm @@ -72,7 +72,7 @@ sub GetBorrowerAttributes { my $opac_only = @_ ? shift : 0; my $dbh = C4::Context->dbh(); - my $query = "SELECT code, description, attribute, lib, password, display_checkout + my $query = "SELECT code, description, attribute, lib, password, display_checkout, category_type, class FROM borrower_attributes JOIN borrower_attribute_types USING (code) LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value) @@ -90,6 +90,8 @@ sub GetBorrowerAttributes { value_description => $row->{'lib'}, password => $row->{'password'}, display_checkout => $row->{'display_checkout'}, + category_type => $row->{'category_type'}, + class => $row->{'class'}, } } return \@results; diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index 29a0d90..377159b 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -110,6 +110,9 @@ sub error_add_attribute_type_form { $template->param(display_checkout_checked => 'checked="checked"'); } + $template->param( category_type => $input->param('category_type') ); + $template->param( class => $input->param('class') ); + $template->param( attribute_type_form => 1, confirm_op => 'add_attribute_type_confirmed', @@ -152,6 +155,8 @@ sub add_update_attribute_type { $attr_type->password_allowed($password_allowed); my $display_checkout = $input->param('display_checkout'); $attr_type->display_checkout($display_checkout); + $attr_type->category_type($input->param('category_type')); + $attr_type->class($input->param('class')); if ($op eq 'edit') { $template->param(edited_attribute_type => $attr_type->code()); @@ -209,6 +214,7 @@ sub edit_attribute_type_form { $template->param(code => $code); $template->param(description => $attr_type->description()); + $template->param(class => $attr_type->class()); if ($attr_type->repeatable()) { $template->param(repeatable_checked => 1); @@ -232,6 +238,9 @@ sub edit_attribute_type_form { } authorised_value_category_list($template, $attr_type->authorised_value_category()); + $template->param ( category_type => $attr_type->category_type ); + $template->param ( class => $attr_type->class ); + $template->param( attribute_type_form => 1, edit_attribute_type => 1, diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 452173d..f35a8b4 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -286,6 +286,8 @@ CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field `staff_searchable` tinyint(1) NOT NULL default 0, -- defines if this field is searchable via the patron search in the staff client (1 for yes, 0 for no) `authorised_value_category` varchar(10) default NULL, -- foreign key from authorised_values that links this custom field to an authorized value category `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens + `category_type` VARCHAR(1) NOT NULL DEFAULT '',-- defines a category for an attribute_type + `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type PRIMARY KEY (`code`), KEY `auth_val_cat_idx` (`authorised_value_category`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9ae0060..6728330 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4571,6 +4571,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE borrower_attribute_types ADD COLUMN category_type VARCHAR(1) NOT NULL DEFAULT '' AFTER `display_checkout`"); + $dbh->do("ALTER TABLE borrower_attribute_types ADD COLUMN class VARCHAR(255) NOT NULL DEFAULT '' AFTER `category_type`"); + print "Upgrade to $DBversion done (New fields category_type and class in borrower_attribute_types table)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt index b8a8e3e..4d32646 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt @@ -186,6 +186,24 @@ function CheckAttributeTypeForm(f) { to be chosen from the authorized value list. However, an authorized value list is not enforced during batch patron import.
  • +
  • + + + Please let blank if you want these attributs to be for all types of patron. Else, select one type. +
  • +
  • + + + Group attributes types with a block title +
  • @@ -248,23 +266,33 @@ function CheckAttributeTypeForm(f) {
    Could not delete patron attribute type "[% ERROR_delete_not_found %]" — it was already absent from the database.
    [% END %] -[% IF ( available_attribute_types ) %] - - - - - - [% FOREACH available_attribute_type IN available_attribute_types %] - - - - - - [% END %] -
    CodeDescriptionActions
    [% available_attribute_type.code |html %][% available_attribute_type.description %] - Edit - Delete -
    [% ELSE %]

    There are no saved patron attribute types.

    [% END %] +[% IF ( available_attribute_types ) %] + + + + + + + + + + + [% FOREACH available_attribute_type IN available_attribute_types %] + + + + + + + [% END %] + +
    ClassCodeDescriptionActions
    [% available_attribute_type.class |html %][% available_attribute_type.code |html %][% available_attribute_type.description %] + Edit + Delete +
    +[% ELSE %] +

    There are no saved patron attribute types.

    +[% END %]
    [% pagination_bar %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index b9371b6..9c31271 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -23,6 +23,16 @@ document.form.state.value=RegExp.$3; document.form.country.value=RegExp.$4; }); + + [% IF category_type %] + update_category_code( "[% category_type %]" ); + [% ELSE %] + if ( $("#categorycode").length > 0 ){ + var category_type = $("#categorycode").find("option:selected").attr("data-typename"); + update_category_code( category_type ); + } + [% END %] + }); function clear_entry(node) { @@ -51,6 +61,23 @@ $("select#patron_attr_" + newId, clone).attr('value',''); original.parentNode.insertBefore(clone, original.nextSibling); } + + function update_category_code(category_type) { + var mytable = $("#attributes_table>tbody"); + + mytable.find("tr").each(function(){ + $(this).hide() + }); + + mytable.find("tr[data-category_type="+category_type+"]").each(function(){ + $(this).show(); + }); + mytable.find("tr[data-category_type='']").each(function(){ + $(this).show(); + }); + + } + var MSG_SEPARATOR = _("Separator must be / in field "); var MSG_INCORRECT_DAY = _("Invalid day entered in field "); var MSG_INCORRECT_MONTH = _("Invalid month entered in field "); @@ -890,25 +917,25 @@
  • - [% FOREACH typeloo IN typeloop %] - [% FOREACH categoryloo IN typeloo.categoryloop %] - [% IF ( loop.first ) %] - [% IF ( categoryloo.typename_C ) %][% END %] - [% IF ( categoryloo.typename_A ) %][% END %] - [% IF ( categoryloo.typename_S ) %][% END %] - [% IF ( categoryloo.typename_I ) %][% END %] - [% IF ( categoryloo.typename_P ) %][% END %] - [% IF ( categoryloo.typename_X ) %][% END %] - [% END %] - [% IF ( categoryloo.categorycodeselected ) %] - - [% ELSE %] - - [% END %] - [% IF ( loop.last ) %] - - [% END %] + [% FOREACH categoryloo IN typeloo.categoryloop %] + [% IF ( loop.first ) %] + [% IF ( categoryloo.typename_C ) %][% END %] + [% IF ( categoryloo.typename_A ) %][% END %] + [% IF ( categoryloo.typename_S ) %][% END %] + [% IF ( categoryloo.typename_I ) %][% END %] + [% IF ( categoryloo.typename_P ) %][% END %] + [% IF ( categoryloo.typename_X ) %][% END %] + [% END %] + [% IF ( categoryloo.categorycodeselected ) %] + + [% ELSE %] + + [% END %] + [% IF ( loop.last ) %] + + [% END %] [% END %] [% END %] @@ -1180,14 +1207,20 @@
    Additional attributes and identifiers - - - - - +
    TypeValue
    + + + + + + + + [% FOREACH patron_attribute IN patron_attributes %] - - + + [% END %] +
    ClassTypeValue
    [% patron_attribute.code %] ([% patron_attribute.description %]) +
    [% patron_attribute.class %] + [% patron_attribute.code %] ([% patron_attribute.description %]) @@ -1228,6 +1261,7 @@
    [% END %][% END %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 454032c..439689f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -285,22 +285,35 @@ function validate1(date) { [% UNLESS ( no_patron_attribute_types ) %]

    Additional attributes and identifiers

    - - - - - - [% FOREACH extendedattribute IN extendedattributes %] - - - - +[% FOREACH attribute IN attributes_loop %] + [% IF attribute.class %] +

    [% attribute.class %]

    +
    TypeValue
    [% extendedattribute.code %] ([% extendedattribute.description %])[% extendedattribute.value %] - [% IF ( extendedattribute.value_description ) %] - ([% extendedattribute.value_description %]) - [% END %] -
    + [% ELSE %] +
    [% END %] -
    + + + Type + Description + Value + + + + [% FOREACH item IN attribute.items %] + + [% item.code %] + [% item.description %] + [% item.value %] + [% IF ( item.value_description ) %] + ([% item.value_description %]) + [% END %] + + + [% END %] + + +[% END %]
    [% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index d169dbd..0997888 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -407,6 +407,9 @@ if ($op eq 'add'){ if ($op eq "modify") { $template->param( updtype => 'M',modify => 1 ); $template->param( step_1=>1, step_2=>1, step_3=>1, step_4=>1, step_5 => 1, step_6 => 1) unless $step; + if ( $step = 4 ) { + $template->param( category_type => $borrower_data->{'categorycode'} ); + } } if ( $op eq "duplicate" ) { $template->param( updtype => 'I' ); @@ -760,11 +763,13 @@ sub patron_attributes_form { foreach my $type_code (map { $_->{code} } @types) { my $attr_type = C4::Members::AttributeTypes->fetch($type_code); my $entry = { + class => $attr_type->class(), code => $attr_type->code(), description => $attr_type->description(), repeatable => $attr_type->repeatable(), password_allowed => $attr_type->password_allowed(), category => $attr_type->authorised_value_category(), + category_type => $attr_type->category_type(), password => '', }; if (exists $attr_hash{$attr_type->code()}) { diff --git a/members/moremember.pl b/members/moremember.pl index 6e5407c..e48538e 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -252,7 +252,6 @@ my $issuecount = @{$issue}; my $relissuecount = @{$relissue}; my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} ); my $today = POSIX::strftime("%Y-%m-%d", localtime); # iso format -my @issuedata; my @borrowers_with_issues; my $overdues_exist = 0; my $totalprice = 0; @@ -432,11 +431,25 @@ my $branch=C4::Context->userenv->{'branch'}; $template->param(%$data); if (C4::Context->preference('ExtendedPatronAttributes')) { - my $attributes = GetBorrowerAttributes($borrowernumber); + my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber); + my @classes = uniq( map {$_->{class}} @$attributes ); + my @attributes_loop; + for my $class (@classes) { + my @items; + for my $attr (@$attributes) { + push @items, $attr if $attr->{class} eq $class + } + push @attributes_loop, { + class => $class, + items => \@items + }; + } + $template->param( ExtendedPatronAttributes => 1, - extendedattributes => $attributes + attributes_loop => \@attributes_loop ); + my @types = C4::Members::AttributeTypes::GetAttributeTypes(); if (scalar(@types) == 0) { $template->param(no_patron_attribute_types => 1); -- 1.7.7.3 From adrien.saurat at biblibre.com Mon Dec 5 10:40:14 2011 From: adrien.saurat at biblibre.com (Adrien Saurat) Date: Mon, 5 Dec 2011 10:40:14 +0100 Subject: [Koha-patches] [PATCH] Bug 7013: required format for authorized values Message-ID: <1323078014-4084-1-git-send-email-adrien.saurat@biblibre.com> When an authorized values contains special characters as spaces, some problems arise in other pages. This patch sets up a new check for any new authorized value. The value can only contain letters, numbers, dash "-" and underscore "_". --- admin/authorised_values.pl | 97 +++++++++++--------- .../prog/en/modules/admin/authorised_values.tt | 7 +- 2 files changed, 58 insertions(+), 46 deletions(-) diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index d7872d6..26e792e 100755 --- a/admin/authorised_values.pl +++ b/admin/authorised_values.pl @@ -102,59 +102,68 @@ if ($op eq 'add_form') { my $imageurl = $input->param( 'imageurl' ) || ''; $imageurl = '' if $imageurl =~ /removeImage/; my $duplicate_entry = 0; + my $bad_chars = 0; - if ( $id ) { # Update - my $sth = $dbh->prepare( "SELECT category, authorised_value FROM authorised_values WHERE id='$id' "); - $sth->execute(); - my ($category, $authorised_value) = $sth->fetchrow_array(); - if ( $authorised_value ne $new_authorised_value ) { + if ( $new_authorised_value =~ /^[a-zA-Z0-9\-_]+$/ ) { + if ( $id ) { # Update + my $sth = $dbh->prepare( "SELECT category, authorised_value FROM authorised_values WHERE id='$id' "); + $sth->execute(); + my ($category, $authorised_value) = $sth->fetchrow_array(); + if ( $authorised_value ne $new_authorised_value ) { + my $sth = $dbh->prepare_cached( "SELECT COUNT(*) FROM authorised_values " . + "WHERE category = '$new_category' AND authorised_value = '$new_authorised_value' and id<>$id"); + $sth->execute(); + ($duplicate_entry) = $sth->fetchrow_array(); + warn "**** duplicate_entry = $duplicate_entry"; + } + unless ( $duplicate_entry ) { + my $sth=$dbh->prepare( 'UPDATE authorised_values + SET category = ?, + authorised_value = ?, + lib = ?, + lib_opac = ?, + imageurl = ? + WHERE id=?' ); + my $lib = $input->param('lib'); + my $lib_opac = $input->param('lib_opac'); + undef $lib if ($lib eq ""); # to insert NULL instead of a blank string + undef $lib_opac if ($lib_opac eq ""); # to insert NULL instead of a blank string + $sth->execute($new_category, $new_authorised_value, $lib, $lib_opac, $imageurl, $id); + print "Content-Type: text/html\n\n"; + exit; + } + } + else { # Insert my $sth = $dbh->prepare_cached( "SELECT COUNT(*) FROM authorised_values " . - "WHERE category = '$new_category' AND authorised_value = '$new_authorised_value' and id<>$id"); + "WHERE category = '$new_category' AND authorised_value = '$new_authorised_value' "); $sth->execute(); ($duplicate_entry) = $sth->fetchrow_array(); - warn "**** duplicate_entry = $duplicate_entry"; + unless ( $duplicate_entry ) { + my $sth=$dbh->prepare( 'INSERT INTO authorised_values + ( id, category, authorised_value, lib, lib_opac, imageurl ) + values (?, ?, ?, ?, ?, ?)' ); + my $lib = $input->param('lib'); + my $lib_opac = $input->param('lib_opac'); + undef $lib if ($lib eq ""); # to insert NULL instead of a blank string + undef $lib_opac if ($lib_opac eq ""); # to insert NULL instead of a blank string + $sth->execute($id, $new_category, $new_authorised_value, $lib, $lib_opac, $imageurl ); + print "Content-Type: text/html\n\nparam('category')."&offset=$offset\">"; + exit; + } } - unless ( $duplicate_entry ) { - my $sth=$dbh->prepare( 'UPDATE authorised_values - SET category = ?, - authorised_value = ?, - lib = ?, - lib_opac = ?, - imageurl = ? - WHERE id=?' ); - my $lib = $input->param('lib'); - my $lib_opac = $input->param('lib_opac'); - undef $lib if ($lib eq ""); # to insert NULL instead of a blank string - undef $lib_opac if ($lib_opac eq ""); # to insert NULL instead of a blank string - $sth->execute($new_category, $new_authorised_value, $lib, $lib_opac, $imageurl, $id); - print "Content-Type: text/html\n\n"; - exit; + if ( $duplicate_entry ) { + $template->param(duplicate_category => $new_category, + duplicate_value => $new_authorised_value, + else => 1); + default_form(); } } - else { # Insert - my $sth = $dbh->prepare_cached( "SELECT COUNT(*) FROM authorised_values " . - "WHERE category = '$new_category' AND authorised_value = '$new_authorised_value' "); - $sth->execute(); - ($duplicate_entry) = $sth->fetchrow_array(); - unless ( $duplicate_entry ) { - my $sth=$dbh->prepare( 'INSERT INTO authorised_values - ( id, category, authorised_value, lib, lib_opac, imageurl ) - values (?, ?, ?, ?, ?, ?)' ); - my $lib = $input->param('lib'); - my $lib_opac = $input->param('lib_opac'); - undef $lib if ($lib eq ""); # to insert NULL instead of a blank string - undef $lib_opac if ($lib_opac eq ""); # to insert NULL instead of a blank string - $sth->execute($id, $new_category, $new_authorised_value, $lib, $lib_opac, $imageurl ); - print "Content-Type: text/html\n\nparam('category')."&offset=$offset\">"; - exit; - } - } - if ( $duplicate_entry ) { - $template->param(duplicate_category => $new_category, - duplicate_value => $new_authorised_value, + else { + $template->param(rejected_category => $new_category, + rejected_value => $new_authorised_value, else => 1); default_form(); - } + } ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index 7e71789..1d9cfea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -67,8 +67,7 @@
  • [% IF ( action_modify ) %][% END %] - -
  • + Allowed characters : letters, numbers, dash and underscore
  • @@ -182,6 +181,10 @@
    Could not add value "[% duplicate_value %]" for category "[% duplicate_category %]" — value already present.
    [% END %] +[% IF ( rejected_category ) %] +
    Could not add value "[% rejected_value %]" for category "[% rejected_category %]" — the value can only contain the following characters: letters, numbers, - and _ +
    +[% END %] [% tab_list %] [% IF ( category == 'Bsort1' ) %]

    An authorized value attached to patrons, that can be used for stats purposes

    -- 1.7.4.1 From jonathan.druart at biblibre.com Mon Dec 5 11:36:59 2011 From: jonathan.druart at biblibre.com (Jonathan Druart) Date: Mon, 5 Dec 2011 11:36:59 +0100 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_5347=3A_Adds_columns_cla?= =?utf-8?q?ims=5Fcount_and_claimed=5Fdate_in_aqorders?= Message-ID: <1323081419-11845-1-git-send-email-jonathan.druart@biblibre.com> This patch adds 2 columns in the aqorders table : - claims_count : number of claims for an orders - claimed_date : date of the lastest claim In the lateorders.pl table, you can not select orders from different supplier because there is just one letter sent after clicking the "Claim order" button. So, it's logic that you want to select only orders from this supplier. Modification in C4/Letters.pm: refactoring code for claimacquisition and claimissues letter type. Now, fields for theses letters check the table name. It's not possible to chooce aqorders.title, this field doesn't exist ! Furthermore, you can add a tag around your item fields, like this : -- Begin example <> <> <> <> <> <> Ordernumber <> (<>) (<> ordered) ($<> each) has not been received. -- End example --- C4/Acquisition.pm | 30 +++ C4/Letters.pm | 198 ++++++++------------ acqui/lateorders.pl | 18 ++- .../data/mysql/de-DE/mandatory/sample_notices.sql | 2 +- .../data/mysql/en/mandatory/sample_notices.sql | 2 +- .../data/mysql/es-ES/mandatory/sample_notices.sql | 2 +- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 2 +- installer/data/mysql/it-IT/necessari/notices.sql | 2 +- installer/data/mysql/kohastructure.sql | 2 + .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 2 +- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/optional/sample_notices.sql | 2 +- .../data/mysql/uk-UA/mandatory/sample_notices.sql | 2 +- .../data/mysql/uk-UA/optional/sample_notices.sql | 2 +- installer/data/mysql/updatedatabase.pl | 6 + .../intranet-tmpl/prog/en/css/staff-global.css | 10 +- .../prog/en/modules/acqui/lateorders.tt | 39 ++++- 18 files changed, 189 insertions(+), 136 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 7127f24..e1d18f5 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -61,6 +61,8 @@ BEGIN { &GetContracts &GetContract &GetItemnumbersFromOrder + + &AddClaim ); } @@ -1416,9 +1418,12 @@ sub GetLateOrders { DATE(aqbasket.closedate) AS orderdate, aqorders.rrp AS unitpricesupplier, aqorders.ecost AS unitpricelib, + aqorders.claims_count AS claims_count, + aqorders.claimed_date AS claimed_date, aqbudgets.budget_name AS budget, borrowers.branchcode AS branch, aqbooksellers.name AS supplier, + aqbooksellers.id AS supplierid, biblio.author, biblio.title, biblioitems.publishercode AS publisher, biblioitems.publicationyear, @@ -1742,6 +1747,31 @@ sub GetContract { return $result; } +=head3 AddClaim + +=over 4 + +&AddClaim($ordernumber); + +Add a claim for an order + +=back + +=cut +sub AddClaim { + my ($ordernumber) = @_; + my $dbh = C4::Context->dbh; + my $query = " + UPDATE aqorders SET + claims_count = claims_count + 1, + claimed_date = CURDATE() + WHERE ordernumber = ? + "; + my $sth = $dbh->prepare($query); + $sth->execute($ordernumber); + +} + 1; __END__ diff --git a/C4/Letters.pm b/C4/Letters.pm index 6846a00..edd93a1 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -243,6 +243,7 @@ sub findrelatedto ($$) { sub SendAlerts { my ( $type, $externalid, $letter ) = @_; my $dbh = C4::Context->dbh; + my $strsth; if ( $type eq 'issue' ) { # warn "sending issues..."; @@ -290,99 +291,56 @@ sub SendAlerts { ); sendmail(%mail) or carp $Mail::Sendmail::error; -# warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; } } } elsif ( $type eq 'claimacquisition' ) { - # warn "sending issues..."; - my $letter = getletter( 'claimacquisition', $letter ); + $letter = getletter( 'claimacquisition', $letter ); # prepare the letter... # search the biblionumber - my $strsth = -"select aqorders.*,aqbasket.*,biblio.*,biblioitems.* from aqorders LEFT JOIN aqbasket on aqbasket.basketno=aqorders.basketno LEFT JOIN biblio on aqorders.biblionumber=biblio.biblionumber LEFT JOIN biblioitems on aqorders.biblioitemnumber=biblioitems.biblioitemnumber where aqorders.ordernumber IN (" - . join( ",", @$externalid ) . ")"; - my $sthorders = $dbh->prepare($strsth); - $sthorders->execute; - my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{booksellerid} ); - my $sthbookseller = - $dbh->prepare("select * from aqbooksellers where id=?"); - $sthbookseller->execute( $dataorders->[0]->{booksellerid} ); - my $databookseller = $sthbookseller->fetchrow_hashref; - - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; - } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; - } - } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; - - # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) - { - my %mail = ( - To => $databookseller->{bookselleremail} - . ( - $databookseller->{contemail} - ? "," . $databookseller->{contemail} - : "" - ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - } - if ( C4::Context->preference("LetterLog") ) { - logaction( - "ACQUISITION", - "Send Acquisition claim letter", - "", - "order list : " - . join( ",", @$externalid ) - . "\n$innerletter->{title}\n$innerletter->{content}" - ); + $strsth = qq{ + SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.*,aqbooksellers.* + FROM aqorders + LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno + LEFT JOIN biblio ON aqorders.biblionumber=biblio.biblionumber + LEFT JOIN biblioitems ON aqorders.biblioitemnumber=biblioitems.biblioitemnumber + LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id + WHERE aqorders.ordernumber IN ( } + . join( ",", @$externalid ) . ")"; } elsif ( $type eq 'claimissues' ) { - # warn "sending issues..."; - my $letter = getletter( 'claimissues', $letter ); + $letter = getletter( 'claimissues', $letter ); # prepare the letter... # search the biblionumber - my $strsth = -"select serial.*,subscription.*, biblio.* from serial LEFT JOIN subscription on serial.subscriptionid=subscription.subscriptionid LEFT JOIN biblio on serial.biblionumber=biblio.biblionumber where serial.serialid IN (" + $strsth = qq{ + SELECT serial.*,subscription.*, biblio.*, aqbooksellers.* + FROM serial + LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid + LEFT JOIN biblio ON serial.biblionumber=biblio.biblionumber + LEFT JOIN aqbooksellers ON subscription.aqbooksellerid=aqbooksellers.id + WHERE serial.serialid IN ( + } . join( ",", @$externalid ) . ")"; + } + + if ( $type eq 'claimacquisition' or $type eq 'claimissues' ) { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; - my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{aqbooksellerid} ); - my $sthbookseller = - $dbh->prepare("select * from aqbooksellers where id=?"); - $sthbookseller->execute( $dataorders->[0]->{aqbooksellerid} ); - my $databookseller = $sthbookseller->fetchrow_hashref; + my @fields = map { + $sthorders->{mysql_table}[$_] . "." . $sthorders->{NAME}[$_] } + (0 .. $#{$sthorders->{NAME}} ) ; + + my @orders_infos; + while ( my $row = $sthorders->fetchrow_arrayref() ) { + my %rec = (); + @rec{@fields} = @$row; + push @orders_infos, \%rec; + } # parsing branch info my $userenv = C4::Context->userenv; @@ -391,59 +349,65 @@ sub SendAlerts { # parsing librarian name $letter->{content} =~ s/<>/$userenv->{firstname}/g; $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; + $letter->{content} =~ s/<>/$userenv->{emailaddress}/g; + + # Get Fields remplacement + my $item_format = $1 if ( $letter->{content} =~ m/(.*<\/item>)/xms ); + + # Foreach field to remplace + while ( $letter->{content} =~ m/<<([^>]*)>>/g ) { + my $field = $1; + my $value = $orders_infos[0]->{$field} || ""; + $value = sprintf("%.2f", $value) if $field =~ /price/; + $letter->{content} =~ s/<<$field>>/$value/g; + } + + if ( $item_format ) { + # For each order + foreach my $infos ( @orders_infos ) { + my $order_content = $item_format; + # We replace by value + while ( $order_content =~ m/<<([^>]*)>>/g ) { + my $field = $1; + my $value = $infos->{$field} || ""; + $value = sprintf("%.2f", $value) if $field =~ /price/; + $order_content =~ s/(<<$field>>)/$value/g; } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; + $order_content =~ s/<\/{0,1}?item>//g; + $letter->{content} =~ s/.*<\/item>/$order_content\n$item_format/xms; } + $letter->{content} =~ s/.*<\/item>//xms; } - $letter->{content} =~ s/<<[^>]*>>//g; + my $innerletter = $letter; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) { - my $mail_to = $databookseller->{bookselleremail}; - if ($databookseller->{contemail}) { - if (!$mail_to) { - $mail_to = $databookseller->{contemail}; - } else { - $mail_to .= q|,|; - $mail_to .= $databookseller->{contemail}; - } - } - my $mail_subj = $innerletter->{title}; - my $mail_msg = $innerletter->{content}; - $mail_msg ||= q{}; - $mail_subj ||= q{}; - + if ( $orders_infos[0]->{'aqbooksellers.bookselleremail'} + || $orders_infos[0]->{'aqbooksellers.contemail'} ) { + my $to = $orders_infos[0]->{'aqbooksellers.bookselleremail'}; + $to .= ", " if $to; + $to .= $orders_infos[0]->{'aqbooksellers.contemail'} || ""; my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, + To => $to, + From => $userenv->{emailaddress}, + Subject => "" . $innerletter->{title}, + Message => "" . $innerletter->{content}, 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail) or carp $Mail::Sendmail::error; - logaction( - "ACQUISITION", - "CLAIM ISSUE", - undef, - "To=" - . $databookseller->{contemail} - . " Title=" - . $innerletter->{title} - . " Content=" - . $innerletter->{content} - ) if C4::Context->preference("LetterLog"); + warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; + if ( C4::Context->preference("LetterLog") ) { + logaction( "ACQUISITION", "Send Acquisition claim letter", "", "order list : " . join( ",", @$externalid ) . "\n$innerletter->{title}\n$innerletter->{content}" ) if $type eq 'claimacquisition'; + logaction( "ACQUISITION", "CLAIM ISSUE", undef, "To=" . $mail{To} . " Title=" . $innerletter->{title} . " Content=" . $innerletter->{content} ) if $type eq 'claimissues'; + } + } else { + die "This bookseller have no email\n"; } - } - # send an "account details" notice to a newly created user + + warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}"; + } + + # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { # must parse the password special, before it's hashed. $letter->{content} =~ s/<>/$externalid->{'password'}/g; diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 810f665..fe27de4 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -76,6 +76,19 @@ unless ($delay =~ /^\d{1,3}$/) { $delay = 30; #default value for delay } +if ($op and $op eq "send_alert"){ + my @ordernums = $input->param("claim_for");# FIXME: Fallback values? + eval { + SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value? + AddClaim ( $_ ) for @ordernums; + }; + if ( $@ ) { + $template->param(error_claim => $@); + } else { + $template->param(info_claim => "Emails have been sent"); + } +} + my %supplierlist = GetBooksellersWithLateOrders($delay); my (@sloopy); # supplier loop foreach (keys %supplierlist){ @@ -100,11 +113,6 @@ foreach (keys %$letters){ } $template->param(letters=>\@letters) if (@letters); -if ($op and $op eq "send_alert"){ - my @ordernums = $input->param("claim_for"); # FIXME: Fallback values? - SendAlerts('claimacquisition',\@ordernums,$input->param("letter_code")); # FIXME: Fallback value? -} - $template->param(ERROR_LOOP => \@errors) if (@errors); $template->param( lateorders => \@lateorders, diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 166c36d..bd195fb 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <> <>,\n\nNach unseren Unterlagen haben Sie Medien entliehen, die nun ?berf?llig geworden sind. Unsere Bibliothek erhebt keine Mahngeb?hren, bitte geben Sie die entliehenen Medien schnellstm?glich zur?ck.\n\n<>\n<>\n<> <>\nTelefon: <>\nFax: <>\nEmail: <>\n\nSie k?nnen die ?berf?lligen Medien soweit m?glich auch direkt ?ber Ihr Benutzerkonto online verl?ngern. Wenn ein Medium l?nger als 30 Tage ?berf?llig ist, wird Ihr Benutzeraccount gesperrt und Sie k?nnen keine Medien mehr entleihen.\n\nDie folgenden Medien sind zur Zeit ?berf?llig:\n\n"<>" by <>, <>, Barcode: <> Geb?hr: EUR\n\nVielen Dank f?r die schnelle Erledigung.\n\n<> Ihr Bibliotheksteam\n'), -('claimacquisition','ACQCLAIM','Reklamation (Erwerbung)','Titel nicht eingetroffen','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> bestellt) (je $<> ?) sind nicht eingetroffen.'), +('claimacquisition','ACQCLAIM','Reklamation (Erwerbung)','Titel nicht eingetroffen','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> bestellt) (je $<> ?) sind nicht eingetroffen.'), ('serial','RLIST','Umlaufliste','Zeitschrift ist jetzt verf?gbar','<> <>,\r\n\r\nDas folgende Heft ist jetzt verf?gbar:\r\n\r\n<>, <> (<>)\r\n\r\nBitte holen Sie es sobald m?glich ab.'), ('members','ACCTDETAILS','Kontoinformationen - Standard','Ihr neues Benutzerkonto','Liebe/r <> <> <>.\r\n\r\nDie Daten Ihres neuen Benutzerkontos sind:\r\n\r\nBenutzer: <>\r\nPasswort: <>\r\n\r\nWenn Sie Probleme in Hinsicht auf Ihr Benutzerkonto haben, wenden Sie sich bitte an die Bibliothek.\r\n\r\nVielen Dank,\r\nIhr Bibliotheksteam'), ('circulation','DUE','F?lligkeitsbenachrichtigung','F?lligkeitsbenachrichtigung','Liebe/r <> <>,\r\n\r\nDie folgenden Medien sind ab heute f?llig:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..0c9e860 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 689fa0f..0c9e860 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..09dc641 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -2,7 +2,7 @@ INSERT IGNORE INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 689fa0f..0c9e860 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 452173d..c79c4b9 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2631,6 +2631,8 @@ CREATE TABLE `aqorders` ( `sort1_authcat` varchar(10) default NULL, `sort2_authcat` varchar(10) default NULL, `uncertainprice` tinyint(1), + `claims_count` int(11) default 0, + `claimed_date` date default NULL, PRIMARY KEY (`ordernumber`), KEY `basketno` (`basketno`), KEY `biblionumber` (`biblionumber`), diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index cdb5529..7263eb0 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -21,7 +21,7 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Purring','Purring p? dokument','<> <>,\n\nDu har l?n som skulle v?rt levert. Biblioteket krever ikke inn gebyrer, men vennligst lever eller forny l?net/l?nene ved biblioteket.\n\n<>\n<>\n<> <>\nTelefon: <>\nFax: <>\nE-post: <>\n\nDersom du har et passord og l?net/l?nene kan fornyes kan du gj?re dette p? nettet. Dersom du overskrider l?netiden med mer enn 30 dager vil l?nekortet bli sperret.\n\nF?lgende l?n har g?tt over tiden:\n\n"<>" av <>, <>, Strekkode: <> Gebyr: GBP\n\nP? forh?nd takk.\n\n<>\n'), -('claimacquisition','ACQCLAIM','Periodikapurring','Eksemplar ikke mottatt','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nBestillingsnummer <> (<>) (<> ordered) ($<> each) har ikke blitt mottatt.'), +('claimacquisition','ACQCLAIM','Periodikapurring','Eksemplar ikke mottatt','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nBestillingsnummer <> (<>) (<> ordered) ($<> each) har ikke blitt mottatt.'), ('serial','RLIST','Sirkulasjon','Et dokument er n? tilgjengelig','<> <>,\r\n\r\nDette dokumentet er tilgjengelig:\r\n\r\n<>, <> (<>)\r\n\r\nVennligst kom og hent det n?r det passer.'), ('members','ACCTDETAILS','Mal for kontodetaljer - STANDARD','Dine nye kontodetaljer i Koha.','Hei <> <> <>.\r\n\r\nDine nye detaljer er:\r\n\r\nBruker: <>\r\nPassord: <>\r\n\r\nDersom det oppst?r problemer, vennligst kontakt biblioteket.\r\n\r\nVennlig hilsen,\r\nBiblioteket\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Innleveringsp?minnelse','Innleveringsp?minnelse','<> <>,\r\n\r\nDette dokumentet m? n? leveres:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..287730a 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -2,7 +2,7 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice', 'Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..0c9e860 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/ru-RU/optional/sample_notices.sql b/installer/data/mysql/ru-RU/optional/sample_notices.sql index 4f2001e..d6537e1 100644 --- a/installer/data/mysql/ru-RU/optional/sample_notices.sql +++ b/installer/data/mysql/ru-RU/optional/sample_notices.sql @@ -5,7 +5,7 @@ INSERT INTO `letter` VALUES ('circulation','ODUE','??????????? ? ?????????','??????? ???????????','???????? <> <>,\r\n\r\n?? ????? ???????? ???????, ? ??? ???? ????????????? ??????????. ???? ?????????? ?? ??????? ?????? ?? ?????????, ??, ??????????, ????????? ??? ???????? ?? ??? ????? ??????.\r\n\r\n<><><><><><><>???? ?? ???????????????? ?????? ? ??????????, ?? ?????? ???????????? ??? ? ????? ??????? ????????????? ?????? ??? ??????????? ??????. ???? ????????? ????? ????????? ????? ??? ?? 30 ????, ?? ?? ??????? ???????????? ??? ???????????? ????? ???? ?? ??????? ?????????. ????????? ????????? ? ????????? ????? ???????? ????????????:\r\n\r\n<>'), -('claimacquisition','ACQCLAIM','?????????? ????????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????? <> (<>) (<> ??????) ???????? ?? ????.'), +('claimacquisition','ACQCLAIM','?????????? ????????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????? <> (<>) (<> ??????) ???????? ?? ????.'), ('serial','RLIST','?????? ??????????','?????????? ??????? ??? ?????????','<> <>,\r\n\r\n????????? ?????? ??? ????????:\r\n\r\n<>\r\n\r\n??????? ??????? ??? ? ????? ??????? ??? ??? ?????.'), diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..dc5a54d 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/uk-UA/optional/sample_notices.sql b/installer/data/mysql/uk-UA/optional/sample_notices.sql index 6df324b..0e1e1f4 100644 --- a/installer/data/mysql/uk-UA/optional/sample_notices.sql +++ b/installer/data/mysql/uk-UA/optional/sample_notices.sql @@ -5,7 +5,7 @@ INSERT INTO `letter` VALUES ('circulation','ODUE','???????????? ??? ????????????','??????? ???????????','???????? <> <>,\r\n\r\n?? ????? ???????? ???????, ? ??? ? ??????????? ??????????. ???? ?????????? ?? ?????? ?????? ?? ??????????, ???, ???? ?????, ????????? ??? ??????? ?? ?? ????? ??????.\r\n\r\n<><><><><><><>???? ?? ????????????? ?????? ? ??????????, ?? ?????? ??????????????? ???? ? ????? ??????? ????????????? ?????? ??? ??????????? ??????. ???? ????????? ??? ???????????? ????? ??? ?? 30 ????, ?? ?? ??????? ??????????????? ??? ????????? ?????? ???? ?? ????????? ?????????. ????????? ????????? ? ????? ??? ? ????????????:\r\n\r\n<>'), -('claimacquisition','ACQCLAIM','?????? ?????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????????? <> (<>) (<> ?????????) (<> ??????) ???????? ?? ????.'), +('claimacquisition','ACQCLAIM','?????? ?????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????????? <> (<>) (<> ?????????) (<> ??????) ???????? ?? ????.'), ('serial','RLIST','?????? ???????????','????????? ??????? ??? ????????','<> <>,\r\n\r\n????????? ?????? ??? ?????????:\r\n\r\n<>\r\n\r\n???????? ??????? ???? ? ????-???? ??????? ??? ??? ???.'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9ae0060..f46d33b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4571,6 +4571,12 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("ALTER TABLE `aqorders` ADD COLUMN `claims_count` INT(11) DEFAULT 0, ADD COLUMN `claimed_date` DATE DEFAULT NULL AFTER `claims_count`"); + print "Upgrade to $DBversion done (Add claims_count and claimed_date fields in aqorders table)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS 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 7b38062..7557f58 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2080,4 +2080,12 @@ div.pager input.pagedisplay { background-color : transparent; font-weight: bold; text-align : center; -} \ No newline at end of file +} + +div.info { + border : 2px dashed #990000; + background-color : #99FFCC; + padding : .5em; + margin : 1em; +} + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 1e64e1f..545d9c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -1,6 +1,20 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Late orders [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'header.inc' %] @@ -17,6 +31,12 @@

    [% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders

    +[% IF error_claim %] +
    [% error_claim %]
    +[% END %] +[% IF info_claim %] +
    [% info_claim %]
    +[% END %] [% IF ( lateorders ) %]
    @@ -35,12 +55,20 @@ Information Total cost Basket -   + claims count + claimed date + + [% IF Supplier %] + + [% ELSE %] + + [% END %] [% FOREACH lateorder IN lateorders %] [% UNLESS ( loop.odd ) %] [% ELSE %][% END %] + ([% lateorder.supplierid %]) [% lateorder.orderdate %] ([% lateorder.latesince %] days) @@ -69,8 +97,13 @@

    [% lateorder.branch %]

    + [% lateorder.claims_count %] + [% lateorder.claimed_date %] - + [% UNLESS lateorder.budget_lock %] + + [% END %] + [% END %] @@ -79,6 +112,8 @@   [% total %]   +   +   -- 1.7.7.3 From oleonard at myacpl.org Mon Dec 5 15:47:08 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 5 Dec 2011 09:47:08 -0500 Subject: [Koha-patches] [PATCH] Bug 7319 - Improving title and breadcrumbs on acquisitions Z39.50 search pages Message-ID: <1323096428-24102-1-git-send-email-oleonard@myacpl.org> Changing title and breadcrumbs so that they correctly reflect the curent stage of the process. To test: Add to an order from an external source. When filling out the Z39.50 search form the title and breadcrumbs should read "Order from external sources." After searching they should read "Order from external sources -> Search results" --- .../prog/en/modules/acqui/z3950_search.tt | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index bbcb973..66dbc6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Acquisitions › Z39.50 Search Results +Koha › Acquisitions › [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source › Search results[% END %] [% INCLUDE 'greybox.inc' %] [% INCLUDE 'doc-head-close.inc' %] @@ -63,11 +63,11 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
    [% IF ( opsearch ) %] -

    Z39.50 Search Points

    +

    Order from external source

    @@ -126,7 +126,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% ELSE %] -

    Results

    +

    Search results

    [% IF ( breeding_loop ) %] -- 1.7.3 From oleonard at myacpl.org Tue Dec 6 15:59:20 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 6 Dec 2011 09:59:20 -0500 Subject: [Koha-patches] [PATCH] Bug 7226 - can't add tags on list Message-ID: <1323183560-28390-1-git-send-email-oleonard@myacpl.org> Incorrect check for TagsInputOnList was preventing the right JavaScript from being triggered, and markup was nested inside the wrong logic for the confirmation message to be displayed consistently. --- .../opac-tmpl/prog/en/modules/opac-shelves.tt | 26 ++++++++++---------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt index 528b8a7..8fff936 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt @@ -92,7 +92,6 @@ $(function() { $("#addtags").html(""+_("Tag")+"<\/a> |"); $(".tagbutton").click(KOHA.Tags.add_tag_button); - [% IF ( TagsInputOnList ) %] [% IF ( loggedinusername ) %] $("#tagsel_tag").click(function(){ tagSelected(); @@ -112,7 +111,6 @@ $(function() { return false; }); [% END %] - [% END %] [% END %][% END %][% END %] [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] }); @@ -278,14 +276,16 @@ $(function() { [% END %][% ELSE %]This record has no items.[% END %] [% END %] [% IF ( TagsEnabled ) %] - [% IF ( TagsShowOnList ) %] - [% IF ( itemsloo.TagLoop ) %] -
    - Tags: - - [% END %] + [% IF ( TagsShowOnList ) %] + [% IF ( itemsloo.TagLoop.size ) %] +
    + Tags: +
      [% FOREACH TagLoo IN itemsloo.TagLoop %]
    • [% TagLoo.term %] ([% TagLoo.weight_total %])
    • + [% END %] +
    +
    + [% END %] + [% END %] [% IF ( TagsInputOnList ) %] [% IF ( loggedinusername ) %] @@ -299,10 +299,10 @@ $(function() { [% ELSIF ( loop.first ) %]Log in to add tags. [% END %] [% END %] - [% IF ( itemsloo.TagLoop ) %] -
    [% END %] + [% IF ( loggedinusername ) %] + + [% END %] [% END %] - [% END %] Actions: [% IF ( RequestOnOpac ) %] -- 1.7.3 From oleonard at myacpl.org Tue Dec 6 17:02:04 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 6 Dec 2011 11:02:04 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 7261 System Preference to select the first day of week Message-ID: <1323187324-29076-1-git-send-email-oleonard@myacpl.org> From: Juan Romay Sieira Choose Sunday or Monday as the first day of the week in the calendar (OPAC and Intranet). Signed-off-by: Owen Leonard --- C4/Auth.pm | 2 ++ installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 6 ++++++ .../intranet-tmpl/prog/en/includes/calendar.inc | 2 +- .../prog/en/lib/calendar/calendar-setup.js | 5 ++++- .../prog/en/modules/admin/preferences/admin.pref | 8 ++++++++ .../opac-tmpl/prog/en/modules/opac-reserve.tt | 6 ++++-- 7 files changed, 26 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e360e10..347d037 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -369,6 +369,7 @@ sub get_template_and_user { AmazonSimilarItems => C4::Context->preference("AmazonSimilarItems"), AutoLocation => C4::Context->preference("AutoLocation"), "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1, + CalendarFirstDayOfWeek => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1, CircAutocompl => C4::Context->preference("CircAutocompl"), FRBRizeEditions => C4::Context->preference("FRBRizeEditions"), IndependantBranches => C4::Context->preference("IndependantBranches"), @@ -426,6 +427,7 @@ sub get_template_and_user { AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), BranchesLoop => GetBranchesLoop($opac_name), + CalendarFirstDayOfWeek => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Monday")?1:0, LibraryName => "" . C4::Context->preference("LibraryName"), LibraryNameTitle => "" . $LibraryNameTitle, LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"", diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ae2c1cb..8ada5f5 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); - +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9ae0060..4e21b12 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4571,6 +4571,12 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');"); + print "Upgrade to $DBversion done (Add syspref CalendarFirstDayOfWeek used to select the first day of week to use in the calendar. )\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index 43ba022..d70716c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -7,7 +7,7 @@ Calendar._DN = new Array(_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_(" Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun")); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. -Calendar._FD = 1; +Calendar._FD = [% CalendarFirstDayOfWeek %]; // full month names Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December")); // short month names diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-setup.js b/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-setup.js index 8b7fcdf..1d876b1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-setup.js +++ b/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-setup.js @@ -69,7 +69,10 @@ Calendar.setup = function (params) { param_default("singleClick", true); param_default("disableFunc", 'dateStatusHandler'); param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined - param_default("firstDay", 0); // defaults to "Sunday" first + if (Calendar._FD) + param_default("firstDay", Calendar._FD); + else + param_default("firstDay", 0); // defaults to "Sunday" first param_default("align", "Br"); param_default("range", [1900, 2999]); param_default("weekNumbers", true); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index f026c7e..e4f5502 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -40,6 +40,14 @@ Administration: yes: Allow no: "Don't allow" - staff and patrons to create and view saved lists of books. + - + - Use + - pref: CalendarFirstDayOfWeek + default: Sunday + choices: + Sunday: Sunday + Monday: Monday + - as the first day of week in the calendar. Login options: - - pref: insecure diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index ca49152..826effc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -338,7 +338,8 @@ ifFormat : "[% DHTMLcalendar_dateformat %]", button : "CalendarReserveDate[% bibitemloo.biblionumber %]", disableFunc : validate[% bibitemloo.biblionumber %], - dateStatusFunc : validate[% bibitemloo.biblionumber %] + dateStatusFunc : validate[% bibitemloo.biblionumber %], + firstDay : [% CalendarFirstDayOfWeek %] } ); //]]> @@ -370,7 +371,8 @@ ifFormat : "[% DHTMLcalendar_dateformat %]", button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]", disableFunc : validate1, - dateStatusFunc : validate1 + dateStatusFunc : validate1, + firstDay : [% CalendarFirstDayOfWeek %] } ); //]]> -- 1.7.3 From oleonard at myacpl.org Tue Dec 6 17:10:43 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 6 Dec 2011 11:10:43 -0500 Subject: [Koha-patches] [PATCH] Bug 2307 - Calendar widget cannot be translated Message-ID: <1323187843-29150-1-git-send-email-oleonard@myacpl.org> Implementing the same fix in the OPAC which we now use in the staff client. --- koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc | 62 ++++++++++++++++++++- 1 files changed, 61 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc index 140abeb..43ba022 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc @@ -1,6 +1,66 @@ - + @@ -92,8 +92,8 @@ $.tablesorter.addParser({ [% IF ( BORROWER_INF.flagged ) %]
      - [% IF ( BORROWER_INF.debarred ) %] -
    • Please note: Your account has been frozen until [% BORROWER_INF.debarred %] - [% BORROWER_INF.debarredcomment %]. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please contact the library.
    • + [% IF ( userdebarred ) %] +
    • Please note: Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until [% BORROWER_INF.userdebarreddate %][% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment "[% BORROWER_INF.debarredcomment %]"[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If your account page shows your account to be clear, please contact the library.
    • [% END %] [% IF ( BORROWER_INF.gonenoaddress ) %]
    • Please note: According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]contact information[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)[% END %].
    • @@ -260,14 +260,11 @@ $.tablesorter.addParser({
    [% END %]
    - [% IF ( canrenew ) %] - [% IF ( OpacRenewalAllowed ) %] + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %] [% END %] - [% END %] - [% IF ( OpacRenewalAllowed ) %] - [% IF ( canrenew ) %] + [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
    @@ -277,7 +274,6 @@ $.tablesorter.addParser({ [% UNLESS patron_flagged %][% END %]
    [% END %] - [% END %] [% ELSE %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 9806c9f..b94a05f 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -30,6 +30,7 @@ use C4::Members; use C4::Members::AttributeTypes; use C4::Members::Attributes qw/GetBorrowerAttributeValue/; use C4::Output; +use C4::Overdues qw/CheckBorrowerDebarred/; use C4::Biblio; use C4::Items; use C4::Dates qw/format_date/; @@ -78,7 +79,18 @@ for (qw(dateenrolled dateexpiry dateofbirth)) { } $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); -if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { +my $debar = CheckBorrowerDebarred($borrowernumber); +my $userdebarred; + +if ($debar) { + $userdebarred = 1; + $template->param( 'userdebarred' => $userdebarred ); + if ( $debar ne "9999-12-31" ) { + $borr->{'userdebarreddate'} = C4::Dates::format_date($debar); + } +} + +if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { $borr->{'flagged'} = 1; } @@ -104,7 +116,6 @@ if ( $borr->{'amountoutstanding'} < 0 ) { } $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; -$borr->{'debarred'} = C4::Dates->new($borr->{'debarred'},'iso')->output; my @bordat; $bordat[0] = $borr; @@ -127,6 +138,7 @@ $template->param( BORROWER_INFO => \@bordat, OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0, surname => $borr->{surname}, showname => $borr->{showname}, + ); #get issued items .... -- 1.7.3 From srdjan at catalyst.net.nz Fri Dec 9 05:13:12 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Fri, 9 Dec 2011 17:13:12 +1300 Subject: [Koha-patches] [PATCH] bug_6488: Take in account opachiddenitems when searching in opac In-Reply-To: References: Message-ID: <1323403992-7177-1-git-send-email-srdjan@catalyst.net.nz> Changed searchResults() interface Added trailing \n when parsing OpacHiddenItems to make YAML happy XSLTParse4Display() and buildKohaItemsNamespace() take hidden items as input param Removed numbering from the search results, looks wrong with hidden items --- C4/Items.pm | 52 +++++++------ C4/Search.pm | 83 +++++++++++--------- C4/XSLT.pm | 11 ++- catalogue/search.pl | 2 +- cataloguing/addbooks.pl | 2 +- .../opac-tmpl/prog/en/modules/opac-results.tt | 1 - opac/opac-search.pl | 4 +- 7 files changed, 86 insertions(+), 69 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 0756832..a8801ca 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1630,41 +1630,45 @@ sub GetHiddenItemnumbers { my @resultitems; my $yaml = C4::Context->preference('OpacHiddenItems'); + $yaml = "$yaml\n"; # YAML is anal on ending \n. Surplus does not hurt my $hidingrules; eval { - $hidingrules = YAML::Load($yaml); + $hidingrules = YAML::Load($yaml); }; if ($@) { - warn "Unable to parse OpacHiddenItems syspref : $@"; - return (); - } else { + warn "Unable to parse OpacHiddenItems syspref : $@"; + return (); + } my $dbh = C4::Context->dbh; - # For each item - foreach my $item (@items) { + # For each item + foreach my $item (@items) { - # We check each rule - foreach my $field (keys %$hidingrules) { - my $query = "SELECT $field from items where itemnumber = ?"; - my $sth = $dbh->prepare($query); - $sth->execute($item->{'itemnumber'}); - my ($result) = $sth->fetchrow; + # We check each rule + foreach my $field (keys %$hidingrules) { + my $val; + if (exists $item->{$field}) { + $val = $item->{$field}; + } + else { + my $query = "SELECT $field from items where itemnumber = ?"; + $val = $dbh->selectrow_array($query, undef, $item->{'itemnumber'}); + } + $val = '' unless defined $val; - # If the results matches the values in the yaml file - if (any { $result eq $_ } @{$hidingrules->{$field}}) { + # If the results matches the values in the yaml file + if (any { $val eq $_ } @{$hidingrules->{$field}}) { - # We add the itemnumber to the list - push @resultitems, $item->{'itemnumber'}; + # We add the itemnumber to the list + push @resultitems, $item->{'itemnumber'}; - # If at least one rule matched for an item, no need to test the others - last; - } - } - } - return @resultitems; + # If at least one rule matched for an item, no need to test the others + last; + } + } } - - } + return @resultitems; +} =head3 get_item_authorised_values diff --git a/C4/Search.pm b/C4/Search.pm index fdb3479..a9d47ac 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -31,6 +31,7 @@ use C4::Branch; use C4::Reserves; # CheckReserves use C4::Debug; use C4::Items; +use C4::Charset; use YAML; use URI::Escape; @@ -1413,11 +1414,16 @@ Format results in a form suitable for passing to the template # IMO this subroutine is pretty messy still -- it's responsible for # building the HTML output for the template sub searchResults { - my ( $search_context, $searchdesc, $hits, $results_per_page, $offset, $scan, @marcresults, $hidelostitems ) = @_; + my ( $search_context, $searchdesc, $hits, $results_per_page, $offset, $scan, $marcresults ) = @_; my $dbh = C4::Context->dbh; my @newresults; - $search_context = 'opac' unless $search_context eq 'opac' or $search_context eq 'intranet'; + $search_context = 'opac' if !$search_context || $search_context ne 'intranet'; + my ($is_opac, $hidelostitems); + if ($search_context eq 'opac') { + $hidelostitems = C4::Context->preference('hidelostitems'); + $is_opac = 1; + } #Build branchnames hash #find branchname @@ -1480,12 +1486,11 @@ sub searchResults { my $marcflavour = C4::Context->preference("marcflavour"); # We get the biblionumber position in MARC my ($bibliotag,$bibliosubf)=GetMarcFromKohaField('biblio.biblionumber',''); - my $fw; # loop through all of the records we've retrieved for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { - my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] ); - $fw = $scan + my $marcrecord = MARC::File::USMARC::decode( $marcresults->[$i] ); + my $fw = $scan ? undef : $bibliotag < 10 ? GetFrameworkCode($marcrecord->field($bibliotag)->data) @@ -1603,18 +1608,18 @@ sub searchResults { my $other_count = 0; my $wthdrawn_count = 0; my $itemlost_count = 0; + my $hideatopac_count = 0; my $itembinding_count = 0; my $itemdamaged_count = 0; my $item_in_transit_count = 0; my $can_place_holds = 0; - my $item_onhold_count = 0; + my $item_onhold_count = 0; my $items_count = scalar(@fields); - my $maxitems = - ( C4::Context->preference('maxItemsinSearchResults') ) - ? C4::Context->preference('maxItemsinSearchResults') - 1 - : 1; + my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults'); + my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1; # loop through every item + my @hiddenitems; foreach my $field (@fields) { my $item; @@ -1624,9 +1629,11 @@ sub searchResults { } # Hidden items - my @items = ($item); - my (@hiddenitems) = GetHiddenItemnumbers(@items); - $item->{'hideatopac'} = 1 if (@hiddenitems); + if ($is_opac) { + my @hi = GetHiddenItemnumbers($item); + $item->{'hideatopac'} = @hi; + push @hiddenitems, @hi; + } my $hbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'homebranch' : 'holdingbranch'; my $otherbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'holdingbranch' : 'homebranch'; @@ -1710,6 +1717,7 @@ sub searchResults { $wthdrawn_count++ if $item->{wthdrawn}; $itemlost_count++ if $item->{itemlost}; $itemdamaged_count++ if $item->{damaged}; + $hideatopac_count++ if $item->{hideatopac}; $item_in_transit_count++ if $transfertwhen ne ''; $item_onhold_count++ if $reservestatus eq 'Waiting'; $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; @@ -1748,11 +1756,11 @@ sub searchResults { } } } # notforloan, item level and biblioitem level + + next if $is_opac && $hideatopac_count >= $items_count; + next if $hidelostitems && $itemlost_count >= $items_count; + my ( $availableitemscount, $onloanitemscount, $otheritemscount ); - $maxitems = - ( C4::Context->preference('maxItemsinSearchResults') ) - ? C4::Context->preference('maxItemsinSearchResults') - 1 - : 1; for my $key ( sort keys %$onloan_items ) { (++$onloanitemscount > $maxitems) and last; push @onloan_items_loop, $onloan_items->{$key}; @@ -1766,20 +1774,7 @@ sub searchResults { push @available_items_loop, $available_items->{$key} } - # XSLT processing of some stuff - use C4::Charset; - SetUTF8Flag($marcrecord); - $debug && warn $marcrecord->as_formatted; - if (!$scan && $search_context eq 'opac' && C4::Context->preference("OPACXSLTResultsDisplay")) { - # FIXME note that XSLTResultsDisplay (use of XSLT to format staff interface bib search results) - # is not implemented yet - $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, 'Results', - $search_context, 1); - # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs - - } - - # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either + # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either if (!C4::Context->preference("item-level_itypes")) { if ($itemtypes{ $oldbiblio->{itemtype} }->{notforloan}) { $can_place_holds = 0; @@ -1803,8 +1798,8 @@ sub searchResults { $oldbiblio->{intransitcount} = $item_in_transit_count; $oldbiblio->{onholdcount} = $item_onhold_count; $oldbiblio->{orderedcount} = $ordered_count; - $oldbiblio->{isbn} =~ - s/-//g; # deleting - in isbn to enable amazon content + # deleting - in isbn to enable amazon content + $oldbiblio->{isbn} =~ s/-//g; if (C4::Context->preference("AlternateHoldingsField") && $items_count == 0) { my $fieldspec = C4::Context->preference("AlternateHoldingsField"); @@ -1834,10 +1829,24 @@ sub searchResults { $oldbiblio->{'alternateholdings_count'} = $alternateholdingscount; } - push( @newresults, $oldbiblio ) - if(not $hidelostitems - or (($items_count > $itemlost_count ) - && $hidelostitems)); + # XSLT processing of some stuff + if (!$scan && $search_context eq 'opac' && C4::Context->preference("OPACXSLTResultsDisplay")) { + SetUTF8Flag($marcrecord); + $debug && warn $marcrecord->as_formatted; + # FIXME note that XSLTResultsDisplay (use of XSLT to format staff interface bib search results) + # is not implemented yet + $oldbiblio->{XSLTResultsRecord} + = XSLTParse4Display($oldbiblio->{biblionumber}, + $marcrecord, + 'Results', + $search_context, + 1, # clean up the problematic ampersand entities that Zebra outputs + \@hiddenitems + ); + + } + + push( @newresults, $oldbiblio ); } return @newresults; diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 8bc4000..41fca01 100755 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -121,12 +121,12 @@ sub getAuthorisedValues4MARCSubfields { my $stylesheet; sub XSLTParse4Display { - my ( $biblionumber, $orig_record, $xsl_suffix, $interface, $fixamps ) = @_; + my ( $biblionumber, $orig_record, $xsl_suffix, $interface, $fixamps, $hidden_items ) = @_; $interface = 'opac' unless $interface; # grab the XML, run it through our stylesheet, push it out to the browser my $record = transformMARCXML4XSLT($biblionumber, $orig_record); #return $record->as_formatted(); - my $itemsxml = buildKohaItemsNamespace($biblionumber); + my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); my $sysxml = "\n"; foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow @@ -180,8 +180,13 @@ sub XSLTParse4Display { } sub buildKohaItemsNamespace { - my ($biblionumber) = @_; + my ($biblionumber, $hidden_items) = @_; + my @items = C4::Items::GetItemsInfo($biblionumber); + if ($hidden_items && @$hidden_items) { + my %hi = map {$_ => 1} @$hidden_items; + @items = grep { !$hi{$_->{itemnumber}} } @items; + } my $branches = GetBranches(); my $itemtypes = GetItemTypes(); my $xml = ''; diff --git a/catalogue/search.pl b/catalogue/search.pl index 907efdb..24f2978 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -547,7 +547,7 @@ for (my $i=0;$i<@servers;$i++) { $hits = $results_hashref->{$server}->{"hits"}; my $page = $cgi->param('page') || 0; my @newresults = searchResults('intranet', $query_desc, $hits, $results_per_page, $offset, $scan, - @{$results_hashref->{$server}->{"RECORDS"}}); + $results_hashref->{$server}->{"RECORDS"}); $total = $total + $results_hashref->{$server}->{"hits"}; ## If there's just one result, redirect to the detail page if ($total == 1) { diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index 5e89ef8..38e8024 100755 --- a/cataloguing/addbooks.pl +++ b/cataloguing/addbooks.pl @@ -86,7 +86,7 @@ if ($query) { # format output # SimpleSearch() give the results per page we want, so 0 offet here my $total = @{$marcresults}; - my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @{$marcresults} ); + my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, $marcresults ); $template->param( total => $total_hits, query => $query, diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index 7201a82..deda677 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -380,7 +380,6 @@ $(document).ready(function(){ - [% UNLESS ( item_level_itypes ) %] [% UNLESS ( noItemTypeImages ) %] diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 42eb0ec..13d9f0d 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -487,12 +487,12 @@ for (my $i=0;$i<@servers;$i++) { # we want as specified by $offset and $results_per_page, # we need to set the offset parameter of searchResults to 0 my @group_results = searchResults( 'opac', $query_desc, $group->{'group_count'},$results_per_page, 0, $scan, - @{ $group->{"RECORDS"} }, C4::Context->preference('hidelostitems')); + $group->{"RECORDS"}); push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results }; } } else { @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan, - @{$results_hashref->{$server}->{"RECORDS"}},, C4::Context->preference('hidelostitems')); + $results_hashref->{$server}->{"RECORDS"}); } my $tag_quantity; if (C4::Context->preference('TagsEnabled') and -- 1.6.5 From Katrin.Fischer.83 at web.de Fri Dec 9 07:44:05 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 9 Dec 2011 07:44:05 +0100 Subject: [Koha-patches] [PATCH] Bug 7338: Link on serial collection page wrong Message-ID: <1323413045-5300-1-git-send-email-Katrin.Fischer.83@web.de> This was a scoping error. The links are not supposed to show up when you open that page with a subscription id in the URL. To test: 1) Check links don't show up now. --- .../prog/en/modules/serials/serials-collection.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 93c4fdc..f7538b7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -183,7 +183,7 @@ $(document).ready(function() {
    You have nothing checked out
    [% IF ( opacbookbag ) %] [% ELSE %] [% IF ( virtualshelves ) %] [% ELSE %] [% IF ( RequestOnOpac ) %][% UNLESS ( SEARCH_RESULT.norequests ) %][% IF ( opacuserlogin ) %] [% END %][% END %][% END %][% END %][% END %][% SEARCH_RESULT.result_number %].
    -[% UNLESS ( year.onesubscription ) %] +[% UNLESS ( onesubscription ) %] [% END %] [% FOREACH serial IN year.serials %] [% UNLESS ( loop.odd ) %][% ELSE %][% END %] -[% UNLESS ( serial.onesubscription ) %] +[% UNLESS ( onesubscription ) %] [% END %] - + + + + [% IF Supplier %] + + [% ELSE %] + + [% END %] [% FOREACH lateorder IN lateorders %] [% UNLESS ( loop.odd ) %] [% ELSE %][% END %] @@ -69,8 +97,13 @@

    [% lateorder.branch %]

    + + [% END %] @@ -79,6 +112,8 @@ + + -- 1.7.7.3 From henridamien.laurent at biblibre.com Wed Dec 14 16:11:07 2011 From: henridamien.laurent at biblibre.com (Henri-Damien LAURENT) Date: Wed, 14 Dec 2011 16:11:07 +0100 Subject: [Koha-patches] [PATCH] Bug 7358: reaffect a closed basket to a closed basketgroup Message-ID: <1323875467-11178-1-git-send-email-henridamien.laurent@biblibre.com> From: Admin User Koha The list of basketgroups when looking at a closed basket show all the basketgroups. It should not be possible to affect a basket to a closed basketgroup, since this basketgroup should have been sent to a supplier. --- acqui/basket.pl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index b836280..60a46f0 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -199,6 +199,7 @@ if ( $op eq 'delete_confirm' ) { my $member = GetMember(borrowernumber => $loggedinuser); if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) { $basketgroups = GetBasketgroups($basket->{booksellerid}); + @$basketgroups= grep {!$_->{closed}} @$basketgroups; for my $bg ( @{$basketgroups} ) { if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){ $bg->{default} = 1; -- 1.7.2.5 From henridamien.laurent at biblibre.com Wed Dec 14 17:35:35 2011 From: henridamien.laurent at biblibre.com (Henri-Damien LAURENT) Date: Wed, 14 Dec 2011 17:35:35 +0100 Subject: [Koha-patches] [PATCH] Bug 7360 Import Default framework into other deletes default Framework Message-ID: <1323880535-14933-1-git-send-email-henridamien.laurent@biblibre.com> From: Admin User Koha Step to reproduce : - export default framework as SQL - create new framework - Import the exported SQL file into this new framework. Go to default framework : It disappeared. If some libraries want to share default frameworks, then it is a major bug. This patch fixes the test in order to cope with 0 character framework name. --- C4/ImportExportFramework.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm index a2b650b..d85e64f 100755 --- a/C4/ImportExportFramework.pm +++ b/C4/ImportExportFramework.pm @@ -776,7 +776,7 @@ sub _parseSQLLine my $stmt = SQL::Statement->new($line, $parser); my $where = $stmt->where(); if ($where && $where->op() eq '=' && $line =~ /^\s*DELETE/) { - $line =~ s/frameworkcode='.+?'/frameworkcode='$frameworkcode';/ unless ($_ =~ /frameworkcode='$frameworkcode'/); + $line =~ s/frameworkcode='.*?'/frameworkcode='$frameworkcode';/ unless ($_ =~ /frameworkcode='$frameworkcode'/); } else { my @arrFields; my @arrValues; @@ -817,7 +817,7 @@ sub _parseSQLLine if ($error) { $line .= ';' unless ($line =~ /;$/); if ($line =~ /^\s*DELETE/) { - $line =~ s/frameworkcode='.+?'/frameworkcode='$frameworkcode'/ unless ($_ =~ /frameworkcode='$frameworkcode'/); + $line =~ s/frameworkcode='.*?'/frameworkcode='$frameworkcode'/ unless ($_ =~ /frameworkcode='$frameworkcode'/); } elsif ($line =~ /^\s*INSERT\s+INTO\s+(.*?)\s+\((.*?frameworkcode.*?)\)\s+VALUES\s+\((.+)\)\s*;\s*$/) { my $table = $1; my $fields = $2; -- 1.7.2.5 From oleonard at myacpl.org Wed Dec 14 18:15:15 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 14 Dec 2011 12:15:15 -0500 Subject: [Koha-patches] [PATCH] Bug 1633 - Interface revisions for the staff client Message-ID: <1323882915-28706-1-git-send-email-oleonard@myacpl.org> This patch revises the image viewer page to match other biblio detail pages: a toolbar, a sidebar menu, etc. Additional data is now pulled by imageviewer.pl in order to provide information necessary for the proper functioning of the toolbar and menus: item counts, hold availability, biblio view options. Other changes have been made to match the changes in the OPAC interface like styling of the images and no-javascript compatibility --- catalogue/image.pl | 2 +- catalogue/imageviewer.pl | 30 ++++++- .../intranet-tmpl/prog/en/css/staff-global.css | 9 +- .../prog/en/includes/biblio-view-menu.inc | 2 +- .../prog/en/modules/catalogue/detail.tt | 8 +- .../prog/en/modules/catalogue/imageviewer.tt | 102 ++++++++++++++++---- 6 files changed, 121 insertions(+), 32 deletions(-) diff --git a/catalogue/image.pl b/catalogue/image.pl index 17621d7..13b2b4e 100755 --- a/catalogue/image.pl +++ b/catalogue/image.pl @@ -29,7 +29,7 @@ use C4::Images; $|=1; -my $DEBUG = 1; +my $DEBUG = 0; my $data = new CGI; my $imagenumber; diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl index 395e4b7..caa793e 100755 --- a/catalogue/imageviewer.pl +++ b/catalogue/imageviewer.pl @@ -23,8 +23,10 @@ use warnings; use CGI; use C4::Auth; use C4::Biblio; +use C4::Items; use C4::Output; use C4::Images; +use C4::Search; my $query = new CGI; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( @@ -38,14 +40,38 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +my $imagenumber = $query ->param('imagenumber'); my ($count, $biblio) = GetBiblio($biblionumber); +my $itemcount = GetItemsCount($biblionumber); + +my @items = GetItemsInfo( $biblionumber ); + +my $norequests = 1; +foreach my $item (@items) { + # can place holds defaults to yes + $norequests = 0 unless ( ( $item->{'notforloan_per_itemtype'} > 0 ) || ( $item->{'itemnotforloan'} > 0 ) ); +} + +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'}, + ); +} if (C4::Context->preference("LocalCoverImages")) { my @images = ListImagesForBiblio($biblionumber); $template->{VARS}->{'LocalCoverImages'} = 1; $template->{VARS}->{'images'} = \@images; + $template->{VARS}->{'imagenumber'} = $imagenumber || $images[0] || ''; } - -$template->{VARS}->{'biblio'} = $biblio; + $template->{VARS}->{'count'} = $itemcount; + $template->{VARS}->{'biblionumber'} = $biblionumber; + $template->{VARS}->{'norequests'} = $norequests; + $template->param( C4::Search::enabled_staff_search_views ); + $template->{VARS}->{'biblio'} = $biblio; output_html_with_http_headers $query, $cookie, $template->output; 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 30334ef..4d18ac6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2133,6 +2133,9 @@ div.pager input.pagedisplay { font-weight: bold; text-align : center; } -.localimage { - padding: .3em; -} + +a.localimage img { + border : 1px solid #0000CC; + margin : 0 .5em; + padding : .3em; +} \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc index a944dc5..903cf3a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc @@ -23,7 +23,7 @@ [% IF ( CAN_user_reserveforothers ) %] [% IF ( holdsview ) %]
  • [% ELSE %]
  • [% END %]Holds
  • [% END %] - [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]
  • [% ELSE %]
  • [% END %]Analytics
  • [% END %] + [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]
  • [% ELSE %]
  • [% END %]Analytics
  • [% END %] [% IF ( subscriptionsnumber ) %]
  • Subscription(s)
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index f9aff7f..4e9cd7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -510,7 +510,7 @@ function verify_images() { @@ -520,15 +520,15 @@ function verify_images() { [% IF ( LocalCoverImages ) %]
    [% IF ( localimages ) %] -
    Click on an image to view it in the image viewer
    +

    Click on an image to view it in the image viewer

    [% FOREACH image IN localimages %] [% IF image %] -img + [% END %] [% END %] [% ELSE %] [% IF ( CAN_user_tools_upload_local_cover_images ) %] -

    No images have been uploaded for this bibliographic record yet. Please upload one.

    +

    No images have been uploaded for this bibliographic record yet. Please upload one.

    [% END %] [% END %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt index c5ab657..4c389b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt @@ -1,11 +1,12 @@ [% INCLUDE 'doc-head-open.inc' %] -[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Images for: [% biblio.title |html %] +Koha › Catalog › Details for [% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %] [% INCLUDE 'doc-head-close.inc' %] - - - -
    Large view
    -[% IF LocalCoverImages == 1 %] -[% FOREACH img IN images %] -[% IF img %] -Image -[% END %] -[% END %] -[% biblio.title %] [% biblio.author %] +[% END %] + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
    + +
    +
    +
    +
    + +[% INCLUDE 'cat-toolbar.inc' %] + +

    Images for [% biblio.title |html %]

    +

    [% biblio.author %]

    + +[% IF ( LocalCoverImages == 1 ) %] + [% IF ( images.size > 1 ) %] +
    +
    + +
    + +
    + + [% FOREACH img IN images %] + [% IF img %] + + [% IF ( imagenumber == img ) %] + + [% ELSE %] + + [% END %] + + [% END %] + [% END %] +
    + + [% ELSE %] +
    There are no images for this record.
    + [% END %] [% ELSE %] -Unfortunately, images are not enabled for this catalog at this time. +
    Local images have not been enabled by your system administrator.
    [% END %] - - + +
    +
    +
    +
    +[% INCLUDE 'biblio-view-menu.inc' %] +
    +
    +[% INCLUDE 'intranet-bottom.inc' %] -- 1.7.3 From M.de.Rooy at rijksmuseum.nl Thu Dec 15 09:06:39 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 15 Dec 2011 08:06:39 +0000 Subject: [Koha-patches] [PATCH] 6302 follow up Message-ID: <809BE39CD64BFD4EB9036172EBCCFA31382C93@S-MAIL-1B.rijksmuseum.intra> Updates to_address in message queue when sending an email (when needed). --- C4/Letters.pm | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 862121c..2420e4a 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -836,8 +836,8 @@ sub _send_message_by_email ($;$$$) { if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) { $sendmail_params{ Bcc } = $bcc; } - + _update_message_to_address($message->{'message_id'},$to_address) unless $message->{to_address}; #if initial message address was empty, coming here means that a to address was found and queue should be updated if ( sendmail( %sendmail_params ) ) { _set_message_status( { message_id => $message->{'message_id'}, status => 'sent' } ); @@ -863,6 +863,12 @@ sub _send_message_by_sms ($) { return $success; } +sub _update_message_to_address { + my ($id, $to)= @_; + my $dbh = C4::Context->dbh(); + $dbh->do('UPDATE message_queue SET to_address=? WHERE message_id=?',undef,($to,$id)); +} + sub _set_message_status ($) { my $params = shift or return undef; -- 1.6.0.6 From lrea at nekls.org Thu Dec 15 17:29:13 2011 From: lrea at nekls.org (lrea at nekls.org) Date: Thu, 15 Dec 2011 10:29:13 -0600 Subject: [Koha-patches] =?utf-8?q?=5BPATCH_2/2=5D_Bug_7333_-_Fixing_up_db?= =?utf-8?q?=5Fdependent/Search=2Et_to_use_sample_data_Thanks_to_Chr?= =?utf-8?q?is_N=2E_for_helping_figure_out_that_it_was_because_there?= =?utf-8?q?_were_no_French_stopwords_in_the_DB_that_the_test_was_fa?= =?utf-8?q?iling=2E?= Message-ID: <1323966553-23377-1-git-send-email-lrea@nekls.org> From: Liz Rea Patch changes the French string (with French stopwords) to an English string with English stopwords, as only English stopwords are installed in the default data. This patch will allow Search.t to run on the database attached to this bug. --- t/db_dependent/Search.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 31316f2..17fac6e 100644 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -23,7 +23,7 @@ foreach my $string ("Le?on","mod?les") { ok($results[0] eq $string,"$string is not modified"); } -foreach my $string ("Les chaussettes de l'archiduchesse") { +foreach my $string ("A book about the stars") { my @results=C4::Search::_remove_stopwords($string,"kw"); $debug && warn "$string ",Dump(@results); ok($results[0] ne $string,"$results[0] from $string"); -- 1.7.2.5 From oleonard at myacpl.org Thu Dec 15 19:28:37 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 15 Dec 2011 13:28:37 -0500 Subject: [Koha-patches] [PATCH] Bug 6933 [REVISED] Add a view of titles with a particular tag to the staff client Message-ID: <1323973717-32715-1-git-send-email-oleonard@myacpl.org> - Adds a new page to the tags moderation section for viewing all the titles tagged with a particular term. - Adds display of approved tags to the catalog detail page matching the opac view. Adding tags from the detail view not implemented. Follow-up adds tags display to XSLT detail view Areas for improvement: - I think it would be better to show "Also tagged with:" and exclude the current tag from the list of titles tagged with a particular tag. - It would be nice to be able to show unapproved tags (and some idication of their status) along with approved tags on the detail page if the user had TagsModeration permission. --- catalogue/detail.pl | 13 +++ .../prog/en/modules/catalogue/detail.tt | 27 +++++ .../intranet-tmpl/prog/en/modules/tags/list.tt | 103 ++++++++++++++++++++ .../intranet-tmpl/prog/en/modules/tags/review.tt | 2 +- tags/list.pl | 81 +++++++++++++++ 5 files changed, 225 insertions(+), 1 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt create mode 100755 tags/list.pl diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 580949d..c9b8321 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -35,6 +35,7 @@ use C4::Serials; use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); use C4::External::Amazon; use C4::Search; # enabled_staff_search_views +use C4::Tags qw(get_tags); use C4::VirtualShelves; use C4::XSLT; @@ -384,4 +385,16 @@ if (C4::Context->preference('OPACBaseURL')){ $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') ); } +# Displaying tags + +my $tag_quantity; +if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail')) { + $template->param( + TagsEnabled => 1, + TagsShowOnDetail => $tag_quantity + ); + $template->param(TagLoop => get_tags({biblionumber=>$biblionumber, approved=>1, + 'sort'=>'-weight', limit=>$tag_quantity})); +} + output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 019fa10..ad013f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -97,6 +97,18 @@ function verify_images() { [% END %] [% END %] + [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %] + Tags: + [% FOREACH TagLoo IN TagLoop %] + [% IF ( CAN_user_tools_moderate_tags ) %] + [% TagLoo.term |html %] + [% ELSE %] + [% TagLoo.term |html %] + [% END %] + ([% TagLoo.weight_total %])[% IF ( loop.last ) %][% ELSE %], [% END %] + [% END %] + + [% END %] [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]
    @@ -215,9 +227,24 @@ function verify_images() { [% END %] + [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %] +
  • Tags: +
      + [% FOREACH TagLoo IN TagLoop %] +
    • + [% IF ( CAN_user_tools_moderate_tags ) %] + [% TagLoo.term |html %] + [% ELSE %] + [% TagLoo.term |html %] + [% END %] + ([% TagLoo.weight_total %])[% IF ( loop.last ) %][% ELSE %], [% END %]
    • + [% END %] +
  • + [% END %] [% IF ( holdcount ) %]
  • Holds: [% holdcount %]
  • [% ELSE %][% END %] [% END %] +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt new file mode 100644 index 0000000..05fd452 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt @@ -0,0 +1,103 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › Tools › Tags › [% IF ( do_it ) %]Review › [% ELSE %]Review Tags[% END %] +[% INCLUDE 'doc-head-close.inc' %] + + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
    +
    +
    +
    +[% IF ( titles ) %] +

    Titles tagged with the term [% tag %]

    +
    # SubsDate published @@ -205,7 +205,7 @@ $(document).ready(function() {
    [% serial.subscriptionid %] -- 1.7.5.4 From alex.arnaud at biblibre.com Fri Dec 9 10:45:24 2011 From: alex.arnaud at biblibre.com (alex.arnaud at biblibre.com) Date: Fri, 9 Dec 2011 10:45:24 +0100 Subject: [Koha-patches] [PATCH] bug 7342 - neworderempty: Fix empty values in statistic 1 and 2 dropboxes Message-ID: <1323423924-12008-1-git-send-email-alex.arnaud@biblibre.com> From: Alex Arnaud --- acqui/fetch_sort_dropbox.pl | 74 ++++++++++++++++++++ .../prog/en/modules/acqui/neworderempty.tt | 10 ++-- 2 files changed, 79 insertions(+), 5 deletions(-) create mode 100755 acqui/fetch_sort_dropbox.pl diff --git a/acqui/fetch_sort_dropbox.pl b/acqui/fetch_sort_dropbox.pl new file mode 100755 index 0000000..4045016 --- /dev/null +++ b/acqui/fetch_sort_dropbox.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl + +# Copyright 2008-2009 BibLibre SARL +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +use strict; +use CGI; +use C4::Context; +use C4::Output; +use C4::Auth; +use C4::Budgets; + +=head1 + +fetch_sort_dropbox : + +=cut + +my $input = new CGI; + +my $budget_id = $input->param('budget_id'); +my $sort_id = $input->param('sort'); + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { template_name => "acqui/ajax.tmpl", # FIXME: REMOVE TMPL DEP? + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {editcatalogue => 'edit_catalogue'}, + debug => 0, + } +); + +#my $dropbox_values; +my $budget = GetBudget($budget_id); +my $dropbox_values = GetAuthvalueDropbox( $budget->{'sort'.$sort_id.'_authcat'}, '' ); + +my @authorised_values; +my %authorised_lib; + +foreach ( @$dropbox_values) { + push @authorised_values, $_->{value}; + $authorised_lib{$_->{value}} = $_->{label}; +} + +my $budget_authvalue_dropbox = CGI::scrolling_list( + -values => \@authorised_values, + -labels => \%authorised_lib, + -default => $authorised_values[0], +); + + +#strip off select tags ;/ +$budget_authvalue_dropbox =~ s/^\//; +$budget_authvalue_dropbox =~ s/\<\/select\>$//; +chomp $budget_authvalue_dropbox; + +$template->param( return => $budget_authvalue_dropbox ); +output_html_with_http_headers $input, $cookie, $template->output; +1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index d58582e..26db40d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -475,9 +475,9 @@ $(document).ready(function() @@ -490,12 +490,12 @@ $(document).ready(function() [% IF CGIsort2 %] - [% FOREACH sort_opt IN CGIsort2 %] [% IF sort_opt.default %] - + [% ELSE %] - + [% END %] [% END %] -- 1.7.0.4 From alex.arnaud at biblibre.com Fri Dec 9 14:03:40 2011 From: alex.arnaud at biblibre.com (alex.arnaud at biblibre.com) Date: Fri, 9 Dec 2011 14:03:40 +0100 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6694: Problem with casAuthentication syspref Message-ID: <1323435820-13186-1-git-send-email-alex.arnaud@biblibre.com> From: Julian Maurice A missing test in checkauth caused anonymous session to be destroyed and re-created at every call when this syspref was set. Almost the same issue is also fixed in check_api_auth, which caused C4::Service->init to fail. Signed-off-by: Alex Arnaud --- C4/Auth.pm | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e360e10..17b8469 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -688,7 +688,8 @@ sub checkauth { $userid = $session->param('id'); $sessiontype = $session->param('sessiontype'); } - if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) { + if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) + || ( $cas && $query->param('ticket') ) ) { #if a user enters an id ne to the id in the current session, we need to log them in... #first we need to clear the anonymous session... $debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id'); @@ -751,7 +752,7 @@ sub checkauth { C4::Context->_new_userenv($sessionID); $cookie = $query->cookie(CGISESSID => $sessionID); $userid = $query->param('userid'); - if ($cas || $userid) { + if (($cas && $query->param('ticket')) || $userid) { my $password = $query->param('password'); my ($return, $cardnumber); if ($cas && $query->param('ticket')) { @@ -1117,7 +1118,7 @@ sub check_api_auth { unless ($query->param('userid')) { $sessionID = $query->cookie("CGISESSID"); } - if ($sessionID && not $cas) { + if ($sessionID && not ($cas && $query->param('PT')) ) { my $session = get_session($sessionID); C4::Context->_new_userenv($sessionID); if ($session) { -- 1.7.0.4 From jcamins at cpbibliography.com Sat Dec 10 20:26:59 2011 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Sat, 10 Dec 2011 14:26:59 -0500 Subject: [Koha-patches] [PATCH] Bug 1633: Add support for uploading images to Koha Message-ID: <1323545219-15281-1-git-send-email-jcamins@cpbibliography.com> A frequently-requested feature for Koha, especially by special libraries, is the ability to upload local cover images into Koha. This patch adds that ability. This counter-patch builds on the work by Koustubha Kale at Anant Corporation, but adds the following additional features: 1. Moves the code for handling image retrieval/saving into the Koha namespace 2. The ability to have multiple cover images for a biblio 3. Handling for "full size" (800x600) and thumbnail-size (200x140) images 4. A separate image viewer page 5. Javascript-based handling of cover image placement for the cover images in the OPAC (as opposed to static tags embedded into pages) 6. Local cover display in the staff client 7. Uploading images directly from the record view How to use/test : Assign user permission to the user Tools > (upload_local_cover_images Upload local cover images). In order to upload local images, login to the staff client. Go to Home ? Tools ? Upload Cover Images. Here you can upload cover images either singly or in bulk in the form of a zip file. If uploading singly, click on image file, browse the image from your local disk, type in the biblio number of the catalogue entry and press upload. If uploading in bulk as a zip file, the zip file must contain (in addition to cover images) one text file named either datalink.txt OR idlink.txt. This file should have mapping of biblionumber to image file name in the zip one per line with comma or tab as delimiters. For example: 1, scanned_cover_image_of_bib_no_1.jpg 2, scanned_cover_image_of_bib_no_1.jpg Cover images will be resized to a large image of 800x600 and a thumbnail of 200x140. Depending on the setting of AllowMultipleCovers, it is possible to upload multiple images for a single bibliographic record. However, even if multiple covers are permitted, you have the option of replacing the existing covers by checking the "Replace existing covers" option on the upload screen. 1. The patch adds a menu link in Tools from where you can upload local cover images 2. It adds a user permission to enable access control to this menu item under Tools 3. It adds a system preference OPACLocalCoverImages under Enhanced Content. This needs to be turned on to show local cover images in OPAC. Once you have uploaded local images, if you search for the biblio, the local cover should show up in search as well as search detail pages in the OPAC, and the details view in the Intranet. Koustubha Kale is working on another patch which will allow us to set a cover image source priority in system preferences, and which will then gracefully fail over to the next source if image is not available from the first choice source. Detailed test plan: 1. Install update (database updates are in installer/data/mysql/atomicupdate/local_cover_images.pl) 2. Enable LocalCoverImages and OPACLocalCoverImages in the Enhanced content preferences screen 3. Upload an image of type GIF, JPEG, PNG, or XPM either from the "Local Cover Image" tool and choosing "Image file" as its type and entering a valid biblionumber, or by viewing a record and clicking the "Upload Image" option under the Edit button in the toolbar 4. View the record in the Intranet and OPAC. The image should show up directly in OPAC search results and details, and there should be an "Images" tab on both the Intranet and the OPAC detail view 5. Upload another image and attach it to the same bibliographic record. 6. Confirm that the new image (only) shows up in the OPAC and Intranet 7. Change the AllowMultipleCovers to "Allow" in the Enhanced content preferences screen 8. Add several images to a bibliographic record 9. Confirm that they all show up in the "Images" tab on the Intranet and OPAC and only one shows up in the main display in the OPAC details and search results pages 10. Create a zip file containing at least one image and a text file "idlink.txt" with one or more lines that looks like this: 1, filename.jpg Replace the '1' with a valid biblionumber, and 'filename.jpg' with the name of the image file you are adding to the zip file 11. Upload the zip file from the "Local Cover Image" tool (being sure to choose "zip file" as the filetype) 12. Check that the image(s) have been attached to the appropriate bibliographic record(s) Special thanks to Koustubha Kale and Anant Corporation for the initial implementation of local cover images, and to Chris Nighswonger of Foundation Bible College for his prior work on patron images. --- C4/Auth.pm | 5 +- C4/UploadedFile.pm | 18 ++ Koha/Images.pm | 149 +++++++++++++++++ catalogue/detail.pl | 6 + catalogue/image.pl | 111 +++++++++++++ catalogue/imageviewer.pl | 51 ++++++ .../data/mysql/atomicupdate/local_cover_images.pl | 20 +++ .../data/mysql/en/mandatory/userpermissions.sql | 1 + installer/data/mysql/kohastructure.sql | 15 ++ installer/data/mysql/sysprefs.sql | 4 +- .../intranet-tmpl/prog/en/css/staff-global.css | 3 + .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 3 +- .../prog/en/includes/doc-head-close.inc | 8 + .../intranet-tmpl/prog/en/includes/tools-menu.inc | 3 + koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js | 44 +++++ .../admin/preferences/enhanced_content.pref | 19 +++ .../prog/en/modules/catalogue/detail.tt | 12 ++ .../prog/en/modules/catalogue/imageviewer.tt | 43 +++++ .../prog/en/modules/tools/tools-home.tt | 5 + .../prog/en/modules/tools/upload-images.tt | 130 +++++++++++++++ .../opac-tmpl/prog/en/includes/doc-head-close.inc | 9 + koha-tmpl/opac-tmpl/prog/en/js/localcovers.js | 44 +++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 18 ++ .../opac-tmpl/prog/en/modules/opac-imageviewer.tt | 43 +++++ .../opac-tmpl/prog/en/modules/opac-results.tt | 2 + opac/opac-detail.pl | 11 ++ opac/opac-image.pl | 111 +++++++++++++ opac/opac-imageviewer.pl | 51 ++++++ opac/opac-search.pl | 4 + tools/upload-cover-image.pl | 167 ++++++++++++++++++++ 30 files changed, 1107 insertions(+), 3 deletions(-) create mode 100644 Koha/Images.pm create mode 100755 catalogue/image.pl create mode 100755 catalogue/imageviewer.pl create mode 100644 installer/data/mysql/atomicupdate/local_cover_images.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt create mode 100644 koha-tmpl/opac-tmpl/prog/en/js/localcovers.js create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt create mode 100755 opac/opac-image.pl create mode 100755 opac/opac-imageviewer.pl create mode 100755 tools/upload-cover-image.pl diff --git a/C4/Auth.pm b/C4/Auth.pm index e360e10..2b997dd 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -389,7 +389,9 @@ sub get_template_and_user { virtualshelves => C4::Context->preference("virtualshelves"), StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"), NoZebra => C4::Context->preference('NoZebra'), - EasyAnalyticalRecords => C4::Context->preference('EasyAnalyticalRecords'), + EasyAnalyticalRecords => C4::Context->preference('EasyAnalyticalRecords'), + LocalCoverImages => C4::Context->preference('LocalCoverImages'), + AllowMultipleCovers => C4::Context->preference('AllowMultipleCovers'), ); } else { @@ -494,6 +496,7 @@ sub get_template_and_user { SyndeticsAwards => C4::Context->preference("SyndeticsAwards"), SyndeticsSeries => C4::Context->preference("SyndeticsSeries"), SyndeticsCoverImageSize => C4::Context->preference("SyndeticsCoverImageSize"), + OPACLocalCoverImages => C4::Context->preference("OPACLocalCoverImages"), ); $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic")); diff --git a/C4/UploadedFile.pm b/C4/UploadedFile.pm index da29c1f..e8c9080 100644 --- a/C4/UploadedFile.pm +++ b/C4/UploadedFile.pm @@ -159,6 +159,24 @@ sub name { } } +=head2 filename + + my $filename = $uploaded_file->filename(); + +Accessor method for the name by which the file is to be known. + +=cut + +sub filename { + my $self = shift; + if (@_) { + $self->{'tmp_file_name'} = shift; + $self->_serialize(); + } else { + return $self->{'tmp_file_name'}; + } +} + =head2 max_size my $max_size = $uploaded_file->max_size(); diff --git a/Koha/Images.pm b/Koha/Images.pm new file mode 100644 index 0000000..80ef437 --- /dev/null +++ b/Koha/Images.pm @@ -0,0 +1,149 @@ +package Koha::Images; +use strict; +use warnings; +use 5.010; + +use C4::Context; +use GD; + +use vars qw($debug $VERSION @ISA @EXPORT); + +BEGIN { + # set the version for version checking + $VERSION = 3.03; + require Exporter; + @ISA = qw(Exporter); + @EXPORT = qw( + &PutImage + &RetrieveImage + &ListImagesForBiblio + &DelImage + ); + $debug = $ENV{KOHA_DEBUG} || $ENV{DEBUG} || 0; +} + +=head2 PutImage + + PutImage($biblionumber, $srcimage, $replace); + +Stores binary image data and thumbnail in database, optionally replacing existing images for the given biblio. + +=cut + +sub PutImage { + my ($biblionumber, $srcimage, $replace) = @_; + + return -1 unless defined($srcimage); + + if ($replace) { + foreach (ListImagesForBiblio($biblionumber)) { + DelImage($_); + } + } + + my $dbh = C4::Context->dbh; + my $query = "INSERT INTO biblioimages (biblionumber, mimetype, imagefile, thumbnail) VALUES (?,?,?,?);"; + my $sth = $dbh->prepare($query); + + my $mimetype = 'image/png'; # GD autodetects three basic image formats: PNG, JPEG, XPM; we will convert all to PNG which is lossless... +# Check the pixel size of the image we are about to import... + my $thumbnail = _scale_image($srcimage, 140, 200); # MAX pixel dims are 140 X 200 for thumbnail... + my $fullsize = _scale_image($srcimage, 600, 800); # MAX pixel dims are 600 X 800 for full-size image... + $debug and warn "thumbnail is " . length($thumbnail) . " bytes."; + + $sth->execute($biblionumber,$mimetype,$fullsize->png(),$thumbnail->png()); + my $dberror = $sth->errstr; + warn "Error returned inserting $biblionumber.$mimetype." if $sth->errstr; + undef $thumbnail; + undef $fullsize; + return $dberror; +} + +=head2 RetrieveImage + my ($imagedata, $error) = RetrieveImage($imagenumber); + +Retrieves the specified image. + +=cut + +sub RetrieveImage { + my ($imagenumber) = @_; + + my $dbh = C4::Context->dbh; + my $query = 'SELECT mimetype, imagefile, thumbnail FROM biblioimages WHERE imagenumber = ?'; + my $sth = $dbh->prepare($query); + $sth->execute($imagenumber); + my $imagedata = $sth->fetchrow_hashref; + warn "Database error!" if $sth->errstr; + return $imagedata, $sth->errstr; +} + +=head2 ListImagesForBiblio + my (@images) = ListImagesForBiblio($biblionumber); + +Gets a list of all images associated with a particular biblio. + +=cut + + +sub ListImagesForBiblio { + my ($biblionumber) = @_; + + my @imagenumbers; + my $dbh = C4::Context->dbh; + my $query = 'SELECT imagenumber FROM biblioimages WHERE biblionumber = ?'; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + if (!$sth->errstr) { + while (my $row = $sth->fetchrow_hashref) { + push @imagenumbers, $row->{'imagenumber'}; + } + } + warn "Database error!" if $sth->errstr; + return @imagenumbers, $sth->errstr; +} + +=head2 DelImage + + my ($dberror) = DelImage($imagenumber); + +Removes the image with the supplied imagenumber. + +=cut + +sub DelImage { + my ($imagenumber) = @_; + warn "Imagenumber passed to DelImage is $imagenumber" if $debug; + my $dbh = C4::Context->dbh; + my $query = "DELETE FROM biblioimages WHERE imagenumber = ?;"; + my $sth = $dbh->prepare($query); + $sth->execute($imagenumber); + my $dberror = $sth->errstr; + warn "Database error!" if $sth->errstr; + return $dberror; +} + +sub _scale_image { + my ($image, $maxwidth, $maxheight) = @_; + my ($width, $height) = $image->getBounds(); + $debug and warn "image is $width pix X $height pix."; + if ($width > $maxwidth || $height > $maxheight) { +# $debug and warn "$filename exceeds the maximum pixel dimensions of $maxwidth X $maxheight. Resizing..."; + my $percent_reduce; # Percent we will reduce the image dimensions by... + if ($width > $maxwidth) { + $percent_reduce = sprintf("%.5f",($maxwidth/$width)); # If the width is oversize, scale based on width overage... + } else { + $percent_reduce = sprintf("%.5f",($maxheight/$height)); # otherwise scale based on height overage. + } + my $width_reduce = sprintf("%.0f", ($width * $percent_reduce)); + my $height_reduce = sprintf("%.0f", ($height * $percent_reduce)); + $debug and warn "Reducing image by " . ($percent_reduce * 100) . "\% or to $width_reduce pix X $height_reduce pix"; + my $newimage = GD::Image->new($width_reduce, $height_reduce, 1); #'1' creates true color image... + $newimage->copyResampled($image,0,0,0,0,$width_reduce,$height_reduce,$width,$height); + return $newimage; + } else { + return $image; + } +} + +1; diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 580949d..7719c77 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -37,6 +37,7 @@ use C4::External::Amazon; use C4::Search; # enabled_staff_search_views use C4::VirtualShelves; use C4::XSLT; +use Koha::Images; # use Smart::Comments; @@ -379,6 +380,11 @@ if ( C4::Context->preference("AmazonEnabled") == 1 ) { } } +if ( C4::Context->preference("LocalCoverImages") == 1 ) { + my @images = ListImagesForBiblio($biblionumber); + $template->{VARS}->{localimages} = \@images; +} + # Get OPAC URL if (C4::Context->preference('OPACBaseURL')){ $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') ); diff --git a/catalogue/image.pl b/catalogue/image.pl new file mode 100755 index 0000000..8721299 --- /dev/null +++ b/catalogue/image.pl @@ -0,0 +1,111 @@ +#!/usr/bin/perl +# +# based on patronimage.pl +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# +# + +use strict; +use warnings; + +use CGI; #qw(:standard escapeHTML); +use C4::Context; +use Koha::Images; + +$|=1; + +my $DEBUG = 1; +my $data = new CGI; +my $imagenumber; + +=head1 NAME + +image.pl - Script for retrieving and formatting local cover images for display + +=head1 SYNOPSIS + + + + + + +=head1 DESCRIPTION + +This script, when called from within HTML and passed a valid imagenumber or +biblionumber, will retrieve the image data associated with that biblionumber +if one exists, format it in proper HTML format and pass it back to be displayed. +If the parameter thumbnail has been provided, a thumbnail will be returned +rather than the full-size image. When a biblionumber is provided rather than an +imagenumber, a random image is selected. + +=cut + +if (defined $data->param('imagenumber')) { + $imagenumber = $data->param('imagenumber'); +} elsif (defined $data->param('biblionumber')) { + my @imagenumbers = ListImagesForBiblio($data->param('biblionumber')); + if (@imagenumbers) { + $imagenumber = $imagenumbers[0]; + } else { + warn "No images for this biblio" if $DEBUG; + error(); + } +} else { + $imagenumber = shift; +} + +if ($imagenumber) { + warn "imagenumber passed in: $imagenumber" if $DEBUG; + my ($imagedata, $dberror) = RetrieveImage($imagenumber); + + if ($dberror) { + warn "Database Error!" if $DEBUG; + error(); + } + + if ($imagedata) { + my $image; + if ($data->param('thumbnail')) { + $image = $imagedata->{'thumbnail'}; + } else { + $image = $imagedata->{'imagefile'}; + } + print $data->header (-type => $imagedata->{'mimetype'}, -'Cache-Control' => 'no-store', -expires => 'now', -Content_Length => length ($image)), $image; + exit; + } else { + warn "No image exists for $imagenumber" if $DEBUG; + error(); + } +} else { + error(); +} + +error(); + +sub error { + print $data->header ( -status=> '404', -expires => 'now' ); + exit; +} + +=head1 AUTHOR + +Chris Nighswonger cnighswonger foundations edu + +modified for local cover images by Koustubha Kale kmkale anantcorp com + +=cut diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl new file mode 100755 index 0000000..fae6243 --- /dev/null +++ b/catalogue/imageviewer.pl @@ -0,0 +1,51 @@ +#!/usr/bin/perl + +# Copyright 2011 C & P Bibliography Services +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use CGI; +use C4::Auth; +use C4::Biblio; +use C4::Output; +use Koha::Images; + +my $query = new CGI; +my ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "catalogue/imageviewer.tmpl", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { catalogue => 1 }, + } +); + +my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +my ($count, $biblio) = GetBiblio($biblionumber); + +if (C4::Context->preference("LocalCoverImages")) { + my @images = ListImagesForBiblio($biblionumber); + $template->{VARS}->{'LocalCoverImages'} = 1; + $template->{VARS}->{'images'} = \@images; +} + +$template->{VARS}->{'biblio'} = $biblio; + +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/installer/data/mysql/atomicupdate/local_cover_images.pl b/installer/data/mysql/atomicupdate/local_cover_images.pl new file mode 100644 index 0000000..a698e7f --- /dev/null +++ b/installer/data/mysql/atomicupdate/local_cover_images.pl @@ -0,0 +1,20 @@ +#! /usr/bin/perl +use strict; +use warnings; +use C4::Context; +my $dbh=C4::Context->dbh; + +$dbh->do( q|CREATE TABLE `biblioimages` ( + `imagenumber` int(11) NOT NULL AUTO_INCREMENT, + `biblionumber` int(11) NOT NULL, + `mimetype` varchar(15) NOT NULL, + `imagefile` mediumblob NOT NULL, + `thumbnail` mediumblob NOT NULL, + PRIMARY KEY (`imagenumber`), + CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8|); +$dbh->do( q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACLocalCoverImages','0','Display local cover images on OPAC search and details pages.','1','YesNo')|); +$dbh->do( q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet search and details pages.','1','YesNo')|); +$dbh->do( q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo')|); +$dbh->do( q|INSERT INTO permissions (module_bit, code, description) VALUES (13, 'upload_local_cover_images', 'Upload local cover images')|); +print "Upgrade done (Added support for local cover images)\n"; diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql index ec61ea0..873089a 100644 --- a/installer/data/mysql/en/mandatory/userpermissions.sql +++ b/installer/data/mysql/en/mandatory/userpermissions.sql @@ -36,6 +36,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES (13, 'manage_csv_profiles', 'Manage CSV export profiles'), (13, 'moderate_tags', 'Moderate patron tags'), (13, 'rotating_collections', 'Manage rotating collections'), + (13, 'upload_local_cover_images', 'Upload local cover images'), (15, 'check_expiration', 'Check the expiration of a serial'), (15, 'claim_serials', 'Claim missing serials'), (15, 'create_subscription', 'Create a new subscription'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 452173d..7340eee 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2667,6 +2667,21 @@ CREATE TABLE `fieldmapping` ( -- koha to keyword mapping PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- +-- Table structure for table `bibliocoverimage` +-- + +DROP TABLE IF EXISTS `bibliocoverimage`; + +CREATE TABLE `bibliocoverimage` ( + `imagenumber` int(11) NOT NULL AUTO_INCREMENT, + `biblionumber` int(11) NOT NULL, + `mimetype` varchar(15) NOT NULL, + `imagefile` mediumblob NOT NULL, + `thumbnail` mediumblob NOT NULL, + PRIMARY KEY (`imagenumber`), + CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ae2c1cb..99e88c1 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); - +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACLocalCoverImages','0','Display local cover images on OPAC search and details pages.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet details pages.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo'); 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 7710eda..c1d4b43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2093,3 +2093,6 @@ div.pager input.pagedisplay { font-weight: bold; text-align : center; } +.localimage { + padding: .3em; +} 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 4b54c40..64f5c4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -101,7 +101,8 @@ function confirm_items_deletion() { [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=" },[% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Edit Items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]" },[% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Attach Item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]" },[% END %] - [% IF ( EasyAnalyticalRecords ) %][% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Link to Host Item"), url: "/cgi-bin/koha/cataloguing/linkitem.pl?biblionumber=[% biblionumber %]" },[% END %][% END %] + [% IF ( EasyAnalyticalRecords ) %][% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Link to Host Item"), url: "/cgi-bin/koha/cataloguing/linkitem.pl?biblionumber=[% biblionumber %]" },[% END %][% END %] + [% IF ( LocalCoverImages ) %][% IF ( CAN_user_tools_upload_local_cover_images ) %]{ text: _("Upload Image"), url: "/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image" },[% END %][% END %] [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=duplicate" },[% END %] [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace Record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %] [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete Record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] },[% END %] 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 6a2dae0..53f6843 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 @@ -99,3 +99,11 @@ [% IF ( virtualshelves || intranetbookbag ) %] [% END %] +[% IF LocalCoverImages %] + + +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index e3896cc..8a739d5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -70,6 +70,9 @@ [% IF ( CAN_user_tools_manage_staged_marc ) %]
  • Staged MARC management
  • [% END %] + [% IF ( CAN_user_tools_upload_local_cover_images ) %] +
  • Upload Local Cover Image
  • + [% END %]
    Additional Tools
    @@ -516,6 +517,17 @@ function verify_images() {
    [% END %][% END %] +[% IF ( LocalCoverImages ) %] +
    +
    Click on an image to view it in the image viewer
    +[% FOREACH image IN localimages %] +[% IF image %] +img +[% END %] +[% END %] +
    +[% END %] +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt new file mode 100644 index 0000000..c5ab657 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt @@ -0,0 +1,43 @@ +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Images for: [% biblio.title |html %] +[% INCLUDE 'doc-head-close.inc' %] + + + + +
    Large view
    +[% IF LocalCoverImages == 1 %] +[% FOREACH img IN images %] +[% IF img %] +Image +[% END %] +[% END %] +[% biblio.title %] [% biblio.author %] +[% ELSE %] +Unfortunately, images are not enabled for this catalog at this time. +[% END %] + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt index 05bdb47..b71a1ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt @@ -140,6 +140,11 @@
    Managed staged MARC records, including completing and reversing imports
    [% END %] + [% IF ( CAN_user_tools_upload_local_cover_images ) %] +
    Upload Local Cover Image
    +
    Utility to upload scanned cover images for display in OPAC
    + [% END %] +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt new file mode 100644 index 0000000..1f1b964 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt @@ -0,0 +1,130 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › Tools › Upload Images +[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'file-upload.inc' %] +[% INCLUDE 'background-job.inc' %] + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
    + +
    +
    +
    + +

    Upload Local Cover Image

    +[% IF ( uploadimage ) %] +

    Image upload results :

    +
      +
    • [% total %] images found
    • + [% IF ( error ) %] +
      + [% IF ( error == 'UZIPFAIL' ) %]

      Failed to unzip archive.
      Please ensure you are uploading a valid zip file and try again.

      + [% ELSIF ( error == 'OPNLINK' ) %]

      Cannot open folder index (idlink.txt or datalink.txt) to read.
      Please verify that it exists.

      + [% ELSIF ( error == 'OPNIMG' ) %]

      Cannot process file as an image.
      Please ensure you only upload GIF, JPEG, PNG, or XPM images.

      + [% ELSIF ( error == 'DELERR' ) %]

      Unrecognized or missing field delimiter.
      Please verify that you are using either a single quote or a tab.

      + [% ELSIF ( error == 'DBERR' ) %]

      Unable to save image to database.

      + [% ELSE %]

      An unknown error has occurred.
      Please review the error log for more details.

      [% END %] +
      + + [% END %] +
    • View final record
    • +
    • Back
    • +
    +
    +[% END %] +
      +
    • Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.
    • +
    +
    +
    +Upload images +
      +
    1. +
      + + +
    2. +
    +
    +
    + +
    Upload progress:
    0%
    +
    +
    + +
    +
    + + + +
    +
    + File type +
      +
    1. + + +
    2. +
    3. + + +
    4. +
    5. + [% IF ( filetype == 'image' ) %][% ELSE %] +
    6. +
    +
    +
    + Options +
      +
    1. + + +
    2. +
    +
    +
    + +
    Job progress:
    0%
    +
    + +
    + +
    +
    +
    +[% INCLUDE 'tools-menu.inc' %] +
    +
    +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc index 15bea79..18e5917 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc @@ -98,6 +98,15 @@ var NO_OL_JACKET = _("No cover image available"); [% END %] +[% IF OPACLocalCoverImages %] + + +[% END %] + [% IF ( BakerTaylorEnabled ) %] + + + +
    Large view
    +[% IF OPACLocalCoverImages == 1 %] +[% FOREACH img IN images %] +[% IF img %] +Image +[% END %] +[% END %] +[% biblio.title %] [% biblio.author %] +[% ELSE %] +Unfortunately, images are not enabled for this catalog at this time. +[% END %] + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index 7201a82..2565c8f 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -229,6 +229,7 @@ $(document).ready(function(){ [% END %] [% END %][% END %] [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %] + [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %] [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] }); //]]> @@ -528,6 +529,7 @@ $(document).ready(function(){
    + [% IF ( OPACLocalCoverImages ) %]
    [% END %] [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %][% ELSE %]No cover image available[% END %][% END %][% END %] [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index f82dde2..714ea24 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -45,6 +45,7 @@ use C4::Charset; use MARC::Record; use MARC::Field; use List::MoreUtils qw/any none/; +use Koha::Images; BEGIN { if (C4::Context->preference('BakerTaylorEnabled')) { @@ -686,6 +687,11 @@ if (scalar(@serialcollections) > 0) { serialcollections => \@serialcollections); } +# Local cover Images stuff +if (C4::Context->preference("OPACLocalCoverImages")){ + $template->param(OPACLocalCoverImages => 1); +} + # Amazon.com Stuff if ( C4::Context->preference("OPACAmazonEnabled") ) { $template->param( AmazonTld => get_amazon_tld() ); @@ -911,4 +917,9 @@ my $defaulttab = ? 'serialcollection' : 'subscription'; $template->param('defaulttab' => $defaulttab); +if (C4::Context->preference('OPACLocalCoverImages') == 1) { + my @images = ListImagesForBiblio($biblionumber); + $template->{VARS}->{localimages} = \@images; +} + output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/opac-image.pl b/opac/opac-image.pl new file mode 100755 index 0000000..de44152 --- /dev/null +++ b/opac/opac-image.pl @@ -0,0 +1,111 @@ +#!/usr/bin/perl +# +# based on patronimage.pl +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# +# + +use strict; +use warnings; + +use CGI; #qw(:standard escapeHTML); +use C4::Context; +use Koha::Images; + +$|=1; + +my $DEBUG = 1; +my $data = new CGI; +my $imagenumber; + +=head1 NAME + +opac-image.pl - Script for retrieving and formatting local cover images for display + +=head1 SYNOPSIS + + + + + + +=head1 DESCRIPTION + +This script, when called from within HTML and passed a valid imagenumber or +biblionumber, will retrieve the image data associated with that biblionumber +if one exists, format it in proper HTML format and pass it back to be displayed. +If the parameter thumbnail has been provided, a thumbnail will be returned +rather than the full-size image. When a biblionumber is provided rather than an +imagenumber, a random image is selected. + +=cut + +if (defined $data->param('imagenumber')) { + $imagenumber = $data->param('imagenumber'); +} elsif (defined $data->param('biblionumber')) { + my @imagenumbers = ListImagesForBiblio($data->param('biblionumber')); + if (@imagenumbers) { + $imagenumber = $imagenumbers[0]; + } else { + warn "No images for this biblio" if $DEBUG; + error(); + } +} else { + $imagenumber = shift; +} + +if ($imagenumber) { + warn "imagenumber passed in: $imagenumber" if $DEBUG; + my ($imagedata, $dberror) = RetrieveImage($imagenumber); + + if ($dberror) { + warn "Database Error!" if $DEBUG; + error(); + } + + if ($imagedata) { + my $image; + if ($data->param('thumbnail')) { + $image = $imagedata->{'thumbnail'}; + } else { + $image = $imagedata->{'imagefile'}; + } + print $data->header (-type => $imagedata->{'mimetype'}, -'Cache-Control' => 'no-store', -expires => 'now', -Content_Length => length ($image)), $image; + exit; + } else { + warn "No image exists for $imagenumber" if $DEBUG; + error(); + } +} else { + error(); +} + +error(); + +sub error { + print $data->header ( -status=> '404', -expires => 'now' ); + exit; +} + +=head1 AUTHOR + +Chris Nighswonger cnighswonger foundations edu + +modified for local cover images by Koustubha Kale kmkale anantcorp com + +=cut diff --git a/opac/opac-imageviewer.pl b/opac/opac-imageviewer.pl new file mode 100755 index 0000000..6d2f326 --- /dev/null +++ b/opac/opac-imageviewer.pl @@ -0,0 +1,51 @@ +#!/usr/bin/perl + +# Copyright 2011 C & P Bibliography Services +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use CGI; +use C4::Auth; +use C4::Biblio; +use C4::Output; +use Koha::Images; + +my $query = new CGI; +my ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "opac-imageviewer.tmpl", + query => $query, + type => "opac", + authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), + flagsrequired => { borrow => 1 }, + } +); + +my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +my ($count, $biblio) = GetBiblio($biblionumber); + +if (C4::Context->preference("OPACLocalCoverImages")) { + my @images = ListImagesForBiblio($biblionumber); + $template->{VARS}->{'OPACLocalCoverImages'} = 1; + $template->{VARS}->{'images'} = \@images; +} + +$template->{VARS}->{'biblio'} = $biblio; + +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 42eb0ec..365bd72 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -612,6 +612,10 @@ for (my $i=0;$i<@servers;$i++) { $template->param(SEARCH_RESULTS => \@newresults, OPACItemsResultsDisplay => (C4::Context->preference("OPACItemsResultsDisplay") eq "itemdetails"?1:0), ); + if (C4::Context->preference("OPACLocalCoverImages")){ + $template->param(OPACLocalCoverImages => 1); + $template->param(OPACLocalCoverImagesPriority => C4::Context->preference("OPACLocalCoverImagesPriority")); + } ## Build the page numbers on the bottom of the page my @page_numbers; # total number of pages there will be diff --git a/tools/upload-cover-image.pl b/tools/upload-cover-image.pl new file mode 100755 index 0000000..af45cbc --- /dev/null +++ b/tools/upload-cover-image.pl @@ -0,0 +1,167 @@ +#!/usr/bin/perl +# +# Copyright 2011 C & P Bibliography Services +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +# +# +=head1 NAME + +upload-cover-image.pl - Script for handling uploading of both single and bulk coverimages and importing them into the database. + +=head1 SYNOPSIS + +upload-cover-image.pl + +=head1 DESCRIPTION + +This script is called and presents the user with an interface allowing him/her to upload a single cover image or bulk cover images via a zip file. +Files greater than 100K will be refused. Images should be 140x200 pixels. If they are larger they will be auto-resized to comply. + +=cut + + +use strict; +use warnings; + +use File::Temp; +use CGI; +use GD; +use C4::Context; +use C4::Auth; +use C4::Output; +use Koha::Images; +use C4::UploadedFile; + +my $debug = 1; + +my $input = new CGI; + +my $fileID=$input->param('uploadedfileid'); +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "tools/upload-images.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { tools => 'upload_cover_images'}, + debug => 0, + }); + +my $filetype = $input->param('filetype'); +my $biblionumber = $input->param('biblionumber'); +my $uploadfilename = $input->param('uploadfile'); +my $replace = $input->param('replace'); +my $op = $input->param('op'); +my %cookies = parse CGI::Cookie($cookie); +my $sessionID = $cookies{'CGISESSID'}->value; + +my $error; + +$template->{VARS}->{'filetype'} = $filetype; +$template->{VARS}->{'biblionumber'} = $biblionumber; + +my $total = 0; + +if ($fileID) { + my $uploaded_file = C4::UploadedFile->fetch($sessionID, $fileID); + if ($filetype eq 'image') { + my $fh = $uploaded_file->fh(); + my $srcimage = GD::Image->new($fh); + if (defined $srcimage) { + my $dberror = PutImage($biblionumber, $srcimage, $replace); + if ($dberror) { + $error = 'DBERR'; + } else { + $total = 1; + } + } else { + $error = 'OPNIMG'; + } + undef $srcimage; + } else { + my $filename = $uploaded_file->filename(); + my $dirname = File::Temp::tempdir( CLEANUP => 1); + unless (system("unzip", $filename, '-d', $dirname) == 0) { + $error = 'UZIPFAIL'; + } else { + my @directories; + push @directories, "$dirname"; + foreach my $recursive_dir ( @directories ) { + my $dir; + opendir $dir, $recursive_dir; + while ( my $entry = readdir $dir ) { + push @directories, "$recursive_dir/$entry" if ( -d "$recursive_dir/$entry" and $entry !~ /^[._]/ ); + } + closedir $dir; + } + foreach my $dir ( @directories ) { + my $file; + if ( -e "$dir/idlink.txt" ) { + $file = "$dir/idlink.txt"; + } elsif ( -e "$dir/datalink.txt" ) { + $file = "$dir/datalink.txt"; + } else { + next; + } + if (open (FILE, $file)) { + while (my $line = ) { + my $delim = ($line =~ /\t/) ? "\t" : ($line =~ /,/) ? "," : ""; + #$debug and warn "Delimeter is \'$delim\'"; + unless ( $delim eq "," || $delim eq "\t" ) { + warn "Unrecognized or missing field delimeter. Please verify that you are using either a ',' or a 'tab'"; + $error = 'DELERR'; + } else { + ($biblionumber, $filename) = split $delim, $line; + $biblionumber =~ s/[\"\r\n]//g; # remove offensive characters + $filename =~ s/[\"\r\n\s]//g; + my $srcimage = GD::Image->new("$dir/$filename"); + if (defined $srcimage) { + $total++; + my $dberror = PutImage($biblionumber, $srcimage, $replace); + if ($dberror) { + $error = 'DBERR'; + } + } else { + $error = 'OPNIMG'; + } + undef $srcimage; + } + } + close(FILE); + } else { + $error = 'OPNLINK'; + } + } + } + } + $template->{VARS}->{'total'} = $total; + $template->{VARS}->{'uploadimage'} = 1; + $template->{VARS}->{'error'} = $error; + $template->{VARS}->{'biblionumber'} = $biblionumber; +} + +output_html_with_http_headers $input, $cookie, $template->output; + +exit 0; + +=head1 AUTHORS + +Written by Jared Camins-Esakov of C & P Bibliography Services, in part based on +code by Koustubha Kale of Anant Corporation and Chris Nighswonger of Foundation +Bible College. + +=cut -- 1.7.2.5 From jcamins at cpbibliography.com Sun Dec 11 02:25:24 2011 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Sat, 10 Dec 2011 20:25:24 -0500 Subject: [Koha-patches] [PATCH] Bug 7345: Enable exporting records sans private fields Message-ID: <1323566724-17817-1-git-send-email-jcamins@cpbibliography.com> Add an option for marcstd to the opac-export.pl and catalogue/export.pl scripts. This new format removes all 9XX, X9X, XX9 fields and subfield $9 (with the exception of 490 in flavours of MARC other than UNIMARC). The work is done in C4::Record::marc2marc. Testing plan: 1. Export a record in "MARC (Unicode/UTF-8)" format as a control 2. In the OPAC, run the following jQuery to add the marcstd option to the UI: > $("#export #format").append(""); 3. Export the same record in "MARC (no 9xx)" format 4. Compare the two, noticing that any subfield $9 or fields including 9 (other than 490 in flavours of MARC other than UNIMARC) have been removed --- C4/Record.pm | 27 ++++++++++++++++++++++++++- catalogue/export.pl | 4 ++++ opac/opac-export.pl | 4 ++++ 3 files changed, 34 insertions(+), 1 deletions(-) diff --git a/C4/Record.pm b/C4/Record.pm index cecb6ed..9c55abb 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -77,7 +77,32 @@ Returns an ISO-2709 scalar sub marc2marc { my ($marc,$to_flavour,$from_flavour,$encoding) = @_; - my $error = "Feature not yet implemented\n"; + my $error; + if ($to_flavour =~ m/marcstd/) { + my $marc_record_obj; + if ($marc =~ /^MARC::Record/) { # it's already a MARC::Record object + $marc_record_obj = $marc; + } else { # it's not a MARC::Record object, make it one + eval { $marc_record_obj = MARC::Record->new_from_usmarc($marc) }; # handle exceptions + +# conversion to MARC::Record object failed, populate $error + if ($@) { $error .="\nCreation of MARC::Record object failed: ".$MARC::File::ERROR }; + } + unless ($error) { + my @privatefields; + foreach my $field ($marc_record_obj->fields()) { + if ($field->tag() =~ m/9/ && ($field->tag() != '490' || C4::Context->preference("marcflavour") eq 'UNIMARC')) { + push @privatefields, $field; + } elsif (! ($field->is_control_field())) { + $field->delete_subfield(code => '9') if ($field->subfield('9')); + } + } + $marc_record_obj->delete_field(@privatefields); + $marc = $marc_record_obj->as_usmarc(); + } + } else { + $error = "Feature not yet implemented\n"; + } return ($error,$marc); } diff --git a/catalogue/export.pl b/catalogue/export.pl index 2b55d9f..db69af9 100755 --- a/catalogue/export.pl +++ b/catalogue/export.pl @@ -51,6 +51,10 @@ if ($op eq "export") { C4::Charset::SetUTF8Flag($marc, 1); $marc = $marc->as_usmarc(); } + elsif ($format =~ /marcstd/) { + C4::Charset::SetUTF8Flag($marc,1); + ($error,$marc) = marc2marc($marc, 'marcstd', C4::Context->preference('marcflavour')); + } print $query->header( -type => 'application/octet-stream', -attachment=>"bib-$biblionumber.$format"); diff --git a/opac/opac-export.pl b/opac/opac-export.pl index 411fd3f..fb8dee7 100755 --- a/opac/opac-export.pl +++ b/opac/opac-export.pl @@ -66,6 +66,10 @@ elsif ($format =~ /utf8/) { C4::Charset::SetUTF8Flag($marc,1); $marc = $marc->as_usmarc(); } +elsif ($format =~ /marcstd/) { + C4::Charset::SetUTF8Flag($marc,1); + ($error,$marc) = marc2marc($marc, 'marcstd', C4::Context->preference('marcflavour')); +} else { $error= "Format $format is not supported."; } -- 1.7.2.5 From Katrin.Fischer.83 at web.de Mon Dec 12 08:44:08 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 12 Dec 2011 08:44:08 +0100 Subject: [Koha-patches] [PATCH 1/2] Bug 7338 Links on Serial Collection page Message-ID: <1323675849-4500-1-git-send-email-Katrin.Fischer.83@web.de> From: Fr?d?ric Demians Don't display link to the serial, when the collection page displays just one subscription. Display it when several subscriptions. Alway display a link for displaying biblio record other subscriptions. --- .../prog/en/modules/serials/serials-collection.tt | 11 +++++------ serials/serials-collection.pl | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 93c4fdc..ed126af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -71,7 +71,7 @@ $(document).ready(function() { [% IF ( subscriptions ) %] -[% IF ( onesubscription ) %] +[% IF ( subscriptions.size == 1 ) %] [% ELSE %] @@ -161,9 +161,8 @@ $(document).ready(function() { [% END %] [% IF ( subscr ) %] -[% UNLESS ( onesubscription ) %] - -[% END %] + + [% END %]
    Subscription Summary Subscription Summaries
    See any subscription attached to this biblio
    See any subscription attached to this biblio
    [% END %] @@ -183,7 +182,7 @@ $(document).ready(function() {
    -[% UNLESS ( year.onesubscription ) %] +[% IF ( subscriptions.size > 1 ) %] [% END %] [% FOREACH serial IN year.serials %] [% UNLESS ( loop.odd ) %][% ELSE %][% END %] -[% UNLESS ( serial.onesubscription ) %] +[% IF ( subscriptions.size > 1 ) %] [% END %] [% END %] [% IF ( subscr ) %] +[% IF ( subscriptioncount > 1 ) %] [% END %] +[% END %]
    # SubsDate published @@ -205,7 +204,7 @@ $(document).ready(function() {
    [% serial.subscriptionid %] diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index 8c7c32b..c4605e0 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -147,7 +147,6 @@ foreach (@$location) { chop $subscriptionidlist; $template->param( - onesubscription => (scalar(@$subscriptiondescs)==1), subscriptionidlist => $subscriptionidlist, biblionumber => $biblionumber, subscriptions => $subscriptiondescs, -- 1.7.5.4 From Katrin.Fischer.83 at web.de Mon Dec 12 08:44:09 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 12 Dec 2011 08:44:09 +0100 Subject: [Koha-patches] [PATCH 2/2] Bug 7338: Follow up: show link only when there is more than 1 subscription In-Reply-To: <1323675849-4500-1-git-send-email-Katrin.Fischer.83@web.de> References: <1323675849-4500-1-git-send-email-Katrin.Fischer.83@web.de> Message-ID: <1323675849-4500-2-git-send-email-Katrin.Fischer.83@web.de> To be tested together with http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6690 1) Create a subscription for a title - check the link 'Show any subscription...' doesn't show now - check the serials collection page works correctly and shows all necessary information 2) Create a second subscription for the same title - check a new link 'Show any subscription...' shows up now - use links in the issue table to change between viewing the single subscription and the overview page - check it works correctly and all information shows up --- .../prog/en/modules/serials/serials-collection.tt | 2 ++ serials/serials-collection.pl | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index ed126af..3777f47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -161,9 +161,11 @@ $(document).ready(function() {
    See any subscription attached to this biblio
    [% END %] diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index c4605e0..a67db7a 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -93,6 +93,7 @@ if($op eq 'gennext' && @subscriptionid){ print $query->redirect('/cgi-bin/koha/serials/serials-collection.pl?subscriptionid='.$subscriptionid); } +my $subscriptioncount; my ($location, $callnumber); if (@subscriptionid){ my @subscriptioninformation=(); @@ -123,6 +124,7 @@ if (@subscriptionid){ @subscriptioninformation=(@$tmpsubscription, at subscriptioninformation); } $subscriptions=PrepareSerialsData(\@subscriptioninformation); + $subscriptioncount = CountSubscriptionFromBiblionumber($subscriptiondescs->[0]{'biblionumber'}); } else { $subscriptiondescs = GetSubscriptionsFromBiblionumber($biblionumber) ; my $subscriptioninformation = GetFullSubscriptionsFromBiblionumber($biblionumber); @@ -157,6 +159,7 @@ $template->param( suggestion => C4::Context->preference("suggestion"), virtualshelves => C4::Context->preference("virtualshelves"), subscr=>$query->param('subscriptionid'), + subscriptioncount => $subscriptioncount, location => $locationlib, callnumber => $callnumber, ); -- 1.7.5.4 From wizzyrea at gmail.com Wed Dec 7 23:35:44 2011 From: wizzyrea at gmail.com (Liz Rea) Date: Wed, 7 Dec 2011 16:35:44 -0600 Subject: [Koha-patches] [PATCH] Bug 7333 - modifying Members.t to use a branchcode that exists in the sample data Message-ID: <1323297344-12564-1-git-send-email-wizzyrea@gmail.com> To test: Create a fresh koha db with all of the sample data (if you have one that has the sample branches in it, that will work too) run the test: prove t/db_dependent/Members.t All subtests should complete. --- t/db_dependent/Members.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t index c1e4d85..420f7f3 100755 --- a/t/db_dependent/Members.t +++ b/t/db_dependent/Members.t @@ -18,7 +18,7 @@ my $CARDNUMBER = 'TESTCARD01'; my $FIRSTNAME = 'Marie'; my $SURNAME = 'Mcknight'; my $CATEGORYCODE = 'S'; -my $BRANCHCODE = 's'; +my $BRANCHCODE = 'CPL'; my $CHANGED_FIRSTNAME = "Marry Ann"; my $EMAIL = "Marie\@email.com"; -- 1.7.2.5 From wizzyrea at gmail.com Wed Dec 7 23:51:17 2011 From: wizzyrea at gmail.com (Liz Rea) Date: Wed, 7 Dec 2011 16:51:17 -0600 Subject: [Koha-patches] [PATCH 2/2] Bug 5327 - fixing t/db_dependent/Record.t to not fail because of whitespace. Message-ID: <1323298277-12952-1-git-send-email-wizzyrea@gmail.com> To test: run prove -v t/db_dependent/Record.t The test should complete successfully. I should note - if this test was actually testing the whitespace and the problem with the output was valid, please go ahead and fix that problem and disregard this patch. To me, the generated output looked better than the expected result, so I made them match. --- t/db_dependent/Record.t | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Record.t b/t/db_dependent/Record.t index b0e1894..2e04449 100755 --- a/t/db_dependent/Record.t +++ b/t/db_dependent/Record.t @@ -74,11 +74,11 @@ is ($marcqualified, $test3xml, "testing marcQualified"); my $mods=marc2modsxml($marc); my $test4xml=qq( - - - - - + + + + + ); -- 1.7.2.5 From f.demians at tamil.fr Mon Dec 12 09:48:52 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Mon, 12 Dec 2011 09:48:52 +0100 Subject: [Koha-patches] [PATCH] Bug 3216 Add CHR/ICU Zebra tokenization choice to installation Message-ID: <1323679732-3846-1-git-send-email-f.demians@tamil.fr> Word search with multi-part facets works properly only with Zebra ICU tokenization. This patch add a new question to Koha command line installer: Zebra has two methods to perform records tokenization and characters normalization: CHR and ICU. ICU is recommended for catalogs containing non-Latin characters. (chr, icu) [chr] How to test: - perl ./Makefile.PL - Try each possible value for new parameter - Take a look at zebradb/etc/default.idx file. Depending of the parameter you get this line: icuchain words-icu.xml or this one: charmap word-phrase-utf.chr --- Makefile.PL | 22 +++++++++++++++++++--- etc/zebradb/etc/default.idx | 5 ++--- etc/zebradb/etc/words-icu.xml | 12 ++++++++++++ rewrite-config.PL | 1 + 4 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 etc/zebradb/etc/words-icu.xml diff --git a/Makefile.PL b/Makefile.PL index 074ff55..5ca3103 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -409,6 +409,7 @@ my %config_defaults = ( 'AUTH_INDEX_MODE' => 'dom', 'ZEBRA_MARC_FORMAT' => 'marc21', 'ZEBRA_LANGUAGE' => 'en', + 'ZEBRA_TOKENIZER' => 'chr', 'ZEBRA_USER' => 'kohauser', 'ZEBRA_PASS' => 'zebrastripes', 'ZEBRA_SRU_HOST' => 'localhost', @@ -460,6 +461,7 @@ my %valid_config_values = ( 'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 }, 'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'normarc' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation 'ZEBRA_LANGUAGE' => { 'en' => 1, 'fr' => 1, 'nb' => 1 }, # FIXME should generate from contents of distribution + 'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 }, 'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 }, 'USE_MEMCACHED' => { 'yes' => 1, 'no' => 1 }, ); @@ -486,11 +488,12 @@ my $pl_files = { 'rewrite-config.PL' => [ 'blib/KOHA_CONF_DIR/koha-conf.xml', 'blib/KOHA_CONF_DIR/koha-httpd.conf', + 'blib/ZEBRA_CONF_DIR/etc/default.idx', 'blib/MISC_DIR/koha-install-log' ], 'fix-perl-path.PL' => [ # this script ensures the correct shebang line for the platform installed on... 'blib' - ] + ], }; if ($config{'INSTALL_ZEBRA'} eq "yes") { @@ -527,6 +530,10 @@ if ($config{'INSTALL_MODE'} ne "dev") { ); } +$config{ZEBRA_TOKENIZER_STMT} = $config{ZEBRA_TOKENIZER} eq 'icu' + ? 'icuchain words-icu.xml' + : 'charmap word-phrase-utf.chr'; + my %test_suite_override_dirs = ( KOHA_CONF_DIR => ['etc'], ZEBRA_CONF_DIR => ['etc', 'zebradb'], @@ -917,8 +924,8 @@ Since you've chosen to use Zebra with Koha, you must specify the primary MARC format of the records to be indexed by Zebra. -Koha provides Zebra configuration files for MARC 21 -and UNIMARC. +Koha provides Zebra configuration files for MARC21, +NORMARC and UNIMARC. MARC format for Zebra indexing); $msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values); @@ -946,6 +953,15 @@ Authorities indexing mode); $config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values, $install_log_values); $msg = q( +Zebra has two methods to perform records tokenization +and characters normalization: CHR and ICU. ICU is +recommended for catalogs containing non-Latin +characters.); + + $msg .= _add_valid_values_disp('ZEBRA_TOKENIZER', $valid_values); + $config{'ZEBRA_TOKENIZER'} = _get_value('ZEBRA_TOKENIZER', $msg, $defaults->{'ZEBRA_TOKENIZER'}, $valid_values, $install_log_values); + + $msg = q( Please specify Zebra database user); $config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values); diff --git a/etc/zebradb/etc/default.idx b/etc/zebradb/etc/default.idx index 8ffbc59..d6314c6 100644 --- a/etc/zebradb/etc/default.idx +++ b/etc/zebradb/etc/default.idx @@ -10,16 +10,15 @@ completeness 0 position 1 alwaysmatches 1 firstinfield 1 -charmap word-phrase-utf.chr -#firstinfield 1 +__ZEBRA_TOKENIZER_STMT__ # Phrase index # Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1) # and structure is word/phrase/word-list/free-form-text/document-text index p completeness 1 -charmap word-phrase-utf.chr firstinfield 1 +__ZEBRA_TOKENIZER_STMT__ # URX (URL) index # Used if structure=urx (@attr 4=104) diff --git a/etc/zebradb/etc/words-icu.xml b/etc/zebradb/etc/words-icu.xml new file mode 100644 index 0000000..38af51f --- /dev/null +++ b/etc/zebradb/etc/words-icu.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/rewrite-config.PL b/rewrite-config.PL index 7817f91..967a546 100644 --- a/rewrite-config.PL +++ b/rewrite-config.PL @@ -120,6 +120,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; '__ZEBRA_RUN_DIR__' => "$prefix/var/run/zebradb", '__ZEBRA_MARC_FORMAT__' => 'marc21', '__ZEBRA_LANGUAGE__' => 'en', + '__ZEBRA_TOKENIZER_STMT__' => 'charmap word-phrase-utf.chr', '__ZEBRA_AUTH_CFG__' => 'zebra-authorities.cfg', '__AUTH_RETRIEVAL_CFG__' => 'retrieval-info-auth-grs1.xml', "__MERGE_SERVER_HOST__" => $myhost, -- 1.7.8 From adrien.saurat at biblibre.com Mon Dec 12 12:27:14 2011 From: adrien.saurat at biblibre.com (Adrien Saurat) Date: Mon, 12 Dec 2011 12:27:14 +0100 Subject: [Koha-patches] [PATCH] Bug 6374: defines a default value for "size" in Results Message-ID: <1323689234-6862-1-git-send-email-adrien.saurat@biblibre.com> If no size is stored in the database for a given biblio, the script search.pl will now define a default size (empty space) to avoid conflicts with TT (which uses a size parameter too). --- catalogue/search.pl | 39 ++++++++++++++++++++++----------------- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index 907efdb..104b505 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -440,18 +440,18 @@ if ($params->{'limit-yr'}) { # $ %z3950p will be a hash ref if the indexes are present (advacned search), otherwise undef my $z3950par; my $indexes2z3950 = { - kw=>'title', au=>'author', 'au,phr'=>'author', nb=>'isbn', ns=>'issn', - 'lcn,phr'=>'dewey', su=>'subject', 'su,phr'=>'subject', - ti=>'title', 'ti,phr'=>'title', se=>'title' + kw=>'title', au=>'author', 'au,phr'=>'author', nb=>'isbn', ns=>'issn', + 'lcn,phr'=>'dewey', su=>'subject', 'su,phr'=>'subject', + ti=>'title', 'ti,phr'=>'title', se=>'title' }; for (my $ii = 0; $ii < @operands; ++$ii) { - my $name = $indexes2z3950->{$indexes[$ii]}; - if (defined $name && defined $operands[$ii]) - { - $z3950par ||= {}; - $z3950par->{$name} = $operands[$ii] if !exists $z3950par->{$name}; - } + my $name = $indexes2z3950->{$indexes[$ii]}; + if (defined $name && defined $operands[$ii]) + { + $z3950par ||= {}; + $z3950par->{$name} = $operands[$ii] if !exists $z3950par->{$name}; + } } @@ -484,9 +484,9 @@ for my $this_cgi ( split('&',$query_cgi) ) { my $input_name = $1; my $input_value = $2; push @query_inputs, { input_name => $input_name, input_value => $input_value }; - if ($input_name eq 'idx') { - $scan_index_to_use = $input_value; # unless $scan_index_to_use; - } + if ($input_name eq 'idx') { + $scan_index_to_use = $input_value; # unless $scan_index_to_use; + } } $template->param ( QUERY_INPUTS => \@query_inputs, scan_index_to_use => $scan_index_to_use ); @@ -552,8 +552,8 @@ for (my $i=0;$i<@servers;$i++) { ## If there's just one result, redirect to the detail page if ($total == 1) { my $biblionumber = $newresults[0]->{biblionumber}; - my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); - my $views = { C4::Search::enabled_staff_search_views }; + my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); + my $views = { C4::Search::enabled_staff_search_views }; if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { print $cgi->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber"); } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { @@ -578,12 +578,17 @@ for (my $i=0;$i<@servers;$i++) { $template->param(limit_desc => $limit_desc); $template->param(offset => $offset); $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold); - $template->param (z3950_search_params => C4::Search::z3950_search_args($query_desc)); + $template->param (z3950_search_params => C4::Search::z3950_search_args($query_desc)); if ($query_desc || $limit_desc) { $template->param(searchdesc => 1); } $template->param(stopwords_removed => "@$stopwords_removed") if $stopwords_removed; $template->param(results_per_page => $results_per_page); + # must define a value for size if not present in DB + # in order to avoid problems generated by the default size value in TT + foreach my $line (@newresults) { + if ( not exists $line->{'size'} ) { $line->{'size'} = "" } + } $template->param(SEARCH_RESULTS => \@newresults); ## FIXME: add a global function for this, it's better than the current global one @@ -649,7 +654,7 @@ for (my $i=0;$i<@servers;$i++) { # no hits else { $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc); - $template->param (z3950_search_params => C4::Search::z3950_search_args($z3950par || $query_desc)); + $template->param (z3950_search_params => C4::Search::z3950_search_args($z3950par || $query_desc)); } } # end of the if local @@ -679,7 +684,7 @@ $template->param( total => $total, opacfacets => 1, facets_loop => $facets, - displayFacetCount=> C4::Context->preference('displayFacetCount')||0, + displayFacetCount=> C4::Context->preference('displayFacetCount')||0, scan => $scan, search_error => $error, ); -- 1.7.4.1 From tomascohen at gmail.com Mon Dec 12 19:38:38 2011 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Mon, 12 Dec 2011 15:38:38 -0300 Subject: [Koha-patches] [PATCH] Add my name to .mailmap Message-ID: <1323715118-32608-1-git-send-email-tomascohen@gmail.com> --- .mailmap | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/.mailmap b/.mailmap index b186da0..0609b39 100644 --- a/.mailmap +++ b/.mailmap @@ -34,6 +34,7 @@ Owen Leonard Paul Poulain Robin Sheat Srdjan Jankovic +Tomas Cohen Arazi # Name to name mapping: the name in the right column will be mapped to the name in the left @@ -44,4 +45,5 @@ Chris Nighswonger Chris R. Nighswonger + -- 1.7.5.4 From lrea at nekls.org Tue Dec 13 00:04:08 2011 From: lrea at nekls.org (lrea at nekls.org) Date: Mon, 12 Dec 2011 17:04:08 -0600 Subject: [Koha-patches] [PATCH] Bug 7157 - Improve the j2a.pl cronjob Message-ID: <1323731048-17421-1-git-send-email-lrea@nekls.org> From: Liz Rea - Calculates updates date based on the upper age limit defined in the patron categories. - Allows libraries to work on all branches or only one. - Allows libraries to specify which Adult patron category to update child categories to. - Allows libraries to specify a single Child patron category to update to an adult category. - Has a test mode to display what transforms would be done on the database without executing the changes. Includes improved help, copyright statement, and uses warnings. Also incorporates Paul's suggestions regarding --help and --man. To test: Create two patron categories, a child and an adult category. Make sure they have an upper age limit. Create or modify some patrons in multiple branches that fall into the category of "my birthdate is less than or equal to today's date minus the upper age limit" 1. Run the script with no flags - nothing should happen, it will suggest you try the -help flag. 2. Run the script with the -help flag - you should see the help 3. Run the script with the -fromcat= -tocat= -v -n - should show you results from all branches but take no action and tell you what its computations are. 4. Run the script with the -fromcat= -tocat= -branch= -v -n - should show you results from your specified branch, but take no action and tell you what it's computations are. 5. Run the script with the -fromcat= -tocat= -v -branch= - should show you the computations and tell you how many patrons were modified in your single branch. It will not show you the information on which patrons were updated. 6. Run the script with the -fromcat= -tocat= -v - should show you the computations and tell you how many patrons were modified across all branches. 7. Run the script without the -v flag, if you care what the non-verbose output looks like. Known limitation - if you give it an unknown tocat, it will fail with a rather ugly error. I'm going to fix that but in another patch. There is more this script could do, please feel free to take it and run. --- misc/cronjobs/j2a.pl | 230 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 214 insertions(+), 16 deletions(-) mode change 100755 => 100644 misc/cronjobs/j2a.pl diff --git a/misc/cronjobs/j2a.pl b/misc/cronjobs/j2a.pl old mode 100755 new mode 100644 index ec5d207..b445b10 --- a/misc/cronjobs/j2a.pl +++ b/misc/cronjobs/j2a.pl @@ -1,7 +1,26 @@ #!/usr/bin/perl -#run nightly -- changes J to A on someone's 18th birthday + +# 2011 Liz Rea - Northeast Kansas Library System + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# + use strict; -#use warnings; FIXME - Bug 2505 +use warnings; + BEGIN { # find Koha's Perl modules # test carefully before changing this @@ -9,26 +28,205 @@ BEGIN { eval { require "$FindBin::Bin/../kohalib.pl" }; } + use C4::Context; -my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) - = localtime(time); +use C4::Members; +use Getopt::Long; +use Pod::Usage; + +=head1 NAME + +juv2adult.pl - convert juvenile/child patrons from juvenile patron category and category code to corresponding adult patron category and category code when they reach the upper age limit defined in the Patron Categories. + +=head1 SYNOPSIS + +juv2adult.pl [ -branch= -fromcat= -tocat= ] + + Options: + --help brief help message + --man full documentation + -v verbose mode + -n take no action, display only + -branch only deal with patrons from this library/branch + -fromcat change patron category from this category + -tocat change patron category to this category +=head1 OPTIONS + +=over 8 + +=item B<--help> + +Print a brief help message and exits. + +=item B<--man> + +Prints the manual page and exits. + +=item B<-v> + +Verbose. Without this flag set, only fatal errors are reported. + +=item B<-n> + +No Action. With this flag set, script will report changes but not actually execute them on the database. + +=item B<-branch> + +changes patrons for one specific branch. Use the value in the +branches.branchcode table. + +=item B<-fromcat> + +*required* defines the juvenile category to update. Expects the code from categories.categorycode. + +=item B<-tocat> + +*required* defines the category juvenile patrons will be converted to. Expects the code from categories.categorycode. + +=back + +=head1 DESCRIPTION + +This script is designed to update patrons from juvenile to adult patron types, remove the guarantor, and update their category codes appropriately when they reach the upper age limit defined in the Patron Categories. + +=head1 USAGE EXAMPLES + +C - Suggests that you read this help. :) + +C -branch= -fromcat= -tocat= - Processes a single branch, and updates the patron categories from fromcat to tocat. + +C -fromcat= -tocat= -v -n - Processes all branches, shows all messages, and reports the patrons who would be affected. Takes no action on the database. +=cut + +# These variables are set by command line options. +# They are initially set to default values. + + +my $help = 0; +my $man = 0; +my $verbose = 0; +my $noaction = 0; +my $mybranch; +my $fromcat; +my $tocat; + +GetOptions( + 'help|?' => \$help, + 'man' => \$man, + 'v' => \$verbose, + 'n' => \$noaction, + 'fromcat=s' => \$fromcat, + 'tocat=s' => \$tocat, + 'branch=s' => \$mybranch, +) or pod2usage(2); +pod2usage(1) if $help; +pod2usage( -verbose => 2 ) if $man; + +if(not $fromcat && $tocat) { #make sure we've specified the info we need. + print "please specify -help for usage tips.\n"; + exit; +} + +my $dbh=C4::Context->dbh; +my @branches = C4::Branch::GetBranches(); +#get today's date, format it and subtract upperagelimit +my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year +=1900; $mon +=1; if ($mon < 10) {$mon = "0".$mon;} if ($mday < 10) {$mday = "0".$mday;} +# get the upperagelimit from the category to be transitioned from +my $query=qq|SELECT upperagelimit from categories where categorycode =?|; +my $sth=$dbh->prepare( $query ); +$sth->execute( $fromcat ) + or die "Couldn't execute statement: " . $sth->errstr; +my $agelimit = $sth->fetchrow_array(); +if ( not $agelimit ) { -$year -=18; #18 year olds here: if your J turns to A before this change here -my $dbh=C4::Context->dbh; + die "No patron category with that category code. Please try again. \n"; +} +$sth->finish( ); +$year -=$agelimit; + +$verbose and print "The age limit for category $fromcat is $agelimit\n"; -#get today's date, format it and subtract 18 yrs. my $itsyourbirthday = "$year-$mon-$mday"; -my $query=qq|UPDATE borrowers - SET categorycode='A', - guarantorid ='0' - WHERE dateofbirth<=? - AND dateofbirth!='0000-00-00' - AND categorycode IN (select categorycode from categories where category_type='C')|; -my $sth=$dbh->prepare($query); -my $res = $sth->execute($itsyourbirthday) or die "can't execute"; -print "$res\n"; #did it work? + +if ( not $noaction) { + if ( $mybranch ) { #yep, we received a specific branch to work on. + $verbose and print "Looking for patrons of $mybranch to update from $fromcat to $tocat that were born before $itsyourbirthday\n"; + my $query=qq|UPDATE borrowers + SET categorycode='A', + guarantorid ='0', + categorycode =? + WHERE dateofbirth<=? + AND dateofbirth!='0000-00-00' + AND branchcode=? + AND categorycode IN (select categorycode from categories where category_type='C' and categorycode=?)|; + my $sth=$dbh->prepare($query); + my $res = $sth->execute( $tocat, $itsyourbirthday, $mybranch, $fromcat ) or die "can't execute"; + if ($res eq '0E0') { print "No patrons updated\n"; + } else { print "Updated $res patrons\n"; } + } else { # branch was not supplied, processing all branches + $verbose and print "Looking in all branches for patrons to update from $fromcat to $tocat that were born before $itsyourbirthday\n"; + foreach my $branchcode (@branches) { + my $query=qq|UPDATE borrowers + SET categorycode='A', + guarantorid ='0', + categorycode =? + WHERE dateofbirth<=? + AND dateofbirth!='0000-00-00' + AND categorycode IN (select categorycode from categories where category_type='C' and categorycode=?)|; + my $sth=$dbh->prepare($query); + my $res = $sth->execute( $tocat, $itsyourbirthday, $fromcat ) or die "can't execute"; + if ($res eq '0E0') { print "No patrons updated\n"; + } else { print "Updated $res patrons\n"; } + } + } +} else { + my $birthday; + if ( $mybranch ) { + $verbose and print "Displaying patrons that would be updated from $fromcat to $tocat from $mybranch\n"; + my $query=qq|SELECT firstname, + surname, + cardnumber, + dateofbirth + FROM borrowers + WHERE dateofbirth<=? + AND dateofbirth!='0000-00-00' + AND branchcode=? + AND categorycode IN (select categorycode from categories where category_type='C' and categorycode=?)|; + my $sth=$dbh->prepare( $query ); + $sth->execute( $itsyourbirthday, $mybranch, $fromcat ) + or die "Couldn't execute statement: " . $sth->errstr; + while ( my @res = $sth->fetchrow_array()) { + my $firstname = $res[0]; + my $surname = $res[1]; + my $barcode = $res[2]; + $birthday = $res[3]; + print "$firstname $surname $barcode $birthday\n"; + } + } else { + $verbose and print "Displaying patrons that would be updated from $fromcat to $tocat.\n"; + my $query=qq|SELECT firstname, + surname, + cardnumber, + dateofbirth + FROM borrowers + WHERE dateofbirth<=? + AND dateofbirth!='0000-00-00' + AND categorycode IN (select categorycode from categories where category_type='C' and categorycode=?)|; + my $sth=$dbh->prepare( $query ); + $sth->execute( $itsyourbirthday, $fromcat ) + or die "Couldn't execute statement: " . $sth->errstr; + while ( my @res = $sth->fetchrow_array()) { + my $firstname = $res[0]; + my $surname = $res[1]; + my $barcode = $res[2]; + $birthday = $res[3]; + print "$firstname $surname $barcode $birthday\n"; + } + } + $sth->finish( ); +} $dbh->disconnect(); -- 1.7.2.5 From christophe.croullebois at biblibre.com Tue Dec 13 11:33:57 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Tue, 13 Dec 2011 11:33:57 +0100 Subject: [Koha-patches] [PATCH 1/1] Bug 7350: In neworderempty.pl duplicating an item does not preserve select box selections Message-ID: <1323772437-12080-1-git-send-email-christophe.croullebois@biblibre.com> cloneNode() does not preserve select box selections, I have created a function to duplicate them : "clone_with_selected". It is included in "cloneItemBlock", that's all. Now the values selected in ddl are duplicated as the imput-texts are. --- koha-tmpl/intranet-tmpl/prog/en/js/additem.js | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js index efcb8eb..2f6c3fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js @@ -6,7 +6,7 @@ function deleteItemBlock(index) { } function cloneItemBlock(index) { var original = document.getElementById(index); //original
    - var clone = original.cloneNode(true); + var clone = clone_with_selected(original) var random = Math.floor(Math.random()*100000); // get a random itemid. // set the attribute for the new 'div' subfields clone.setAttribute('id',index + random);//set another id. @@ -55,6 +55,19 @@ function check_additem() { // duplicates within the form. return success; } + +function clone_with_selected (node) { + var origin = node.getElementsByTagName("select"); + var tmp = node.cloneNode(true) + var selectelem = tmp.getElementsByTagName("select"); + for (var i=0; i Sorting by cardnumber now works (removed a client-side sort, the server-side sort is enough). --- .../prog/en/modules/members/member.tt | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index 4bff548..f625220 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -99,14 +99,4 @@
    - - [% INCLUDE 'intranet-bottom.inc' %] -- 1.7.4.1 From oleonard at myacpl.org Tue Dec 13 18:32:02 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 13 Dec 2011 12:32:02 -0500 Subject: [Koha-patches] [PATCH] Bug 1633 - Add ability to take book cover images from local img db Message-ID: <1323797523-16828-1-git-send-email-oleonard@myacpl.org> OPAC Template revisions: - Revised OPAC imageviewer template to match structure of other OPAC pages (with masthead search, footer, etc) - Added link back to detail page (controlled by BiblioDefaultView preference) - Added link style to thumbnails on opac-detail to add a sense of "clickability" to them - Revised OPAC imageviewer template to allow it to function with JavaScript turned off. Now even without JS main image will load, thumbnails will be properly styled, and thumbnail links will work. - Changes to the script are only to pass missing variables to the template TODO: Corresponding changes for the staff client --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 5 + koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 4 +- .../opac-tmpl/prog/en/modules/opac-imageviewer.tt | 82 ++++++++++++++++---- opac/opac-imageviewer.pl | 3 + 4 files changed, 75 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 21dc08f..f904af2 100755 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2289,3 +2289,8 @@ a.koha_url { .nav_results #listResults li a { color:#FFFFFF; font-weight:normal;} +a.localimage img { + border : 1px solid #8EB3E7; + margin : 0 .5em; + padding : .3em; +} \ No newline at end of file diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 717c5b6..7f52117 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -987,10 +987,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( OPACLocalCoverImages ) %]
    diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt index d6633e1..a14e61d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt @@ -1,11 +1,12 @@ [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Images for: [% biblio.title |html %] [% INCLUDE 'doc-head-close.inc' %] - - + -
    Large view
    -[% IF OPACLocalCoverImages == 1 %] -[% FOREACH img IN images %] -[% IF img %] -Image -[% END %] -[% END %] -[% biblio.title %] [% biblio.author %] +[% IF ( OpacNav ) %]
    [% ELSE %]
    [% END %] +
    +[% INCLUDE 'masthead.inc' %] +
    +
    +
    +
    +

    Images for [% IF ( BiblioDefaultViewmarc ) %] + [% ELSE %] + [% IF ( BiblioDefaultViewisbd ) %] + [% ELSE %] + [% END %] + [% END %][% biblio.title %] [% biblio.author %]

    +
    + +
    + + [% IF OPACLocalCoverImages == 1 %] +
    + [% FOREACH img IN images %] + [% IF img %] + + [% IF ( imagenumber == img ) %] + [% ELSE %] + + [% END %] + + [% END %] + [% END %] +
    +
    [% ELSE %] Unfortunately, images are not enabled for this catalog at this time. [% END %] - - + +
    +
    +
    +[% IF ( OpacNav ) %] +
    +[% INCLUDE 'navigation.inc' %] +
    +[% END %] +
    +[% INCLUDE 'opac-bottom.inc' %] diff --git a/opac/opac-imageviewer.pl b/opac/opac-imageviewer.pl index 6d2f326..cddc45c 100755 --- a/opac/opac-imageviewer.pl +++ b/opac/opac-imageviewer.pl @@ -38,12 +38,15 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +my $imagenumber = $query ->param('imagenumber'); my ($count, $biblio) = GetBiblio($biblionumber); if (C4::Context->preference("OPACLocalCoverImages")) { my @images = ListImagesForBiblio($biblionumber); $template->{VARS}->{'OPACLocalCoverImages'} = 1; $template->{VARS}->{'images'} = \@images; + $template->{VARS}->{'biblionumber'} = $biblionumber; + $template->{VARS}->{'imagenumber'} = $imagenumber; } $template->{VARS}->{'biblio'} = $biblio; -- 1.7.3 From oleonard at myacpl.org Tue Dec 13 20:39:26 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 13 Dec 2011 14:39:26 -0500 Subject: [Koha-patches] [PATCH] Bug 7135 - in addbiblio, make save button floating to have it on always on screen Message-ID: <1323805166-17599-1-git-send-email-oleonard@myacpl.org> Follow-up fix corrects z-index of toolbar so that "More" menu is not hidden behind it. --- .../prog/en/lib/jquery/plugins/jquery.fixFloat.js | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js index 9fb63e0..0a6fde0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js +++ b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js @@ -26,7 +26,6 @@ tbh.width(tbh.width()); tbh.css({'position':'absolute'}); } - tbh.css({'z-index':1000}); if(options.enabled){ $(window).scroll(function(){ @@ -48,7 +47,8 @@ if(fixMe){ var cssObj = { 'position' : 'fixed', - 'top' : '0px' + 'top' : '0px', + 'z-index' : '1000' } tbh.css(cssObj); tbh.addClass("floating"); @@ -56,7 +56,8 @@ if(repositionMe){ var cssObj = { 'position' : 'absolute', - 'top' : originalOffset + 'top' : originalOffset, + 'z-index' : '1' } tbh.css(cssObj); tbh.removeClass("floating"); -- 1.7.3 From f.demians at tamil.fr Wed Dec 14 08:54:34 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Wed, 14 Dec 2011 08:54:34 +0100 Subject: [Koha-patches] [PATCH] Bug 7335 Note subfields are not displayed in TEXTAREA if hidden Message-ID: <1323849274-20192-1-git-send-email-f.demians@tamil.fr> In the data entry form, there is a (hidden) functionality for note subfields. MARC21 500-599 and UNIMARC 300-399 subfields are displayed in TEXTAREA rather than INPUT tags. This is good since usually notes can be pretty long. But if one of those fields is marked in the framework as 'hidden', then it isn't displayed at first when you create a record and when you expand the field by clicking on its label the field is displayed in a one-line INPUT tag. To reproduce this bug: - Modify your framework: MARC21: 500$a, hidden=1 UNIMARC: 300$a, hidden=1 - Create a new biblio record with this framework - Open the tab containing 500 or 300 field - 500 or 300 tab is collapsed - Click on 500 or 300 label to expand the field - 500$a or 300$a is displayed in a one-line INPUT tag, not in a TEXTAREA as it should --- cataloguing/addbiblio.pl | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 71d43d7..b80c805 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -467,21 +467,9 @@ sub create_input { value=\"$value\" \/> "; } - elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { - $subfield_data{marc_value} = - ""; - - # it's a standard field } else { + # it's a standard field if ( length($value) > 100 or -- 1.7.8 From marc at msys.ch Wed Dec 14 09:59:10 2011 From: marc at msys.ch (Marc Balmer) Date: Wed, 14 Dec 2011 09:59:10 +0100 Subject: [Koha-patches] Fixing some typos Message-ID: <4EE8655E.802@msys.ch> While reading the code I found some typos and fixed them. The patches must be applied in order. 0001 functionnal -> functional 0002 wether -> whether 0003 developper -> developer 0004 'the the ' - > 'the ' Please some kind soul sign these off and an even kinder sould commit them to the master branch ;) Thanks, Marc -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0001-Typo.patch URL: From marc at msys.ch Sun Dec 11 19:00:14 2011 From: marc at msys.ch (Marc Balmer) Date: Sun, 11 Dec 2011 19:00:14 +0100 Subject: [PATCH 1/4] Typo. Message-ID: --- kohaversion.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kohaversion.pl b/kohaversion.pl index 29b43df..f5dfcb1 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -6,7 +6,7 @@ the kohaversion is divided in 4 parts : - #1 : the major number. 3 atm - - #2 : the functionnal release. 00 atm + - #2 : the functional release. 00 atm - #3 : the subnumber, moves only on a public release - #4 : the developer version. The 4th number is the database subversion. used by developers when the database changes. updatedatabase take care of the changes itself -- 1.7.2.5 --------------080600010502090104060004 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="0002-Fix-typo-wether-whether.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0002-Fix-typo-wether-whether.patch" From marc at msys.ch Wed Dec 14 09:26:01 2011 From: marc at msys.ch (Marc Balmer) Date: Wed, 14 Dec 2011 09:26:01 +0100 Subject: [PATCH 2/4] Fix typo: wether -> whether. Message-ID: --- INSTALL.opensuse | 2 +- authorities/authorities.pl | 2 +- cataloguing/addbiblio.pl | 2 +- cataloguing/plugin_launcher.pl | 2 +- installer/install.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 4 ++-- .../po/zh-Hans-CN-i-staff-t-prog-v-3006000.po | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/INSTALL.opensuse b/INSTALL.opensuse index f80fe4b..b028fd3 100644 --- a/INSTALL.opensuse +++ b/INSTALL.opensuse @@ -802,7 +802,7 @@ XML::LibXML::SAX::Parser=HASH(0x8356e0c) == Install the Zebra package == Zebra is already in the standard repository of openSUSE 11.3, so it seems better to install it. -In the next chapter a question will be asked wether it is installed, so you better install it; no harm done. +In the next chapter a question will be asked whether it is installed, so you better install it; no harm done. Because you may need the documentation, that will also be installed. Note that the package name is idzebra. diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 2f82f5a..1ba9122 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -204,7 +204,7 @@ sub create_input { } elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) { - # opening plugin. Just check wether we are on a developper computer on a production one + # opening plugin. Just check whether we are on a developper computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder"; unless (-r $cgidir and -d $cgidir) { diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 71d43d7..f69efea 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -414,7 +414,7 @@ sub create_input { } elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) { - # opening plugin. Just check wether we are on a developper computer on a production one + # opening plugin. Just check whether we are on a developper computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder"; unless ( opendir( DIR, "$cgidir" ) ) { diff --git a/cataloguing/plugin_launcher.pl b/cataloguing/plugin_launcher.pl index 9a264ab..bbd3f1f 100755 --- a/cataloguing/plugin_launcher.pl +++ b/cataloguing/plugin_launcher.pl @@ -27,7 +27,7 @@ use C4::Output; my $input = new CGI; my $plugin_name="cataloguing/value_builder/".$input->param("plugin_name"); -# opening plugin. Just check wether we are on a developper computer on a production one +# opening plugin. Just check whether we are on a developper computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir ."/cgi-bin"; my $vbdir = "$cgidir/cataloguing/value_builder"; diff --git a/installer/install.pl b/installer/install.pl index ae478b6..f95eee3 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -330,7 +330,7 @@ elsif ( $step && $step == 3 ) { } else { # - # check wether it's a 1st install or an update + # check whether it's a 1st install or an update # #Check if there are enough tables. # Paul has cleaned up tables so reduced the count diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index e6d2315..b137f59 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -76,14 +76,14 @@ DDApp = { if (uls[i].className == "draglist" || uls[i].className == "draglist_alt") { ddtarget = YAHOO.util.DragDropMgr.getDDById(uls[i].id); // The yahoo drag and drop is written (broken or not) in such a way, that if an element is subscribed as a target multiple times, -// it has to be unlinked multiple times, so we need to test wether it is allready a target, otherwise we'll have a problem when closing the group +// it has to be unlinked multiple times, so we need to test whether it is allready a target, otherwise we'll have a problem when closing the group if( ! ddtarget ) { new YAHOO.util.DDTarget(uls[i].id); } var children = uls[i].getElementsByTagName('li'); for( j=0; j developer. Message-ID: --- authorities/authorities.pl | 2 +- cataloguing/addbiblio.pl | 2 +- cataloguing/plugin_launcher.pl | 2 +- misc/migration_tools/build6xx.pl | 2 +- misc/release_notes/release_notes_200RC2.txt | 2 +- misc/release_notes/release_notes_200RC3.txt | 2 +- misc/release_notes/release_notes_210.txt | 8 ++++---- misc/release_notes/release_notes_211.txt | 2 +- misc/release_notes/release_notes_220.txt | 4 ++-- misc/release_notes/release_notes_221.txt | 4 ++-- misc/release_notes/release_notes_222.txt | 4 ++-- misc/release_notes/release_notes_223.txt | 4 ++-- misc/release_notes/release_notes_22RC1.txt | 2 +- misc/release_notes/release_notes_22RC2.txt | 2 +- misc/release_notes/release_notes_22RC3.txt | 2 +- misc/release_notes/release_notes_22RC4.txt | 2 +- misc/release_notes/release_notes_22RC5.txt | 2 +- 17 files changed, 24 insertions(+), 24 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 1ba9122..23653f6 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -204,7 +204,7 @@ sub create_input { } elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) { - # opening plugin. Just check whether we are on a developper computer on a production one + # opening plugin. Just check whether we are on a developer computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder"; unless (-r $cgidir and -d $cgidir) { diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index f69efea..568007e 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -414,7 +414,7 @@ sub create_input { } elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) { - # opening plugin. Just check whether we are on a developper computer on a production one + # opening plugin. Just check whether we are on a developer computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder"; unless ( opendir( DIR, "$cgidir" ) ) { diff --git a/cataloguing/plugin_launcher.pl b/cataloguing/plugin_launcher.pl index bbd3f1f..f3ef3e8 100755 --- a/cataloguing/plugin_launcher.pl +++ b/cataloguing/plugin_launcher.pl @@ -27,7 +27,7 @@ use C4::Output; my $input = new CGI; my $plugin_name="cataloguing/value_builder/".$input->param("plugin_name"); -# opening plugin. Just check whether we are on a developper computer on a production one +# opening plugin. Just check whether we are on a developer computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir ."/cgi-bin"; my $vbdir = "$cgidir/cataloguing/value_builder"; diff --git a/misc/migration_tools/build6xx.pl b/misc/migration_tools/build6xx.pl index 5c02f12..2c4bf2b 100755 --- a/misc/migration_tools/build6xx.pl +++ b/misc/migration_tools/build6xx.pl @@ -234,7 +234,7 @@ while (my ($bibid) = $sth->fetchrow) { } } if ($#x >4) { - # too many $x, not handled, warn the developper that tries to migrate + # too many $x, not handled, warn the developer that tries to migrate print "warning there is ".$#x.'$x values'; } } diff --git a/misc/release_notes/release_notes_200RC2.txt b/misc/release_notes/release_notes_200RC2.txt index 21fc394..aa6248e 100644 --- a/misc/release_notes/release_notes_200RC2.txt +++ b/misc/release_notes/release_notes_200RC2.txt @@ -6,7 +6,7 @@ If you want to adopt Koha, please do, but you're warned that this release candid If you test it and let us know about any we haven't seen yet, it will help us to fix them. The 2.0.x series version is "feature freezed". Only bugs or minor changes will be made in this branch. -The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developpers can already get 1st draft of a working z3950 server. +The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developers can already get 1st draft of a working z3950 server. INSTALLATION diff --git a/misc/release_notes/release_notes_200RC3.txt b/misc/release_notes/release_notes_200RC3.txt index 0560597..89c7387 100644 --- a/misc/release_notes/release_notes_200RC3.txt +++ b/misc/release_notes/release_notes_200RC3.txt @@ -6,7 +6,7 @@ If you want to adopt Koha, please do, but you're warned that this release candid If you test it and let us know about any we haven't seen yet, it will help us to fix them. The 2.0.x series version is "feature freezed". Only bugs or minor changes will be made in this branch. -The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developpers can already get 1st draft of a working z3950 server. +The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developers can already get 1st draft of a working z3950 server. INSTALLATION diff --git a/misc/release_notes/release_notes_210.txt b/misc/release_notes/release_notes_210.txt index f810421..3610236 100644 --- a/misc/release_notes/release_notes_210.txt +++ b/misc/release_notes/release_notes_210.txt @@ -48,7 +48,7 @@ WHAT'S NEW 1 Auto installer **************** If you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. -A very usefull feature for developpers that want to install/uninstall Koha quite often. +A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. 2 Uninstaller @@ -102,7 +102,7 @@ Circulation has been heavily rewritten... You can define rules like : "up to 2 CDROM, up to 10 books, max 10 items". * circulation works now like this (internally) : - get borrower cardnumber & item number -- check "can book be issued". This sub (canbookbeissued) checks everything. For each problem, 2 arrays can be set up : MUSTCONFIRM and IMPOSSIBLE. MUSTCONFIRM entries needs a librarian confirmation before effective issuing. IMPOSSIBLE entries makes the issue impossible. It's now very easy to alter issuing rules for a given library (with a developper), as every test is heavily documented & in a single sub. +- check "can book be issued". This sub (canbookbeissued) checks everything. For each problem, 2 arrays can be set up : MUSTCONFIRM and IMPOSSIBLE. MUSTCONFIRM entries needs a librarian confirmation before effective issuing. IMPOSSIBLE entries makes the issue impossible. It's now very easy to alter issuing rules for a given library (with a developer), as every test is heavily documented & in a single sub. - if >=1 IMPOSSIBLE entry : issuing is impossible, show why. - if >=1 MUSTCONFIRM : show problems, and ask for confirmation. - if both are empty : issue. @@ -139,7 +139,7 @@ Should be used for MARC21 with some work. We need volunteers here. ============== HELP NEEDED ============== -We alway accept new developpers wanting to code or test features of the Roadmap. +We alway accept new developers wanting to code or test features of the Roadmap. We still can accept features not in the RoadMap if : - strongly supported/coded by someone. - compatible with other features. @@ -167,4 +167,4 @@ Frameworks have to be defined to be choosable at installation stage. The idea be Same as for MARC21 frameworks. Except we don't have authority structure for MARC21 (we have for UNIMARC in french, thanks to ENSMP) * provide ISBD for MARC21 -(ISBD for UNIMARC is being done, thanks to doXulting) \ No newline at end of file +(ISBD for UNIMARC is being done, thanks to doXulting) diff --git a/misc/release_notes/release_notes_211.txt b/misc/release_notes/release_notes_211.txt index 2d68bcf..20b996b 100644 --- a/misc/release_notes/release_notes_211.txt +++ b/misc/release_notes/release_notes_211.txt @@ -61,4 +61,4 @@ The next release will probably be 2.2RC1. It should contains : * bugfixes. * some new code for a better LDAP handling (automatic creation of the borrower if it does not exist, getting informations from LDAP directory) -* a barcode generator ! it's a new feature that should be commited by a new developper coming from south america (argentina). I've seen the code, it's clean & nice. Just a new dependencay, for PDF generating. Should be non mandatory for ppl that don't want to print barcodes. +* a barcode generator ! it's a new feature that should be commited by a new developer coming from south america (argentina). I've seen the code, it's clean & nice. Just a new dependencay, for PDF generating. Should be non mandatory for ppl that don't want to print barcodes. diff --git a/misc/release_notes/release_notes_220.txt b/misc/release_notes/release_notes_220.txt index 3b95480..5677f2d 100644 --- a/misc/release_notes/release_notes_220.txt +++ b/misc/release_notes/release_notes_220.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). @@ -196,7 +196,7 @@ General : * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed. * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product. * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package ! -* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. +* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform. * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied) * Nelsonville have shared their templates. They are available as NPL theme. diff --git a/misc/release_notes/release_notes_221.txt b/misc/release_notes/release_notes_221.txt index 06ceb19..24afbb7 100644 --- a/misc/release_notes/release_notes_221.txt +++ b/misc/release_notes/release_notes_221.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). @@ -215,7 +215,7 @@ General : * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed. * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product. * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package ! -* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. +* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform. * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied) * Nelsonville have shared their templates. They are available as NPL theme. diff --git a/misc/release_notes/release_notes_222.txt b/misc/release_notes/release_notes_222.txt index 0522389..6b11e75 100644 --- a/misc/release_notes/release_notes_222.txt +++ b/misc/release_notes/release_notes_222.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). @@ -361,7 +361,7 @@ General : * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed. * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product. * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package ! -* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. +* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform. * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied) * Nelsonville have shared their templates. They are available as NPL theme. diff --git a/misc/release_notes/release_notes_223.txt b/misc/release_notes/release_notes_223.txt index 6eb7311..5ecc63e 100644 --- a/misc/release_notes/release_notes_223.txt +++ b/misc/release_notes/release_notes_223.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). @@ -408,7 +408,7 @@ General : * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed. * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product. * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package ! -* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. +* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file. * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform. * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied) * Nelsonville have shared their templates. They are available as NPL theme. diff --git a/misc/release_notes/release_notes_22RC1.txt b/misc/release_notes/release_notes_22RC1.txt index 2b6cc5f..bdbfa15 100644 --- a/misc/release_notes/release_notes_22RC1.txt +++ b/misc/release_notes/release_notes_22RC1.txt @@ -5,7 +5,7 @@ Welcome to the 1st Release Candidate of the 2.2 version of Koha. Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators !). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators !). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). diff --git a/misc/release_notes/release_notes_22RC2.txt b/misc/release_notes/release_notes_22RC2.txt index 162630a..8484c5c 100644 --- a/misc/release_notes/release_notes_22RC2.txt +++ b/misc/release_notes/release_notes_22RC2.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators !). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators !). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). diff --git a/misc/release_notes/release_notes_22RC3.txt b/misc/release_notes/release_notes_22RC3.txt index 2c9aa08..4121fb1 100644 --- a/misc/release_notes/release_notes_22RC3.txt +++ b/misc/release_notes/release_notes_22RC3.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators !). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators !). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). diff --git a/misc/release_notes/release_notes_22RC4.txt b/misc/release_notes/release_notes_22RC4.txt index 3608697..7db7665 100644 --- a/misc/release_notes/release_notes_22RC4.txt +++ b/misc/release_notes/release_notes_22RC4.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). diff --git a/misc/release_notes/release_notes_22RC5.txt b/misc/release_notes/release_notes_22RC5.txt index 6f5009d..8a6ac1e 100644 --- a/misc/release_notes/release_notes_22RC5.txt +++ b/misc/release_notes/release_notes_22RC5.txt @@ -4,7 +4,7 @@ RELEASE NOTES Koha is the 1st Open-Source Integrated Library System. Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system. -Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators). +Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators). With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items). -- 1.7.2.5 --------------080600010502090104060004 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="0004-Remove-duplicated-word-the-the-the.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0004-Remove-duplicated-word-the-the-the.patch" RnJvbSBjZmE2MmI4NGUwMzQwZDkxMDZkMGIxZTMyMTY4ODJlZTA2ZDE2MWExIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJjIEJhbG1lciA8bWFyY0Btc3lzLmNoPgpEYXRl OiBXZWQsIDE0IERlYyAyMDExIDA5OjUyOjQ3ICswMTAwClN1YmplY3Q6IFtQQVRDSCA0LzRd IFJlbW92ZSBkdXBsaWNhdGVkIHdvcmQ6ICAndGhlIHRoZSAnIC0+ICd0aGUgJy4KCi0tLQog QzQvTGFiZWxzL0xhYmVsLnBtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAg ICA2ICsrKy0tLQogQzQvUmVjb3JkLnBtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgfCAgICAyICstCiBldGMvemVicmFkYi9jY2wucHJvcGVydGllcyAgICAgICAg ICAgICAgICAgICAgICAgICB8ICAgIDIgKy0KIGluc3RhbGxlci9kYXRhL215c3FsL2tvaGFz dHJ1Y3R1cmUuc3FsICAgICAgICAgICAgIHwgICAgNCArKy0tCiAuLi4vaW50cmFuZXQtdG1w bC9wcm9nL2VuL2pzL3RpbnltY2UvY2hhbmdlbG9nICAgICB8ICAgIDQgKystLQogLi4uL3Ro ZW1lcy9hZHZhbmNlZC9jc3MvZWRpdG9yX2NvbnRlbnQuY3NzICAgICAgICAgfCAgICAyICst CiAuLi4vcHJvZy9lbi9saWIveXVpL2NhbGVuZGFyL2NhbGVuZGFyLWRlYnVnLmpzICAgICB8 ICAgIDIgKy0KIC4uLi9wcm9nL2VuL2xpYi95dWkvY2FsZW5kYXIvY2FsZW5kYXIuanMgICAg ICAgICAgIHwgICAgMiArLQogLi4uL3Byb2cvZW4vbGliL3l1aS9kcmFnZHJvcC9kcmFnZHJv cC1kZWJ1Zy5qcyAgICAgfCAgICAyICstCiAuLi4vcHJvZy9lbi9saWIveXVpL2RyYWdkcm9w L2RyYWdkcm9wLmpzICAgICAgICAgICB8ICAgIDIgKy0KIC4uLi9wcm9nL2VuL2xpYi95dWkv ZWRpdG9yL2VkaXRvci1kZWJ1Zy5qcyAgICAgICAgIHwgICAgMiArLQogLi4uL2ludHJhbmV0 LXRtcGwvcHJvZy9lbi9saWIveXVpL2VkaXRvci9lZGl0b3IuanMgfCAgICAyICstCiAuLi4v cHJvZy9lbi9saWIveXVpL2VkaXRvci9zaW1wbGVlZGl0b3ItZGVidWcuanMgICB8ICAgIDIg Ky0KIC4uLi9wcm9nL2VuL2xpYi95dWkvZWRpdG9yL3NpbXBsZWVkaXRvci5qcyAgICAgICAg IHwgICAgMiArLQogLi4uL2lud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LUFyYWItaS1zdGFmZi10 LXByb2ctdi0zMDA2MDAwLnBvICAgICAgICAgfCAgICA4ICsrKystLS0tCiAuLi4vcG8vYXot QVotaS1zdGFmZi10LXByb2ctdi0zMDA2MDAwLnBvICAgICAgICAgICB8ICAgMTAgKysrKyst LS0tLQogbWlzYy90cmFuc2xhdG9yL3BvL2Jlbi1pLXN0YWZmLXQtcHJvZy12LTMwMDYwMDAu cG8gfCAgICA4ICsrKystLS0tCiAuLi4vcG8vY2EtVkEtaS1zdGFmZi10LXByb2ctdi0zMDA2 MDAwLnBvICAgICAgICAgICB8ICAgIDggKysrKy0tLS0KIC4uLi9wby9kYS1ESy1pLXN0YWZm LXQtcHJvZy12LTMwMDYwMDAucG8gICAgICAgICAgIHwgICAgOCArKysrLS0tLQogLi4uL3Bv L2RlLURFLWktc3RhZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAgICAgfCAgIDEwICsr KysrLS0tLS0KIC4uLi9wby9lbC1HUi1pLXN0YWZmLXQtcHJvZy12LTMwMDYwMDAucG8gICAg ICAgICAgIHwgICAxMCArKysrKy0tLS0tCiAuLi4vcG8vZW4tR0ItaS1zdGFmZi10LXByb2ct di0zMDA2MDAwLnBvICAgICAgICAgICB8ICAgMTIgKysrKysrLS0tLS0tCiAuLi4vcG8vZW4t TlotaS1zdGFmZi10LXByb2ctdi0zMDA2MDAwLnBvICAgICAgICAgICB8ICAgMTIgKysrKysr LS0tLS0tCiAuLi4vcG8vZXMtRVMtaS1zdGFmZi10LXByb2ctdi0zMDA2MDAwLnBvICAgICAg ICAgICB8ICAgIDggKysrKy0tLS0KIC4uLi9wby9maS1GSS1pLXN0YWZmLXQtcHJvZy12LTMw MDYwMDAucG8gICAgICAgICAgIHwgICAgOCArKysrLS0tLQogLi4uL3BvL2ZyLUNBLWktc3Rh ZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAgICAgfCAgICA4ICsrKystLS0tCiAuLi4v cG8vZnItRlItaS1zdGFmZi10LXByb2ctdi0zMDA2MDAwLnBvICAgICAgICAgICB8ICAgIDgg KysrKy0tLS0KIG1pc2MvdHJhbnNsYXRvci9wby9oaS1pLXN0YWZmLXQtcHJvZy12LTMwMDYw MDAucG8gIHwgICAgOCArKysrLS0tLQogLi4uL3BvL2hyLUhSLWktc3RhZmYtdC1wcm9nLXYt MzAwNjAwMC5wbyAgICAgICAgICAgfCAgICA4ICsrKystLS0tCiAuLi4vcG8vaHUtSFUtaS1z dGFmZi10LXByb2ctdi0zMDA2MDAwLnBvICAgICAgICAgICB8ICAgIDggKysrKy0tLS0KIC4u Li9wby9oeS1Bcm1uLWktc3RhZmYtcHJvZy12LTMwMDYwMDAucG8gICAgICAgICAgIHwgICAg NCArKy0tCiAuLi4vcG8vaHktQXJtbi1pLXN0YWZmLXQtcHJvZy12LTMwMDYwMDAucG8gICAg ICAgICB8ICAgIDggKysrKy0tLS0KIC4uLi9wby9pZC1JRC1pLXN0YWZmLXQtcHJvZy12LTMw MDYwMDAucG8gICAgICAgICAgIHwgICAgOCArKysrLS0tLQogLi4uL3BvL2l0LUlULWktc3Rh ZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAgICAgfCAgICA4ICsrKystLS0tCiAuLi4v cG8va24tS25kYS1pLXN0YWZmLXQtcHJvZy12LTMwMDYwMDAucG8gICAgICAgICB8ICAgIDIg Ky0KIC4uLi9wby9sby1MYW9vLWktc3RhZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAg IHwgICAgOCArKysrLS0tLQogbWlzYy90cmFuc2xhdG9yL3BvL21vbi1pLXN0YWZmLXQtcHJv Zy12LTMwMDYwMDAucG8gfCAgIDEwICsrKysrLS0tLS0KIC4uLi9wby9tcy1NWS1pLXN0YWZm LXQtcHJvZy12LTMwMDYwMDAucG8gICAgICAgICAgIHwgICAgOCArKysrLS0tLQogLi4uL3Bv L25iLU5PLWktc3RhZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAgICAgfCAgICA4ICsr KystLS0tCiAuLi4vcG8vbmwtQkUtaS1zdGFmZi10LXByb2ctdi0zMDA2MDAwLnBvICAgICAg ICAgICB8ICAgIDggKysrKy0tLS0KIC4uLi9wby9ubC1OTC1pLXN0YWZmLXQtcHJvZy12LTMw MDYwMDAucG8gICAgICAgICAgIHwgICAgOCArKysrLS0tLQogbWlzYy90cmFuc2xhdG9yL3Bv L25uLU5PLWktc3RhZmYtcHJvZy12LTMwMDYwMDAucG8gfCAgICA2ICsrKy0tLQogLi4uL3Bv L25uLU5PLWktc3RhZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAgICAgfCAgICA4ICsr KystLS0tCiAuLi4vcG8vcGwtUEwtaS1zdGFmZi10LXByb2ctdi0zMDA2MDAwLnBvICAgICAg ICAgICB8ICAgIDggKysrKy0tLS0KIC4uLi9wby9wdC1CUi1pLXN0YWZmLXQtcHJvZy12LTMw MDYwMDAucG8gICAgICAgICAgIHwgICAgOCArKysrLS0tLQogLi4uL3BvL3B0LVBULWktc3Rh ZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAgICAgfCAgIDEwICsrKysrLS0tLS0KIC4u Li9wby9yby1STy1pLXN0YWZmLXQtcHJvZy12LTMwMDYwMDAucG8gICAgICAgICAgIHwgICAg OCArKysrLS0tLQogLi4uL3BvL3J1LVJVLWktc3RhZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAg ICAgICAgICAgfCAgIDEwICsrKysrLS0tLS0KIC4uLi9wby9zZC1QSy1pLXN0YWZmLXQtcHJv Zy12LTMwMDYwMDAucG8gICAgICAgICAgIHwgICAgOCArKysrLS0tLQogLi4uL3BvL3N2LVNF LWktc3RhZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyAgICAgICAgICAgfCAgICA4ICsrKystLS0t CiBtaXNjL3RyYW5zbGF0b3IvcG8vdGV0LWktc3RhZmYtdC1wcm9nLXYtMzAwNjAwMC5wbyB8 ICAgIDggKysrKy0tLS0KIC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VlIHRoZSBmdWxsIGRvY3VtZW50YXRpb24gZm9y IHRoZSBQYXRyb24gSW1hZ2UgVXBsb2FkZXIgaW4gdGhlICIKIG1zZ3N0ciAiIgogCiAjOiBp bnRyYW5ldC10bXBsL3Byb2cvZW4vbW9kdWxlcy9oZWxwL3Rvb2xzL3NjaGVkdWxlci50dDoy NgogIywgYy1mb3JtYXQKLW1zZ2lkICJTZWUgdGhlIGZ1bGwgZG9jdW1lbnRhdGlvbiBmb3Ig dGhlIHRoZSBUYXNrIFNjaGVkdWxlciBpbiB0aGUgIgorbXNnaWQgIlNlZSB0aGUgZnVsbCBk b2N1bWVudGF0aW9uIGZvciB0aGUgVGFzayBTY2hlZHVsZXIgaW4gdGhlICIKIG1zZ3N0ciAi IgogCiAjOiBpbnRyYW5ldC10bXBsL3Byb2cvZW4vbW9kdWxlcy90b29scy9pbnZlbnRvcnku dHQ6MTk3Ci0tIAoxLjcuMi41Cgo= --------------080600010502090104060004-- From marc at msys.ch Wed Dec 14 10:17:29 2011 From: marc at msys.ch (Marc Balmer) Date: Wed, 14 Dec 2011 10:17:29 +0100 Subject: [Koha-patches] Fixing some typos In-Reply-To: <4EE8655E.802@msys.ch> References: <4EE8655E.802@msys.ch> Message-ID: <4EE869A9.8040700@msys.ch> Am 14.12.11 09:59, schrieb Marc Balmer: > 0001 functionnal -> functional > 0002 wether -> whether > 0003 developper -> developer > 0004 'the the ' - > 'the ' I filed a bug, 7356, for this: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7356 From jonathan.druart at biblibre.com Wed Dec 14 15:11:51 2011 From: jonathan.druart at biblibre.com (Jonathan Druart) Date: Wed, 14 Dec 2011 15:11:51 +0100 Subject: [Koha-patches] =?utf-8?q?=5BPATCH_1/1=5D_Bug_5347=3A_Adds_columns?= =?utf-8?q?_claims=5Fcount_and_claimed=5Fdate_in_aqorders?= Message-ID: <1323871911-22153-1-git-send-email-jonathan.druart@biblibre.com> This patch adds 2 columns in the aqorders table : - claims_count : number of claims for an orders - claimed_date : date of the lastest claim In the lateorders.pl table, you can not select orders from different supplier because there is just one letter sent after clicking the "Claim order" button. So, it's logic that you want to select only orders from this supplier. Modification in C4/Letters.pm: refactoring code for claimacquisition and claimissues letter type. Now, fields for theses letters check the table name. It's not possible to chooce aqorders.title, this field doesn't exist ! Furthermore, you can add a tag around your item fields, like this : -- Begin example <> <> <> <> <> <> <> Library : <> In your possesssion : <>. <>. <>, <>. Callnumber : <>. doc type : <> Barcode : <> Date for the return : <>. <> -- End example --- C4/Acquisition.pm | 31 +++ C4/Letters.pm | 198 ++++++++------------ acqui/lateorders.pl | 18 ++- .../data/mysql/de-DE/mandatory/sample_notices.sql | 2 +- .../data/mysql/en/mandatory/sample_notices.sql | 2 +- .../data/mysql/es-ES/mandatory/sample_notices.sql | 2 +- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 2 +- installer/data/mysql/it-IT/necessari/notices.sql | 2 +- installer/data/mysql/kohastructure.sql | 2 + .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 2 +- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/optional/sample_notices.sql | 2 +- .../data/mysql/uk-UA/mandatory/sample_notices.sql | 2 +- .../data/mysql/uk-UA/optional/sample_notices.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 + .../intranet-tmpl/prog/en/css/staff-global.css | 8 + .../prog/en/modules/acqui/lateorders.tt | 39 ++++- 18 files changed, 190 insertions(+), 135 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 7127f24..6fe4804 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -61,6 +61,8 @@ BEGIN { &GetContracts &GetContract &GetItemnumbersFromOrder + + &AddClaim ); } @@ -1416,9 +1418,12 @@ sub GetLateOrders { DATE(aqbasket.closedate) AS orderdate, aqorders.rrp AS unitpricesupplier, aqorders.ecost AS unitpricelib, + aqorders.claims_count AS claims_count, + aqorders.claimed_date AS claimed_date, aqbudgets.budget_name AS budget, borrowers.branchcode AS branch, aqbooksellers.name AS supplier, + aqbooksellers.id AS supplierid, biblio.author, biblio.title, biblioitems.publishercode AS publisher, biblioitems.publicationyear, @@ -1480,6 +1485,7 @@ sub GetLateOrders { my @results; while (my $data = $sth->fetchrow_hashref) { $data->{orderdate} = format_date($data->{orderdate}); + $data->{claimed_date} = format_date($data->{claimed_date}); push @results, $data; } return @results; @@ -1742,6 +1748,31 @@ sub GetContract { return $result; } +=head3 AddClaim + +=over 4 + +&AddClaim($ordernumber); + +Add a claim for an order + +=back + +=cut +sub AddClaim { + my ($ordernumber) = @_; + my $dbh = C4::Context->dbh; + my $query = " + UPDATE aqorders SET + claims_count = claims_count + 1, + claimed_date = CURDATE() + WHERE ordernumber = ? + "; + my $sth = $dbh->prepare($query); + $sth->execute($ordernumber); + +} + 1; __END__ diff --git a/C4/Letters.pm b/C4/Letters.pm index 6846a00..0688c40 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -243,6 +243,7 @@ sub findrelatedto ($$) { sub SendAlerts { my ( $type, $externalid, $letter ) = @_; my $dbh = C4::Context->dbh; + my $strsth; if ( $type eq 'issue' ) { # warn "sending issues..."; @@ -290,99 +291,56 @@ sub SendAlerts { ); sendmail(%mail) or carp $Mail::Sendmail::error; -# warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; } } } elsif ( $type eq 'claimacquisition' ) { - # warn "sending issues..."; - my $letter = getletter( 'claimacquisition', $letter ); + $letter = getletter( 'claimacquisition', $letter ); # prepare the letter... # search the biblionumber - my $strsth = -"select aqorders.*,aqbasket.*,biblio.*,biblioitems.* from aqorders LEFT JOIN aqbasket on aqbasket.basketno=aqorders.basketno LEFT JOIN biblio on aqorders.biblionumber=biblio.biblionumber LEFT JOIN biblioitems on aqorders.biblioitemnumber=biblioitems.biblioitemnumber where aqorders.ordernumber IN (" - . join( ",", @$externalid ) . ")"; - my $sthorders = $dbh->prepare($strsth); - $sthorders->execute; - my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{booksellerid} ); - my $sthbookseller = - $dbh->prepare("select * from aqbooksellers where id=?"); - $sthbookseller->execute( $dataorders->[0]->{booksellerid} ); - my $databookseller = $sthbookseller->fetchrow_hashref; - - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; - } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; - } - } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; - - # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) - { - my %mail = ( - To => $databookseller->{bookselleremail} - . ( - $databookseller->{contemail} - ? "," . $databookseller->{contemail} - : "" - ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - } - if ( C4::Context->preference("LetterLog") ) { - logaction( - "ACQUISITION", - "Send Acquisition claim letter", - "", - "order list : " - . join( ",", @$externalid ) - . "\n$innerletter->{title}\n$innerletter->{content}" - ); + $strsth = qq{ + SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.*,aqbooksellers.* + FROM aqorders + LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno + LEFT JOIN biblio ON aqorders.biblionumber=biblio.biblionumber + LEFT JOIN biblioitems ON aqorders.biblioitemnumber=biblioitems.biblioitemnumber + LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id + WHERE aqorders.ordernumber IN ( } + . join( ",", @$externalid ) . ")"; } elsif ( $type eq 'claimissues' ) { - # warn "sending issues..."; - my $letter = getletter( 'claimissues', $letter ); + $letter = getletter( 'claimissues', $letter ); # prepare the letter... # search the biblionumber - my $strsth = -"select serial.*,subscription.*, biblio.* from serial LEFT JOIN subscription on serial.subscriptionid=subscription.subscriptionid LEFT JOIN biblio on serial.biblionumber=biblio.biblionumber where serial.serialid IN (" + $strsth = qq{ + SELECT serial.*,subscription.*, biblio.*, aqbooksellers.* + FROM serial + LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid + LEFT JOIN biblio ON serial.biblionumber=biblio.biblionumber + LEFT JOIN aqbooksellers ON subscription.aqbooksellerid=aqbooksellers.id + WHERE serial.serialid IN ( + } . join( ",", @$externalid ) . ")"; + } + + if ( $type eq 'claimacquisition' or $type eq 'claimissues' ) { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; - my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{aqbooksellerid} ); - my $sthbookseller = - $dbh->prepare("select * from aqbooksellers where id=?"); - $sthbookseller->execute( $dataorders->[0]->{aqbooksellerid} ); - my $databookseller = $sthbookseller->fetchrow_hashref; + my @fields = map { + $sthorders->{mysql_table}[$_] . "." . $sthorders->{NAME}[$_] } + (0 .. $#{$sthorders->{NAME}} ) ; + + my @orders_infos; + while ( my $row = $sthorders->fetchrow_arrayref() ) { + my %rec = (); + @rec{@fields} = @$row; + push @orders_infos, \%rec; + } # parsing branch info my $userenv = C4::Context->userenv; @@ -391,59 +349,65 @@ sub SendAlerts { # parsing librarian name $letter->{content} =~ s/<>/$userenv->{firstname}/g; $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; + $letter->{content} =~ s/<>/$userenv->{emailaddress}/g; + + # Get Fields remplacement + my $item_format = $1 if ( $letter->{content} =~ m/(.*<\/order>)/xms ); + + # Foreach field to remplace + while ( $letter->{content} =~ m/<<([^>]*)>>/g ) { + my $field = $1; + my $value = $orders_infos[0]->{$field} || ""; + $value = sprintf("%.2f", $value) if $field =~ /price/; + $letter->{content} =~ s/<<$field>>/$value/g; + } + + if ( $item_format ) { + # For each order + foreach my $infos ( @orders_infos ) { + my $order_content = $item_format; + # We replace by value + while ( $order_content =~ m/<<([^>]*)>>/g ) { + my $field = $1; + my $value = $infos->{$field} || ""; + $value = sprintf("%.2f", $value) if $field =~ /price/; + $order_content =~ s/(<<$field>>)/$value/g; } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; + $order_content =~ s/<\/{0,1}?item>//g; + $letter->{content} =~ s/.*<\/order>/$order_content\n$item_format/xms; } + $letter->{content} =~ s/.*<\/order>//xms; } - $letter->{content} =~ s/<<[^>]*>>//g; + my $innerletter = $letter; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) { - my $mail_to = $databookseller->{bookselleremail}; - if ($databookseller->{contemail}) { - if (!$mail_to) { - $mail_to = $databookseller->{contemail}; - } else { - $mail_to .= q|,|; - $mail_to .= $databookseller->{contemail}; - } - } - my $mail_subj = $innerletter->{title}; - my $mail_msg = $innerletter->{content}; - $mail_msg ||= q{}; - $mail_subj ||= q{}; - + if ( $orders_infos[0]->{'aqbooksellers.bookselleremail'} + || $orders_infos[0]->{'aqbooksellers.contemail'} ) { + my $to = $orders_infos[0]->{'aqbooksellers.bookselleremail'}; + $to .= ", " if $to; + $to .= $orders_infos[0]->{'aqbooksellers.contemail'} || ""; my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, + To => $to, + From => $userenv->{emailaddress}, + Subject => "" . $innerletter->{title}, + Message => "" . $innerletter->{content}, 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail) or carp $Mail::Sendmail::error; - logaction( - "ACQUISITION", - "CLAIM ISSUE", - undef, - "To=" - . $databookseller->{contemail} - . " Title=" - . $innerletter->{title} - . " Content=" - . $innerletter->{content} - ) if C4::Context->preference("LetterLog"); + warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; + if ( C4::Context->preference("LetterLog") ) { + logaction( "ACQUISITION", "Send Acquisition claim letter", "", "order list : " . join( ",", @$externalid ) . "\n$innerletter->{title}\n$innerletter->{content}" ) if $type eq 'claimacquisition'; + logaction( "ACQUISITION", "CLAIM ISSUE", undef, "To=" . $mail{To} . " Title=" . $innerletter->{title} . " Content=" . $innerletter->{content} ) if $type eq 'claimissues'; + } + } else { + die "This bookseller have no email\n"; } - } - # send an "account details" notice to a newly created user + + warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}"; + } + + # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { # must parse the password special, before it's hashed. $letter->{content} =~ s/<>/$externalid->{'password'}/g; diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 810f665..fe27de4 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -76,6 +76,19 @@ unless ($delay =~ /^\d{1,3}$/) { $delay = 30; #default value for delay } +if ($op and $op eq "send_alert"){ + my @ordernums = $input->param("claim_for");# FIXME: Fallback values? + eval { + SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value? + AddClaim ( $_ ) for @ordernums; + }; + if ( $@ ) { + $template->param(error_claim => $@); + } else { + $template->param(info_claim => "Emails have been sent"); + } +} + my %supplierlist = GetBooksellersWithLateOrders($delay); my (@sloopy); # supplier loop foreach (keys %supplierlist){ @@ -100,11 +113,6 @@ foreach (keys %$letters){ } $template->param(letters=>\@letters) if (@letters); -if ($op and $op eq "send_alert"){ - my @ordernums = $input->param("claim_for"); # FIXME: Fallback values? - SendAlerts('claimacquisition',\@ordernums,$input->param("letter_code")); # FIXME: Fallback value? -} - $template->param(ERROR_LOOP => \@errors) if (@errors); $template->param( lateorders => \@lateorders, diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 166c36d..0d172db 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <> <>,\n\nNach unseren Unterlagen haben Sie Medien entliehen, die nun ?berf?llig geworden sind. Unsere Bibliothek erhebt keine Mahngeb?hren, bitte geben Sie die entliehenen Medien schnellstm?glich zur?ck.\n\n<>\n<>\n<> <>\nTelefon: <>\nFax: <>\nEmail: <>\n\nSie k?nnen die ?berf?lligen Medien soweit m?glich auch direkt ?ber Ihr Benutzerkonto online verl?ngern. Wenn ein Medium l?nger als 30 Tage ?berf?llig ist, wird Ihr Benutzeraccount gesperrt und Sie k?nnen keine Medien mehr entleihen.\n\nDie folgenden Medien sind zur Zeit ?berf?llig:\n\n"<>" by <>, <>, Barcode: <> Geb?hr: EUR\n\nVielen Dank f?r die schnelle Erledigung.\n\n<> Ihr Bibliotheksteam\n'), -('claimacquisition','ACQCLAIM','Reklamation (Erwerbung)','Titel nicht eingetroffen','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> bestellt) (je $<> ?) sind nicht eingetroffen.'), +('claimacquisition','ACQCLAIM','Reklamation (Erwerbung)','Titel nicht eingetroffen','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> bestellt) (je $<> ?) sind nicht eingetroffen.'), ('serial','RLIST','Umlaufliste','Zeitschrift ist jetzt verf?gbar','<> <>,\r\n\r\nDas folgende Heft ist jetzt verf?gbar:\r\n\r\n<>, <> (<>)\r\n\r\nBitte holen Sie es sobald m?glich ab.'), ('members','ACCTDETAILS','Kontoinformationen - Standard','Ihr neues Benutzerkonto','Liebe/r <> <> <>.\r\n\r\nDie Daten Ihres neuen Benutzerkontos sind:\r\n\r\nBenutzer: <>\r\nPasswort: <>\r\n\r\nWenn Sie Probleme in Hinsicht auf Ihr Benutzerkonto haben, wenden Sie sich bitte an die Bibliothek.\r\n\r\nVielen Dank,\r\nIhr Bibliotheksteam'), ('circulation','DUE','F?lligkeitsbenachrichtigung','F?lligkeitsbenachrichtigung','Liebe/r <> <>,\r\n\r\nDie folgenden Medien sind ab heute f?llig:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..5ca7eaf 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 689fa0f..78b80fa 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..9e9f66d 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -2,7 +2,7 @@ INSERT IGNORE INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 689fa0f..78b80fa 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 452173d..c79c4b9 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2631,6 +2631,8 @@ CREATE TABLE `aqorders` ( `sort1_authcat` varchar(10) default NULL, `sort2_authcat` varchar(10) default NULL, `uncertainprice` tinyint(1), + `claims_count` int(11) default 0, + `claimed_date` date default NULL, PRIMARY KEY (`ordernumber`), KEY `basketno` (`basketno`), KEY `biblionumber` (`biblionumber`), diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index cdb5529..762da91 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -21,7 +21,7 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Purring','Purring p? dokument','<> <>,\n\nDu har l?n som skulle v?rt levert. Biblioteket krever ikke inn gebyrer, men vennligst lever eller forny l?net/l?nene ved biblioteket.\n\n<>\n<>\n<> <>\nTelefon: <>\nFax: <>\nE-post: <>\n\nDersom du har et passord og l?net/l?nene kan fornyes kan du gj?re dette p? nettet. Dersom du overskrider l?netiden med mer enn 30 dager vil l?nekortet bli sperret.\n\nF?lgende l?n har g?tt over tiden:\n\n"<>" av <>, <>, Strekkode: <> Gebyr: GBP\n\nP? forh?nd takk.\n\n<>\n'), -('claimacquisition','ACQCLAIM','Periodikapurring','Eksemplar ikke mottatt','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nBestillingsnummer <> (<>) (<> ordered) ($<> each) har ikke blitt mottatt.'), +('claimacquisition','ACQCLAIM','Periodikapurring','Eksemplar ikke mottatt','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nBestillingsnummer <> (<>) (<> ordered) ($<> each) har ikke blitt mottatt.'), ('serial','RLIST','Sirkulasjon','Et dokument er n? tilgjengelig','<> <>,\r\n\r\nDette dokumentet er tilgjengelig:\r\n\r\n<>, <> (<>)\r\n\r\nVennligst kom og hent det n?r det passer.'), ('members','ACCTDETAILS','Mal for kontodetaljer - STANDARD','Dine nye kontodetaljer i Koha.','Hei <> <> <>.\r\n\r\nDine nye detaljer er:\r\n\r\nBruker: <>\r\nPassord: <>\r\n\r\nDersom det oppst?r problemer, vennligst kontakt biblioteket.\r\n\r\nVennlig hilsen,\r\nBiblioteket\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Innleveringsp?minnelse','Innleveringsp?minnelse','<> <>,\r\n\r\nDette dokumentet m? n? leveres:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..c101b0b 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -2,7 +2,7 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice', 'Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..5ca7eaf 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/ru-RU/optional/sample_notices.sql b/installer/data/mysql/ru-RU/optional/sample_notices.sql index 4f2001e..e2d6d99 100644 --- a/installer/data/mysql/ru-RU/optional/sample_notices.sql +++ b/installer/data/mysql/ru-RU/optional/sample_notices.sql @@ -5,7 +5,7 @@ INSERT INTO `letter` VALUES ('circulation','ODUE','??????????? ? ?????????','??????? ???????????','???????? <> <>,\r\n\r\n?? ????? ???????? ???????, ? ??? ???? ????????????? ??????????. ???? ?????????? ?? ??????? ?????? ?? ?????????, ??, ??????????, ????????? ??? ???????? ?? ??? ????? ??????.\r\n\r\n<><><><><><><>???? ?? ???????????????? ?????? ? ??????????, ?? ?????? ???????????? ??? ? ????? ??????? ????????????? ?????? ??? ??????????? ??????. ???? ????????? ????? ????????? ????? ??? ?? 30 ????, ?? ?? ??????? ???????????? ??? ???????????? ????? ???? ?? ??????? ?????????. ????????? ????????? ? ????????? ????? ???????? ????????????:\r\n\r\n<>'), -('claimacquisition','ACQCLAIM','?????????? ????????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????? <> (<>) (<> ??????) ???????? ?? ????.'), +('claimacquisition','ACQCLAIM','?????????? ????????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????? <> (<>) (<> ??????) ???????? ?? ????.'), ('serial','RLIST','?????? ??????????','?????????? ??????? ??? ?????????','<> <>,\r\n\r\n????????? ?????? ??? ????????:\r\n\r\n<>\r\n\r\n??????? ??????? ??? ? ????? ??????? ??? ??? ?????.'), diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..6ab0e18 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -1,6 +1,6 @@ INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: GBP\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n'), -('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), +('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin at yoursite.org'), ('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <> <>,\r\n\r\nThe following item is now due:\r\n\r\n<>, <> (<>)'), diff --git a/installer/data/mysql/uk-UA/optional/sample_notices.sql b/installer/data/mysql/uk-UA/optional/sample_notices.sql index 6df324b..790ea5d 100644 --- a/installer/data/mysql/uk-UA/optional/sample_notices.sql +++ b/installer/data/mysql/uk-UA/optional/sample_notices.sql @@ -5,7 +5,7 @@ INSERT INTO `letter` VALUES ('circulation','ODUE','???????????? ??? ????????????','??????? ???????????','???????? <> <>,\r\n\r\n?? ????? ???????? ???????, ? ??? ? ??????????? ??????????. ???? ?????????? ?? ?????? ?????? ?? ??????????, ???, ???? ?????, ????????? ??? ??????? ?? ?? ????? ??????.\r\n\r\n<><><><><><><>???? ?? ????????????? ?????? ? ??????????, ?? ?????? ??????????????? ???? ? ????? ??????? ????????????? ?????? ??? ??????????? ??????. ???? ????????? ??? ???????????? ????? ??? ?? 30 ????, ?? ?? ??????? ??????????????? ??? ????????? ?????? ???? ?? ????????? ?????????. ????????? ????????? ? ????? ??? ? ????????????:\r\n\r\n<>'), -('claimacquisition','ACQCLAIM','?????? ?????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????????? <> (<>) (<> ?????????) (<> ??????) ???????? ?? ????.'), +('claimacquisition','ACQCLAIM','?????? ?????????','????????? ?? ????????','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\n????? ?????????? <> (<>) (<> ?????????) (<> ??????) ???????? ?? ????.'), ('serial','RLIST','?????? ???????????','????????? ??????? ??? ????????','<> <>,\r\n\r\n????????? ?????? ??? ?????????:\r\n\r\n<>\r\n\r\n???????? ??????? ???? ? ????-???? ??????? ??? ??? ???.'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b5f96ef..8f493b2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4578,6 +4578,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("ALTER TABLE `aqorders` ADD COLUMN `claims_count` INT(11) DEFAULT 0, ADD COLUMN `claimed_date` DATE DEFAULT NULL AFTER `claims_count`"); + print "Upgrade to $DBversion done (Add claims_count and claimed_date fields in aqorders table)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) 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 4e2bb3e..dc1659f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2085,3 +2085,11 @@ div.pager input.pagedisplay { font-weight: bold; text-align : center; } + +div.info { + border : 2px dashed #990000; + background-color : #99FFCC; + padding : .5em; + margin : 1em; +} + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 1e64e1f..165f5c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -1,6 +1,20 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Late orders [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'header.inc' %] @@ -17,6 +31,12 @@

    [% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders

    +[% IF error_claim %] +
    [% error_claim %]
    +[% END %] +[% IF info_claim %] +
    [% info_claim %]
    +[% END %] [% IF ( lateorders ) %]
    @@ -35,12 +55,20 @@
    Information Total cost Basket Claims countClaimed date
    + ([% lateorder.supplierid %]) [% lateorder.orderdate %] ([% lateorder.latesince %] days) [% lateorder.claims_count %][% lateorder.claimed_date %] - + [% UNLESS lateorder.budget_lock %] + + [% END %] +
      [% total %]    
    + + + + + + + [% FOREACH title IN titles %] + [% IF ( title.even ) %] + + [% ELSE %] + + [% END %] + + + + + [% END %] +
    TitleLocation 
    [% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title |html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield %][% END %] + [% title.author %] +

    [% IF ( title.publishercode ) %]- [% title.publishercode|html %] + [% IF ( title.place ) %] [% title.place %][% END %][% END %] + [% IF ( title.pages ) %] - [% title.pages %][% IF ( title.size ) %] [% title.size %] + [% END %] + [% END %]

    + [% IF ( title.notes ) %] +

    [% title.notes |html%]

    [% END %] + [% IF ( title.TagLoop ) %]

    Tagged with: [% FOREACH TagLoo IN title.TagLoop %] + [% TagLoo.term |html %] ([% TagLoo.weight_total %])[% IF ( loop.last ) %][% ELSE %], [% END %] + [% END %]

    + [% END %] +
    [% IF ( title.items ) %]
      [% FOREACH item IN title.items %] +
    • + [% item.branchname %] [% item.location_description %] + [% IF ( item.itemcallnumber ) %] + ([% item.itemcallnumber %]) + [% END %] +
    • + [% END %]
    [% ELSE %]This record has no items.[% END %] +
    +[% ELSE %] +
    There are no titles tagged with the term [% tag %]
    +[% END %] + +
    +
    + +
    +[% INCLUDE 'intranet-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index 5d025af..843f7ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -217,7 +217,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% ELSE %] [% END %] - [% tagloo.term %] + [% tagloo.term %] [% tagloo.weight_total %] diff --git a/tags/list.pl b/tags/list.pl new file mode 100755 index 0000000..7b16ce5 --- /dev/null +++ b/tags/list.pl @@ -0,0 +1,81 @@ +#!/usr/bin/perl + +# Copyright 2011 Athens County Public Libraries +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use warnings; +use strict; +use CGI; + +use C4::Auth qw(:DEFAULT check_cookie_auth); +use C4::Biblio; +use C4::Context; +use C4::Dates qw(format_date); +use C4::Items; +use C4::Koha; +use C4::Tags 0.03 qw(get_tags remove_tag get_tag_rows); +use C4::Output; + +my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. + +my $query = CGI->new; +my $op = $query->param('op') || ''; +my $biblionumber = $query->param('biblionumber'); +my $tag = $query->param('tag'); +my $tag_id = $query->param('tag_id'); + +my ($template, $borrowernumber, $cookie) = get_template_and_user({ + template_name => "tags/list.tmpl", + query => $query, + type => "intranet", + debug => 1, + authnotrequired => 0, + flagsrequired => $needed_flags, +}); + +if( $op eq "del" ){ + remove_tag($tag_id); + print $query->redirect("/cgi-bin/koha/tags/list.pl?tag=$tag"); +} else { + +my $marcflavour = C4::Context->preference('marcflavour'); +my @results; + +if ($tag) { + my $taglist = get_tag_rows({term=>$tag}); + for ( @{$taglist} ) { + my $dat = &GetBiblioData($_->{biblionumber}); + my $record = &GetMarcBiblio($_->{biblionumber}); + $dat->{'subtitle'} = GetRecordValue('subtitle', $record, GetFrameworkCode($_->{biblionumber})); + my @items = GetItemsInfo( $_->{biblionumber} ); + $dat->{biblionumber} = $_->{biblionumber}; + $dat->{tag_id} = $_->{tag_id}; + $dat->{items} = \@items; + $dat->{TagLoop} = get_tags({biblionumber=>$_->{biblionumber}, 'sort'=>'-weight',limit=>10 }); + push( @results, $dat ); + } + +my $resultsarray = \@results; + +$template->param( + tag => $tag, + titles => $resultsarray, +); +} +} + +output_html_with_http_headers $query, $cookie, $template->output; -- 1.7.3 From adrien.saurat at biblibre.com Fri Dec 16 16:54:37 2011 From: adrien.saurat at biblibre.com (Adrien Saurat) Date: Fri, 16 Dec 2011 16:54:37 +0100 Subject: [Koha-patches] [PATCH] Bug 7363: allows downloading of lists in CSV format Message-ID: <1324050877-11958-1-git-send-email-adrien.saurat@biblibre.com> Getting a list in CSV format was impossible because the shelfid parameter was empty in the URL. --- .../prog/en/includes/virtualshelves-toolbar.inc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc index 3f14e51..18304a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc @@ -38,7 +38,7 @@ { text: _("RIS"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&shelfid=[% shelfnumber %]" }, { text: _("BibTex"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&shelfid=[% shelfnumber %]" }, [% FOREACH csv_profile IN csv_profiles %] - { text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% csv_profile.shelfnumber %]" }, + { text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% shelfnumber %]" }, [% END %] ]; @@ -96,4 +96,4 @@ [% END %]
    - \ No newline at end of file + -- 1.7.4.1 From oleonard at myacpl.org Fri Dec 16 22:37:30 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 16 Dec 2011 16:37:30 -0500 Subject: [Koha-patches] [PATCH] Bug 5503 - comments shouldn't show patron's full name Message-ID: <1324071450-28388-1-git-send-email-oleonard@myacpl.org> Adding a few choices for what information can be displayed alongside comments in the OPAC: - nothing - full name - first name - last name - first name and last name first initial - username --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 8 +++++ .../prog/en/modules/admin/preferences/opac.pref | 11 +++++-- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 30 ++++++++++++------- .../opac-tmpl/prog/en/modules/opac-showreviews.tt | 16 +++++++++- opac/opac-showreviews.pl | 2 + 6 files changed, 52 insertions(+), 17 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 128c9b2..1f603f5 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -103,7 +103,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer','full','Choose how a commenter\'s identity is presented alongside comments in the OPAC','none|full|first|surname|firstandinitial|username','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewerPhoto',1,'If ON, photo of reviewer will be shown beside comments in OPAC','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory','simplified','Define the display preference for serials issue history in OPAC','simplified|full','Choice'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0063a75..e4266b0 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4578,6 +4578,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.02.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(" UPDATE `koha`.`systempreferences` SET `value` = 'none', `options` = 'none|full|first|surname|firstandinitial|username', `explanation` = 'Choose how a commenter\'s identity is presented alongside comments in the OPAC', `type` = 'Choice' WHERE `systempreferences`.`variable` = 'ShowReviewer' AND `systempreferences`.`variable` = 0"); + $dbh->do(" UPDATE `koha`.`systempreferences` SET `value` = 'full', `options` = 'none|full|first|surname|firstandinitial|username', `explanation` = 'Choose how a commenter\'s identity is presented alongside comments in the OPAC', `type` = 'Choice' WHERE `systempreferences`.`variable` = 'ShowReviewer' AND `systempreferences`.`variable` = 1"); + print "Adding additional options for the display of commenter's identity in the OPAC: Full name, first name, last name, first name and last name first initial, username, or no information\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index d6ae2b2..cd051de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -270,11 +270,16 @@ OPAC: no: "Don't allow" - patrons to make comments on items on the OPAC. - + - Show - pref: ShowReviewer choices: - yes: Show - no: Hide - - reviewer's name above comments in OPAC. + none: no name + full: full name + first: first name + surname: last name + firstandinitial: first name and last name initial + username: username + - of commenter with comments in OPAC. - - pref: ShowReviewerPhoto choices: diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index d1b6570..ba987c9 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -865,18 +865,26 @@ YAHOO.util.Event.onContentReady("furtherm", function () {

  • [% ELSE %]
    - [% IF ( ShowReviewer ) %] - [% IF ( review.avatarurl ) %] - - [% END %] -
    - Comment by - [% review.title %] - [% review.firstname %] - [% review.surname %] -
    + [% IF ( ShowReviewer != "none" ) %] + [% IF ( review.avatarurl ) %] + + [% END %] + [% SWITCH ShowReviewer %] + [% CASE 'full' %] +
    Comment by [% review.title %] [% review.firstname %] [% review.surname %]
    + [% CASE 'first' %] +
    Comment by [% review.firstname %]
    + [% CASE 'surname' %] +
    Comment by [% review.surname %]
    + [% CASE 'firstandinitial' %] +
    Comment by [% review.firstname %] [% review.surname|truncate(2,'.') %]
    + [% CASE 'username' %] +
    Comment by [% review.userid %]
    + [% END %] + [% review.datereviewed %] + [% ELSIF ( ShowReviewer == "none") %] +
    Patron comment on [% review.datereviewed %]
    [% END %] - [% review.datereviewed %]

    [% review.review %]

    diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt index d9a630f..9370767 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt @@ -52,8 +52,20 @@ $(document).ready(function(){ [% END %] [% review.review |html %] Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by you[% ELSE %] - [% IF ( ShowReviewer ) %] by - [% review.firstname %] [% review.surname %][% END %][% END %]

    + [% IF ( ShowReviewer != "none" ) %] by + [% SWITCH ShowReviewer %] + [% CASE 'full' %] + [% review.borrtitle %] [% review.firstname %] [% review.surname %] + [% CASE 'first' %] + [% review.firstname %] + [% CASE 'surname' %] + [% review.surname %] + [% CASE 'firstandinitial' %] + [% review.firstname %] [% review.surname|truncate(2,'.') %] + [% CASE 'username' %] + [% review.userid %] + [% END %] + [% END %][% END %]

    diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl index 74f4684..449ffcd 100755 --- a/opac/opac-showreviews.pl +++ b/opac/opac-showreviews.pl @@ -101,8 +101,10 @@ for my $result (@$reviews){ $result->{size} = $bib->{'size'}; $result->{notes} = $bib->{'notes'}; $result->{timestamp} = $bib->{'timestamp'}; + $result->{borrtitle} = $borr->{'title'}; $result->{firstname} = $borr->{'firstname'}; $result->{surname} = $borr->{'surname'}; + $result->{userid} = $borr->{'userid'}; if ($libravatar_enabled and $borr->{'email'}) { $result->{avatarurl} = libravatar_url(email => $borr->{'email'}, size => 40, https => $ENV{HTTPS}); } -- 1.7.5.4 From srdjan at catalyst.net.nz Mon Dec 19 02:56:01 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 19 Dec 2011 14:56:01 +1300 Subject: [Koha-patches] [PATCH] bug_7001: Issue and Reserve slips are notices. In-Reply-To: References: Message-ID: <1324259761-30801-1-git-send-email-srdjan@catalyst.net.nz> Branches can have their own version of notices - added branchcode to letter table. Support html notices - added is_html to letter table. GetPreparedletter() is the interface for compiling letters (notices). Sysprefs for notice and slips stylesheets. --- C4/Circulation.pm | 20 +- C4/Letters.pm | 583 +++++++++++++------- C4/Members.pm | 81 +++- C4/Message.pm | 12 +- C4/Print.pm | 139 ++---- C4/Reserves.pm | 103 +++-- C4/Suggestions.pm | 22 +- acqui/booksellers.pl | 7 +- circ/circulation.pl | 3 +- circ/hold-transfer-slip.pl | 27 +- .../data/mysql/de-DE/mandatory/sample_notices.sql | 2 +- .../data/mysql/en/mandatory/sample_notices.sql | 84 +++- .../data/mysql/es-ES/mandatory/sample_notices.sql | 2 +- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 2 +- installer/data/mysql/it-IT/necessari/notices.sql | 2 +- installer/data/mysql/kohastructure.sql | 4 +- .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 2 +- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 2 +- installer/data/mysql/sysprefs.sql | 3 + .../data/mysql/uk-UA/mandatory/sample_notices.sql | 2 +- installer/data/mysql/updatedatabase.pl | 98 ++++- .../prog/en/includes/circ-toolbar.inc | 4 +- .../en/modules/admin/preferences/circulation.pref | 5 + .../en/modules/admin/preferences/staff_client.pref | 5 + .../prog/en/modules/batch/print-notices.tt | 6 +- .../prog/en/modules/circ/hold-transfer-slip.tt | 54 -- .../prog/en/modules/circ/printslip.tt | 28 + .../prog/en/modules/members/moremember-receipt.tt | 76 --- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 113 +++- members/memberentry.pl | 5 +- members/moremember.pl | 10 - members/printslip.pl | 89 +++ misc/cronjobs/advance_notices.pl | 78 ++-- misc/cronjobs/gather_print_notices.pl | 14 +- misc/cronjobs/overdue_notices.pl | 84 ++-- t/db_dependent/lib/KohaTest/Letters.pm | 5 +- t/db_dependent/lib/KohaTest/Letters/GetLetter.pm | 3 +- t/db_dependent/lib/KohaTest/Members.pm | 1 + t/db_dependent/lib/KohaTest/Print.pm | 5 +- t/db_dependent/lib/KohaTest/Reserves.pm | 1 + tools/letter.pl | 214 +++++--- 42 files changed, 1260 insertions(+), 742 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt create mode 100755 members/printslip.pl diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a6f4f2..cff3fa7 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2655,11 +2655,18 @@ sub SendCirculationAlert { borrowernumber => $borrower->{borrowernumber}, message_name => $message_name{$type}, }); - my $letter = C4::Letters::getletter('circulation', $type); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'borrowers', $borrower->{borrowernumber}); - C4::Letters::parseletter($letter, 'branches', $branch); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $type, + branchcode => $branch, + tables => { + 'biblio' => $item->{biblionumber}, + 'biblioitems' => $item->{biblionumber}, + 'borrowers' => $borrower, + 'branches' => $branch, + } + ) or return; + my @transports = @{ $borrower_preferences->{transports} }; # warn "no transports" unless @transports; for (@transports) { @@ -2674,7 +2681,8 @@ sub SendCirculationAlert { $message->update; } } - $letter; + + return $letter; } =head2 updateWrongTransfer diff --git a/C4/Letters.pm b/C4/Letters.pm index 2420e4a..7f195d6 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -26,6 +26,7 @@ use Encode; use Carp; use C4::Members; +use C4::Members::Attributes qw(GetBorrowerAttributes); use C4::Branch; use C4::Log; use C4::SMS; @@ -42,7 +43,7 @@ BEGIN { $VERSION = 3.01; @ISA = qw(Exporter); @EXPORT = qw( - &GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts GetPrintMessages + &GetLetters &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages ); } @@ -117,13 +118,26 @@ sub GetLetters (;$) { return \%letters; } -sub getletter ($$) { - my ( $module, $code ) = @_; +my %letter; +sub getletter ($$$) { + my ( $module, $code, $branchcode ) = @_; + + if (C4::Context->preference('IndependantBranches') && $branchcode){ + $$branchcode = C4::Context->userenv->{'branch'}; + } + + if ( my $l = $letter{$module}{$code}{$branchcode} ) { + return { %$l }; # deep copy + } + my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("select * from letter where module=? and code=?"); - $sth->execute( $module, $code ); - my $line = $sth->fetchrow_hashref; - return $line; + my $sth = $dbh->prepare("select * from letter where module=? and code=? and (branchcode = ? or branchcode = '') order by branchcode desc limit 1"); + $sth->execute( $module, $code, $branchcode ); + my $line = $sth->fetchrow_hashref + or return; + $line->{'content-type'} = 'text/html; charset="UTF-8"' if $line->{is_html}; + $letter{$module}{$code}{$branchcode} = $line; + return { %$line }; } =head2 addalert ($borrowernumber, $type, $externalid) @@ -178,7 +192,7 @@ sub delalert ($) { sub getalert (;$$$) { my ( $borrowernumber, $type, $externalid ) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT * FROM alert WHERE"; + my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE"; my @bind; if ($borrowernumber and $borrowernumber =~ /^\d+$/) { $query .= " borrowernumber=? AND "; @@ -234,70 +248,65 @@ sub findrelatedto ($$) { parameters : - $type : the type of alert - $externalid : the id of the "object" to query - - $letter : the letter to send. + - $letter_code : the letter to send. send an alert to all borrowers having put an alert on a given subject. =cut sub SendAlerts { - my ( $type, $externalid, $letter ) = @_; + my ( $type, $externalid, $letter_code ) = @_; my $dbh = C4::Context->dbh; if ( $type eq 'issue' ) { - # warn "sending issues..."; - my $letter = getletter( 'serial', $letter ); - # prepare the letter... # search the biblionumber my $sth = $dbh->prepare( "SELECT biblionumber FROM subscription WHERE subscriptionid=?"); $sth->execute($externalid); - my ($biblionumber) = $sth->fetchrow; - - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - - # parsing biblio information - parseletter( $letter, 'biblio', $biblionumber ); - parseletter( $letter, 'biblioitems', $biblionumber ); + my ($biblionumber) = $sth->fetchrow + or warn( "No subscription for '$externalid'" ), + return; + my %letter; # find the list of borrowers to alert my $alerts = getalert( '', 'issue', $externalid ); foreach (@$alerts) { - # and parse borrower ... - my $innerletter = $letter; my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'}); - parseletter( $innerletter, 'borrowers', $_->{'borrowernumber'} ); + my $email = $borinfo->{email} or next; + + # warn "sending issues..."; + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'serial', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $_->{branchcode}, + 'biblio' => $biblionumber, + 'biblioitems' => $biblionumber, + 'borrowers' => $borinfo, + }, + want_librarian => 1, + ) or return; # ... then send mail - if ( $borinfo->{email} ) { - my %mail = ( - To => $borinfo->{email}, - From => $borinfo->{email}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - + my %mail = ( + To => $email, + From => $email, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; # warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; - } } } elsif ( $type eq 'claimacquisition' ) { # warn "sending issues..."; - my $letter = getletter( 'claimacquisition', $letter ); # prepare the letter... # search the biblionumber @@ -307,52 +316,43 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{booksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{booksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; - } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimacquisition', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) - { - my %mail = ( - To => $databookseller->{bookselleremail} - . ( - $databookseller->{contemail} - ? "," . $databookseller->{contemail} - : "" - ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + if ( C4::Context->preference("LetterLog") ) { logaction( "ACQUISITION", @@ -360,16 +360,13 @@ sub SendAlerts { "", "order list : " . join( ",", @$externalid ) - . "\n$innerletter->{title}\n$innerletter->{content}" + . "\n$letter->{title}\n$letter->{content}" ); } } elsif ( $type eq 'claimissues' ) { # warn "sending issues..."; - my $letter = getletter( 'claimissues', $letter ); - - # prepare the letter... # search the biblionumber my $strsth = "select serial.*,subscription.*, biblio.* from serial LEFT JOIN subscription on serial.subscriptionid=subscription.subscriptionid LEFT JOIN biblio on serial.biblionumber=biblio.biblionumber where serial.serialid IN (" @@ -377,81 +374,76 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{aqbooksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{aqbooksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; - } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + # prepare the letter... + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimissues', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) { - my $mail_to = $databookseller->{bookselleremail}; - if ($databookseller->{contemail}) { - if (!$mail_to) { - $mail_to = $databookseller->{contemail}; - } else { - $mail_to .= q|,|; - $mail_to .= $databookseller->{contemail}; - } - } - my $mail_subj = $innerletter->{title}; - my $mail_msg = $innerletter->{content}; - $mail_msg ||= q{}; - $mail_subj ||= q{}; + my $mail_subj = $letter->{title}; + my $mail_msg = $letter->{content}; + $mail_msg ||= q{}; + $mail_subj ||= q{}; - my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - logaction( - "ACQUISITION", - "CLAIM ISSUE", - undef, - "To=" - . $databookseller->{contemail} - . " Title=" - . $innerletter->{title} - . " Content=" - . $innerletter->{content} - ) if C4::Context->preference("LetterLog"); - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => $mail_subj, + Message => $mail_msg, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + + logaction( + "ACQUISITION", + "CLAIM ISSUE", + undef, + "To=" + . $databookseller->{contemail} + . " Title=" + . $letter->{title} + . " Content=" + . $letter->{content} + ) if C4::Context->preference("LetterLog"); } # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { - # must parse the password special, before it's hashed. - $letter->{content} =~ s/<>/$externalid->{'password'}/g; - - parseletter( $letter, 'borrowers', $externalid->{'borrowernumber'}); - parseletter( $letter, 'branches', $externalid->{'branchcode'} ); - my $branchdetails = GetBranchDetail($externalid->{'branchcode'}); + my $letter = GetPreparedLetter ( + module => 'members', + letter_code => $letter_code, + branchcode => $externalid->{'branchcode'}, + tables => { + 'branches' => $branchdetails, + 'borrowers' => $externalid->{'borrowernumber'}, + }, + substitute => { 'borrowers.password' => $externalid->{'password'} }, + want_librarian => 1, + ) or return; + my %mail = ( To => $externalid->{'emailaddr'}, From => $branchdetails->{'branchemail'} || C4::Context->preference("KohaAdminEmailAddress"), @@ -463,24 +455,148 @@ sub SendAlerts { } } -=head2 parseletter($letter, $table, $pk) - - parameters : - - $letter : a hash to letter fields (title & content useful) - - $table : the Koha table to parse. - - $pk : the primary key to query on the $table table - parse all fields from a table, and replace values in title & content with the appropriate value - (not exported sub, used only internally) +=head2 GetPreparedLetter( %params ) + + %params hash: + module => letter module, mandatory + letter_code => letter code, mandatory + branchcode => for letter selection, if missing default system letter taken + tables => a hashref with table names as keys. Values are either: + - a scalar - primary key value + - an arrayref - primary key values + - a hashref - full record + substitute => custom substitution key/value pairs + repeat => records to be substituted on consecutive lines: + - an arrayref - tries to guess what needs substituting by + taking remaining << >> tokensr; not recommended + - a hashref token => @tables - replaces << >> << >> + subtemplate for each @tables row; table is a hashref as above + want_librarian => boolean, if set to true triggers librarian details + substitution from the userenv + Return value: + letter fields hashref (title & content useful) =cut -our %handles = (); -our %columns = (); +sub GetPreparedLetter { + my %params = @_; + + my $module = $params{module} or croak "No module"; + my $letter_code = $params{letter_code} or croak "No letter_code"; + my $branchcode = $params{branchcode} || ''; + + my $letter = getletter( $module, $letter_code, $branchcode ) + or warn( "No $module $letter_code letter"), + return; + + my $tables = $params{tables}; + my $substitute = $params{substitute}; + my $repeat = $params{repeat}; + $tables || $substitute || $repeat + or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), + return; + my $want_librarian = $params{want_librarian}; + + if ($substitute) { + while ( my ($token, $val) = each %$substitute ) { + $letter->{title} =~ s/<<$token>>/$val/g; + $letter->{content} =~ s/<<$token>>/$val/g; + } + } + + if ($want_librarian) { + # parsing librarian name + my $userenv = C4::Context->userenv; + $letter->{content} =~ s/<>/$userenv->{firstname}/go; + $letter->{content} =~ s/<>/$userenv->{surname}/go; + $letter->{content} =~ s/<>/$userenv->{emailaddress}/go; + } + + my ($repeat_no_enclosing_tags, $repeat_enclosing_tags); + + if ($repeat) { + if (ref ($repeat) eq 'ARRAY' ) { + $repeat_no_enclosing_tags = $repeat; + } else { + $repeat_enclosing_tags = $repeat; + } + } + + if ($repeat_enclosing_tags) { + while ( my ($tag, $tag_tables) = each %$repeat_enclosing_tags ) { + if ( $letter->{content} =~ m!<$tag>(.*)!s ) { + my $subcontent = $1; + my @lines = map { + my %subletter = ( title => '', content => $subcontent ); + _substitute_tables( \%subletter, $_ ); + $subletter{content}; + } @$tag_tables; + $letter->{content} =~ s!<$tag>.*!join( "\n", @lines )!se; + } + } + } + + if ($tables) { + _substitute_tables( $letter, $tables ); + } + + if ($repeat_no_enclosing_tags) { + if ( $letter->{content} =~ m/[^\n]*<<.*>>[^\n]*/so ) { + my $line = $&; + my $i = 1; + my @lines = map { + my $c = $line; + $c =~ s/<>/$i/go; + foreach my $field ( keys %{$_} ) { + $c =~ s/(<<[^\.]+.$field>>)/$_->{$field}/; + } + $i++; + $c; + } @$repeat_no_enclosing_tags; + + my $replaceby = join( "\n", @lines ); + $letter->{content} =~ s/\Q$line\E/$replaceby/s; + } + } + + $letter->{content} =~ s/<<\S*>>//go; #remove any stragglers +# $letter->{content} =~ s/<<[^>]*>>//go; + + return $letter; +} + +sub _substitute_tables { + my ( $letter, $tables ) = @_; + while ( my ($table, $param) = each %$tables ) { + next unless $param; + + my $ref = ref $param; -sub parseletter_sth { + my $values; + if ($ref && $ref eq 'HASH') { + $values = $param; + } + else { + my @pk; + my $sth = _parseletter_sth($table); + unless ($sth) { + warn "_parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; + return; + } + $sth->execute( $ref ? @$param : $param ); + + $values = $sth->fetchrow_hashref; + } + + _parseletter ( $letter, $table, $values ); + } +} + +my %handles = (); +sub _parseletter_sth { my $table = shift; unless ($table) { - carp "ERROR: parseletter_sth() called without argument (table)"; + carp "ERROR: _parseletter_sth() called without argument (table)"; return; } # check cache first @@ -494,9 +610,12 @@ sub parseletter_sth { ($table eq 'borrowers' ) ? "SELECT * FROM $table WHERE borrowernumber = ?" : ($table eq 'branches' ) ? "SELECT * FROM $table WHERE branchcode = ?" : ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE suggestionid = ?" : - ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : undef ; + ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : + ($table eq 'aqorders' ) ? "SELECT * FROM $table WHERE ordernumber = ?" : + ($table eq 'opac_news' ) ? "SELECT * FROM $table WHERE idnew = ?" : + undef ; unless ($query) { - warn "ERROR: No parseletter_sth query for table '$table'"; + warn "ERROR: No _parseletter_sth query for table '$table'"; return; # nothing to get } unless ($handles{$table} = C4::Context->dbh->prepare($query)) { @@ -506,25 +625,21 @@ sub parseletter_sth { return $handles{$table}; # now cache is populated for that $table } -sub parseletter { - my ( $letter, $table, $pk, $pk2 ) = @_; - unless ($letter) { - carp "ERROR: parseletter() 1st argument 'letter' empty"; - return; - } - my $sth = parseletter_sth($table); - unless ($sth) { - warn "parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; - return; - } - if ( $pk2 ) { - $sth->execute($pk, $pk2); - } else { - $sth->execute($pk); - } +=head2 _parseletter($letter, $table, $values) - my $values = $sth->fetchrow_hashref; - + parameters : + - $letter : a hash to letter fields (title & content useful) + - $table : the Koha table to parse. + - $values : table record hashref + parse all fields from a table, and replace values in title & content with the appropriate value + (not exported sub, used only internally) + +=cut + +my %columns = (); +sub _parseletter { + my ( $letter, $table, $values ) = @_; + # TEMPORARY hack until the expirationdate column is added to reserves if ( $table eq 'reserves' && $values->{'waitingdate'} ) { my @waitingdate = split /-/, $values->{'waitingdate'}; @@ -538,16 +653,51 @@ sub parseletter { )->output(); } + if ($letter->{content} && $letter->{content} =~ /<>/) { + my @da = localtime(); + my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); + $letter->{content} =~ s/<>/$todaysdate/go; + } # and get all fields from the table - my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table"); - $columns->execute; - while ( ( my $field ) = $columns->fetchrow_array ) { - my $replacefield = "<<$table.$field>>"; - $values->{$field} =~ s/\p{P}(?=$)//g if $values->{$field}; - my $replacedby = $values->{$field} || ''; - ($letter->{title} ) and $letter->{title} =~ s/$replacefield/$replacedby/g; - ($letter->{content}) and $letter->{content} =~ s/$replacefield/$replacedby/g; +# my $columns = $columns{$table}; +# unless ($columns) { +# $columns = $columns{$table} = C4::Context->dbh->selectcol_arrayref("SHOW COLUMNS FROM $table"); +# } +# foreach my $field (@$columns) { + + while ( my ($field, $val) = each %$values ) { + my $replacetablefield = "<<$table.$field>>"; + my $replacefield = "<<$field>>"; + $val =~ s/\p{P}(?=$)//g if $val; + my $replacedby = defined ($val) ? $val : ''; + ($letter->{title} ) and do { + $letter->{title} =~ s/$replacetablefield/$replacedby/g; + $letter->{title} =~ s/$replacefield/$replacedby/g; + }; + ($letter->{content}) and do { + $letter->{content} =~ s/$replacetablefield/$replacedby/g; + $letter->{content} =~ s/$replacefield/$replacedby/g; + }; + } + + if ($table eq 'borrowers' && $letter->{content}) { + if ( my $attributes = GetBorrowerAttributes($values->{borrowernumber}) ) { + my %attr; + foreach (@$attributes) { + my $code = $_->{code}; + my $val = $_->{value_description} || $_->{value}; + $val =~ s/\p{P}(?=$)//g if $val; + next unless $val gt ''; + $attr{$code} ||= []; + push @{ $attr{$code} }, $val; + } + while ( my ($code, $val_ar) = each %attr ) { + my $replacefield = "<>"; + my $replacedby = join ',', @$val_ar; + $letter->{content} =~ s/$replacefield/$replacedby/g; + } + } } return $letter; } @@ -732,31 +882,32 @@ returns your letter object, with the content updated. sub _add_attachments { my $params = shift; - return unless 'HASH' eq ref $params; - foreach my $required_parameter (qw( letter attachments message )) { - return unless exists $params->{$required_parameter}; - } - return $params->{'letter'} unless @{ $params->{'attachments'} }; + my $letter = $params->{'letter'}; + my $attachments = $params->{'attachments'}; + return $letter unless @$attachments; + my $message = $params->{'message'}; # First, we have to put the body in as the first attachment - $params->{'message'}->attach( - Type => 'TEXT', - Data => $params->{'letter'}->{'content'}, + $message->attach( + Type => $letter->{'content-type'} || 'TEXT', + Data => $letter->{'is_html'} + ? _wrap_html($letter->{'content'}, $letter->{'title'}) + : $letter->{'content'}, ); - foreach my $attachment ( @{ $params->{'attachments'} } ) { - $params->{'message'}->attach( + foreach my $attachment ( @$attachments ) { + $message->attach( Type => $attachment->{'type'}, Data => $attachment->{'content'}, Filename => $attachment->{'filename'}, ); } # we're forcing list context here to get the header, not the count back from grep. - ( $params->{'letter'}->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); - $params->{'letter'}->{'content-type'} =~ s/^Content-Type:\s+//; - $params->{'letter'}->{'content'} = $params->{'message'}->body_as_string; + ( $letter->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); + $letter->{'content-type'} =~ s/^Content-Type:\s+//; + $letter->{'content'} = $message->body_as_string; - return $params->{'letter'}; + return $letter; } @@ -823,14 +974,17 @@ sub _send_message_by_email ($;$$$) { my $utf8 = decode('MIME-Header', $message->{'subject'} ); $message->{subject}= encode('MIME-Header', $utf8); + my $subject = encode('utf8', $message->{'subject'}); my $content = encode('utf8', $message->{'content'}); + my $content_type = $message->{'content_type'} || 'text/plain; charset="UTF-8"'; + my $is_html = $content_type =~ m/html/io; my %sendmail_params = ( To => $to_address, From => $message->{'from_address'} || C4::Context->preference('KohaAdminEmailAddress'), - Subject => encode('utf8', $message->{'subject'}), + Subject => $subject, charset => 'utf8', - Message => $content, - 'content-type' => $message->{'content_type'} || 'text/plain; charset="UTF-8"', + Message => $is_html ? _wrap_html($content, $subject) : $content, + 'content-type' => $content_type, ); $sendmail_params{'Auth'} = {user => $username, pass => $password, method => $method} if $username; if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) { @@ -850,6 +1004,27 @@ sub _send_message_by_email ($;$$$) { } } +sub _wrap_html { + my ($content, $title) = @_; + + my $css = C4::Context->preference("NoticeCSS") || ''; + $css = qq{} if $css; + return < + + +$title + +$css + + +$content + + +EOS +} + sub _send_message_by_sms ($) { my $message = shift or return undef; my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} ); diff --git a/C4/Members.pm b/C4/Members.pm index 1d7bc42..9f42cea 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -23,7 +23,7 @@ package C4::Members; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Dates qw(format_date_in_iso); +use C4::Dates qw(format_date_in_iso format_date); use Digest::MD5 qw(md5_base64); use Date::Calc qw/Today Add_Delta_YM check_date Date_to_Days/; use C4::Log; # logaction @@ -31,8 +31,10 @@ use C4::Overdues; use C4::Reserves; use C4::Accounts; use C4::Biblio; +use C4::Letters; use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable); use C4::Members::Attributes qw(SearchIdMatchingAttribute); +use C4::NewsChannels; #get slip news our ($VERSION, at ISA, at EXPORT, at EXPORT_OK,$debug); @@ -91,6 +93,8 @@ BEGIN { &DeleteMessage &GetMessages &GetMessagesCount + + &IssueSlip ); #Modify data @@ -2227,7 +2231,80 @@ sub DeleteMessage { logaction("MEMBERS", "DELCIRCMESSAGE", $message->{'borrowernumber'}, $message->{'message'}) if C4::Context->preference("BorrowersLog"); } -END { } # module clean-up code here (global destructor) +=head2 IssueSlip + + IssueSlip($branchcode, $borrowernumber, $quickslip) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) + + $quickslip is boolean, to indicate whether we want a quick slip + +=cut + +sub IssueSlip { + my ($branch, $borrowernumber, $quickslip) = @_; + +# return unless ( C4::Context->boolean_preference('printcirculationslips') ); + + my $today = POSIX::strftime("%Y-%m-%d", localtime); + + my $issueslist = GetPendingIssues($borrowernumber); + foreach my $it (@$issueslist){ + if ($it->{'issuedate'} eq $today) { + $it->{'today'} = 1; + } + elsif ($it->{'date_due'} le $today) { + $it->{'overdue'} = 1; + } + + $it->{'date_due'}=format_date($it->{'date_due'}); + } + my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; + + my ($letter_code, %repeat); + if ( $quickslip ) { + $letter_code = 'ISSUEQSLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'today'} } @issues ], + ); + } + else { + $letter_code = 'ISSUESLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { !$_->{'overdue'} } @issues ], + + 'overdue' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'overdue'} } @issues ], + + 'news' => [ map { + $_->{'timestamp'} = $_->{'newdate'}; + { opac_news => $_ } + } @{ GetNewsToDisplay("slip") } ], + ); + } + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $letter_code, + branchcode => $branch, + tables => { + 'branches' => $branch, + 'borrowers' => $borrowernumber, + }, + repeat => \%repeat, + ); +} 1; diff --git a/C4/Message.pm b/C4/Message.pm index 16272ff..4b88970 100644 --- a/C4/Message.pm +++ b/C4/Message.pm @@ -18,9 +18,15 @@ How to add a new message to the queue: use C4::Items; my $borrower = { borrowernumber => 1 }; my $item = C4::Items::GetItem(1); - my $letter = C4::Letters::getletter('circulation', 'CHECKOUT'); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'CHECKOUT', + branchcode => $branch, + tables => { + 'biblio', $item->{biblionumber}, + 'biblioitems', $item->{biblionumber}, + }, + ); C4::Message->enqueue($letter, $borrower->{borrowernumber}, 'email'); How to update a borrower's last checkout message: diff --git a/C4/Print.pm b/C4/Print.pm index 2ba7584..2343fa4 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -20,8 +20,6 @@ package C4::Print; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Members; -use C4::Dates qw(format_date); use vars qw($VERSION @ISA @EXPORT); @@ -30,7 +28,7 @@ BEGIN { $VERSION = 3.01; require Exporter; @ISA = qw(Exporter); - @EXPORT = qw(&remoteprint &printreserve &printslip); + @EXPORT = qw(&printslip); } =head1 NAME @@ -47,28 +45,48 @@ The functions in this module handle sending text to a printer. =head1 FUNCTIONS -=head2 remoteprint +=cut - &remoteprint($items, $borrower); +=comment + my $slip = <<"EOF"; +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Date: $todaysdate; -Prints the list of items in C<$items> to a printer. +ITEM RESERVED: +$itemdata->{'title'} ($itemdata->{'author'}) +barcode: $itemdata->{'barcode'} + +COLLECT AT: $branchname -C<$borrower> is a reference-to-hash giving information about a patron. -This may be gotten from C<&GetMemberDetails>. The patron's name -will be printed in the output. +BORROWER: +$bordata->{'surname'}, $bordata->{'firstname'} +card number: $bordata->{'cardnumber'} +Phone: $bordata->{'phone'} +$bordata->{'streetaddress'} +$bordata->{'suburb'} +$bordata->{'town'} +$bordata->{'emailaddress'} -C<$items> is a reference-to-list, where each element is a -reference-to-hash describing a borrowed item. C<$items> may be gotten -from C<&GetBorrowerIssues>. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +EOF =cut +=head2 printslip + + &printslip($slip) + +print a slip for the given $borrowernumber and $branchcode + +=cut + +sub printslip ($) { + my ($slip) = @_; + + return unless ( C4::Context->boolean_preference('printcirculationslips') ); + # FIXME - It'd be nifty if this could generate pretty PostScript. -sub remoteprint ($$) { - my ($items, $borrower) = @_; - (return) - unless ( C4::Context->boolean_preference('printcirculationslips') ); my $queue = ''; # FIXME - If 'queue' is undefined or empty, then presumably it should @@ -93,100 +111,13 @@ sub remoteprint ($$) { # print $queue; #open (FILE,">/tmp/$file"); - my $i = 0; - # FIXME - This is HLT-specific. Put this stuff in a customizable - # site-specific file somewhere. - print PRINTER "Horowhenua Library Trust\r\n"; - print PRINTER "Phone: 368-1953\r\n"; - print PRINTER "Fax: 367-9218\r\n"; - print PRINTER "Email: renewals\@library.org.nz\r\n\r\n\r\n"; - print PRINTER "$borrower->{'cardnumber'}\r\n"; - print PRINTER - "$borrower->{'title'} $borrower->{'initials'} $borrower->{'surname'}\r\n"; - - # FIXME - Use for ($i = 0; $items->[$i]; $i++) - # Or better yet, foreach $item (@{$items}) - while ( $items->[$i] ) { - - # print $i; - my $itemdata = $items->[$i]; - - # FIXME - This is just begging for a Perl format. - print PRINTER "$i $itemdata->{'title'}\r\n"; - print PRINTER "$itemdata->{'barcode'}"; - print PRINTER " " x 15; - print PRINTER "$itemdata->{'date_due'}\r\n"; - $i++; - } + print PRINTER $slip; print PRINTER "\r\n" x 7 ; close PRINTER; #system("lpr /tmp/$file"); } -sub printreserve { - my ( $branchname, $bordata, $itemdata ) = @_; - my $printer = ''; - (return) unless ( C4::Context->boolean_preference('printreserveslips') ); - if ( $printer eq "" || $printer eq 'nulllp' ) { - open( PRINTER, ">>/tmp/kohares" ) - or die "Could not write to /tmp/kohares"; - } - else { - open( PRINTER, "| lpr -P $printer >/dev/null" ) - or die "Couldn't write to queue:$!\n"; - } - my @da = localtime(); - my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); - my $slip = <<"EOF"; -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Date: $todaysdate; - -ITEM RESERVED: -$itemdata->{'title'} ($itemdata->{'author'}) -barcode: $itemdata->{'barcode'} - -COLLECT AT: $branchname - -BORROWER: -$bordata->{'surname'}, $bordata->{'firstname'} -card number: $bordata->{'cardnumber'} -Phone: $bordata->{'phone'} -$bordata->{'streetaddress'} -$bordata->{'suburb'} -$bordata->{'town'} -$bordata->{'emailaddress'} - - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -EOF - print PRINTER $slip; - close PRINTER; - return $slip; -} - -=head2 printslip - - &printslip($borrowernumber) - -print a slip for the given $borrowernumber - -=cut - -#' -sub printslip ($) { - my $borrowernumber = shift; - my $borrower = GetMemberDetails($borrowernumber); - my $issueslist = GetPendingIssues($borrowernumber); - foreach my $it (@$issueslist){ - $it->{'date_due'}=format_date($it->{'date_due'}); - } - my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; - remoteprint(\@issues, $borrower ); -} - -END { } # module clean-up code here (global destructor) - 1; __END__ diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 359bbad..d2af1c5 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -121,6 +121,8 @@ BEGIN { &AlterPriority &ToggleLowestPriority + + &ReserveSlip ); @EXPORT_OK = qw( MergeHolds ); } @@ -194,32 +196,31 @@ sub AddReserve { # Send e-mail to librarian if syspref is active if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){ my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); - my $biblio = GetBiblioData($biblionumber); - my $letter = C4::Letters::getletter( 'reserves', 'HOLDPLACED'); - my $branchcode = $borrower->{branchcode}; - my $branch_details = C4::Branch::GetBranchDetail($branchcode); - my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - - my %keys = (%$borrower, %$biblio); - foreach my $key (keys %keys) { - my $replacefield = "<<$key>>"; - $letter->{content} =~ s/$replacefield/$keys{$key}/g; - $letter->{title} =~ s/$replacefield/$keys{$key}/g; + my $branch_details = C4::Branch::GetBranchDetail($borrower->{branchcode}); + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => 'HOLDPLACED', + branchcode => $branch, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + }, + ) ) { + + my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); + + C4::Letters::EnqueueLetter( + { letter => $letter, + borrowernumber => $borrowernumber, + message_transport_type => 'email', + from_address => $admin_email_address, + to_address => $admin_email_address, + } + ); } - - C4::Letters::EnqueueLetter( - { letter => $letter, - borrowernumber => $borrowernumber, - message_transport_type => 'email', - from_address => $admin_email_address, - to_address => $admin_email_address, - } - ); - - } - #} ($const eq "o" || $const eq "e") or return; # FIXME: why not have a useful return value? $query = qq/ @@ -1720,21 +1721,21 @@ sub _koha_notify_reserve { my $admin_email_address = $branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - my $letter = getletter( 'reserves', $letter_code ); - die "Could not find a letter called '$letter_code' in the 'reserves' module" unless( $letter ); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => $letter_code, + branchcode => $reserve->{branchcode}, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + 'reserves' => $reserve, + 'items', $reserve->{'itemnumber'}, + }, + substitute => { today => C4::Dates->new()->output() }, + ) or die "Could not find a letter called '$letter_code' in the 'reserves' module"; - C4::Letters::parseletter( $letter, 'branches', $reserve->{'branchcode'} ); - C4::Letters::parseletter( $letter, 'borrowers', $borrowernumber ); - C4::Letters::parseletter( $letter, 'biblio', $biblionumber ); - C4::Letters::parseletter( $letter, 'reserves', $borrowernumber, $biblionumber ); - if ( $reserve->{'itemnumber'} ) { - C4::Letters::parseletter( $letter, 'items', $reserve->{'itemnumber'} ); - } - my $today = C4::Dates->new()->output(); - $letter->{'title'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<<[a-z0-9_]+\.[a-z0-9]+>>//g; #remove any stragglers if ( $print_mode ) { C4::Letters::EnqueueLetter( { @@ -1908,6 +1909,36 @@ sub MergeHolds { } +=head2 ReserveSlip + + ReserveSlip($branchcode, $borrowernumber, $biblionumber) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) or undef + +=cut + +sub ReserveSlip { + my ($branch, $borrowernumber, $biblionumber) = @_; + +# return unless ( C4::Context->boolean_preference('printreserveslips') ); + + my $reserve = GetReserveInfo($borrowernumber,$biblionumber ) + or return; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'RESERVESLIP', + branchcode => $branch, + tables => { + 'reserves' => $reserve, + 'branches' => $reserve->{branchcode}, + 'borrowers' => $reserve, + 'biblio' => $reserve, + 'items' => $reserve, + }, + ); +} + =head1 AUTHOR Koha Development Team diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index ccc0c8e..6c10fdf 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -371,20 +371,24 @@ sub ModSuggestion { if ($suggestion->{STATUS}) { # fetch the entire updated suggestion so that we can populate the letter my $full_suggestion = GetSuggestion($suggestion->{suggestionid}); - my $letter = C4::Letters::getletter('suggestions', $full_suggestion->{STATUS}); - if ($letter) { - C4::Letters::parseletter($letter, 'branches', $full_suggestion->{branchcode}); - C4::Letters::parseletter($letter, 'borrowers', $full_suggestion->{suggestedby}); - C4::Letters::parseletter($letter, 'suggestions', $full_suggestion->{suggestionid}); - C4::Letters::parseletter($letter, 'biblio', $full_suggestion->{biblionumber}); - my $enqueued = C4::Letters::EnqueueLetter({ + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'suggestions', + letter_code => $full_suggestion->{STATUS}, + branchcode => $full_suggestion->{branchcode}, + tables => { + 'branches' => $full_suggestion->{branchcode}, + 'borrowers' => $full_suggestion->{suggestedby}, + 'suggestions' => $full_suggestion, + 'biblio' => $full_suggestion->{biblionumber}, + }, + ) ) { + C4::Letters::EnqueueLetter({ letter => $letter, borrowernumber => $full_suggestion->{suggestedby}, suggestionid => $full_suggestion->{suggestionid}, LibraryName => C4::Context->preference("LibraryName"), message_transport_type => 'email', - }); - if (!$enqueued){warn "can't enqueue letter $letter";} + }) or warn "can't enqueue letter $letter"; } } return $status_update_table; diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 634eb93..745d040 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -111,16 +111,11 @@ for my $vendor (@suppliers) { for my $basket ( @{$baskets} ) { my $authorisedby = $basket->{authorisedby}; - my $basketbranch = ''; # set a blank branch to start with - if ( GetMember( borrowernumber => $authorisedby ) ) { - # authorisedby may not be a valid borrowernumber; it's not foreign-key constrained! - $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; - } if ($userenv->{'flags'} & 1 || #user is superlibrarian (haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and ($viewbaskets eq 'all' || #user is allowed to see all baskets - ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq $basketbranch) || #basket belongs to user's branch + ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq GetMember( borrowernumber => $authorisedby )->{branchcode}) || #basket belongs to user's branch ($basket->{authorisedby} && $viewbaskets == 'user' && $authorisedby == $loggedinuser) #user created this basket ) ) diff --git a/circ/circulation.pl b/circ/circulation.pl index c95e59b..f5d6cb6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -24,7 +24,6 @@ use strict; #use warnings; FIXME - Bug 2505 use CGI; use C4::Output; -use C4::Print; use C4::Auth qw/:DEFAULT get_session/; use C4::Dates qw/format_date/; use C4::Branch; # GetBranches @@ -176,7 +175,7 @@ if ( $barcode eq '' && $query->param('charges') eq 'yes' ) { } if ( $print eq 'yes' && $borrowernumber ne '' ) { - printslip( $borrowernumber ); + PrintIssueSlip($branch, $borrowernumber); $query->param( 'borrowernumber', '' ); $borrowernumber = ''; } diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl index f581464..492dac7 100755 --- a/circ/hold-transfer-slip.pl +++ b/circ/hold-transfer-slip.pl @@ -25,8 +25,6 @@ use C4::Output; use CGI; use C4::Auth; use C4::Reserves; -use C4::Branch; -use C4::Dates qw/format_date format_date_in_iso/; use vars qw($debug); @@ -41,7 +39,7 @@ my $transfer = $input->param('transfer'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "circ/hold-transfer-slip.tmpl", + template_name => "circ/printslip.tmpl", query => $input, type => "intranet", authnotrequired => 0, @@ -50,14 +48,21 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $reserveinfo = GetReserveInfo($borrowernumber,$biblionumber ); -my $pulldate = C4::Dates->new(); -$reserveinfo->{'pulldate'} = $pulldate->output(); -$reserveinfo->{'branchname'} = GetBranchName($reserveinfo->{'branchcode'}); -$reserveinfo->{'transferrequired'} = $transfer; - -$template->param( reservedata => [ $reserveinfo ] , - ); +my $userenv = C4::Context->userenv; +my ($slip, $is_html); +if ( my $letter = ReserveSlip ($userenv->{branch}, $borrowernumber, $biblionumber) ) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} +else { + $slip = "Reserve not found"; +} +$template->param( + slip => $slip, + plain => !$is_html, + title => "Koha -- Circulation: Transfers", + stylesheet => C4::Context->preference("SlipCSS"), +); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 166c36d..efdad91 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r < ('reserves', 'HOLD_PRINT', 'Vormerkbenachrichtigung (Print)', 'Vormerkbenachrichtigung (Print)', '<>\r\n<>\r\n<>\r\n<>\r\n<> <>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<> <>\r\n<>\r\n<>\r\n<> <>\r\n<>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nLiebe(r) <> <>,\r\n\r\nF??r Sie liegt seit dem <> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <>\r\nVerfasser: <>\r\nSignatur: <>\r\n'), ('circulation','CHECKIN','R??ckgabequittung (Zusammenfassung)','R??ckgabequittung','Die folgenden Medien wurden zur??ckgegeben:\r\n----\r\n<>\r\n----\r\nVielen Dank.'), ('circulation','CHECKOUT','Ausleihquittung (Zusammenfassung)','Ausleihquittung','Die folgenden Medien wurden entliehen:\r\n----\r\n<>\r\n----\r\nVielen Dank f??r Ihren Besuch in <>.'), -('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <> (<<biblionumber>>) durch den Benutzer <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <<biblio.title>> (<<biblio.biblionumber>>) durch den Benutzer <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Anschaffungsvorschlag wurde angenommen', 'Ihr Anschaffungsvorschlag wurde angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> by <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und wird Ihn sobald wie m??glich im Buchhandel bestellen. Sie erhalten Nachricht, sobald die Bestellung abgeschlossen ist und sobald der Titel in der Bibliotek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Vorgeschlagenes Medium verf??gbar', 'Das vorgeschlagene Medium ist jetzt verf??gbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Bestand der Bibliothek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verf??gbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..8c9f4bd 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -11,8 +11,90 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'); +INSERT INTO `letter` (module, code, name, title, content, is_html) +VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style="text-align: center; font-style:italic;">News</h4> +<news> +<div class="newsitem"> +<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5> +<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.new>></p> +<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1), +('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1), +('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<reserves> +<div> +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> + <h4><<biblio.title>></h4> + <h5><<biblio.author>></h5> + <ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> + </ul> + <p>Notes: + <pre><<reserves.reservenotes>></pre> + </p> +</div> +</reserves>', 1); + diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..acffe73 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup at <<branches.branchname>>', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a03bd23..00ff188 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1168,10 +1168,12 @@ DROP TABLE IF EXISTS `letter`; CREATE TABLE `letter` ( -- table for all notice templates in Koha `module` varchar(20) NOT NULL default '', -- Koha module that triggers this notice `code` varchar(20) NOT NULL default '', -- unique identifier for this notice + `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out `name` varchar(100) NOT NULL default '', -- plain text name for this notice + `is_html` tinyint(1) default 0, `title` varchar(200) NOT NULL default '', -- subject line of the notice `content` text, -- body text for the notice - PRIMARY KEY (`module`,`code`) + PRIMARY KEY (`module`,`code`, `branchcode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index cdb5529..08b452e 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -32,7 +32,7 @@ VALUES ('circulation','ODUE','Purring','Purring p?? dokument','<<borrowers.first ('reserves', 'HOLD_PRINT', 'Hentemelding (p?? papir)', 'Hentemelding', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nDu har et reservert dokument som kan hentes fra <<reserves.waitingdate>>:\r\n\r\nTittel: <<biblio.title>>\r\nForfatter: <<biblio.author>>\r\nEksemplar: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Innlevering','Melding om innlevering','F??lgende dokument har blitt innlevert:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), ('circulation','CHECKOUT','Utl??n','Melding om utl??n','F??lgende dokument har blitt l??nt ut:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), -('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<title>> (<<biblionumber>>) av <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<biblio.title>> (<<biblio.biblionumber>>) av <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Forslag godtatt', 'Innkj??psforslag godtatt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert forslaget i dag. Dokumentet vil bli bestilt s?? fort det lar seg gj??re. Du vil f?? en ny melding n??r bestillingen er gjort, og n??r dokumentet ankommer biblioteket.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Foresl??tt dokument tilgjengelig', 'Foresl??tt dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet n?? er innlemmet i samlingen.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Innkj??psforslag i bestilling', 'Innkj??psforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet du foreslo n?? er i bestilling.\n\nDu vil f?? en ny melding n??r dokumentet er tilgjengelig.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..f0844f3 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 128c9b2..e9aac60 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free'); + diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..b637343 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -10,7 +10,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0063a75..9082fc2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4497,7 +4497,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (Add 461 subfield 9 to default framework)\n"; SetVersion ($DBversion); } - } $DBversion = "3.05.00.018"; @@ -4578,6 +4577,103 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.02.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `letter` DROP PRIMARY KEY"); + $dbh->do("ALTER TABLE `letter` ADD `branchcode` varchar(10) default NULL AFTER `code`"); + $dbh->do("ALTER TABLE `letter` ADD PRIMARY KEY (`module`,`code`, `branchcode`)"); + $dbh->do("ALTER TABLE `letter` ADD `is_html` tinyint(1) default 0 AFTER `name`"); + print "Added branchcode and is_html to letter table\n"; + + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style=\"text-align: center; font-style:italic;\">News</h4> +<news> +<div class=\"newsitem\"> +<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5> +<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.new>></p> +<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> +<h4><<biblio.title>></h4> +<h5><<biblio.author>></h5> +<ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> +</ul> +<p>Notes: +<pre><<reserves.reservenotes>></pre> +</p>', 1)"); + + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free')"); + + $dbh->do("UPDATE `letter` SET content = replace(content, '<<title>>', '<<biblio.title>>') WHERE code = 'HOLDPLACED')"); + + print "Upgrade to $DBversion done (Add branchcode and is_html to letter table; Add NoticeCSS and SlipCSS sysprefs)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) 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 913076f..6fdd720 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc @@ -42,8 +42,10 @@ function update_child() { }); // YUI Toolbar Functions + var slip_re = /slip/; function printx_window(print_type) { - window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); + var handler = print_type.match(slip_re) ? "printslip" : "moremember"; + window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); return false; } function searchToHold(){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index f4946b5..b3b279c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -91,6 +91,11 @@ Circulation: yes: Record no: "Don't record" - local use when an unissued item is checked in. + - + - Include the stylesheet at + - pref: NoticeCSS + class: url + - on Notices. (This should be a complete URL, starting with <code>http://</code>.) Checkout Policy: - - pref: AllowNotForLoanOverride diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index df0a434..efa33a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -83,6 +83,11 @@ Staff Client: Results: "Results page (for future use, Results XSLT not functional at this time)." Both: "Both Results and Details pages (for future use, Results XSLT not functional at this time)." - 'Note: The corresponding XSLT option must be turned on.' + - + - Include the stylesheet at + - pref: SlipCSS + class: url + - on Issue and Reserve Slips. (This should be a complete URL, starting with <code>http://</code>.) Options: - - pref: viewMARC diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt index 1904381..73f9e61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt @@ -8,11 +8,7 @@ --> </style> [% IF ( stylesheet ) %] - <style type="text/css"> - <!-- - [% stylesheet %] - --> - </style> + <link rel="stylesheet" type="text/css" href="[% stylesheet %]"> [% END %] </head> <body> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt deleted file mode 100644 index 18d45aa..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt +++ /dev/null @@ -1,54 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -<title>Koha -- Circulation: Transfers -[% INCLUDE 'doc-head-close-receipt.inc' %] - - -
    - -[% FOREACH reservedat IN reservedata %] - -
    Date: [% reservedat.pulldate %]
    -

    [% IF ( reservedat.transferrequired ) %]Transfer to [% reservedat.branchname %] [% ELSE %]Hold in [% reservedat.branchname %][% END %]

    - -
    - -

    [% reservedat.surname %], [% reservedat.firstname %]

    - -
      -
    • [% reservedat.cardnumber %]
    • - [% IF ( reservedat.phone ) %] -
    • [% reservedat.phone %]
    • - [% END %] -
    • - [% reservedat.address %]
      - [% IF ( reservedat.address2 ) %][% reservedat.address2 %]
      [% END %] - [% reservedat.city %] [% reservedat.zip %] -
    • - [% IF ( reservedat.email ) %] -
    • [% reservedat.email %]
    • - [% END %] -
    -
    -

    ITEM ON HOLD

    -

    [% reservedat.title |html %]

    -
    [% reservedat.author %]
    -
      - [% IF ( reservedat.barcode ) %]
    • [% reservedat.barcode %]
    • [% END %] - [% IF ( reservedat.itemcallnumber ) %]
    • [% reservedat.itemcallnumber %]
    • [% END %] - [% IF ( reservedat.waitingdate ) %]
    • [% reservedat.waitingdate %]
    • [% END %] -
    - [% IF ( reservedat.reservenotes ) %] -

    Notes: [% reservedat.reservenotes %]

    - [% END %] - - - -[% END %] -
    -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt new file mode 100644 index 0000000..a790069 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt @@ -0,0 +1,28 @@ +[% INCLUDE 'doc-head-open.inc' %] +[% title %] + + + +[% IF stylesheet %] + +[% END %] + + + + +
    + +[% IF plain %] +
    +[% slip %]
    +
    +[% ELSE %] +[% slip %] +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt deleted file mode 100644 index 4a85ccb..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt +++ /dev/null @@ -1,76 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Print Receipt for [% cardnumber %] - - - - - - - - -
    - -

    [% LibraryName %]

    -[% IF ( branchname ) %][% branchname %]
    [% END %] -Checked out to [% firstname %] [% surname %]
    -(
    [% cardnumber %])
    - -[% todaysdate %]
    - -[% IF ( quickslip ) %] -

    Checked Out Today

    -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -[% IF ( issueloo.today ) %] -

    [% issueloo.title |html %]
    -Barcode: [% issueloo.barcode %]
    -Date due: [% issueloo.date_due %]

    - [% END %] - [% END %] - [% END %] - -[% ELSE %] -

    Checked Out

    -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -

    [% issueloo.title |html %]
    -Barcode: [% issueloo.barcode %]
    -Date due: [% issueloo.date_due %]

    - [% END %] - [% END %] - -[% END %] - -[% IF ( quickslip ) %] -[% ELSE %] -[% IF ( overdues_exist ) %] -

    Overdues

    - [% FOREACH issueloo IN issueloop %] - [% IF ( issueloo.red ) %] -

    [% issueloo.title |html %]
    -Barcode: [% issueloo.barcode %]
    -Date due: [% issueloo.date_due %]

    -[% END %] -[% END %] -[% END %] -[% END %] - -[% IF ( koha_news_count ) %] -

    News

    - - [% FOREACH koha_new IN koha_news %] -
    [% koha_new.title %]
    -

    [% koha_new.new %]

    -

    Posted on [% koha_new.newdate %] - -


    - [% END %] -[% END %] - - -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 063236e..b64477e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -10,6 +10,10 @@ $(document).ready(function() { sortList: [[0,0]], headers: { 3: {sorter:false},4: { sorter: false }} }); + + $('#branch').change(function() { + $('#selectlibrary').submit(); + }); }); [% IF ( add_form ) %] @@ -114,7 +118,7 @@ $(document).ready(function() {
    - [% IF ( no_op_set ) %] +[% IF ( no_op_set ) %]
    + + [% UNLESS independant_branch %] +

    +

    + + Select a library : + +
    +

    + [% END %] +
    @@ -135,41 +155,71 @@ $(document).ready(function() { [% IF ( search ) %]

    You Searched for [% searchfield %]

    [% END %] - [% IF ( letter ) %] + [% IF ( letter && !independant_branch) %] + [% select_for_copy = BLOCK %] + + [% END %] + [% END %] +
    + + - [% FOREACH lette IN letter %] - [% UNLESS ( loop.odd ) %] + + [% FOREACH lette IN letter %] + [% can_edit = lette.branchcode || !independant_branch %] + [% UNLESS ( loop.odd ) %] - [% ELSE %] + [% ELSE %] - [% END %] + [% END %] + + - [% END %] + [% END %] +
    Branch Module Code Name     
    [% lette.branchname || "(All libraries)" %] [% lette.module %] [% lette.code %] [% lette.name %] - Edit + [% IF can_edit %] + Edit + [% END %] - [% IF ( lette.protected ) %] - - - [% ELSE %] - Delete - [% END %] + [% IF !independant_branch || !lette.branchcode %] +
    + + + + + [% IF independant_branch %] + + [% ELSE %] + [% select_for_copy %] + [% END %] + +
    + [% END %] +
    + [% IF !lette.protected && can_edit %] + Delete + [% END %]
    - [% END %] +[% END %] - [% END %] - [% IF ( add_form ) %] +[% IF ( add_form ) %]
    @@ -182,6 +232,20 @@ $(document).ready(function() {
    [% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]
      + + [% IF independant_branch %] + + [% ELSE %] +
    1. + + +
    2. + [% END %]
    3. @@ -235,6 +299,9 @@ $(document).ready(function() {
    4. + +
    5. +
    6. @@ -253,16 +320,16 @@ $(document).ready(function() {
    - [% END %] +[% END %] - [% IF ( add_validate ) %] +[% IF ( add_validate ) %] Data recorded
    - [% END %] +[% END %] - [% IF ( delete_confirm ) %] +[% IF ( delete_confirm ) %]

    Delete Notice?

    @@ -290,14 +357,14 @@ $(document).ready(function() { - [% END %] +[% END %] - [% IF ( delete_confirmed ) %] +[% IF ( delete_confirmed ) %] Data deleted - [% END %] +[% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index c047873..f345351 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -338,10 +338,7 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ # if we manage to find a valid email address, send notice if ($emailaddr) { $newdata{emailaddr} = $emailaddr; - my $letter = getletter ('members', "ACCTDETAILS:$newdata{'branchcode'}") ; - # if $branch notice fails, then email a default notice instead. - $letter = getletter ('members', "ACCTDETAILS") if !$letter; - SendAlerts ( 'members' , \%newdata , $letter ) if $letter + SendAlerts ( 'members', \%newdata, "ACCTDETAILS" ); } } diff --git a/members/moremember.pl b/members/moremember.pl index 6e5407c..9277deb 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -51,7 +51,6 @@ use C4::Reserves; use C4::Branch; # GetBranchName use C4::Overdues qw/CheckBorrowerDebarred/; use C4::Form::MessagingPreferences; -use C4::NewsChannels; #get slip news use List::MoreUtils qw/uniq/; use C4::Members::Attributes qw(GetBorrowerAttributes); @@ -483,13 +482,4 @@ $template->param( quickslip => $quickslip, ); -#Get the slip news items -my $all_koha_news = &GetNewsToDisplay("slip"); -my $koha_news_count = scalar @$all_koha_news; - -$template->param( - koha_news => $all_koha_news, - koha_news_count => $koha_news_count -); - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printslip.pl b/members/printslip.pl new file mode 100755 index 0000000..eba8d68 --- /dev/null +++ b/members/printslip.pl @@ -0,0 +1,89 @@ +#!/usr/bin/perl + +# Copyright 2000-2002 Katipo Communications +# Copyright 2010 BibLibre +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +=head1 moremember.pl + + script to do a borrower enquiry/bring up borrower details etc + Displays all the details about a borrower + written 20/12/99 by chris at katipo.co.nz + last modified 21/1/2000 by chris at katipo.co.nz + modified 31/1/2001 by chris at katipo.co.nz + to not allow items on request to be renewed + + needs html removed and to use the C4::Output more, but its tricky + +=cut + +use strict; +#use warnings; FIXME - Bug 2505 +use CGI; +use C4::Context; +use C4::Auth; +use C4::Output; +use C4::Members; +use C4::Koha; + +#use Smart::Comments; +#use Data::Dumper; + +use vars qw($debug); + +BEGIN { + $debug = $ENV{DEBUG} || 0; +} + +my $input = new CGI; +$debug or $debug = $input->param('debug') || 0; +my $print = $input->param('print'); +my $error = $input->param('error'); + +# circ staff who process checkouts but can't edit +# patrons still need to be able to print receipts +my $flagsrequired = { circulate => "circulate_remaining_permissions" }; + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "circ/printslip.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => $flagsrequired, + debug => 1, + } +); + +my $borrowernumber = $input->param('borrowernumber'); +my $branch=C4::Context->userenv->{'branch'}; +my ($slip, $is_html); +if (my $letter = IssueSlip ($branch, $borrowernumber, $print eq "qslip")) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} + +$template->param( + slip => $slip, + plain => !$is_html, + title => "Print Receipt for $borrowernumber", + stylesheet => C4::Context->preference("SlipCSS"), + error => $error, +); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index 1fa358f..09c4017 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -79,13 +79,10 @@ patrons. It queues them in the message queue, which is processed by the process_message_queue.pl cronjob. See the comments in the script for directions on changing the script. This script has the following parameters : - -c Confirm and remove this help & warning - -m maximum number of days in advance to send advance notices. - -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. - -v verbose - -i csv list of fields that get substituted into templates in places - of the EEitems.contentEE placeholder. Defaults to - issuedate,title,barcode,author + -c Confirm and remove this help & warning + -m maximum number of days in advance to send advance notices. + -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. + -v verbose ENDUSAGE # Since advance notice options are not visible in the web-interface @@ -157,8 +154,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'DUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -166,13 +161,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } else { $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, @@ -189,8 +185,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'PREDUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},$borrower_preferences->{'days_in_advance'}); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -198,13 +192,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } @@ -250,8 +245,6 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my $letter_type = 'PREDUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,$borrower_preferences->{'days_in_advance'}); my $titles = ""; @@ -259,12 +252,13 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; print $letter->{'content'}; @@ -290,20 +284,19 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { next PATRON unless $borrower_preferences; # how could this happen? my $letter_type = 'DUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; @@ -323,40 +316,35 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { =head2 parse_letter - - =cut sub parse_letter { my $params = shift; - foreach my $required ( qw( letter borrowernumber ) ) { + foreach my $required ( qw( letter_code borrowernumber ) ) { return unless exists $params->{$required}; } - if ( $params->{'substitute'} ) { - while ( my ($key, $replacedby) = each %{$params->{'substitute'}} ) { - my $replacefield = "<<$key>>"; - - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } - } - - C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); + my %table_params = ( 'borrowers' => $params->{'borrowernumber'} ); - if ( $params->{'branchcode'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + if ( my $p = $params->{'branchcode'} ) { + $table_params{'branches'} = $p; } - if ( $params->{'itemnumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'issues', $params->{'itemnumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'itemnumber'} ); + if ( my $p = $params->{'itemnumber'} ) { + $table_params{'issues'} = $p; + $table_params{'items'} = $p; } - if ( $params->{'biblionumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'biblio', $params->{'biblionumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $params->{'biblionumber'} ); + if ( my $p = $params->{'biblionumber'} ) { + $table_params{'biblio'} = $p; + $table_params{'biblioitems'} = $p; } - return $params->{'letter'}; + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $table_params{'branches'}, + substitute => $params->{'substitute'}, + tables => \%table_params, + ); } 1; diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index a72d6a6..165b16e 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -39,11 +39,9 @@ use Getopt::Long; sub usage { print STDERR < \$stylesheet, 'h|help' => \$help, ) || usage( 1 ); @@ -71,16 +68,9 @@ exit unless( @messages ); open OUTPUT, '>', File::Spec->catdir( $output_directory, "holdnotices-" . $today->output( 'iso' ) . ".html" ); my $template = C4::Templates::gettemplate( 'batch/print-notices.tmpl', 'intranet', new CGI ); -my $stylesheet_contents = ''; - -if ($stylesheet) { - open STYLESHEET, '<', $stylesheet; - while ( ) { $stylesheet_contents .= $_ } - close STYLESHEET; -} $template->param( - stylesheet => $stylesheet_contents, + stylesheet => C4::Context->preference("NoticeCSS"), today => $today->output(), messages => \@messages, ); diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 27941da..c991baf 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -460,16 +460,6 @@ END_SQL { $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i."; - my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} ); - - unless ($letter) { - $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; - - # might as well skip while PERIOD, no other borrowers are going to work. - # FIXME : Does this mean a letter must be defined in order to trigger a debar ? - next PERIOD; - } - if ( $overdue_rules->{"debarred$i"} ) { #action taken is debarring @@ -494,11 +484,12 @@ END_SQL my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", @item_info) . "\n"; $itemcount++; - push @items, { itemnumber => $item_info->{'itemnumber'}, biblionumber => $item_info->{'biblionumber'} }; + push @items, $item_info; } $sth2->finish; - $letter = parse_letter( - { letter => $letter, + + my $letter = parse_letter( + { letter_code => $overdue_rules->{"letter$i"}, borrowernumber => $borrowernumber, branchcode => $branchcode, items => \@items, @@ -509,6 +500,13 @@ END_SQL } } ); + unless ($letter) { + $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; + + # might as well skip while PERIOD, no other borrowers are going to work. + # FIXME : Does this mean a letter must be defined in order to trigger a debar ? + next PERIOD; + } if ( $exceededPrintNoticesMaxLines ) { $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; @@ -643,53 +641,55 @@ substituted keys and values. =cut -sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:parseletter +sub parse_letter { my $params = shift; - foreach my $required (qw( letter borrowernumber )) { + foreach my $required (qw( letter_code borrowernumber )) { return unless exists $params->{$required}; } - my $todaysdate = C4::Dates->new()->output("syspref"); - $params->{'letter'}->{title} =~ s/<>/$todaysdate/g; - $params->{'letter'}->{content} =~ s/<>/$todaysdate/g; + my $substitute = $params->{'substitute'} || {}; + $substitute->{today} ||= C4::Dates->new()->output("syspref"); - if ( $params->{'substitute'} ) { - while ( my ( $key, $replacedby ) = each %{ $params->{'substitute'} } ) { - my $replacefield = "<<$key>>"; - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } + my %tables = ( 'borrowers' => $params->{'borrowernumber'} ); + if ( my $p = $params->{'branchcode'} ) { + $tables{'branches'} = $p; } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); - - if ( $params->{'branchcode'} ) { - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + my $currency_format; + if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/o) { # process any fine tags... + $currency_format = $1; + $params->{'letter'}->{'content'} =~ s/.*<\/fine>/<>/o; } - if ( $params->{'items'} ) { + my @item_tables; + if ( my $i = $params->{'items'} ) { my $item_format = ''; - PROCESS_ITEMS: - while (scalar(@{$params->{'items'}}) > 0) { - my $item = shift @{$params->{'items'}}; + foreach my $item (@$i) { my $fine = GetFine($item->{'itemnumber'}, $params->{'borrowernumber'}); if (!$item_format) { $params->{'letter'}->{'content'} =~ m/(.*<\/item>)/; $item_format = $1; } - if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/) { # process any fine tags... - my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL); - $params->{'letter'}->{'content'} =~ s/.*<\/fine>/$formatted_fine/; - } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'items', $item->{'itemnumber'} ); - $params->{'letter'}->{'content'} =~ s/(.*<\/item>)/$1\n$item_format/ if scalar(@{$params->{'items'}} > 0); + $item->{'fine'} = currency_format($currency_format, "$fine", FMT_SYMBOL) + if $currency_format; + + push @item_tables, { + 'biblio' => $item->{'biblionumber'}, + 'biblioitems' => $item->{'biblionumber'}, + 'items' => $item, + }; } } - $params->{'letter'}->{'content'} =~ s/<\/{0,1}?item>//g; # strip all remaining item tags... - return $params->{'letter'}; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $params->{'branchcode'}, + tables => \%tables, + substitute => $substitute, + repeat => { item => \@item_tables }, + ); } =head2 prepare_letter_for_printing diff --git a/t/db_dependent/lib/KohaTest/Letters.pm b/t/db_dependent/lib/KohaTest/Letters.pm index 97d58fb..f2d7b0d 100644 --- a/t/db_dependent/lib/KohaTest/Letters.pm +++ b/t/db_dependent/lib/KohaTest/Letters.pm @@ -12,13 +12,12 @@ sub testing_class { 'C4::Letters' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( getletter - addalert + my @methods = qw( addalert delalert getalert findrelatedto SendAlerts - parseletter + GetPreparedLetter ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm index 76b6ab4..53e5439 100644 --- a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm +++ b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm @@ -10,7 +10,7 @@ use Test::More; sub GetLetter : Test( 6 ) { my $self = shift; - my $letter = getletter( 'circulation', 'ODUE' ); + my $letter = getletter( 'circulation', 'ODUE', '' ); isa_ok( $letter, 'HASH' ) or diag( Data::Dumper->Dump( [ $letter ], [ 'letter' ] ) ); @@ -21,7 +21,6 @@ sub GetLetter : Test( 6 ) { ok( exists $letter->{'name'}, 'name' ); ok( exists $letter->{'title'}, 'title' ); - } 1; diff --git a/t/db_dependent/lib/KohaTest/Members.pm b/t/db_dependent/lib/KohaTest/Members.pm index 5646be1..dfde7da 100644 --- a/t/db_dependent/lib/KohaTest/Members.pm +++ b/t/db_dependent/lib/KohaTest/Members.pm @@ -52,6 +52,7 @@ sub methods : Test( 1 ) { GetBorrowersWhoHaveNeverBorrowed GetBorrowersWithIssuesHistoryOlderThan GetBorrowersNamesAndLatestIssue + IssueSlip ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Print.pm b/t/db_dependent/lib/KohaTest/Print.pm index 02fd5fb..d35ab34 100644 --- a/t/db_dependent/lib/KohaTest/Print.pm +++ b/t/db_dependent/lib/KohaTest/Print.pm @@ -12,10 +12,7 @@ sub testing_class { 'C4::Print' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( remoteprint - printreserve - printslip - ); + my @methods = qw( printslip ); can_ok( $self->testing_class, @methods ); } diff --git a/t/db_dependent/lib/KohaTest/Reserves.pm b/t/db_dependent/lib/KohaTest/Reserves.pm index 8b05dd0..6416ac3 100644 --- a/t/db_dependent/lib/KohaTest/Reserves.pm +++ b/t/db_dependent/lib/KohaTest/Reserves.pm @@ -33,6 +33,7 @@ sub methods : Test( 1 ) { GetReserveInfo _FixPriority _Findgroupreserve + ReserveSlip ); can_ok( $self->testing_class, @methods ); diff --git a/tools/letter.pl b/tools/letter.pl index f5dc0c6..7cfca55 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -46,14 +46,34 @@ use CGI; use C4::Auth; use C4::Context; use C4::Output; +use C4::Branch; # GetBranches -# letter_exists($module, $code) -# - return true if a letter with the given $module and $code exists +# _letter_from_where($branchcode,$module, $code) +# - return FROM WHERE clause and bind args for a letter +sub _letter_from_where { + my ($branchcode, $module, $code) = @_; + my $sql = q{FROM letter WHERE branchcode = ? AND module = ? AND code = ?}; + my @args = ($branchcode || '', $module, $code); +# Mysql is retarded. cause branchcode is part of the primary key it cannot be null. How does that +# work with foreign key constraint I wonder... + +# if ($branchcode) { +# $sql .= " AND branchcode = ?"; +# push @args, $branchcode; +# } else { +# $sql .= " AND branchcode IS NULL"; +# } + + return ($sql, \@args); +} + +# letter_exists($branchcode,$module, $code) +# - return true if a letter with the given $branchcode, $module and $code exists sub letter_exists { - my ($module, $code) = @_; + my ($sql, $args) = _letter_from_where(@_); my $dbh = C4::Context->dbh; - my $letters = $dbh->selectall_arrayref(q{SELECT name FROM letter WHERE module = ? AND code = ?}, undef, $module, $code); - return @{$letters}; + my $letter = $dbh->selectrow_hashref("SELECT * $sql", undef, @$args); + return $letter; } # $protected_letters = protected_letters() @@ -67,14 +87,12 @@ sub protected_letters { my $input = new CGI; my $searchfield = $input->param('searchfield'); my $script_name = '/cgi-bin/koha/tools/letter.pl'; +my $branchcode = $input->param('branchcode'); my $code = $input->param('code'); my $module = $input->param('module'); my $content = $input->param('content'); -my $op = $input->param('op'); +my $op = $input->param('op') || ''; my $dbh = C4::Context->dbh; -if (!defined $module ) { - $module = q{}; -} my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -87,32 +105,38 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -if (!defined $op) { - $op = q{}; # silence errors from eq -} +my $my_branch = C4::Context->preference("IndependantBranches") + ? C4::Context->userenv()->{'branch'} + : undef; # we show only the TMPL_VAR names $op $template->param( + independant_branch => $my_branch, script_name => $script_name, action => $script_name ); +if ($op eq 'copy') { + add_copy(); + $op = 'add_form'; +} + if ($op eq 'add_form') { - add_form($module, $code); + add_form($branchcode, $module, $code); } elsif ( $op eq 'add_validate' ) { add_validate(); $op = q{}; # next operation is to return to default screen } elsif ( $op eq 'delete_confirm' ) { - delete_confirm($module, $code); + delete_confirm($branchcode, $module, $code); } elsif ( $op eq 'delete_confirmed' ) { - delete_confirmed($module, $code); + delete_confirmed($branchcode, $module, $code); $op = q{}; # next operation is to return to default screen } else { - default_display($searchfield); + default_display($branchcode,$searchfield); } # Do this last as delete_confirmed resets @@ -125,23 +149,21 @@ if ($op) { output_html_with_http_headers $input, $cookie, $template->output; sub add_form { - my ($module, $code ) = @_; + my ($branchcode,$module, $code ) = @_; my $letter; # if code has been passed we can identify letter and its an update action if ($code) { - $letter = $dbh->selectrow_hashref(q{SELECT module, code, name, title, content FROM letter WHERE module=? AND code=?}, - undef, $module, $code); + $letter = letter_exists($branchcode,$module, $code); + } + if ($letter) { $template->param( modify => 1 ); $template->param( code => $letter->{code} ); } else { # initialize the new fields $letter = { - module => $module, - code => q{}, - name => q{}, - title => q{}, - content => q{}, + branchcode => $branchcode, + module => $module, }; $template->param( adding => 1 ); } @@ -173,14 +195,20 @@ sub add_form { {value => q{}, text => '---ITEMS---' }, {value => 'items.content', text => 'items.content'}, add_fields('issues','borrowers'); + if ($module eq 'circulation') { + push @{$field_selection}, add_fields('opac_news'); + } } $template->param( - name => $letter->{name}, - title => $letter->{title}, - content => $letter->{content}, - module => $module, - $module => 1, + branchcode => $letter->{branchcode}, + name => $letter->{name}, + is_html => $letter->{is_html}, + title => $letter->{title}, + content => $letter->{content}, + module => $module, + $module => 1, + branchloop => _branchloop($branchcode), SQLfieldname => $field_selection, ); return; @@ -188,37 +216,56 @@ sub add_form { sub add_validate { my $dbh = C4::Context->dbh; - my $module = $input->param('module'); - my $oldmodule = $input->param('oldmodule'); - my $code = $input->param('code'); - my $name = $input->param('name'); - my $title = $input->param('title'); - my $content = $input->param('content'); - if (letter_exists($oldmodule, $code)) { + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode') || ''; + my $module = $input->param('module'); + my $oldmodule = $input->param('oldmodule'); + my $code = $input->param('code'); + my $name = $input->param('name'); + my $is_html = $input->param('is_html'); + my $title = $input->param('title'); + my $content = $input->param('content'); + if (letter_exists($oldbranchcode,$oldmodule, $code)) { $dbh->do( - q{UPDATE letter SET module = ?, code = ?, name = ?, title = ?, content = ? WHERE module = ? AND code = ?}, + q{UPDATE letter SET branchcode = ?, module = ?, name = ?, is_html = ?, title = ?, content = ? WHERE branchcode = ? AND module = ? AND code = ?}, undef, - $module, $code, $name, $title, $content, - $oldmodule, $code + $branchcode, $module, $name, $is_html || 0, $title, $content, + $oldbranchcode, $oldmodule, $code ); } else { $dbh->do( - q{INSERT INTO letter (module,code,name,title,content) VALUES (?,?,?,?,?)}, + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, undef, - $module, $code, $name, $title, $content + $branchcode, $module, $code, $name, $is_html || 0, $title, $content ); } # set up default display - default_display(); - return; + default_display($branchcode); +} + +sub add_copy { + my $dbh = C4::Context->dbh; + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode'); + my $module = $input->param('module'); + my $code = $input->param('code'); + + return if letter_exists($branchcode,$module, $code); + + my $old_letter = letter_exists($oldbranchcode,$module, $code); + + $dbh->do( + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, + undef, + $branchcode, $module, $code, $old_letter->{name}, $old_letter->{is_html}, $old_letter->{title}, $old_letter->{content} + ); } sub delete_confirm { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; my $dbh = C4::Context->dbh; - my $letter = $dbh->selectrow_hashref(q|SELECT name FROM letter WHERE module = ? AND code = ?|, - { Slice => {} }, - $module, $code); + my $letter = letter_exists($branchcode, $module, $code); + $template->param( branchcode => $branchcode ); $template->param( code => $code ); $template->param( module => $module); $template->param( name => $letter->{name}); @@ -226,40 +273,54 @@ sub delete_confirm { } sub delete_confirmed { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; + my ($sql, $args) = _letter_from_where($branchcode, $module, $code); my $dbh = C4::Context->dbh; - $dbh->do('DELETE FROM letter WHERE module=? AND code=?',{},$module,$code); + $dbh->do("DELETE $sql", undef, @$args); # setup default display for screen - default_display(); + default_display($branchcode); return; } sub retrieve_letters { - my $searchstring = shift; + my ($branchcode, $searchstring) = @_; + + $branchcode = $my_branch if $branchcode && $my_branch; + my $dbh = C4::Context->dbh; - if ($searchstring) { - if ($searchstring=~m/(\S+)/) { - $searchstring = $1 . q{%}; - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter WHERE code LIKE ? ORDER BY module, code', - { Slice => {} }, $searchstring); - } + my ($sql, @where, @args); + $sql = "SELECT branchcode, module, code, name, branchname + FROM letter + LEFT OUTER JOIN branches USING (branchcode)"; + if ($searchstring && $searchstring=~m/(\S+)/) { + $searchstring = $1 . q{%}; + push @where, 'code LIKE ?'; + push @args, $searchstring; } - else { - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter ORDER BY module, code', { Slice => {} }); + elsif ($branchcode) { + push @where, 'branchcode = ?'; + push @args, $branchcode || ''; } - return; + elsif ($my_branch) { + push @where, "(branchcode = ? OR branchcode = '')"; + push @args, $my_branch; + } + + $sql .= " WHERE ".join(" AND ", @where) if @where; + $sql .= " ORDER BY module, code, branchcode"; +# use Data::Dumper; die Dumper($sql, \@args); + return $dbh->selectall_arrayref($sql, { Slice => {} }, @args); } sub default_display { - my $searchfield = shift; - my $results; + my ($branchcode, $searchfield) = @_; + if ( $searchfield ) { $template->param( search => 1 ); $template->param( searchfield => $searchfield ); - $results = retrieve_letters($searchfield); - } else { - $results = retrieve_letters(); } + my $results = retrieve_letters($branchcode,$searchfield); + my $loop_data = []; my $protected_letters = protected_letters(); foreach my $row (@{$results}) { @@ -267,8 +328,27 @@ sub default_display { push @{$loop_data}, $row; } - $template->param( letter => $loop_data ); - return; + + $template->param( + letter => $loop_data, + branchloop => _branchloop($branchcode), + ); +} + +sub _branchloop { + my ($branchcode) = @_; + + my $branches = GetBranches(); + my @branchloop; + for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + push @branchloop, { + value => $thisbranch, + selected => $branchcode && $thisbranch eq $branchcode, + branchname => $branches->{$thisbranch}->{'branchname'}, + }; + } + + return \@branchloop; } sub add_fields { -- 1.6.5 From srdjan at catalyst.net.nz Mon Dec 19 05:59:45 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 19 Dec 2011 17:59:45 +1300 Subject: [Koha-patches] [PATCH] bug_5473: Update items when receiving shipments In-Reply-To: References: Message-ID: <1324270785-25666-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Items.pm | 3 +-- acqui/finishreceive.pl | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 8802a4c..a3616eb 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -458,8 +458,7 @@ sub ModItemFromMarc { =head2 ModItem - ModItem({ column => $newvalue }, $biblionumber, - $itemnumber[, $original_item_marc]); + ModItem({ column => $newvalue }, $biblionumber, $itemnumber); Change one or more columns in an item record and update the MARC representation of the item. diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 71b13d6..641932f 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -76,6 +76,7 @@ if ( any { $order->{$_} ne $tplorder{$_} } qw(quantity quantityreceived notes rr if ($quantityrec > $origquantityrec ) { # now, add items if applicable if (C4::Context->preference('AcqCreateItem') eq 'receiving') { + my @tags = $input->param('tag'); my @subfields = $input->param('subfield'); my @field_values = $input->param('field_value'); @@ -105,13 +106,28 @@ if ($quantityrec > $origquantityrec ) { $itemhash{$item}->{'ind_tag'}, $itemhash{$item}->{'indicator'},'ITEM'); my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); - my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber); + my (undef,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber); } } # save the quantity received. - if( $quantityrec > 0 ) { - $datereceived = ModReceiveOrder($biblionumber,$ordernumber, $quantityrec ,$user,$unitprice,$invoiceno,$freight,$replacement,undef,$datereceived); - } + $datereceived = ModReceiveOrder($biblionumber,$ordernumber, $quantityrec ,$user,$unitprice,$invoiceno,$freight,$replacement,undef,$datereceived); +} + +update_item( $_ ) foreach GetItemnumbersFromOrder( $ordernumber ); + +print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived$error_url_str"); + +################################ End of script ################################ + +sub update_item { + my ( $itemnumber ) = @_; + + ModItem( { + booksellerid => $supplierid, + dateaccessioned => $datereceived, + price => $unitprice, + replacementprice => $replacement, + replacementpricedate => $datereceived, + }, $biblionumber, $itemnumber ); } - print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived$error_url_str"); -- 1.6.5 From srdjan at catalyst.net.nz Mon Dec 19 07:24:35 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Mon, 19 Dec 2011 19:24:35 +1300 Subject: [Koha-patches] [PATCH] bug_6210: Select framework if merging two records with different frameworks In-Reply-To: References: Message-ID: <1324275875-28499-1-git-send-email-srdjan@catalyst.net.nz> ModBiblio() - set framework to "" if "Default" --- C4/Biblio.pm | 41 ++++--- cataloguing/merge.pl | 136 +++++++++++-------- .../prog/en/modules/cataloguing/merge.tt | 39 +++++- 3 files changed, 136 insertions(+), 80 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index ac78ae3..7df8412 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -320,7 +320,7 @@ sub ModBiblio { SetUTF8Flag($record); my $dbh = C4::Context->dbh; - $frameworkcode = "" unless $frameworkcode; + $frameworkcode = "" if !$frameworkcode || $frameworkcode eq "Default"; # XXX _strip_item_fields($record, $frameworkcode); @@ -1043,9 +1043,13 @@ for the given frameworkcode sub GetMarcFromKohaField { my ( $kohafield, $frameworkcode ) = @_; - return 0, 0 unless $kohafield and defined $frameworkcode; + return (0, undef) unless $kohafield and defined $frameworkcode; my $relations = C4::Context->marcfromkohafield; - return ( $relations->{$frameworkcode}->{$kohafield}->[0], $relations->{$frameworkcode}->{$kohafield}->[1] ); + if ( my $mf = $relations->{$frameworkcode}->{$kohafield} ) { + return @$mf; + } + warn qq{No marc tags for framework "$frameworkcode" field $kohafield}; + return (0, undef); } =head2 GetMarcBiblio @@ -3179,9 +3183,24 @@ sub _koha_marc_update_bib_ids { # we drop the original field # we add the new builded field. my ( $biblio_tag, $biblio_subfield ) = GetMarcFromKohaField( "biblio.biblionumber", $frameworkcode ); + die qq{No biblionumber tag for framework "$frameworkcode"} unless $biblio_tag; my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcFromKohaField( "biblioitems.biblioitemnumber", $frameworkcode ); + die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblio_tag; - if ( $biblio_tag != $biblioitem_tag ) { + if ( $biblio_tag == $biblioitem_tag ) { + + # biblionumber & biblioitemnumber are in the same field (can't be <10 as fields <10 have only 1 value) + my $new_field = MARC::Field->new( + $biblio_tag, '', '', + "$biblio_subfield" => $biblionumber, + "$biblioitem_subfield" => $biblioitemnumber + ); + + # drop old field and create new one... + my $old_field = $record->field($biblio_tag); + $record->delete_field($old_field) if $old_field; + $record->insert_fields_ordered($new_field); + } else { # biblionumber & biblioitemnumber are in different fields @@ -3209,20 +3228,6 @@ sub _koha_marc_update_bib_ids { $old_field = $record->field($biblioitem_tag); $record->delete_field($old_field) if $old_field; $record->insert_fields_ordered($new_field); - - } else { - - # biblionumber & biblioitemnumber are in the same field (can't be <10 as fields <10 have only 1 value) - my $new_field = MARC::Field->new( - $biblio_tag, '', '', - "$biblio_subfield" => $biblionumber, - "$biblioitem_subfield" => $biblioitemnumber - ); - - # drop old field and create new one... - my $old_field = $record->field($biblio_tag); - $record->delete_field($old_field) if $old_field; - $record->insert_fields_ordered($new_field); } } diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index 0b881f1..1aed8fa 100755 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -27,6 +27,7 @@ use C4::Auth; use C4::Items; use C4::Biblio; use C4::Serials; +use C4::Koha; use C4::Reserves qw/MergeHolds/; my $input = new CGI; @@ -61,7 +62,7 @@ if ($merge) { # Rewriting the leader $record->leader(GetMarcBiblio($tobiblio)->leader()); - my $frameworkcode = &GetFrameworkCode($tobiblio); + my $frameworkcode = $input->param('frameworkcode'); my @notmoveditems; # Modifying the reference record @@ -108,77 +109,98 @@ if ($merge) { push @errors, $error if ($error); } - # Errors - my @errors_loop = map{{error => $_}}@errors; - # Parameters $template->param( - errors => \@errors_loop, result => 1, biblio1 => $input->param('biblio1') ); - #------------------------- # Show records to merge #------------------------- } else { - my $mergereference = $input->param('mergereference'); my $biblionumber = $input->param('biblionumber'); - my $data1 = GetBiblioData($biblionumber[0]); - my $data2 = GetBiblioData($biblionumber[1]); - - # Ask the user to choose which record will be the kept - if (not $mergereference) { - $template->param( - choosereference => 1, - biblio1 => $biblionumber[0], - biblio2 => $biblionumber[1], - title1 => $data1->{'title'}, - title2 => $data2->{'title'} - ); - } else { - - if (scalar(@biblionumber) != 2) { - push @errors, "An unexpected number of records was provided for merging. Currently only two records at a time can be merged."; - } - - # Checks if both records use the same framework - my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]); - my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]); - my $framework; - if ($frameworkcode1 ne $frameworkcode2) { - push @errors, "The records selected for merging are using different frameworks. Currently merging is only available for records using the same framework."; - } else { - $framework = $frameworkcode1; - } - - # Getting MARC Structure - my $tagslib = GetMarcStructure(1, $framework); - - my $notreference = ($biblionumber[0] == $mergereference) ? $biblionumber[1] : $biblionumber[0]; - - # Creating a loop for display - my @record1 = _createMarcHash(GetMarcBiblio($mergereference), $tagslib); - my @record2 = _createMarcHash(GetMarcBiblio($notreference), $tagslib); - - # Errors - my @errors_loop = map{{error => $_}}@errors; - - # Parameters - $template->param( - errors => \@errors_loop, - biblio1 => $mergereference, - biblio2 => $notreference, - mergereference => $mergereference, - record1 => @record1, - record2 => @record2, - framework => $framework - ); + if (scalar(@biblionumber) != 2) { + push @errors, "An unexpected number of records was provided for merging. Currently only two records at a time can be merged."; + } + else { + my $data1 = GetBiblioData($biblionumber[0]); + my $data2 = GetBiblioData($biblionumber[1]); + + # Checks if both records use the same framework + my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]); + my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]); + + if ($mergereference) { + + my $framework; + if ($frameworkcode1 ne $frameworkcode2) { + $framework = $input->param('frameworkcode') + or push @errors, "Famework not selected."; + } else { + $framework = $frameworkcode1; + } + + # Getting MARC Structure + my $tagslib = GetMarcStructure(1, $framework); + + my $notreference = ($biblionumber[0] == $mergereference) ? $biblionumber[1] : $biblionumber[0]; + + # Creating a loop for display + my @record1 = _createMarcHash(GetMarcBiblio($mergereference), $tagslib); + my @record2 = _createMarcHash(GetMarcBiblio($notreference), $tagslib); + + # Parameters + $template->param( + biblio1 => $mergereference, + biblio2 => $notreference, + mergereference => $mergereference, + record1 => @record1, + record2 => @record2, + framework => $framework, + ); + } + else { + + # Ask the user to choose which record will be the kept + $template->param( + choosereference => 1, + biblio1 => $biblionumber[0], + biblio2 => $biblionumber[1], + title1 => $data1->{'title'}, + title2 => $data2->{'title'} + ); + if ($frameworkcode1 ne $frameworkcode2) { + my $frameworks = getframeworks; + my @frameworkselect; + foreach my $thisframeworkcode ( keys %$frameworks ) { + my %row = ( + value => $thisframeworkcode, + frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, + ); + if ($frameworkcode1 eq $thisframeworkcode){ + $row{'selected'} = 1; + } + push @frameworkselect, \%row; + } + $template->param( + frameworkselect => \@frameworkselect, + frameworkcode1 => $frameworkcode1, + frameworkcode2 => $frameworkcode2, + ); + } + } } } + +if (@errors) { + # Errors + my @errors_loop = map{{error => $_}}@errors; + $template->param( errors => \@errors_loop ); +} + output_html_with_http_headers $input, $cookie, $template->output; exit; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt index 0d8a84c..3300f78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt @@ -161,6 +161,10 @@ $(document).ready(function(){ }); +function changeFramework(fw) { + $("#Frameworks").val(fw); +} + //]]> @@ -194,10 +198,34 @@ $(document).ready(function(){
    Merge reference +
    + + + + +
      -
    1. -
    2. +
    3. +
    +
    + [% IF frameworkselect %] +
    + + [% END %] +
    +
    @@ -332,14 +360,15 @@ $(document).ready(function(){ [% END %] +
    +
    +
    + -
    -
    -
    -- 1.6.5 From srdjan at catalyst.net.nz Tue Dec 20 02:58:12 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Tue, 20 Dec 2011 14:58:12 +1300 Subject: [Koha-patches] [PATCH] bug_5473: Update items when receiving shipments In-Reply-To: References: Message-ID: <1324346292-16584-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Acquisition.pm | 1 - C4/Items.pm | 3 +-- acqui/finishreceive.pl | 46 +++++++++++++++++++++++----------------------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 7127f24..ef95ead 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -923,7 +923,6 @@ sub NewOrder { =cut sub NewOrderItem { - #my ($biblioitemnumber,$ordernumber, $biblionumber) = @_; my ($itemnumber, $ordernumber) = @_; my $dbh = C4::Context->dbh; my $query = qq| diff --git a/C4/Items.pm b/C4/Items.pm index 8802a4c..a3616eb 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -458,8 +458,7 @@ sub ModItemFromMarc { =head2 ModItem - ModItem({ column => $newvalue }, $biblionumber, - $itemnumber[, $original_item_marc]); + ModItem({ column => $newvalue }, $biblionumber, $itemnumber); Change one or more columns in an item record and update the MARC representation of the item. diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 71b13d6..55a9977 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -54,28 +54,11 @@ my $error_url_str; my $ecost = $input->param('ecost'); my $note = $input->param("note"); -my %tplorder = ( 'quantity' => $input->param('quantity') || '', - 'quantityreceived' => $input->param('quantityrec') || '', - 'notes' => $input->param("note") || '', - 'rrp' => $input->param('rrp') || '', - 'ecost' => $input->param('ecost') || '', - 'unitprice' => $input->param('cost') || '', - ); -my $order = GetOrder($ordernumber); -if ( any { $order->{$_} ne $tplorder{$_} } qw(quantity quantityreceived notes rrp ecost unitprice) ) { - $order->{quantity} = $tplorder{quantity} if $tplorder{quantity}; - $order->{quantityreceived} = $tplorder{quantityreceived} if $tplorder{quantityreceived}; - $order->{notes} = $tplorder{notes} if $tplorder{notes}; - $order->{rrp} = $tplorder{rrp} if $tplorder{rrp}; - $order->{ecost} = $tplorder{ecost} if $tplorder{ecost}; - $order->{unitprice} = $tplorder{unitprice} if $tplorder{unitprice}; - ModOrder($order); -} - #need old recievedate if we update the order, parcel.pl only shows the right parcel this way FIXME if ($quantityrec > $origquantityrec ) { # now, add items if applicable if (C4::Context->preference('AcqCreateItem') eq 'receiving') { + my @tags = $input->param('tag'); my @subfields = $input->param('subfield'); my @field_values = $input->param('field_value'); @@ -105,13 +88,30 @@ if ($quantityrec > $origquantityrec ) { $itemhash{$item}->{'ind_tag'}, $itemhash{$item}->{'indicator'},'ITEM'); my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); - my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber); + my (undef,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber); + NewOrderItem($itemnumber, $ordernumber); } } # save the quantity received. - if( $quantityrec > 0 ) { - $datereceived = ModReceiveOrder($biblionumber,$ordernumber, $quantityrec ,$user,$unitprice,$invoiceno,$freight,$replacement,undef,$datereceived); - } + $datereceived = ModReceiveOrder($biblionumber,$ordernumber, $quantityrec ,$user,$unitprice,$invoiceno,$freight,$replacement,undef,$datereceived); +} + +update_item( $_ ) foreach GetItemnumbersFromOrder( $ordernumber ); + +print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived$error_url_str"); + +################################ End of script ################################ + +sub update_item { + my ( $itemnumber ) = @_; + warn "AAA $itemnumber"; + + ModItem( { + booksellerid => $supplierid, + dateaccessioned => $datereceived, + price => $unitprice, + replacementprice => $replacement, + replacementpricedate => $datereceived, + }, $biblionumber, $itemnumber ); } - print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived$error_url_str"); -- 1.6.5 From srdjan at catalyst.net.nz Tue Dec 20 06:42:21 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Tue, 20 Dec 2011 18:42:21 +1300 Subject: [Koha-patches] [PATCH] bug_7235: Adding invoice number and vendor name to the moredetail page In-Reply-To: References: Message-ID: <1324359741-385-1-git-send-email-srdjan@catalyst.net.nz> --- catalogue/moredetail.pl | 8 +++++++- .../prog/en/modules/catalogue/moredetail.tt | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index f5bb904..d75e36f 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -27,7 +27,8 @@ use C4::Biblio; use C4::Items; use C4::Branch; use C4::Acquisition; -use C4::Output; +use C4::Bookseller qw(GetBookSellerFromId); +use C4::Output; # contains gettemplate use C4::Auth; use C4::Serials; use C4::Dates qw/format_date/; @@ -147,6 +148,11 @@ foreach my $item (@items){ $item->{'ordernumber'} = $order->{'ordernumber'}; $item->{'basketno'} = $order->{'basketno'}; $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'}; + if ($item->{'basketno'}){ + my $basket = GetBasket($item->{'basketno'}); + my $bookseller = GetBookSellerFromId($basket->{'booksellerid'}); + $item->{'vendor'} = $bookseller->{'name'}; + } $item->{'datereceived'} = $order->{'datereceived'}; if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index e79e9e8..0d06dba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -163,8 +163,18 @@ [% END %] [% ELSE %] [% ITEM_DAT.dateaccessioned %] - [% END %] - + [% END %] + + [% IF ITEM_DAT.vendor %] +
  • Vendor + [% ITEM_DAT.vendor %] +
  • + [% IF ITEM_DAT.booksellerinvoicenumber %] +
  • Invoice number + [% ITEM_DAT.booksellerinvoicenumber %] +
  • + [% END %] + [% END %]
  • Total Checkouts:[% IF ( ITEM_DAT.issues ) %][% ITEM_DAT.issues %][% ELSE %]0[% END %] (View item's checkout history)
  • -- 1.6.5 From dpavlin at rot13.org Tue Dec 20 13:05:57 2011 From: dpavlin at rot13.org (Dobrica Pavlinusic) Date: Tue, 20 Dec 2011 13:05:57 +0100 Subject: [Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output Message-ID: <1324382757-5112-1-git-send-email-dpavlin@rot13.org> Currently, -v option resets Zebra log output to default system values. This produce amount of log specified in system defaults which is usually too low for debugging. This change explicitly forces all Zebra log output which create much more chatter so it triggers with verbosity level 2 Test scenario: 1. pick koha site to reindex 2. use -v -v options to rebuild_zebra.pl to see additional output --- misc/migration_tools/rebuild_zebra.pl | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index 6fa6501..5168fc4 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -34,7 +34,7 @@ my $want_help; my $as_xml; my $process_zebraqueue; my $do_not_clear_zebraqueue; -my $verbose_logging; +my $verbose_logging = 0; my $zebraidx_log_opt = " -v none,fatal,warn "; my $result = GetOptions( 'd:s' => \$directory, @@ -51,7 +51,7 @@ my $result = GetOptions( 'x' => \$as_xml, 'y' => \$do_not_clear_zebraqueue, 'z' => \$process_zebraqueue, - 'v' => \$verbose_logging, + 'v+' => \$verbose_logging, ); @@ -96,8 +96,8 @@ if ($noshadow) { # -v is for verbose, which seems backwards here because of how logging is set # on the CLI of zebraidx. It works this way. The default is to not log much -if ($verbose_logging) { - $zebraidx_log_opt = ''; +if ($verbose_logging >= 2) { + $zebraidx_log_opt = '-v none,fatal,warn,all'; } my $use_tempdir = 0; @@ -639,6 +639,7 @@ Parameters: -v increase the amount of logging. Normally only warnings and errors from the indexing are shown. + Use log level 2 (-v -v) to include all Zebra logs. -munge-config Deprecated option to try to fix Zebra config files. -- 1.7.2.5 From henridamien.laurent at biblibre.com Tue Dec 20 14:06:24 2011 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Tue, 20 Dec 2011 14:06:24 +0100 Subject: [Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output In-Reply-To: <1324382757-5112-1-git-send-email-dpavlin@rot13.org> References: <1324382757-5112-1-git-send-email-dpavlin@rot13.org> Message-ID: <4EF08850.4050906@biblibre.com> Le 20/12/2011 13:05, Dobrica Pavlinusic a ?crit : > Currently, -v option resets Zebra log output to default system values. > > This produce amount of log specified in system defaults which is usually > too low for debugging. > > This change explicitly forces all Zebra log output which create much more > chatter so it triggers with verbosity level 2 > > Test scenario: > 1. pick koha site to reindex > 2. use -v -v options to rebuild_zebra.pl to see additional output > --- > misc/migration_tools/rebuild_zebra.pl | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl > index 6fa6501..5168fc4 100755 > --- a/misc/migration_tools/rebuild_zebra.pl > +++ b/misc/migration_tools/rebuild_zebra.pl > @@ -34,7 +34,7 @@ my $want_help; > my $as_xml; > my $process_zebraqueue; > my $do_not_clear_zebraqueue; > -my $verbose_logging; > +my $verbose_logging = 0; > my $zebraidx_log_opt = " -v none,fatal,warn "; > my $result = GetOptions( > 'd:s' => \$directory, > @@ -51,7 +51,7 @@ my $result = GetOptions( > 'x' => \$as_xml, > 'y' => \$do_not_clear_zebraqueue, > 'z' => \$process_zebraqueue, > - 'v' => \$verbose_logging, > + 'v+' => \$verbose_logging, > ); > > > @@ -96,8 +96,8 @@ if ($noshadow) { > > # -v is for verbose, which seems backwards here because of how logging is set > # on the CLI of zebraidx. It works this way. The default is to not log much > -if ($verbose_logging) { > - $zebraidx_log_opt = ''; > +if ($verbose_logging >= 2) { > + $zebraidx_log_opt = '-v none,fatal,warn,all'; > } mmm... in my opinion, all would be WAY too verbose. request,log are enough to debug the search query. my two cents. > > my $use_tempdir = 0; > @@ -639,6 +639,7 @@ Parameters: > > -v increase the amount of logging. Normally only > warnings and errors from the indexing are shown. > + Use log level 2 (-v -v) to include all Zebra logs. > > -munge-config Deprecated option to try > to fix Zebra config files. From dpavlin at rot13.org Tue Dec 20 15:52:17 2011 From: dpavlin at rot13.org (Dobrica Pavlinusic) Date: Tue, 20 Dec 2011 15:52:17 +0100 Subject: [Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output In-Reply-To: <4EF08850.4050906@biblibre.com> References: <1324382757-5112-1-git-send-email-dpavlin@rot13.org> <4EF08850.4050906@biblibre.com> Message-ID: <20111220145217.GC12086@rot13.org> On Tue, Dec 20, 2011 at 02:06:24PM +0100, LAURENT Henri-Damien wrote: > > -if ($verbose_logging) { > > - $zebraidx_log_opt = ''; > > +if ($verbose_logging >= 2) { > > + $zebraidx_log_opt = '-v none,fatal,warn,all'; > > } > mmm... in my opinion, all would be WAY too verbose. > request,log are enough to debug the search query. > my two cents. all is very verbose, but does provide additional information about Zebra progress (I must admit I'm leaning towards too much information as opposed to too little). Should I move all to verbose level 3 (-v -v -v) or just remove it all together? -- Dobrica Pavlinusic 2share!2flame dpavlin at rot13.org Unix addict. Internet consultant. http://www.rot13.org/~dpavlin From henridamien.laurent at biblibre.com Tue Dec 20 16:54:17 2011 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Tue, 20 Dec 2011 16:54:17 +0100 Subject: [Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output In-Reply-To: <20111220145217.GC12086@rot13.org> References: <1324382757-5112-1-git-send-email-dpavlin@rot13.org> <4EF08850.4050906@biblibre.com> <20111220145217.GC12086@rot13.org> Message-ID: <4EF0AFA9.1060802@biblibre.com> Le 20/12/2011 15:52, Dobrica Pavlinusic a ?crit : > On Tue, Dec 20, 2011 at 02:06:24PM +0100, LAURENT Henri-Damien wrote: >>> -if ($verbose_logging) { >>> - $zebraidx_log_opt = ''; >>> +if ($verbose_logging >= 2) { >>> + $zebraidx_log_opt = '-v none,fatal,warn,all'; >>> } >> mmm... in my opinion, all would be WAY too verbose. >> request,log are enough to debug the search query. >> my two cents. > > all is very verbose, but does provide additional information about Zebra > progress (I must admit I'm leaning towards too much information as > opposed to too little). > > Should I move all to verbose level 3 (-v -v -v) or just remove it all > together? > I would leave that to -vvv When I looked at logs when all is set, I found it quite useless, but if you need that. I would say let's keep it for -vvv From srdjan at catalyst.net.nz Wed Dec 21 08:59:31 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Wed, 21 Dec 2011 20:59:31 +1300 Subject: [Koha-patches] [PATCH] bug_6489: Do not raise WrongTransfer if it is transrerring to reserve branch In-Reply-To: References: Message-ID: <1324454371-14683-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Circulation.pm | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a6f4f2..f1b54d0 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1574,6 +1574,14 @@ sub AddReturn { # check if we have a transfer for this document my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} ); + # find reserves..... + # if we don't have a reserve with the status W, we launch the Checkreserves routine + my ($resfound, $resrec) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); + if ($resfound) { + $resrec->{'ResFound'} = $resfound; + $messages->{'ResFound'} = $resrec; + } + # if we have a transfer to do, we update the line of transfers with the datearrived if ($datesent) { if ( $tobranch eq $branch ) { @@ -1583,7 +1591,8 @@ sub AddReturn { $sth->execute( $item->{'itemnumber'} ); # if we have a reservation with valid transfer, we can set it's status to 'W' C4::Reserves::ModReserveStatus($item->{'itemnumber'}, 'W'); - } else { + } elsif ( !($resrec && $resrec->{branchcode} eq $tobranch) ) { + # Do not raise WrongTransfer if it is transrerring to reserve branch $messages->{'WrongTransfer'} = $tobranch; $messages->{'WrongTransferItem'} = $item->{'itemnumber'}; } @@ -1606,14 +1615,6 @@ sub AddReturn { $messages->{'Debarred'} = $debardate if ($debardate); } - # find reserves..... - # if we don't have a reserve with the status W, we launch the Checkreserves routine - my ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); - if ($resfound) { - $resrec->{'ResFound'} = $resfound; - $messages->{'ResFound'} = $resrec; - } - # update stats? # Record the fact that this book was returned. UpdateStats( -- 1.6.5 From srdjan at catalyst.net.nz Wed Dec 21 09:29:50 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Wed, 21 Dec 2011 21:29:50 +1300 Subject: [Koha-patches] [PATCH] bug_7090: AllowItemsOnHoldCheckout syspref In-Reply-To: References: Message-ID: <1324456190-15624-1-git-send-email-srdjan@catalyst.net.nz> Observe AllowItemsOnHandCheckout syspref when using self checkout --- C4/Circulation.pm | 68 ++++++++++--------- C4/SIP/ILS/Transaction/Checkout.pm | 8 ++- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 ++ .../en/modules/admin/preferences/circulation.pref | 6 ++ opac/sco/sco-main.pl | 16 ++++- 6 files changed, 71 insertions(+), 36 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a6f4f2..5b03b37 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -570,7 +570,7 @@ sub itemissues { =head2 CanBookBeIssued ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $borrower, - $barcode, $duedatespec, $inprocess ); + $barcode, $duedatespec, $inprocess, $ignore_reserves ); Check if a book can be issued. @@ -584,7 +584,8 @@ C<$issuingimpossible> and C<$needsconfirmation> are some hashref. =item C<$duedatespec> is a C4::Dates object. -=item C<$inprocess> +=item C<$inprocess> boolean switch +=item C<$ignore_reserves> boolean switch =back @@ -661,7 +662,7 @@ if the borrower borrows to much things =cut sub CanBookBeIssued { - my ( $borrower, $barcode, $duedate, $inprocess ) = @_; + my ( $borrower, $barcode, $duedate, $inprocess, $ignore_reserves ) = @_; my %needsconfirmation; # filled with problems that needs confirmations my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE my $item = GetItem(GetItemnumberFromBarcode( $barcode )); @@ -868,37 +869,40 @@ sub CanBookBeIssued { $needsconfirmation{issued_borrowernumber} = $currborinfo->{'borrowernumber'}; } - # See if the item is on reserve. - my ( $restype, $res, undef ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); - if ($restype) { - my $resbor = $res->{'borrowernumber'}; - my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); - my $branches = GetBranches(); - my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; - if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) - { - # The item is on reserve and waiting, but has been - # reserved by some other patron. - $needsconfirmation{RESERVE_WAITING} = 1; - $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; - $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; - $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; - $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; - $needsconfirmation{'resbranchname'} = $branchname; - $needsconfirmation{'reswaitingdate'} = format_date($res->{'waitingdate'}); - } - elsif ( $restype eq "Reserved" ) { - # The item is on reserve for someone else. - $needsconfirmation{RESERVED} = 1; - $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; - $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; - $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; - $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; - $needsconfirmation{'resbranchname'} = $branchname; - $needsconfirmation{'resreservedate'} = format_date($res->{'reservedate'}); + unless ( $ignore_reserves ) { + # See if the item is on reserve. + my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); + if ($restype) { + my $resbor = $res->{'borrowernumber'}; + if ( $resbor ne $borrower->{'borrowernumber'} ) { + my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); + my $branchname = GetBranchName( $res->{'branchcode'} ); + if ( $restype eq "Waiting" ) + { + # The item is on reserve and waiting, but has been + # reserved by some other patron. + $needsconfirmation{RESERVE_WAITING} = 1; + $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; + $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; + $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; + $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; + $needsconfirmation{'resbranchname'} = $branchname; + $needsconfirmation{'reswaitingdate'} = format_date($res->{'waitingdate'}); + } + elsif ( $restype eq "Reserved" ) { + # The item is on reserve for someone else. + $needsconfirmation{RESERVED} = 1; + $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; + $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; + $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; + $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; + $needsconfirmation{'resbranchname'} = $branchname; + $needsconfirmation{'resreservedate'} = format_date($res->{'reservedate'}); + } + } } } - return ( \%issuingimpossible, \%needsconfirmation ); + return ( \%issuingimpossible, \%needsconfirmation ); } =head2 AddIssue diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm index 8a14877..617a4eb 100644 --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ b/C4/SIP/ILS/Transaction/Checkout.pm @@ -58,7 +58,13 @@ sub do_checkout { $debug and warn "do_checkout: patron (" . $patron_barcode . ")"; my $borrower = $self->{patron}->getmemberdetails_object(); $debug and warn "do_checkout borrower: . " . Dumper $borrower; - my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued( $borrower, $barcode ); + my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued( + $borrower, + $barcode, + undef, + 0, + C4::Context->preference("AllowItemsOnHoldCheckout") + ); my $noerror=1; if (scalar keys %$issuingimpossible) { foreach (keys %$issuingimpossible) { diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 128c9b2..ca82713 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); - +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0063a75..242f868 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4578,6 +4578,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.02.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo')"); + print "Upgrade to $DBversion add 'AllowItemsOnHoldCheckout' syspref \n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index f4946b5..f4fd721 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -105,6 +105,12 @@ Circulation: no: "Don't allow" - staff to manually override the renewal limit and renew a checkout when it would go over the renewal limit. - + - pref: AllowItemsOnHoldCheckout + choices: + yes: Allow + no: "Don't allow" + - checkouts of items items reserved to someone else. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items. + - - pref: AllFinesNeedOverride choices: yes: Require diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index a1a3ce6..7e4f810 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -132,7 +132,13 @@ elsif ( $op eq "checkout" ) { my $impossible = {}; my $needconfirm = {}; if ( !$confirmed ) { - ( $impossible, $needconfirm ) = CanBookBeIssued( $borrower, $barcode ); + ( $impossible, $needconfirm ) = CanBookBeIssuedCheckout( + $borrower, + $barcode, + undef, + 0, + C4::Context->preference("AllowItemsOnHoldCheckout") + ); } $confirm_required = scalar keys %$needconfirm; @@ -213,7 +219,13 @@ if ($borrower->{cardnumber}) { my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} ); foreach my $it (@$issueslist) { $it->{date_due_display} = format_date($it->{date_due}); - my ($renewokay, $renewerror) = CanBookBeIssued($borrower, $it->{'barcode'},'',''); + my ($renewokay, $renewerror) = CanBookBeIssued( + $borrower, + $it->{'barcode'}, + undef, + 0, + C4::Context->preference("AllowItemsOnHoldCheckout") + ); $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'}; push @issues, $it; } -- 1.6.5 From marc at msys.ch Wed Dec 21 14:21:12 2011 From: marc at msys.ch (Marc Balmer) Date: Wed, 21 Dec 2011 14:21:12 +0100 Subject: [Koha-patches] [PATCH] bug_7090: AllowItemsOnHoldCheckout syspref In-Reply-To: <1324456190-15624-1-git-send-email-srdjan@catalyst.net.nz> References: <1324456190-15624-1-git-send-email-srdjan@catalyst.net.nz> Message-ID: <4EF1DD48.6000802@msys.ch> Am 21.12.11 09:29, schrieb Srdjan Jankovic: > Observe AllowItemsOnHandCheckout syspref when using self checkout > --- > C4/Circulation.pm | 68 ++++++++++--------- > C4/SIP/ILS/Transaction/Checkout.pm | 8 ++- > installer/data/mysql/sysprefs.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 7 ++ > .../en/modules/admin/preferences/circulation.pref | 6 ++ > opac/sco/sco-main.pl | 16 ++++- > 6 files changed, 71 insertions(+), 36 deletions(-) > > diff --git a/C4/Circulation.pm b/C4/Circulation.pm > index 9a6f4f2..5b03b37 100644 > --- a/C4/Circulation.pm > +++ b/C4/Circulation.pm > @@ -570,7 +570,7 @@ sub itemissues { > =head2 CanBookBeIssued > > ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $borrower, > - $barcode, $duedatespec, $inprocess ); > + $barcode, $duedatespec, $inprocess, $ignore_reserves ); > > Check if a book can be issued. > > @@ -584,7 +584,8 @@ C<$issuingimpossible> and C<$needsconfirmation> are some hashref. > > =item C<$duedatespec> is a C4::Dates object. > > -=item C<$inprocess> > +=item C<$inprocess> boolean switch > +=item C<$ignore_reserves> boolean switch > > =back > > @@ -661,7 +662,7 @@ if the borrower borrows to much things > =cut > > sub CanBookBeIssued { > - my ( $borrower, $barcode, $duedate, $inprocess ) = @_; > + my ( $borrower, $barcode, $duedate, $inprocess, $ignore_reserves ) = @_; > my %needsconfirmation; # filled with problems that needs confirmations > my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE > my $item = GetItem(GetItemnumberFromBarcode( $barcode )); > @@ -868,37 +869,40 @@ sub CanBookBeIssued { > $needsconfirmation{issued_borrowernumber} = $currborinfo->{'borrowernumber'}; > } > > - # See if the item is on reserve. > - my ( $restype, $res, undef ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); > - if ($restype) { > - my $resbor = $res->{'borrowernumber'}; > - my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); > - my $branches = GetBranches(); > - my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; > - if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) > - { > - # The item is on reserve and waiting, but has been > - # reserved by some other patron. > - $needsconfirmation{RESERVE_WAITING} = 1; > - $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; > - $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; > - $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; > - $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; > - $needsconfirmation{'resbranchname'} = $branchname; > - $needsconfirmation{'reswaitingdate'} = format_date($res->{'waitingdate'}); > - } > - elsif ( $restype eq "Reserved" ) { > - # The item is on reserve for someone else. > - $needsconfirmation{RESERVED} = 1; > - $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; > - $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; > - $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; > - $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; > - $needsconfirmation{'resbranchname'} = $branchname; > - $needsconfirmation{'resreservedate'} = format_date($res->{'reservedate'}); > + unless ( $ignore_reserves ) { > + # See if the item is on reserve. > + my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); > + if ($restype) { > + my $resbor = $res->{'borrowernumber'}; > + if ( $resbor ne $borrower->{'borrowernumber'} ) { > + my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); > + my $branchname = GetBranchName( $res->{'branchcode'} ); > + if ( $restype eq "Waiting" ) > + { > + # The item is on reserve and waiting, but has been > + # reserved by some other patron. > + $needsconfirmation{RESERVE_WAITING} = 1; > + $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; > + $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; > + $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; > + $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; > + $needsconfirmation{'resbranchname'} = $branchname; > + $needsconfirmation{'reswaitingdate'} = format_date($res->{'waitingdate'}); > + } > + elsif ( $restype eq "Reserved" ) { > + # The item is on reserve for someone else. > + $needsconfirmation{RESERVED} = 1; > + $needsconfirmation{'resfirstname'} = $resborrower->{'firstname'}; > + $needsconfirmation{'ressurname'} = $resborrower->{'surname'}; > + $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'}; > + $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'}; > + $needsconfirmation{'resbranchname'} = $branchname; > + $needsconfirmation{'resreservedate'} = format_date($res->{'reservedate'}); > + } > + } > } > } > - return ( \%issuingimpossible, \%needsconfirmation ); > + return ( \%issuingimpossible, \%needsconfirmation ); > } > > =head2 AddIssue > diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm > index 8a14877..617a4eb 100644 > --- a/C4/SIP/ILS/Transaction/Checkout.pm > +++ b/C4/SIP/ILS/Transaction/Checkout.pm > @@ -58,7 +58,13 @@ sub do_checkout { > $debug and warn "do_checkout: patron (" . $patron_barcode . ")"; > my $borrower = $self->{patron}->getmemberdetails_object(); > $debug and warn "do_checkout borrower: . " . Dumper $borrower; > - my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued( $borrower, $barcode ); > + my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued( > + $borrower, > + $barcode, > + undef, > + 0, > + C4::Context->preference("AllowItemsOnHoldCheckout") > + ); > my $noerror=1; > if (scalar keys %$issuingimpossible) { > foreach (keys %$issuingimpossible) { > diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql > index 128c9b2..ca82713 100755 > --- a/installer/data/mysql/sysprefs.sql > +++ b/installer/data/mysql/sysprefs.sql > @@ -328,4 +328,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); > - > +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo'); > diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl Please don't use backquotes around the table name. They are not needed and in fact lead to a syntax error in PostgreSQL. Granted, this is part of the MySQL installation procedure, but don't make it harder than needed to shared code with PostgreSQL. > index 0063a75..242f868 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -4578,6 +4578,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > > +$DBversion = "3.06.02.XXX"; > +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo')"); > + print "Upgrade to $DBversion add 'AllowItemsOnHoldCheckout' syspref \n"; > + SetVersion ($DBversion); > +} > + > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > index f4946b5..f4fd721 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > @@ -105,6 +105,12 @@ Circulation: > no: "Don't allow" > - staff to manually override the renewal limit and renew a checkout when it would go over the renewal limit. > - > + - pref: AllowItemsOnHoldCheckout > + choices: > + yes: Allow > + no: "Don't allow" > + - checkouts of items items reserved to someone else. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items. > + - > - pref: AllFinesNeedOverride > choices: > yes: Require > diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl > index a1a3ce6..7e4f810 100755 > --- a/opac/sco/sco-main.pl > +++ b/opac/sco/sco-main.pl > @@ -132,7 +132,13 @@ elsif ( $op eq "checkout" ) { > my $impossible = {}; > my $needconfirm = {}; > if ( !$confirmed ) { > - ( $impossible, $needconfirm ) = CanBookBeIssued( $borrower, $barcode ); > + ( $impossible, $needconfirm ) = CanBookBeIssuedCheckout( > + $borrower, > + $barcode, > + undef, > + 0, > + C4::Context->preference("AllowItemsOnHoldCheckout") > + ); > } > $confirm_required = scalar keys %$needconfirm; > > @@ -213,7 +219,13 @@ if ($borrower->{cardnumber}) { > my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} ); > foreach my $it (@$issueslist) { > $it->{date_due_display} = format_date($it->{date_due}); > - my ($renewokay, $renewerror) = CanBookBeIssued($borrower, $it->{'barcode'},'',''); > + my ($renewokay, $renewerror) = CanBookBeIssued( > + $borrower, > + $it->{'barcode'}, > + undef, > + 0, > + C4::Context->preference("AllowItemsOnHoldCheckout") > + ); > $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'}; > push @issues, $it; > } From srdjan at catalyst.net.nz Wed Dec 21 04:28:03 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Wed, 21 Dec 2011 16:28:03 +1300 Subject: [Koha-patches] [PATCH] bug_5786: moved AllowOnShelfHolds to circ matrix (issuingrules) In-Reply-To: References: Message-ID: <1324438083-21189-1-git-send-email-srdjan@catalyst.net.nz> --- C4/Circulation.pm | 3 +- C4/Items.pm | 2 + C4/Reserves.pm | 72 ++++++++++++++++--- C4/VirtualShelves/Page.pm | 1 - admin/smart-rules.pl | 9 ++- admin/systempreferences.pl | 1 - .../mysql/it-IT/necessari/system_preferences.sql | 1 - installer/data/mysql/kohastructure.sql | 3 +- installer/data/mysql/sysprefs.sql | 1 - installer/data/mysql/updatedatabase.pl | 19 +++++ installer/html-template-to-template-toolkit.pl | 2 +- .../en/modules/admin/preferences/circulation.pref | 6 -- .../prog/en/modules/admin/preferences/opac.pref | 6 -- .../prog/en/modules/admin/smart-rules.tt | 25 +++++-- .../prog/en/modules/help/reserve/request.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-ISBDdetail.tt | 6 -- .../opac-tmpl/prog/en/modules/opac-MARCdetail.tt | 6 -- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 12 +--- .../prog/en/modules/opac-results-grouped.tt | 6 -- .../opac-tmpl/prog/en/modules/opac-results.tt | 8 +-- .../opac-tmpl/prog/en/modules/opac-shelves.tt | 6 -- opac/opac-ISBDdetail.pl | 2 - opac/opac-MARCdetail.pl | 1 - opac/opac-detail.pl | 2 - opac/opac-reserve.pl | 2 +- opac/opac-search.pl | 2 +- 26 files changed, 115 insertions(+), 91 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a6f4f2..df202e1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2200,7 +2200,8 @@ sub CanBookBeRenewed { LEFT JOIN biblioitems USING (biblioitemnumber) WHERE - (issuingrules.categorycode = borrowers.categorycode OR issuingrules.categorycode = '*') + (issuingrules.categorycode = borrowers.categorycode + OR issuingrules.categorycode = '*') AND (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*') AND diff --git a/C4/Items.pm b/C4/Items.pm index 8802a4c..7c3a26f 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -160,6 +160,8 @@ sub GetItem { ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array(); } #if we don't have an items.itype, use biblioitems.itemtype. + # FIXME this should respect the itypes systempreference + # if (C4::Context->preference('item-level_itypes')) { if( ! $data->{'itype'} ) { my $sth = $dbh->prepare("SELECT itemtype FROM biblioitems WHERE biblionumber = ?"); $sth->execute($data->{'biblionumber'}); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 359bbad..5a2d819 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -479,7 +479,6 @@ sub CanItemBeReserved{ if(my $rowcount = $sthcount->fetchrow_hashref()){ $reservecount = $rowcount->{count}; } - # we check if it's ok or not if( $reservecount < $allowedreserves ){ return 1; @@ -1321,7 +1320,7 @@ sub GetReserveInfo { =head2 IsAvailableForItemLevelRequest - my $is_available = IsAvailableForItemLevelRequest($itemnumber); + my $is_available = IsAvailableForItemLevelRequest($itemnumber,$borrowernumber,$branchcode); Checks whether a given item record is available for an item-level hold request. An item is available if @@ -1331,12 +1330,8 @@ item-level hold request. An item is available if * it is not withdrawn AND * does not have a not for loan value > 0 -Whether or not the item is currently on loan is -also checked - if the AllowOnShelfHolds system preference -is ON, an item can be requested even if it is currently -on loan to somebody else. If the system preference -is OFF, an item that is currently checked out cannot -be the target of an item-level hold request. +Need to check the issuingrules onshelfholds column, +if this is set items on the shelf can be placed on hold Note that IsAvailableForItemLevelRequest() does not check if the staff operator is authorized to place @@ -1348,9 +1343,9 @@ and canreservefromotherbranches. sub IsAvailableForItemLevelRequest { my $itemnumber = shift; - + my $borrowernumber = shift; + my $branchcode = shift; my $item = GetItem($itemnumber); - # must check the notforloan setting of the itemtype # FIXME - a lot of places in the code do this # or something similar - need to be @@ -1383,14 +1378,67 @@ sub IsAvailableForItemLevelRequest { $item->{wthdrawn} or $notforloan_per_itemtype; - - if (C4::Context->preference('AllowOnShelfHolds')) { + # check issuingrules + + if (OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode)) { return $available_per_item; } else { return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W")); } } +=head2 OnShelfHoldsAllowed + + OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode); + +Checks issuingrules, using the borrowers categorycode, the itemtype, and branchcode to see if onshelf +holds are allowed, returns true if so. + +=cut + +sub OnShelfHoldsAllowed { + my ($itemnumber,$borrowernumber,$branchcode) = @_; + my $item = GetItem($itemnumber); + my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); + my $itype; + my $dbh = C4::Context->dbh; + if (C4::Context->preference('item-level_itypes')) { + # We cant trust GetItem to honour the syspref, so safest to do it ourselves + # When GetItem is fixed, we can remove this + $itype = $item->{itype}; + } + else { + my $query = "SELECT itemtype FROM biblioitems WHERE biblioitemnumber = ? "; + my $sth = $dbh->prepare($query); + $sth->execute($item->{biblioitemnumber}); + if (my $data = $sth->fetchrow_hashref()){ + $itype = $data->{itemtype}; + } + } + + my $query = "SELECT onshelfholds,categorycode,itemtype,branchcode FROM issuingrules WHERE + (issuingrules.categorycode = ? OR issuingrules.categorycode = '*') + AND + (issuingrules.itemtype = ? OR issuingrules.itemtype = '*') + AND + (issuingrules.branchcode = ? OR issuingrules.branchcode = '*') + ORDER BY + issuingrules.categorycode desc, + issuingrules.itemtype desc, + issuingrules.branchcode desc + LIMIT 1"; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare($query); + $sth->execute($borrower->{categorycode},$itype,$branchcode); + my $data = $sth->fetchrow_hashref; + if ($data->{onshelfholds}){ + return 1; + } + else { + return 0; + } +} + =head2 AlterPriority AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate ); diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 523527e..ff55dc0 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -183,7 +183,6 @@ sub shelfpage ($$$$$) { # explicitly fetch this shelf my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber); - $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); if (C4::Context->preference('TagsEnabled')) { $template->param(TagsEnabled => 1); foreach (qw(TagsShowOnList TagsInputOnList)) { diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index f290934..5bfdc7d 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -101,8 +101,8 @@ elsif ($op eq 'delete-branch-item') { # save the values entered elsif ($op eq 'add') { my $sth_search = $dbh->prepare("SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?"); - my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); - my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); + my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod, rentaldiscount, onshelfholds) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, onshelfholds=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); my $br = $branch; # branch my $bor = $input->param('categorycode'); # borrower category @@ -114,6 +114,7 @@ elsif ($op eq 'add') { my $maxissueqty = $input->param('maxissueqty'); my $renewalsallowed = $input->param('renewalsallowed'); my $reservesallowed = $input->param('reservesallowed'); + my $onshelfholds = $input->param('onshelfholds'); $maxissueqty =~ s/\s//g; $maxissueqty = undef if $maxissueqty !~ /^\d+/; my $issuelength = $input->param('issuelength'); @@ -126,9 +127,9 @@ elsif ($op eq 'add') { $sth_search->execute($br,$bor,$cat); my $res = $sth_search->fetchrow_hashref(); if ($res->{total}) { - $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $br,$bor,$cat); + $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $onshelfholds, $br,$bor,$cat); } else { - $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount); + $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$onshelfholds); } } elsif ($op eq "set-branch-defaults") { diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 78d0768..6bd68ee 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -186,7 +186,6 @@ $tabsysprefs{HomeOrHoldingBranch} = "Circulation"; $tabsysprefs{HomeOrHoldingBranchReturn} = "Circulation"; $tabsysprefs{RandomizeHoldsQueueWeight} = "Circulation"; $tabsysprefs{StaticHoldsQueueWeight} = "Circulation"; -$tabsysprefs{AllowOnShelfHolds} = "Circulation"; $tabsysprefs{AllowHoldsOnDamagedItems} = "Circulation"; $tabsysprefs{UseBranchTransferLimits} = "Circulation"; $tabsysprefs{AllowHoldPolicyOverride} = "Circulation"; diff --git a/installer/data/mysql/it-IT/necessari/system_preferences.sql b/installer/data/mysql/it-IT/necessari/system_preferences.sql index b4ddfa0..7aaa066 100644 --- a/installer/data/mysql/it-IT/necessari/system_preferences.sql +++ b/installer/data/mysql/it-IT/necessari/system_preferences.sql @@ -17,7 +17,6 @@ -- 51 Franklin Street' WHERE variable = ' Fifth Floor' WHERE variable = ' Boston' WHERE variable = ' MA 02110-1301 USA. UPDATE systempreferences SET value = 'cataloguing' WHERE variable = 'AcqCreateItem'; -UPDATE systempreferences SET value = '1' WHERE variable = 'AllowOnShelfHolds'; UPDATE systempreferences SET value = '1' WHERE variable = 'AllowRenewalLimitOverride'; UPDATE systempreferences SET value = 'annual' WHERE variable = 'autoBarcode'; UPDATE systempreferences SET value = 'email' WHERE variable = 'AutoEmailPrimaryAddress'; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a03bd23..b6adbd6 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -970,6 +970,7 @@ CREATE TABLE `issues` ( -- information related to check outs or issues DROP TABLE IF EXISTS `issuingrules`; CREATE TABLE `issuingrules` ( + `branchcode` varchar(10) NOT NULL default '', `categorycode` varchar(10) NOT NULL default '', `itemtype` varchar(10) NOT NULL default '', `restrictedtype` tinyint(1) default NULL, @@ -987,7 +988,7 @@ CREATE TABLE `issuingrules` ( `hardduedatecompare` tinyint NOT NULL default "0", `renewalsallowed` smallint(6) NOT NULL default "0", `reservesallowed` smallint(6) NOT NULL default "0", - `branchcode` varchar(10) NOT NULL default '', + `onshelfholds` tinyint(1) NOT NULL default 0, PRIMARY KEY (`branchcode`,`categorycode`,`itemtype`), KEY `categorycode` (`categorycode`), KEY `itemtype` (`itemtype`) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 128c9b2..a1a913a 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -223,7 +223,6 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'), ('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo'); INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'); -INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo'); INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo'); INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo'); -- FIXME: add FrameworksLoaded, noOPACUserLogin? diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0063a75..e039407 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4578,6 +4578,25 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = '3.06.02.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + print "Upgrade to $DBversion done (Bug 5786 move AllowOnShelfHolds to circulation matrix)\n"; + # First create the column + $dbh->do("ALTER TABLE issuingrules ADD onshelfholds tinyint(1) default 0"); + # Now update the column + if (C4::Context->preference("AllowOnShelfHolds")){ + # Pref is on, set allow for all rules + $dbh->do("UPDATE issuingrules SET onshelfholds=1"); + } else { + # If the preference is not set, leave off + $dbh->do("UPDATE issuingrules SET onshelfholds=0"); + } + $dbh->do("ALTER TABLE issuingrules MODIFY onshelfholds tinyint(1) default 0 NOT NULL"); + # Remove from the systempreferences table + $dbh->do("DELETE FROM systempreferences WHERE variable = 'AllowOnShelfHolds'"); + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/installer/html-template-to-template-toolkit.pl b/installer/html-template-to-template-toolkit.pl index e99b195..5f0e0ac 100755 --- a/installer/html-template-to-template-toolkit.pl +++ b/installer/html-template-to-template-toolkit.pl @@ -32,7 +32,7 @@ my @globals = ("themelang","JacketImages","OPACAmazonCoverImages","GoogleJackets "SyndeticsEnabled", "OpacRenewalAllowed", "item_level_itypes","noItemTypeImages", "virtualshelves", "RequestOnOpac", "COinSinOPACResults", "OPACXSLTResultsDisplay", "OPACItemsResultsDisplay", "LibraryThingForLibrariesID", "opacuserlogin", "TagsEnabled", -"TagsShowOnList", "TagsInputOnList","loggedinusername","AllowOnShelfHolds","opacbookbag", +"TagsShowOnList", "TagsInputOnList","loggedinusername","opacbookbag", "OPACAmazonEnabled", "SyndeticsCoverImages","using_https"); # Arguments: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index f4946b5..4cb60ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -236,12 +236,6 @@ Circulation: no: "Don't allow" - hold requests to be placed on damaged items. - - - pref: AllowOnShelfHolds - choices: - yes: Allow - no: "Don't allow" - - hold requests to be placed on items that are not checked out. - - - pref: AllowHoldDateInFuture choices: yes: Allow diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index d6ae2b2..0b076ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -319,12 +319,6 @@ OPAC: # choices: # - If ON, enables subject cloud on OPAC - - - pref: OPACItemHolds - choices: - yes: Allow - no: "Don't allow" - - patrons to place holds on specific items in the OPAC. If this is disabled, users can only put a hold on the next available item. - - - pref: OpacRenewalAllowed choices: yes: Allow diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index d2f314f..e38e446 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -80,7 +80,8 @@ for="tobranch">Clone these rules to: Clone these rules to: Delete @@ -175,6 +183,7 @@ for="tobranch">Clone these rules to: + Yes No diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt index 3d7381b..a5a5cd0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt @@ -72,4 +72,4 @@

    See the full documentation for Holds in the manual (online).

    -[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'help-bottom.inc' %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt index f9984a7..d04e7b1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt @@ -51,13 +51,7 @@ [% UNLESS ( norequests ) %] [% IF ( opacuserlogin ) %] [% IF ( RequestOnOpac ) %] - [% IF ( AllowOnShelfHolds ) %]
  • Place Hold
  • - [% ELSE %] - [% IF ( ItemsIssued ) %] -
  • Place Hold
  • - [% END %] - [% END %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt index 284154e..200c0ed 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt @@ -206,13 +206,7 @@ $(document).ready(function(){ [% UNLESS ( norequests ) %] [% IF ( opacuserlogin ) %] [% IF ( RequestOnOpac ) %] - [% IF ( AllowOnShelfHolds ) %]
  • Place Hold
  • - [% ELSE %] - [% IF ( ItemsIssued ) %] -
  • Place Hold
  • - [% END %] - [% END %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index d1b6570..fb367ca 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -1016,16 +1016,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
      [% UNLESS ( norequests ) %] - [% IF ( opacuserlogin ) %] + [% IF ( opacuserlogin ) %] [% IF ( RequestOnOpac ) %] - [% IF ( AllowOnShelfHolds ) %] -
    • Place Hold
    • - [% ELSE %] - [% IF ( ItemsIssued ) %] -
    • Place Hold
    • - [% END %] - [% END %] - [% END %] +
    • Place Hold
    • + [% END %] [% END %] [% END %]
    • Print
    • diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt index 9e1b855..e08f7f9 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt @@ -260,13 +260,7 @@ function highlightOn() { [% IF ( RequestOnOpac ) %] [% UNLESS ( GROUP_RESULT.norequests ) %] [% IF ( opacuserlogin ) %] - [% IF ( AllowOnShelfHolds ) %] Place Hold - [% ELSE %] - [% IF ( GROUP_RESULT.itemsissued ) %] - Place Hold - [% END %] - [% END %] [% END %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index 798e0d8..2256b3e 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -510,13 +510,7 @@ $(document).ready(function(){ [% IF ( RequestOnOpac ) %] [% UNLESS ( SEARCH_RESULT.norequests ) %] [% IF ( opacuserlogin ) %] - [% IF ( AllowOnShelfHolds ) %] - Place Hold - [% ELSE %] - [% IF ( SEARCH_RESULT.itemsissued ) %] - Place Hold - [% END %] - [% END %] + Place Hold [% END %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt index 391037f..b9e2ed4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt @@ -308,13 +308,7 @@ $(function() { [% IF ( RequestOnOpac ) %] [% UNLESS ( itemsloo.norequests ) %] [% IF ( opacuserlogin ) %] - [% IF ( AllowOnShelfHolds ) %] Place Hold - [% ELSE %] - [% IF ( itemsloo.itemsissued ) %] - Place Hold - [% END %] - [% END %] [% END %] [% END %] [% END %] diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index c80d41c..d978357 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -69,7 +69,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $biblionumber = $query->param('biblionumber'); -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); my $marcflavour = C4::Context->preference("marcflavour"); @@ -152,7 +151,6 @@ foreach ( @$reviews ) { $template->param( RequestOnOpac => C4::Context->preference("RequestOnOpac"), - AllowOnShelfHolds => C4::Context->preference('AllowOnShelfHolds'), norequests => $norequests, ISBD => $res, biblionumber => $biblionumber, diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index ffa0a6d..476fe50 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -81,7 +81,6 @@ $template->param( bibliotitle => $biblio->{title}, ); -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); # adding the $RequestOnOpac param diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index f82dde2..8111e9d 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -347,8 +347,6 @@ if ($session->param('busc')) { } - -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); my $record = GetMarcBiblio($biblionumber); diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index b2144a9..3e573fc 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -471,7 +471,7 @@ foreach my $biblioNum (@biblionumbers) { $policy_holdallowed = 0; } - if (IsAvailableForItemLevelRequest($itemNum) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum) and ($itemLoopIter->{already_reserved} ne 1)) { + if (IsAvailableForItemLevelRequest($itemNum,$borr->{'borrowernumber'},$itemInfo->{'homebranch'}) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum) and !$itemLoopIter->{already_reserved}) { $itemLoopIter->{available} = 1; $numCopiesAvailable++; } diff --git a/opac/opac-search.pl b/opac/opac-search.pl index aba23a8..081bc81 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -100,7 +100,7 @@ if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { elsif (C4::Context->preference("marcflavour") eq "MARC21" ) { $template->param('usmarc' => 1); } -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); + $template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') ); if (C4::Context->preference('BakerTaylorEnabled')) { -- 1.6.5 From marc at msys.ch Wed Dec 21 15:22:24 2011 From: marc at msys.ch (Marc Balmer) Date: Wed, 21 Dec 2011 15:22:24 +0100 Subject: [Koha-patches] [PATCH] bug_5786: moved AllowOnShelfHolds to circ matrix (issuingrules) In-Reply-To: <1324438083-21189-1-git-send-email-srdjan@catalyst.net.nz> References: <1324438083-21189-1-git-send-email-srdjan@catalyst.net.nz> Message-ID: Please stop putting column names in backquotes, it is a MySQLism and hinders my efforts to run Koha on PostgreSQL, Am 21.12.2011 um 04:28 schrieb Srdjan Jankovic : > --- > C4/Circulation.pm | 3 +- > C4/Items.pm | 2 + > C4/Reserves.pm | 72 ++++++++++++++++--- > C4/VirtualShelves/Page.pm | 1 - > admin/smart-rules.pl | 9 ++- > admin/systempreferences.pl | 1 - > .../mysql/it-IT/necessari/system_preferences.sql | 1 - > installer/data/mysql/kohastructure.sql | 3 +- > installer/data/mysql/sysprefs.sql | 1 - > installer/data/mysql/updatedatabase.pl | 19 +++++ > installer/html-template-to-template-toolkit.pl | 2 +- > .../en/modules/admin/preferences/circulation.pref | 6 -- > .../prog/en/modules/admin/preferences/opac.pref | 6 -- > .../prog/en/modules/admin/smart-rules.tt | 25 +++++-- > .../prog/en/modules/help/reserve/request.tt | 2 +- > .../opac-tmpl/prog/en/modules/opac-ISBDdetail.tt | 6 -- > .../opac-tmpl/prog/en/modules/opac-MARCdetail.tt | 6 -- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 12 +--- > .../prog/en/modules/opac-results-grouped.tt | 6 -- > .../opac-tmpl/prog/en/modules/opac-results.tt | 8 +-- > .../opac-tmpl/prog/en/modules/opac-shelves.tt | 6 -- > opac/opac-ISBDdetail.pl | 2 - > opac/opac-MARCdetail.pl | 1 - > opac/opac-detail.pl | 2 - > opac/opac-reserve.pl | 2 +- > opac/opac-search.pl | 2 +- > 26 files changed, 115 insertions(+), 91 deletions(-) > > diff --git a/C4/Circulation.pm b/C4/Circulation.pm > index 9a6f4f2..df202e1 100644 > --- a/C4/Circulation.pm > +++ b/C4/Circulation.pm > @@ -2200,7 +2200,8 @@ sub CanBookBeRenewed { > LEFT JOIN biblioitems USING (biblioitemnumber) > > WHERE > - (issuingrules.categorycode = borrowers.categorycode OR issuingrules.categorycode = '*') > + (issuingrules.categorycode = borrowers.categorycode > + OR issuingrules.categorycode = '*') > AND > (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*') > AND > diff --git a/C4/Items.pm b/C4/Items.pm > index 8802a4c..7c3a26f 100644 > --- a/C4/Items.pm > +++ b/C4/Items.pm > @@ -160,6 +160,8 @@ sub GetItem { > ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array(); > } > #if we don't have an items.itype, use biblioitems.itemtype. > + # FIXME this should respect the itypes systempreference > + # if (C4::Context->preference('item-level_itypes')) { > if( ! $data->{'itype'} ) { > my $sth = $dbh->prepare("SELECT itemtype FROM biblioitems WHERE biblionumber = ?"); > $sth->execute($data->{'biblionumber'}); > diff --git a/C4/Reserves.pm b/C4/Reserves.pm > index 359bbad..5a2d819 100644 > --- a/C4/Reserves.pm > +++ b/C4/Reserves.pm > @@ -479,7 +479,6 @@ sub CanItemBeReserved{ > if(my $rowcount = $sthcount->fetchrow_hashref()){ > $reservecount = $rowcount->{count}; > } > - > # we check if it's ok or not > if( $reservecount < $allowedreserves ){ > return 1; > @@ -1321,7 +1320,7 @@ sub GetReserveInfo { > > =head2 IsAvailableForItemLevelRequest > > - my $is_available = IsAvailableForItemLevelRequest($itemnumber); > + my $is_available = IsAvailableForItemLevelRequest($itemnumber,$borrowernumber,$branchcode); > > Checks whether a given item record is available for an > item-level hold request. An item is available if > @@ -1331,12 +1330,8 @@ item-level hold request. An item is available if > * it is not withdrawn AND > * does not have a not for loan value > 0 > > -Whether or not the item is currently on loan is > -also checked - if the AllowOnShelfHolds system preference > -is ON, an item can be requested even if it is currently > -on loan to somebody else. If the system preference > -is OFF, an item that is currently checked out cannot > -be the target of an item-level hold request. > +Need to check the issuingrules onshelfholds column, > +if this is set items on the shelf can be placed on hold > > Note that IsAvailableForItemLevelRequest() does not > check if the staff operator is authorized to place > @@ -1348,9 +1343,9 @@ and canreservefromotherbranches. > > sub IsAvailableForItemLevelRequest { > my $itemnumber = shift; > - > + my $borrowernumber = shift; > + my $branchcode = shift; > my $item = GetItem($itemnumber); > - > # must check the notforloan setting of the itemtype > # FIXME - a lot of places in the code do this > # or something similar - need to be > @@ -1383,14 +1378,67 @@ sub IsAvailableForItemLevelRequest { > $item->{wthdrawn} or > $notforloan_per_itemtype; > > - > - if (C4::Context->preference('AllowOnShelfHolds')) { > + # check issuingrules > + > + if (OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode)) { > return $available_per_item; > } else { > return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W")); > } > } > > +=head2 OnShelfHoldsAllowed > + > + OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode); > + > +Checks issuingrules, using the borrowers categorycode, the itemtype, and branchcode to see if onshelf > +holds are allowed, returns true if so. > + > +=cut > + > +sub OnShelfHoldsAllowed { > + my ($itemnumber,$borrowernumber,$branchcode) = @_; > + my $item = GetItem($itemnumber); > + my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); > + my $itype; > + my $dbh = C4::Context->dbh; > + if (C4::Context->preference('item-level_itypes')) { > + # We cant trust GetItem to honour the syspref, so safest to do it ourselves > + # When GetItem is fixed, we can remove this > + $itype = $item->{itype}; > + } > + else { > + my $query = "SELECT itemtype FROM biblioitems WHERE biblioitemnumber = ? "; > + my $sth = $dbh->prepare($query); > + $sth->execute($item->{biblioitemnumber}); > + if (my $data = $sth->fetchrow_hashref()){ > + $itype = $data->{itemtype}; > + } > + } > + > + my $query = "SELECT onshelfholds,categorycode,itemtype,branchcode FROM issuingrules WHERE > + (issuingrules.categorycode = ? OR issuingrules.categorycode = '*') > + AND > + (issuingrules.itemtype = ? OR issuingrules.itemtype = '*') > + AND > + (issuingrules.branchcode = ? OR issuingrules.branchcode = '*') > + ORDER BY > + issuingrules.categorycode desc, > + issuingrules.itemtype desc, > + issuingrules.branchcode desc > + LIMIT 1"; > + my $dbh = C4::Context->dbh; > + my $sth = $dbh->prepare($query); > + $sth->execute($borrower->{categorycode},$itype,$branchcode); > + my $data = $sth->fetchrow_hashref; > + if ($data->{onshelfholds}){ > + return 1; > + } > + else { > + return 0; > + } > +} > + > =head2 AlterPriority > > AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate ); > diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm > index 523527e..ff55dc0 100644 > --- a/C4/VirtualShelves/Page.pm > +++ b/C4/VirtualShelves/Page.pm > @@ -183,7 +183,6 @@ sub shelfpage ($$$$$) { > # explicitly fetch this shelf > my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber); > > - $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); > if (C4::Context->preference('TagsEnabled')) { > $template->param(TagsEnabled => 1); > foreach (qw(TagsShowOnList TagsInputOnList)) { > diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl > index f290934..5bfdc7d 100755 > --- a/admin/smart-rules.pl > +++ b/admin/smart-rules.pl > @@ -101,8 +101,8 @@ elsif ($op eq 'delete-branch-item') { > # save the values entered > elsif ($op eq 'add') { > my $sth_search = $dbh->prepare("SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?"); > - my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); > - my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); > + my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod, rentaldiscount, onshelfholds) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); > + my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, onshelfholds=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); > > my $br = $branch; # branch > my $bor = $input->param('categorycode'); # borrower category > @@ -114,6 +114,7 @@ elsif ($op eq 'add') { > my $maxissueqty = $input->param('maxissueqty'); > my $renewalsallowed = $input->param('renewalsallowed'); > my $reservesallowed = $input->param('reservesallowed'); > + my $onshelfholds = $input->param('onshelfholds'); > $maxissueqty =~ s/\s//g; > $maxissueqty = undef if $maxissueqty !~ /^\d+/; > my $issuelength = $input->param('issuelength'); > @@ -126,9 +127,9 @@ elsif ($op eq 'add') { > $sth_search->execute($br,$bor,$cat); > my $res = $sth_search->fetchrow_hashref(); > if ($res->{total}) { > - $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $br,$bor,$cat); > + $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $onshelfholds, $br,$bor,$cat); > } else { > - $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount); > + $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$onshelfholds); > } > } > elsif ($op eq "set-branch-defaults") { > diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl > index 78d0768..6bd68ee 100755 > --- a/admin/systempreferences.pl > +++ b/admin/systempreferences.pl > @@ -186,7 +186,6 @@ $tabsysprefs{HomeOrHoldingBranch} = "Circulation"; > $tabsysprefs{HomeOrHoldingBranchReturn} = "Circulation"; > $tabsysprefs{RandomizeHoldsQueueWeight} = "Circulation"; > $tabsysprefs{StaticHoldsQueueWeight} = "Circulation"; > -$tabsysprefs{AllowOnShelfHolds} = "Circulation"; > $tabsysprefs{AllowHoldsOnDamagedItems} = "Circulation"; > $tabsysprefs{UseBranchTransferLimits} = "Circulation"; > $tabsysprefs{AllowHoldPolicyOverride} = "Circulation"; > diff --git a/installer/data/mysql/it-IT/necessari/system_preferences.sql b/installer/data/mysql/it-IT/necessari/system_preferences.sql > index b4ddfa0..7aaa066 100644 > --- a/installer/data/mysql/it-IT/necessari/system_preferences.sql > +++ b/installer/data/mysql/it-IT/necessari/system_preferences.sql > @@ -17,7 +17,6 @@ > -- 51 Franklin Street' WHERE variable = ' Fifth Floor' WHERE variable = ' Boston' WHERE variable = ' MA 02110-1301 USA. > > UPDATE systempreferences SET value = 'cataloguing' WHERE variable = 'AcqCreateItem'; > -UPDATE systempreferences SET value = '1' WHERE variable = 'AllowOnShelfHolds'; > UPDATE systempreferences SET value = '1' WHERE variable = 'AllowRenewalLimitOverride'; > UPDATE systempreferences SET value = 'annual' WHERE variable = 'autoBarcode'; > UPDATE systempreferences SET value = 'email' WHERE variable = 'AutoEmailPrimaryAddress'; > diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql > index a03bd23..b6adbd6 100644 > --- a/installer/data/mysql/kohastructure.sql > +++ b/installer/data/mysql/kohastructure.sql > @@ -970,6 +970,7 @@ CREATE TABLE `issues` ( -- information related to check outs or issues > > DROP TABLE IF EXISTS `issuingrules`; > CREATE TABLE `issuingrules` ( > + `branchcode` varchar(10) NOT NULL default '', > `categorycode` varchar(10) NOT NULL default '', > `itemtype` varchar(10) NOT NULL default '', > `restrictedtype` tinyint(1) default NULL, > @@ -987,7 +988,7 @@ CREATE TABLE `issuingrules` ( > `hardduedatecompare` tinyint NOT NULL default "0", > `renewalsallowed` smallint(6) NOT NULL default "0", > `reservesallowed` smallint(6) NOT NULL default "0", > - `branchcode` varchar(10) NOT NULL default '', > + `onshelfholds` tinyint(1) NOT NULL default 0, > PRIMARY KEY (`branchcode`,`categorycode`,`itemtype`), > KEY `categorycode` (`categorycode`), > KEY `itemtype` (`itemtype`) > diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql > index 128c9b2..a1a913a 100755 > --- a/installer/data/mysql/sysprefs.sql > +++ b/installer/data/mysql/sysprefs.sql > @@ -223,7 +223,6 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES > ('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'), > ('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo'); > INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'); > -INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo'); > INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo'); > INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo'); > -- FIXME: add FrameworksLoaded, noOPACUserLogin? > diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl > index 0063a75..e039407 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -4578,6 +4578,25 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > > +$DBversion = '3.06.02.XXX'; > +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > + print "Upgrade to $DBversion done (Bug 5786 move AllowOnShelfHolds to circulation matrix)\n"; > + # First create the column > + $dbh->do("ALTER TABLE issuingrules ADD onshelfholds tinyint(1) default 0"); > + # Now update the column > + if (C4::Context->preference("AllowOnShelfHolds")){ > + # Pref is on, set allow for all rules > + $dbh->do("UPDATE issuingrules SET onshelfholds=1"); > + } else { > + # If the preference is not set, leave off > + $dbh->do("UPDATE issuingrules SET onshelfholds=0"); > + } > + $dbh->do("ALTER TABLE issuingrules MODIFY onshelfholds tinyint(1) default 0 NOT NULL"); > + # Remove from the systempreferences table > + $dbh->do("DELETE FROM systempreferences WHERE variable = 'AllowOnShelfHolds'"); > + SetVersion ($DBversion); > +} > + > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) > diff --git a/installer/html-template-to-template-toolkit.pl b/installer/html-template-to-template-toolkit.pl > index e99b195..5f0e0ac 100755 > --- a/installer/html-template-to-template-toolkit.pl > +++ b/installer/html-template-to-template-toolkit.pl > @@ -32,7 +32,7 @@ my @globals = ("themelang","JacketImages","OPACAmazonCoverImages","GoogleJackets > "SyndeticsEnabled", "OpacRenewalAllowed", "item_level_itypes","noItemTypeImages", > "virtualshelves", "RequestOnOpac", "COinSinOPACResults", "OPACXSLTResultsDisplay", > "OPACItemsResultsDisplay", "LibraryThingForLibrariesID", "opacuserlogin", "TagsEnabled", > -"TagsShowOnList", "TagsInputOnList","loggedinusername","AllowOnShelfHolds","opacbookbag", > +"TagsShowOnList", "TagsInputOnList","loggedinusername","opacbookbag", > "OPACAmazonEnabled", "SyndeticsCoverImages","using_https"); > > # Arguments: > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > index f4946b5..4cb60ae 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > @@ -236,12 +236,6 @@ Circulation: > no: "Don't allow" > - hold requests to be placed on damaged items. > - > - - pref: AllowOnShelfHolds > - choices: > - yes: Allow > - no: "Don't allow" > - - hold requests to be placed on items that are not checked out. > - - > - pref: AllowHoldDateInFuture > choices: > yes: Allow > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref > index d6ae2b2..0b076ca 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref > @@ -319,12 +319,6 @@ OPAC: > # choices: > # - If ON, enables subject cloud on OPAC > - > - - pref: OPACItemHolds > - choices: > - yes: Allow > - no: "Don't allow" > - - patrons to place holds on specific items in the OPAC. If this is disabled, users can only put a hold on the next available item. > - - > - pref: OpacRenewalAllowed > choices: > yes: Allow > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt > index d2f314f..e38e446 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt > @@ -80,7 +80,8 @@ for="tobranch">Clone these rules to: Clone these rules to: Delete > @@ -175,6 +183,7 @@ for="tobranch">Clone these rules to: > > > + Yes No > > > > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt > index 3d7381b..a5a5cd0 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt > @@ -72,4 +72,4 @@ > >

      See the full documentation for Holds in the manual (online).

      > > -[% INCLUDE 'help-bottom.inc' %] > \ No newline at end of file > +[% INCLUDE 'help-bottom.inc' %] > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt > index f9984a7..d04e7b1 100644 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt > @@ -51,13 +51,7 @@ > [% UNLESS ( norequests ) %] > [% IF ( opacuserlogin ) %] > [% IF ( RequestOnOpac ) %] > - [% IF ( AllowOnShelfHolds ) %] >
    • Place Hold
    • > - [% ELSE %] > - [% IF ( ItemsIssued ) %] > -
    • Place Hold
    • > - [% END %] > - [% END %] > > [% END %] > [% END %] > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt > index 284154e..200c0ed 100644 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt > @@ -206,13 +206,7 @@ $(document).ready(function(){ > [% UNLESS ( norequests ) %] > [% IF ( opacuserlogin ) %] > [% IF ( RequestOnOpac ) %] > - [% IF ( AllowOnShelfHolds ) %] >
    • Place Hold
    • > - [% ELSE %] > - [% IF ( ItemsIssued ) %] > -
    • Place Hold
    • > - [% END %] > - [% END %] > > [% END %] > [% END %] > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt > index d1b6570..fb367ca 100755 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt > @@ -1016,16 +1016,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { >
        > > [% UNLESS ( norequests ) %] > - [% IF ( opacuserlogin ) %] > + [% IF ( opacuserlogin ) %] > [% IF ( RequestOnOpac ) %] > - [% IF ( AllowOnShelfHolds ) %] > -
      • Place Hold
      • > - [% ELSE %] > - [% IF ( ItemsIssued ) %] > -
      • Place Hold
      • > - [% END %] > - [% END %] > - [% END %] > +
      • Place Hold
      • > + [% END %] > [% END %] > [% END %] >
      • Print
      • > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt > index 9e1b855..e08f7f9 100644 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt > @@ -260,13 +260,7 @@ function highlightOn() { > [% IF ( RequestOnOpac ) %] > [% UNLESS ( GROUP_RESULT.norequests ) %] > [% IF ( opacuserlogin ) %] > - [% IF ( AllowOnShelfHolds ) %] > Place Hold > - [% ELSE %] > - [% IF ( GROUP_RESULT.itemsissued ) %] > - Place Hold > - [% END %] > - [% END %] > [% END %] > [% END %] > [% END %] > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt > index 798e0d8..2256b3e 100755 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt > @@ -510,13 +510,7 @@ $(document).ready(function(){ > [% IF ( RequestOnOpac ) %] > [% UNLESS ( SEARCH_RESULT.norequests ) %] > [% IF ( opacuserlogin ) %] > - [% IF ( AllowOnShelfHolds ) %] > - Place Hold > - [% ELSE %] > - [% IF ( SEARCH_RESULT.itemsissued ) %] > - Place Hold > - [% END %] > - [% END %] > + Place Hold > [% END %] > [% END %] > [% END %] > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt > index 391037f..b9e2ed4 100644 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt > @@ -308,13 +308,7 @@ $(function() { > [% IF ( RequestOnOpac ) %] > [% UNLESS ( itemsloo.norequests ) %] > [% IF ( opacuserlogin ) %] > - [% IF ( AllowOnShelfHolds ) %] > Place Hold > - [% ELSE %] > - [% IF ( itemsloo.itemsissued ) %] > - Place Hold > - [% END %] > - [% END %] > [% END %] > [% END %] > [% END %] > diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl > index c80d41c..d978357 100755 > --- a/opac/opac-ISBDdetail.pl > +++ b/opac/opac-ISBDdetail.pl > @@ -69,7 +69,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > my $biblionumber = $query->param('biblionumber'); > > -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); > $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); > > my $marcflavour = C4::Context->preference("marcflavour"); > @@ -152,7 +151,6 @@ foreach ( @$reviews ) { > > $template->param( > RequestOnOpac => C4::Context->preference("RequestOnOpac"), > - AllowOnShelfHolds => C4::Context->preference('AllowOnShelfHolds'), > norequests => $norequests, > ISBD => $res, > biblionumber => $biblionumber, > diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl > index ffa0a6d..476fe50 100755 > --- a/opac/opac-MARCdetail.pl > +++ b/opac/opac-MARCdetail.pl > @@ -81,7 +81,6 @@ $template->param( > bibliotitle => $biblio->{title}, > ); > > -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); > $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); > > # adding the $RequestOnOpac param > diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl > index f82dde2..8111e9d 100755 > --- a/opac/opac-detail.pl > +++ b/opac/opac-detail.pl > @@ -347,8 +347,6 @@ if ($session->param('busc')) { > } > > > - > -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); > $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); > > my $record = GetMarcBiblio($biblionumber); > diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl > index b2144a9..3e573fc 100755 > --- a/opac/opac-reserve.pl > +++ b/opac/opac-reserve.pl > @@ -471,7 +471,7 @@ foreach my $biblioNum (@biblionumbers) { > $policy_holdallowed = 0; > } > > - if (IsAvailableForItemLevelRequest($itemNum) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum) and ($itemLoopIter->{already_reserved} ne 1)) { > + if (IsAvailableForItemLevelRequest($itemNum,$borr->{'borrowernumber'},$itemInfo->{'homebranch'}) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum) and !$itemLoopIter->{already_reserved}) { > $itemLoopIter->{available} = 1; > $numCopiesAvailable++; > } > diff --git a/opac/opac-search.pl b/opac/opac-search.pl > index aba23a8..081bc81 100755 > --- a/opac/opac-search.pl > +++ b/opac/opac-search.pl > @@ -100,7 +100,7 @@ if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { > elsif (C4::Context->preference("marcflavour") eq "MARC21" ) { > $template->param('usmarc' => 1); > } > -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); > + > $template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') ); > > if (C4::Context->preference('BakerTaylorEnabled')) { > -- > 1.6.5 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ From oleonard at myacpl.org Wed Dec 21 15:39:01 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 21 Dec 2011 09:39:01 -0500 Subject: [Koha-patches] [PATCH] bug_5786: moved AllowOnShelfHolds to circ matrix (issuingrules) In-Reply-To: References: <1324438083-21189-1-git-send-email-srdjan@catalyst.net.nz> Message-ID: I don't think it's appropriate to request this change in practice in a reply on the patches list. I'm sure your request would be considered by all, but it should be raised in the devel list or at the next IRC meeting. -- Owen On Dec 21, 2011, at 9:22 AM, Marc Balmer wrote: > Please stop putting column names in backquotes, it is a MySQLism and hinders my efforts to run Koha on PostgreSQL, > > > > Am 21.12.2011 um 04:28 schrieb Srdjan Jankovic : > >> --- >> C4/Circulation.pm | 3 +- >> C4/Items.pm | 2 + >> C4/Reserves.pm | 72 ++++++++++++++++--- >> C4/VirtualShelves/Page.pm | 1 - >> admin/smart-rules.pl | 9 ++- >> admin/systempreferences.pl | 1 - >> .../mysql/it-IT/necessari/system_preferences.sql | 1 - >> installer/data/mysql/kohastructure.sql | 3 +- >> installer/data/mysql/sysprefs.sql | 1 - >> installer/data/mysql/updatedatabase.pl | 19 +++++ >> installer/html-template-to-template-toolkit.pl | 2 +- >> .../en/modules/admin/preferences/circulation.pref | 6 -- >> .../prog/en/modules/admin/preferences/opac.pref | 6 -- >> .../prog/en/modules/admin/smart-rules.tt | 25 +++++-- >> .../prog/en/modules/help/reserve/request.tt | 2 +- >> .../opac-tmpl/prog/en/modules/opac-ISBDdetail.tt | 6 -- >> .../opac-tmpl/prog/en/modules/opac-MARCdetail.tt | 6 -- >> koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 12 +--- >> .../prog/en/modules/opac-results-grouped.tt | 6 -- >> .../opac-tmpl/prog/en/modules/opac-results.tt | 8 +-- >> .../opac-tmpl/prog/en/modules/opac-shelves.tt | 6 -- >> opac/opac-ISBDdetail.pl | 2 - >> opac/opac-MARCdetail.pl | 1 - >> opac/opac-detail.pl | 2 - >> opac/opac-reserve.pl | 2 +- >> opac/opac-search.pl | 2 +- >> 26 files changed, 115 insertions(+), 91 deletions(-) >> >> diff --git a/C4/Circulation.pm b/C4/Circulation.pm >> index 9a6f4f2..df202e1 100644 >> --- a/C4/Circulation.pm >> +++ b/C4/Circulation.pm >> @@ -2200,7 +2200,8 @@ sub CanBookBeRenewed { >> LEFT JOIN biblioitems USING (biblioitemnumber) >> >> WHERE >> - (issuingrules.categorycode = borrowers.categorycode OR issuingrules.categorycode = '*') >> + (issuingrules.categorycode = borrowers.categorycode >> + OR issuingrules.categorycode = '*') >> AND >> (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*') >> AND >> diff --git a/C4/Items.pm b/C4/Items.pm >> index 8802a4c..7c3a26f 100644 >> --- a/C4/Items.pm >> +++ b/C4/Items.pm >> @@ -160,6 +160,8 @@ sub GetItem { >> ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array(); >> } >> #if we don't have an items.itype, use biblioitems.itemtype. >> + # FIXME this should respect the itypes systempreference >> + # if (C4::Context->preference('item-level_itypes')) { >> if( ! $data->{'itype'} ) { >> my $sth = $dbh->prepare("SELECT itemtype FROM biblioitems WHERE biblionumber = ?"); >> $sth->execute($data->{'biblionumber'}); >> diff --git a/C4/Reserves.pm b/C4/Reserves.pm >> index 359bbad..5a2d819 100644 >> --- a/C4/Reserves.pm >> +++ b/C4/Reserves.pm >> @@ -479,7 +479,6 @@ sub CanItemBeReserved{ >> if(my $rowcount = $sthcount->fetchrow_hashref()){ >> $reservecount = $rowcount->{count}; >> } >> - >> # we check if it's ok or not >> if( $reservecount < $allowedreserves ){ >> return 1; >> @@ -1321,7 +1320,7 @@ sub GetReserveInfo { >> >> =head2 IsAvailableForItemLevelRequest >> >> - my $is_available = IsAvailableForItemLevelRequest($itemnumber); >> + my $is_available = IsAvailableForItemLevelRequest($itemnumber,$borrowernumber,$branchcode); >> >> Checks whether a given item record is available for an >> item-level hold request. An item is available if >> @@ -1331,12 +1330,8 @@ item-level hold request. An item is available if >> * it is not withdrawn AND >> * does not have a not for loan value > 0 >> >> -Whether or not the item is currently on loan is >> -also checked - if the AllowOnShelfHolds system preference >> -is ON, an item can be requested even if it is currently >> -on loan to somebody else. If the system preference >> -is OFF, an item that is currently checked out cannot >> -be the target of an item-level hold request. >> +Need to check the issuingrules onshelfholds column, >> +if this is set items on the shelf can be placed on hold >> >> Note that IsAvailableForItemLevelRequest() does not >> check if the staff operator is authorized to place >> @@ -1348,9 +1343,9 @@ and canreservefromotherbranches. >> >> sub IsAvailableForItemLevelRequest { >> my $itemnumber = shift; >> - >> + my $borrowernumber = shift; >> + my $branchcode = shift; >> my $item = GetItem($itemnumber); >> - >> # must check the notforloan setting of the itemtype >> # FIXME - a lot of places in the code do this >> # or something similar - need to be >> @@ -1383,14 +1378,67 @@ sub IsAvailableForItemLevelRequest { >> $item->{wthdrawn} or >> $notforloan_per_itemtype; >> >> - >> - if (C4::Context->preference('AllowOnShelfHolds')) { >> + # check issuingrules >> + >> + if (OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode)) { >> return $available_per_item; >> } else { >> return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W")); >> } >> } >> >> +=head2 OnShelfHoldsAllowed >> + >> + OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode); >> + >> +Checks issuingrules, using the borrowers categorycode, the itemtype, and branchcode to see if onshelf >> +holds are allowed, returns true if so. >> + >> +=cut >> + >> +sub OnShelfHoldsAllowed { >> + my ($itemnumber,$borrowernumber,$branchcode) = @_; >> + my $item = GetItem($itemnumber); >> + my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); >> + my $itype; >> + my $dbh = C4::Context->dbh; >> + if (C4::Context->preference('item-level_itypes')) { >> + # We cant trust GetItem to honour the syspref, so safest to do it ourselves >> + # When GetItem is fixed, we can remove this >> + $itype = $item->{itype}; >> + } >> + else { >> + my $query = "SELECT itemtype FROM biblioitems WHERE biblioitemnumber = ? "; >> + my $sth = $dbh->prepare($query); >> + $sth->execute($item->{biblioitemnumber}); >> + if (my $data = $sth->fetchrow_hashref()){ >> + $itype = $data->{itemtype}; >> + } >> + } >> + >> + my $query = "SELECT onshelfholds,categorycode,itemtype,branchcode FROM issuingrules WHERE >> + (issuingrules.categorycode = ? OR issuingrules.categorycode = '*') >> + AND >> + (issuingrules.itemtype = ? OR issuingrules.itemtype = '*') >> + AND >> + (issuingrules.branchcode = ? OR issuingrules.branchcode = '*') >> + ORDER BY >> + issuingrules.categorycode desc, >> + issuingrules.itemtype desc, >> + issuingrules.branchcode desc >> + LIMIT 1"; >> + my $dbh = C4::Context->dbh; >> + my $sth = $dbh->prepare($query); >> + $sth->execute($borrower->{categorycode},$itype,$branchcode); >> + my $data = $sth->fetchrow_hashref; >> + if ($data->{onshelfholds}){ >> + return 1; >> + } >> + else { >> + return 0; >> + } >> +} >> + >> =head2 AlterPriority >> >> AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate ); >> diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm >> index 523527e..ff55dc0 100644 >> --- a/C4/VirtualShelves/Page.pm >> +++ b/C4/VirtualShelves/Page.pm >> @@ -183,7 +183,6 @@ sub shelfpage ($$$$$) { >> # explicitly fetch this shelf >> my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber); >> >> - $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); >> if (C4::Context->preference('TagsEnabled')) { >> $template->param(TagsEnabled => 1); >> foreach (qw(TagsShowOnList TagsInputOnList)) { >> diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >> index f290934..5bfdc7d 100755 >> --- a/admin/smart-rules.pl >> +++ b/admin/smart-rules.pl >> @@ -101,8 +101,8 @@ elsif ($op eq 'delete-branch-item') { >> # save the values entered >> elsif ($op eq 'add') { >> my $sth_search = $dbh->prepare("SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?"); >> - my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); >> - my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); >> + my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod, rentaldiscount, onshelfholds) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); >> + my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, onshelfholds=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); >> >> my $br = $branch; # branch >> my $bor = $input->param('categorycode'); # borrower category >> @@ -114,6 +114,7 @@ elsif ($op eq 'add') { >> my $maxissueqty = $input->param('maxissueqty'); >> my $renewalsallowed = $input->param('renewalsallowed'); >> my $reservesallowed = $input->param('reservesallowed'); >> + my $onshelfholds = $input->param('onshelfholds'); >> $maxissueqty =~ s/\s//g; >> $maxissueqty = undef if $maxissueqty !~ /^\d+/; >> my $issuelength = $input->param('issuelength'); >> @@ -126,9 +127,9 @@ elsif ($op eq 'add') { >> $sth_search->execute($br,$bor,$cat); >> my $res = $sth_search->fetchrow_hashref(); >> if ($res->{total}) { >> - $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $br,$bor,$cat); >> + $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $onshelfholds, $br,$bor,$cat); >> } else { >> - $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount); >> + $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$onshelfholds); >> } >> } >> elsif ($op eq "set-branch-defaults") { >> diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl >> index 78d0768..6bd68ee 100755 >> --- a/admin/systempreferences.pl >> +++ b/admin/systempreferences.pl >> @@ -186,7 +186,6 @@ $tabsysprefs{HomeOrHoldingBranch} = "Circulation"; >> $tabsysprefs{HomeOrHoldingBranchReturn} = "Circulation"; >> $tabsysprefs{RandomizeHoldsQueueWeight} = "Circulation"; >> $tabsysprefs{StaticHoldsQueueWeight} = "Circulation"; >> -$tabsysprefs{AllowOnShelfHolds} = "Circulation"; >> $tabsysprefs{AllowHoldsOnDamagedItems} = "Circulation"; >> $tabsysprefs{UseBranchTransferLimits} = "Circulation"; >> $tabsysprefs{AllowHoldPolicyOverride} = "Circulation"; >> diff --git a/installer/data/mysql/it-IT/necessari/system_preferences.sql b/installer/data/mysql/it-IT/necessari/system_preferences.sql >> index b4ddfa0..7aaa066 100644 >> --- a/installer/data/mysql/it-IT/necessari/system_preferences.sql >> +++ b/installer/data/mysql/it-IT/necessari/system_preferences.sql >> @@ -17,7 +17,6 @@ >> -- 51 Franklin Street' WHERE variable = ' Fifth Floor' WHERE variable = ' Boston' WHERE variable = ' MA 02110-1301 USA. >> >> UPDATE systempreferences SET value = 'cataloguing' WHERE variable = 'AcqCreateItem'; >> -UPDATE systempreferences SET value = '1' WHERE variable = 'AllowOnShelfHolds'; >> UPDATE systempreferences SET value = '1' WHERE variable = 'AllowRenewalLimitOverride'; >> UPDATE systempreferences SET value = 'annual' WHERE variable = 'autoBarcode'; >> UPDATE systempreferences SET value = 'email' WHERE variable = 'AutoEmailPrimaryAddress'; >> diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >> index a03bd23..b6adbd6 100644 >> --- a/installer/data/mysql/kohastructure.sql >> +++ b/installer/data/mysql/kohastructure.sql >> @@ -970,6 +970,7 @@ CREATE TABLE `issues` ( -- information related to check outs or issues >> >> DROP TABLE IF EXISTS `issuingrules`; >> CREATE TABLE `issuingrules` ( >> + `branchcode` varchar(10) NOT NULL default '', >> `categorycode` varchar(10) NOT NULL default '', >> `itemtype` varchar(10) NOT NULL default '', >> `restrictedtype` tinyint(1) default NULL, >> @@ -987,7 +988,7 @@ CREATE TABLE `issuingrules` ( >> `hardduedatecompare` tinyint NOT NULL default "0", >> `renewalsallowed` smallint(6) NOT NULL default "0", >> `reservesallowed` smallint(6) NOT NULL default "0", >> - `branchcode` varchar(10) NOT NULL default '', >> + `onshelfholds` tinyint(1) NOT NULL default 0, >> PRIMARY KEY (`branchcode`,`categorycode`,`itemtype`), >> KEY `categorycode` (`categorycode`), >> KEY `itemtype` (`itemtype`) >> diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >> index 128c9b2..a1a913a 100755 >> --- a/installer/data/mysql/sysprefs.sql >> +++ b/installer/data/mysql/sysprefs.sql >> @@ -223,7 +223,6 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES >> ('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'), >> ('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo'); >> INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'); >> -INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo'); >> INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo'); >> INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo'); >> -- FIXME: add FrameworksLoaded, noOPACUserLogin? >> diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >> index 0063a75..e039407 100755 >> --- a/installer/data/mysql/updatedatabase.pl >> +++ b/installer/data/mysql/updatedatabase.pl >> @@ -4578,6 +4578,25 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >> SetVersion($DBversion); >> } >> >> +$DBversion = '3.06.02.XXX'; >> +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >> + print "Upgrade to $DBversion done (Bug 5786 move AllowOnShelfHolds to circulation matrix)\n"; >> + # First create the column >> + $dbh->do("ALTER TABLE issuingrules ADD onshelfholds tinyint(1) default 0"); >> + # Now update the column >> + if (C4::Context->preference("AllowOnShelfHolds")){ >> + # Pref is on, set allow for all rules >> + $dbh->do("UPDATE issuingrules SET onshelfholds=1"); >> + } else { >> + # If the preference is not set, leave off >> + $dbh->do("UPDATE issuingrules SET onshelfholds=0"); >> + } >> + $dbh->do("ALTER TABLE issuingrules MODIFY onshelfholds tinyint(1) default 0 NOT NULL"); >> + # Remove from the systempreferences table >> + $dbh->do("DELETE FROM systempreferences WHERE variable = 'AllowOnShelfHolds'"); >> + SetVersion ($DBversion); >> +} >> + >> =head1 FUNCTIONS >> >> =head2 DropAllForeignKeys($table) >> diff --git a/installer/html-template-to-template-toolkit.pl b/installer/html-template-to-template-toolkit.pl >> index e99b195..5f0e0ac 100755 >> --- a/installer/html-template-to-template-toolkit.pl >> +++ b/installer/html-template-to-template-toolkit.pl >> @@ -32,7 +32,7 @@ my @globals = ("themelang","JacketImages","OPACAmazonCoverImages","GoogleJackets >> "SyndeticsEnabled", "OpacRenewalAllowed", "item_level_itypes","noItemTypeImages", >> "virtualshelves", "RequestOnOpac", "COinSinOPACResults", "OPACXSLTResultsDisplay", >> "OPACItemsResultsDisplay", "LibraryThingForLibrariesID", "opacuserlogin", "TagsEnabled", >> -"TagsShowOnList", "TagsInputOnList","loggedinusername","AllowOnShelfHolds","opacbookbag", >> +"TagsShowOnList", "TagsInputOnList","loggedinusername","opacbookbag", >> "OPACAmazonEnabled", "SyndeticsCoverImages","using_https"); >> >> # Arguments: >> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >> index f4946b5..4cb60ae 100644 >> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >> @@ -236,12 +236,6 @@ Circulation: >> no: "Don't allow" >> - hold requests to be placed on damaged items. >> - >> - - pref: AllowOnShelfHolds >> - choices: >> - yes: Allow >> - no: "Don't allow" >> - - hold requests to be placed on items that are not checked out. >> - - >> - pref: AllowHoldDateInFuture >> choices: >> yes: Allow >> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >> index d6ae2b2..0b076ca 100644 >> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >> @@ -319,12 +319,6 @@ OPAC: >> # choices: >> # - If ON, enables subject cloud on OPAC >> - >> - - pref: OPACItemHolds >> - choices: >> - yes: Allow >> - no: "Don't allow" >> - - patrons to place holds on specific items in the OPAC. If this is disabled, users can only put a hold on the next available item. >> - - >> - pref: OpacRenewalAllowed >> choices: >> yes: Allow >> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >> index d2f314f..e38e446 100644 >> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >> @@ -80,7 +80,8 @@ for="tobranch">Clone these rules to: Clone these rules to: Delete >> @@ -175,6 +183,7 @@ for="tobranch">Clone these rules to: >> >> >> + Yes No >> >> >> >> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt >> index 3d7381b..a5a5cd0 100644 >> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt >> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt >> @@ -72,4 +72,4 @@ >> >>

        See the full documentation for Holds in the manual (online).

        >> >> -[% INCLUDE 'help-bottom.inc' %] >> \ No newline at end of file >> +[% INCLUDE 'help-bottom.inc' %] >> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt >> index f9984a7..d04e7b1 100644 >> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt >> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt >> @@ -51,13 +51,7 @@ >> [% UNLESS ( norequests ) %] >> [% IF ( opacuserlogin ) %] >> [% IF ( RequestOnOpac ) %] >> - [% IF ( AllowOnShelfHolds ) %] >>
      • Place Hold
      • >> - [% ELSE %] >> - [% IF ( ItemsIssued ) %] >> -
      • Place Hold
      • >> - [% END %] >> - [% END %] >> >> [% END %] >> [% END %] >> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt >> index 284154e..200c0ed 100644 >> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt >> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt >> @@ -206,13 +206,7 @@ $(document).ready(function(){ >> [% UNLESS ( norequests ) %] >> [% IF ( opacuserlogin ) %] >> [% IF ( RequestOnOpac ) %] >> - [% IF ( AllowOnShelfHolds ) %] >>
      • Place Hold
      • >> - [% ELSE %] >> - [% IF ( ItemsIssued ) %] >> -
      • Place Hold
      • >> - [% END %] >> - [% END %] >> >> [% END %] >> [% END %] >> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >> index d1b6570..fb367ca 100755 >> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >> @@ -1016,16 +1016,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { >>
          >> >> [% UNLESS ( norequests ) %] >> - [% IF ( opacuserlogin ) %] >> + [% IF ( opacuserlogin ) %] >> [% IF ( RequestOnOpac ) %] >> - [% IF ( AllowOnShelfHolds ) %] >> -
        • Place Hold
        • >> - [% ELSE %] >> - [% IF ( ItemsIssued ) %] >> -
        • Place Hold
        • >> - [% END %] >> - [% END %] >> - [% END %] >> +
        • Place Hold
        • >> + [% END %] >> [% END %] >> [% END %] >>
        • Print
        • >> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt >> index 9e1b855..e08f7f9 100644 >> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt >> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt >> @@ -260,13 +260,7 @@ function highlightOn() { >> [% IF ( RequestOnOpac ) %] >> [% UNLESS ( GROUP_RESULT.norequests ) %] >> [% IF ( opacuserlogin ) %] >> - [% IF ( AllowOnShelfHolds ) %] >> Place Hold >> - [% ELSE %] >> - [% IF ( GROUP_RESULT.itemsissued ) %] >> - Place Hold >> - [% END %] >> - [% END %] >> [% END %] >> [% END %] >> [% END %] >> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >> index 798e0d8..2256b3e 100755 >> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >> @@ -510,13 +510,7 @@ $(document).ready(function(){ >> [% IF ( RequestOnOpac ) %] >> [% UNLESS ( SEARCH_RESULT.norequests ) %] >> [% IF ( opacuserlogin ) %] >> - [% IF ( AllowOnShelfHolds ) %] >> - Place Hold >> - [% ELSE %] >> - [% IF ( SEARCH_RESULT.itemsissued ) %] >> - Place Hold >> - [% END %] >> - [% END %] >> + Place Hold >> [% END %] >> [% END %] >> [% END %] >> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >> index 391037f..b9e2ed4 100644 >> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >> @@ -308,13 +308,7 @@ $(function() { >> [% IF ( RequestOnOpac ) %] >> [% UNLESS ( itemsloo.norequests ) %] >> [% IF ( opacuserlogin ) %] >> - [% IF ( AllowOnShelfHolds ) %] >> Place Hold >> - [% ELSE %] >> - [% IF ( itemsloo.itemsissued ) %] >> - Place Hold >> - [% END %] >> - [% END %] >> [% END %] >> [% END %] >> [% END %] >> diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >> index c80d41c..d978357 100755 >> --- a/opac/opac-ISBDdetail.pl >> +++ b/opac/opac-ISBDdetail.pl >> @@ -69,7 +69,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >> >> my $biblionumber = $query->param('biblionumber'); >> >> -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); >> $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); >> >> my $marcflavour = C4::Context->preference("marcflavour"); >> @@ -152,7 +151,6 @@ foreach ( @$reviews ) { >> >> $template->param( >> RequestOnOpac => C4::Context->preference("RequestOnOpac"), >> - AllowOnShelfHolds => C4::Context->preference('AllowOnShelfHolds'), >> norequests => $norequests, >> ISBD => $res, >> biblionumber => $biblionumber, >> diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >> index ffa0a6d..476fe50 100755 >> --- a/opac/opac-MARCdetail.pl >> +++ b/opac/opac-MARCdetail.pl >> @@ -81,7 +81,6 @@ $template->param( >> bibliotitle => $biblio->{title}, >> ); >> >> -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); >> $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); >> >> # adding the $RequestOnOpac param >> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >> index f82dde2..8111e9d 100755 >> --- a/opac/opac-detail.pl >> +++ b/opac/opac-detail.pl >> @@ -347,8 +347,6 @@ if ($session->param('busc')) { >> } >> >> >> - >> -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); >> $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); >> >> my $record = GetMarcBiblio($biblionumber); >> diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >> index b2144a9..3e573fc 100755 >> --- a/opac/opac-reserve.pl >> +++ b/opac/opac-reserve.pl >> @@ -471,7 +471,7 @@ foreach my $biblioNum (@biblionumbers) { >> $policy_holdallowed = 0; >> } >> >> - if (IsAvailableForItemLevelRequest($itemNum) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum) and ($itemLoopIter->{already_reserved} ne 1)) { >> + if (IsAvailableForItemLevelRequest($itemNum,$borr->{'borrowernumber'},$itemInfo->{'homebranch'}) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum) and !$itemLoopIter->{already_reserved}) { >> $itemLoopIter->{available} = 1; >> $numCopiesAvailable++; >> } >> diff --git a/opac/opac-search.pl b/opac/opac-search.pl >> index aba23a8..081bc81 100755 >> --- a/opac/opac-search.pl >> +++ b/opac/opac-search.pl >> @@ -100,7 +100,7 @@ if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { >> elsif (C4::Context->preference("marcflavour") eq "MARC21" ) { >> $template->param('usmarc' => 1); >> } >> -$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); >> + >> $template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') ); >> >> if (C4::Context->preference('BakerTaylorEnabled')) { >> -- >> 1.6.5 >> >> _______________________________________________ >> Koha-patches mailing list >> Koha-patches at lists.koha-community.org >> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches >> website : http://www.koha-community.org/ >> git : http://git.koha-community.org/ >> bugs : http://bugs.koha-community.org/ > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ From marc at msys.ch Wed Dec 21 15:42:49 2011 From: marc at msys.ch (Marc Balmer) Date: Wed, 21 Dec 2011 15:42:49 +0100 Subject: [Koha-patches] [PATCH] bug_5786: moved AllowOnShelfHolds to circ matrix (issuingrules) In-Reply-To: References: <1324438083-21189-1-git-send-email-srdjan@catalyst.net.nz> Message-ID: <4EF1F069.40106@msys.ch> Am 21.12.11 15:39, schrieb Owen Leonard: > I don't think it's appropriate to request this change in practice in a reply on the patches list. I'm sure your request would be considered by all, but it should be raised in the devel list or at the next IRC meeting. > > -- Owen Well, a copy always went to the patch author, so I assume it gets due attention. [...] From dpavlin at rot13.org Wed Dec 21 16:33:18 2011 From: dpavlin at rot13.org (Dobrica Pavlinusic) Date: Wed, 21 Dec 2011 16:33:18 +0100 Subject: [Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output In-Reply-To: <4EF0AFA9.1060802@biblibre.com> References: <1324382757-5112-1-git-send-email-dpavlin@rot13.org> <4EF08850.4050906@biblibre.com> <20111220145217.GC12086@rot13.org> <4EF0AFA9.1060802@biblibre.com> Message-ID: <20111221153318.GC22066@rot13.org> On Tue, Dec 20, 2011 at 04:54:17PM +0100, LAURENT Henri-Damien wrote: > Le 20/12/2011 15:52, Dobrica Pavlinusic a ?crit : > > On Tue, Dec 20, 2011 at 02:06:24PM +0100, LAURENT Henri-Damien wrote: > >>> -if ($verbose_logging) { > >>> - $zebraidx_log_opt = ''; > >>> +if ($verbose_logging >= 2) { > >>> + $zebraidx_log_opt = '-v none,fatal,warn,all'; > >>> } > >> mmm... in my opinion, all would be WAY too verbose. > >> request,log are enough to debug the search query. > >> my two cents. > > > > all is very verbose, but does provide additional information about Zebra > > progress (I must admit I'm leaning towards too much information as > > opposed to too little). > > > > Should I move all to verbose level 3 (-v -v -v) or just remove it all > > together? > > > I would leave that to -vvv > When I looked at logs when all is set, I found it quite useless, but if > you need that. I would say let's keep it for -vvv I re-examined $zebraidx_log_opt handling with my changes, and default option (without -v parameter or with single -v) is now "none,fatal,warn". Only thing which is affected by -v -v is adding "all" to Zebra logs so I think that moving it to -v -v -v isn't needed: it has same effect as -v -v does now (and would leave -v -v doing nothing). However, it does fixes behaviour with -v which used to reset Zebra log options to '' and thus system defaults as opposed to leaving zebra log flags at "none,fatal,warn". Existing code does produce different logs without -v ("none,fatal,wran") and with single -v (whatever is system default, which is usually just fatal), but I think new behaviour is improvement in this regard. Does this address your concernes with this patch? -- Dobrica Pavlinusic 2share!2flame dpavlin at rot13.org Unix addict. Internet consultant. http://www.rot13.org/~dpavlin From srdjan at catalyst.net.nz Thu Dec 22 01:39:00 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 22 Dec 2011 13:39:00 +1300 Subject: [Koha-patches] [PATCH] bug_4530: Rework issuing rules In-Reply-To: References: Message-ID: <1324514340-28574-1-git-send-email-srdjan@catalyst.net.nz> Use only one set of functions Database efficient rules fetch - only one query --- C4/Circulation.pm | 318 +++++++++------------------- C4/Members.pm | 1 - C4/Overdues.pm | 42 +---- C4/Reserves.pm | 15 +-- t/db_dependent/lib/KohaTest/Circulation.pm | 4 +- t/db_dependent/lib/KohaTest/Overdues.pm | 1 - 6 files changed, 109 insertions(+), 272 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a6f4f2..4e98ad1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -74,7 +74,6 @@ BEGIN { &GetItemIssue &GetItemIssues &GetIssuingCharges - &GetIssuingRule &GetBranchBorrowerCircRule &GetBranchItemRule &GetBiblioIssues @@ -356,12 +355,12 @@ sub TooMany { # given branch, patron category, and item type, determine # applicable issuing rule - my $issuing_rule = GetIssuingRule($cat_borrower, $type, $branch); + my $issuing_rule = GetIssuingRuleRecord($cat_borrower, $type, $branch, 'maxissueqty'); # if a rule is found and has a loan limit set, count # how many loans the patron already has that meet that # rule - if (defined($issuing_rule) and defined($issuing_rule->{'maxissueqty'})) { + if ( $issuing_rule ) { my @bind_params; my $count_query = "SELECT COUNT(*) FROM issues JOIN items USING (itemnumber) "; @@ -1087,56 +1086,8 @@ Get loan length for an itemtype, a borrower type and a branch sub GetLoanLength { my ( $borrowertype, $itemtype, $branchcode ) = @_; - my $dbh = C4::Context->dbh; - my $sth = - $dbh->prepare( -"select issuelength from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" - ); -# warn "in get loan lenght $borrowertype $itemtype $branchcode "; -# try to find issuelength & return the 1st available. -# check with borrowertype, itemtype and branchcode, then without one of those parameters - $sth->execute( $borrowertype, $itemtype, $branchcode ); - my $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, "*", $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", $itemtype, $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", "*", $branchcode ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, $itemtype, "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( $borrowertype, "*", "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", $itemtype, "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - - $sth->execute( "*", "*", "*" ); - $loanlength = $sth->fetchrow_hashref; - return $loanlength->{issuelength} - if defined($loanlength) && $loanlength->{issuelength} ne 'NULL'; - # if no rule is set => 21 days (hardcoded) - return 21; + return GetIssuingRuleValue( $borrowertype, $itemtype, $branchcode, 'issuelength' ) || 21; } @@ -1150,108 +1101,100 @@ Get the Hard Due Date and it's comparison for an itemtype, a borrower type and a sub GetHardDueDate { my ( $borrowertype, $itemtype, $branchcode ) = @_; - my $dbh = C4::Context->dbh; - my $sth = - $dbh->prepare( -"select hardduedate, hardduedatecompare from issuingrules where categorycode=? and itemtype=? and branchcode=?" - ); - $sth->execute( $borrowertype, $itemtype, $branchcode ); - my $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - $sth->execute( $borrowertype, "*", $branchcode ); - $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - $sth->execute( "*", $itemtype, $branchcode ); - $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - $sth->execute( "*", "*", $branchcode ); - $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - $sth->execute( $borrowertype, $itemtype, "*" ); - $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - $sth->execute( $borrowertype, "*", "*" ); - $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - $sth->execute( "*", $itemtype, "*" ); - $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - $sth->execute( "*", "*", "*" ); - $results = $sth->fetchrow_hashref; - return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) - if defined($results) && $results->{hardduedate} ne 'NULL'; - - # if no rule is set => return undefined - return (undef, undef); + my $issuing_rule = GetIssuingRuleRecord($borrowertype, $itemtype, $branchcode, 'hardduedate') + or return; + return (C4::Dates->new($issuing_rule->{hardduedate}, 'iso'),$issuing_rule->{hardduedatecompare}); } + + +=head2 GetIssuingRuleValue + + my $irule = &GetIssuingRuleValue($borrowertype,$itemtype,$branchcode, $rule_name) + +Get the most specific non-null value issuing rule for an itemtype, a borrower type and a branch -=head2 GetIssuingRule +=cut + +sub GetIssuingRuleValue { + my ( $borrowertype, $itemtype, $branchcode, $rule ) = @_; + my $irule = GetIssuingRuleRecord( $borrowertype, $itemtype, $branchcode, $rule ) + or return; + return $irule->{$rule}; +} - my $irule = &GetIssuingRule($borrowertype,$itemtype,branchcode) +=head2 GetIssuingRuleRecord -FIXME - This is a copy-paste of GetLoanLength -as a stop-gap. Do not wish to change API for GetLoanLength -this close to release, however, Overdues::GetIssuingRules is broken. + my $irule = &GetIssuingRuleRecord($borrowertype,$itemtype,$branchcode, $rule_name) -Get the issuing rule for an itemtype, a borrower type and a branch -Returns a hashref from the issuingrules table. +Get the most specific non-null value issuing rule for an itemtype, a borrower type and a branch +If $rule_name is specified, only records with $rule_name not null are taken in account + +Order of preference is $branchcode, $borrowertype, $itemtype =cut -sub GetIssuingRule { - my ( $borrowertype, $itemtype, $branchcode ) = @_; - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare( "select * from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" ); - my $irule; +sub GetIssuingRuleRecord { + my ( $borrowertype, $itemtype, $branchcode, $rule ) = @_; - $sth->execute( $borrowertype, $itemtype, $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + my $irules = GetIssuingRules($borrowertype,$itemtype,$branchcode) + or return; - $sth->execute( $borrowertype, "*", $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + return unless @$irules; - $sth->execute( "*", $itemtype, $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + return $irules->[0] unless $rule; - $sth->execute( "*", "*", $branchcode ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + die qq{Invalid rule (field) "$rule"} unless exists $irules->[0]->{$rule}; - $sth->execute( $borrowertype, $itemtype, "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + foreach (@$irules) { + return $_ if $_->{$rule}; # XXX defined $_->{$rule} + } + + return; +} - $sth->execute( $borrowertype, "*", "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; +=head2 GetIssuingRules - $sth->execute( "*", $itemtype, "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + my $irules = &GetIssuingRules($borrowertype,$itemtype,$branchcode) + +Get issuing all rule records for an itemtype, a borrower type and a branch +in order of preference + +Order of preference is $branchcode, $borrowertype, $itemtype + +=cut + +sub GetIssuingRules { + my ( $borrowertype, $itemtype, $branchcode ) = @_; - $sth->execute( "*", "*", "*" ); - $irule = $sth->fetchrow_hashref; - return $irule if defined($irule) ; + my (@where, @params); - # if no rule matches, - return undef; + if ( $borrowertype ) { + push @where, "categorycode=? OR categorycode='*'"; + push @params, $borrowertype; + } else { + push @where, "categorycode='*'"; + } + + if ( $itemtype ) { + push @where, "itemtype=? OR itemtype='*'"; + push @params, $itemtype; + } else { + push @where, "itemtype='*'"; + } + + if ( $branchcode ) { + push @where, "branchcode=? OR branchcode='*'"; + push @params, $branchcode; + } else { + push @where, "branchcode='*'"; + } + + my $qry = "select * from issuingrules where " + .join( ' AND ', map "($_)", @where ) + ." order by branchcode desc, categorycode desc, itemtype desc"; + + my $dbh = C4::Context->dbh; + return $dbh->selectall_arrayref($qry, { Slice => {} }, @params); } =head2 GetBranchBorrowerCircRule @@ -1751,18 +1694,16 @@ sub _FixFineDaysOnReturn { } my $branchcode = _GetCircControlBranch( $item, $borrower ); + + my $finedays = GetIssuingRuleValue( $borrower->{categorycode}, $item->{itype}, $branchcode, 'finedays' ) + or return; + my $grace = GetIssuingRuleValue( $borrower->{categorycode}, $item->{itype}, $branchcode, 'firstremind' ); + my $calendar = C4::Calendar->new( branchcode => $branchcode ); my $today = C4::Dates->new(); - - my $deltadays = $calendar->daysBetween( $datedue, C4::Dates->new() ); + my $deltadays = $calendar->daysBetween( $datedue, $today ); my $circcontrol = C4::Context::preference('CircControl'); - my $issuingrule = GetIssuingRule( $borrower->{categorycode}, $item->{itype}, $branchcode ); - my $finedays = $issuingrule->{finedays}; - - # exit if no finedays defined - return unless $finedays; - my $grace = $issuingrule->{firstremind}; if ( $deltadays - $grace > 0 ) { my @newdate = Add_Delta_Days( Today(), $deltadays * $finedays ); @@ -2192,27 +2133,16 @@ sub CanBookBeRenewed { my $sthcount = $dbh->prepare(" SELECT - borrowers.categorycode, biblioitems.itemtype, issues.renewals, renewalsallowed, $controlbranch - FROM issuingrules, - issues + borrowers.categorycode, biblioitems.itemtype, issues.renewals, $controlbranch + FROM issues LEFT JOIN items USING (itemnumber) LEFT JOIN borrowers USING (borrowernumber) LEFT JOIN biblioitems USING (biblioitemnumber) WHERE - (issuingrules.categorycode = borrowers.categorycode OR issuingrules.categorycode = '*') - AND - (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*') - AND - (issuingrules.branchcode = $controlbranch OR issuingrules.branchcode = '*') - AND borrowernumber = ? AND itemnumber = ? - ORDER BY - issuingrules.categorycode desc, - issuingrules.itemtype desc, - issuingrules.branchcode desc LIMIT 1; "); @@ -2231,8 +2161,17 @@ sub CanBookBeRenewed { $renewokay = 0; $error="on_reserve" } + elsif ( $override_limit ) { + $renewokay = 1; + } + elsif ( my $renewalsallowed = GetIssuingRuleValue($data1->{categorycode}, $itype, $data1->{$controlbranch}, 'renewalsallowed') ) { + if ( $renewalsallowed > $data1->{renewals} || $override_limit ) { + $renewokay = 1; + } + } + $error="too_many" unless $renewokay; + } - } return ($renewokay,$error); } @@ -2339,8 +2278,6 @@ sub GetRenewCount { my ( $bornum, $itemno ) = @_; my $dbh = C4::Context->dbh; my $renewcount = 0; - my $renewsallowed = 0; - my $renewsleft = 0; my $borrower = C4::Members::GetMember( borrowernumber => $bornum); my $item = GetItem($itemno); @@ -2361,10 +2298,8 @@ sub GetRenewCount { # $item and $borrower should be calculated my $branchcode = _GetCircControlBranch($item, $borrower); - my $issuingrule = GetIssuingRule($borrower->{categorycode}, $item->{itype}, $branchcode); - - $renewsallowed = $issuingrule->{'renewalsallowed'}; - $renewsleft = $renewsallowed - $renewcount; + my $renewsallowed = GetIssuingRuleValue($borrower->{categorycode}, $item->{itype}, $branchcode, 'renewalsallowed') || 0; + my $renewsleft = $renewsallowed - $renewcount; if($renewsleft < 0){ $renewsleft = 0; } return ( $renewcount, $renewsallowed, $renewsleft ); } @@ -2409,19 +2344,11 @@ sub GetIssuingCharges { $item_type = $item_data->{itemtype}; $charge = $item_data->{rentalcharge}; my $branch = C4::Branch::mybranch(); - my $discount_query = q|SELECT rentaldiscount, - issuingrules.itemtype, issuingrules.branchcode + my $borr_query = q|SELECT borrowers.categorycode FROM borrowers - LEFT JOIN issuingrules ON borrowers.categorycode = issuingrules.categorycode - WHERE borrowers.borrowernumber = ? - AND (issuingrules.itemtype = ? OR issuingrules.itemtype = '*') - AND (issuingrules.branchcode = ? OR issuingrules.branchcode = '*')|; - my $discount_sth = $dbh->prepare($discount_query); - $discount_sth->execute( $borrowernumber, $item_type, $branch ); - my $discount_rules = $discount_sth->fetchall_arrayref({}); - if (@{$discount_rules}) { - # We may have multiple rules so get the most specific - my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); + WHERE borrowers.borrowernumber = ?|; + my $borr_cat = $dbh->selectrow_array($borr_query, undef, $borrowernumber); + if ( my $discount = GetIssuingRuleValue($borr_cat, $item_type, $branch, 'rentaldiscount') ) { $charge = ( $charge * ( 100 - $discount ) ) / 100; } } @@ -2430,43 +2357,6 @@ sub GetIssuingCharges { return ( $charge, $item_type ); } -# Select most appropriate discount rule from those returned -sub _get_discount_from_rule { - my ($rules_ref, $branch, $itemtype) = @_; - my $discount; - - if (@{$rules_ref} == 1) { # only 1 applicable rule use it - $discount = $rules_ref->[0]->{rentaldiscount}; - return (defined $discount) ? $discount : 0; - } - # could have up to 4 does one match $branch and $itemtype - my @d = grep { $_->{branchcode} eq $branch && $_->{itemtype} eq $itemtype } @{$rules_ref}; - if (@d) { - $discount = $d[0]->{rentaldiscount}; - return (defined $discount) ? $discount : 0; - } - # do we have item type + all branches - @d = grep { $_->{branchcode} eq q{*} && $_->{itemtype} eq $itemtype } @{$rules_ref}; - if (@d) { - $discount = $d[0]->{rentaldiscount}; - return (defined $discount) ? $discount : 0; - } - # do we all item types + this branch - @d = grep { $_->{branchcode} eq $branch && $_->{itemtype} eq q{*} } @{$rules_ref}; - if (@d) { - $discount = $d[0]->{rentaldiscount}; - return (defined $discount) ? $discount : 0; - } - # so all and all (surely we wont get here) - @d = grep { $_->{branchcode} eq q{*} && $_->{itemtype} eq q{*} } @{$rules_ref}; - if (@d) { - $discount = $d[0]->{rentaldiscount}; - return (defined $discount) ? $discount : 0; - } - # none of the above - return 0; -} - =head2 AddIssuingCharge &AddIssuingCharge( $itemno, $borrowernumber, $charge ) diff --git a/C4/Members.pm b/C4/Members.pm index 1d7bc42..191b977 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -626,7 +626,6 @@ sub IsMemberBlocked { my $dbh = C4::Context->dbh; my $blockeddate = CheckBorrowerDebarred($borrowernumber); - return ( 1, $blockeddate ) if $blockeddate; # if he have late issues diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 660e10b..ef97f87 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -72,9 +72,6 @@ BEGIN { push @EXPORT, qw( &GetIssuesIteminfo ); - # - # &GetIssuingRules - delete. - # use C4::Circulation::GetIssuingRule instead. # subs to move to Members.pm push @EXPORT, qw( @@ -272,9 +269,6 @@ sub CalcFine { my $dbh = C4::Context->dbh; my $amount = 0; my $daystocharge; - # get issuingrules (fines part will be used) - $debug and warn sprintf("CalcFine calling GetIssuingRule(%s, %s, %s)", $bortype, $item->{'itemtype'}, $branchcode); - my $data = C4::Circulation::GetIssuingRule($bortype, $item->{'itemtype'}, $branchcode); if($difference) { # if $difference is supplied, the difference has already been calculated, but we still need to adjust for the calendar. # use copy-pasted functions from calendar module. (deprecated -- these functions will be removed from C4::Overdues ). @@ -292,6 +286,7 @@ sub CalcFine { } } # correct for grace period. + my $data = C4::Circulation::GetIssuingRuleRecord($bortype, $item->{'itemtype'}, $branchcode); my $days_minus_grace = $daystocharge - $data->{'firstremind'}; if ($data->{'chargeperiod'} > 0 && $days_minus_grace > 0 ) { $amount = int($daystocharge / $data->{'chargeperiod'}) * $data->{'fine'}; @@ -655,41 +650,6 @@ sub GetFine { return 0; } - -=head2 GetIssuingRules - -FIXME - This sub should be deprecated and removed. -It ignores branch and defaults. - - $data = &GetIssuingRules($itemtype,$categorycode); - -Looks up for all issuingrules an item info - -C<$itemnumber> is a reference-to-hash whose keys are all of the fields -from the borrowers and categories tables of the Koha database. Thus, - -C<$categorycode> contains information about borrowers category - -C<$data> contains all information about both the borrower and -category he or she belongs to. -=cut - -sub GetIssuingRules { - warn "GetIssuingRules is deprecated: use GetIssuingRule from C4::Circulation instead."; - my ($itemtype,$categorycode)=@_; - my $dbh = C4::Context->dbh(); - my $query=qq|SELECT * - FROM issuingrules - WHERE issuingrules.itemtype=? - AND issuingrules.categorycode=? - |; - my $sth = $dbh->prepare($query); - # print $query; - $sth->execute($itemtype,$categorycode); - return $sth->fetchrow_hashref; -} - - sub ReplacementCost2 { my ( $itemnum, $borrowernumber ) = @_; my $dbh = C4::Context->dbh(); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 359bbad..f23d63a 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -418,18 +418,6 @@ sub CanItemBeReserved{ my $item = GetItem($itemnumber); my $borrower = C4::Members::GetMember('borrowernumber'=>$borrowernumber); - # we retrieve user rights on this itemtype and branchcode - my $sth = $dbh->prepare("SELECT categorycode, itemtype, branchcode, reservesallowed - FROM issuingrules - WHERE (categorycode in (?,'*') ) - AND (itemtype IN (?,'*')) - AND (branchcode IN (?,'*')) - ORDER BY - categorycode DESC, - itemtype DESC, - branchcode DESC;" - ); - my $querycount ="SELECT count(*) as count FROM reserves @@ -454,8 +442,7 @@ sub CanItemBeReserved{ } # we retrieve rights - $sth->execute($categorycode, $itemtype, $branchcode); - if(my $rights = $sth->fetchrow_hashref()){ + if(my $rights = C4::Circulation::GetIssuingRuleRecord($categorycode, $itemtype, $branchcode, 'reservesallowed')){ $itemtype = $rights->{itemtype}; $allowedreserves = $rights->{reservesallowed}; }else{ diff --git a/t/db_dependent/lib/KohaTest/Circulation.pm b/t/db_dependent/lib/KohaTest/Circulation.pm index b3a1ff8..106c1ba 100644 --- a/t/db_dependent/lib/KohaTest/Circulation.pm +++ b/t/db_dependent/lib/KohaTest/Circulation.pm @@ -20,7 +20,9 @@ sub methods : Test( 1 ) { CanBookBeIssued AddIssue GetLoanLength - GetIssuingRule + GetIssuingRules + GetIssuingRuleRecord + GetIssuingRuleValue GetBranchBorrowerCircRule AddReturn MarkIssueReturned diff --git a/t/db_dependent/lib/KohaTest/Overdues.pm b/t/db_dependent/lib/KohaTest/Overdues.pm index 13eb1f2..07d9d41 100644 --- a/t/db_dependent/lib/KohaTest/Overdues.pm +++ b/t/db_dependent/lib/KohaTest/Overdues.pm @@ -23,7 +23,6 @@ sub methods : Test( 1 ) { BorType ReplacementCost GetFine - GetIssuingRules ReplacementCost2 GetNextIdNotify NumberNotifyId -- 1.6.5 From srdjan at catalyst.net.nz Thu Dec 22 02:36:02 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 22 Dec 2011 14:36:02 +1300 Subject: [Koha-patches] [PATCH] Bug 6129 - [master] this adds an ISSN to serialssolutions URLs In-Reply-To: References: Message-ID: <1324517762-6943-1-git-send-email-srdjan@catalyst.net.nz> If a URL is a serialssolutions URLs that doesn't already have an ISSN parameter, this adds one on the OPAC. --- C4/Biblio.pm | 6 ++++-- basket/basket.pl | 4 ++-- catalogue/detail.pl | 11 +++++++++-- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 5 ++++- opac/opac-basket.pl | 2 +- opac/opac-detail.pl | 14 +++++++------- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index ac78ae3..2f97710 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1627,7 +1627,7 @@ sub GetMarcAuthors { =head2 GetMarcUrls - $marcurls = GetMarcUrls($record,$marcflavour); + $marcurls = GetMarcUrls($record,$marcflavour,$issn); Returns arrayref of URLs from MARC data, suitable to pass to tmpl loop. Assumes web resources (not uncommon in MARC21 to omit resource type ind) @@ -1635,7 +1635,7 @@ Assumes web resources (not uncommon in MARC21 to omit resource type ind) =cut sub GetMarcUrls { - my ( $record, $marcflavour ) = @_; + my ( $record, $marcflavour, $issn ) = @_; my @marcurls; for my $field ( $record->field('856') ) { @@ -1645,6 +1645,8 @@ sub GetMarcUrls { } my @urls = $field->subfield('u'); foreach my $url (@urls) { + $url .= "?sid=&ISSN=$issn" + if $issn && ($url =~ m/\bserialssolutions\b/o) && ($url !~ m/\bISSN=/o); my $marcurl; if ( $marcflavour eq 'MARC21' ) { my $s3 = $field->subfield('3'); diff --git a/basket/basket.pl b/basket/basket.pl index 8fc15e4..90c4cf8 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -65,8 +65,8 @@ foreach my $biblionumber ( @bibs ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); - my $marcurlsarray = GetMarcUrls ($record,$marcflavour); - my @items = GetItemsInfo( $biblionumber ); + my $marcurlsarray = GetMarcUrls ($record,$marcflavour,$dat->{issn}); + my @items = GetItemsInfo( $biblionumber, 'opac' ); my $hasauthors = 0; if($dat->{'author'} || @$marcauthorsarray) { diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 580949d..0af8727 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -102,13 +102,20 @@ $template->param( normalized_isbn => $isbn, ); +unless (defined($record)) { + print $query->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} + +my $dat = &GetBiblioData($biblionumber); + my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcisbnsarray = GetMarcISBN( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries($record,$marcflavour); -my $marcurlsarray = GetMarcUrls ($record,$marcflavour); -my $marchostsarray = GetMarcHosts($record,$marcflavour); +my $marcurlsarray = GetMarcUrls ($record,$marcflavour,$dat->{issn}); +my $marchostsarray = GetMarcHosts($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, $fw); # Get Branches, Itemtypes and Locations diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 2d88880..52a692d 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -436,6 +436,7 @@ + @@ -539,7 +540,9 @@ Online Resources: - + + + ?sid=&ISSN= _blank diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index 5e92d15..e56509e 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -67,7 +67,7 @@ foreach my $biblionumber ( @bibs ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); - my $marcurlsarray = GetMarcUrls ($record,$marcflavour); + my $marcurlsarray = GetMarcUrls ($record,$marcflavour,$dat->{issn}); my @items = &GetItemsLocationInfo( $biblionumber ); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index f82dde2..1b71c13 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -400,12 +400,12 @@ my $hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddeni # Hide items if ($hideitems) { for my $itm (@all_items) { - if ( C4::Context->preference('hidelostitems') ) { - push @items, $itm unless $itm->{itemlost} or any { $itm->{'itemnumber'} eq $_ } @hiddenitems; - } else { - push @items, $itm unless any { $itm->{'itemnumber'} eq $_ } @hiddenitems; + if ( C4::Context->preference('hidelostitems') ) { + push @items, $itm unless $itm->{itemlost} or any { $itm->{'itemnumber'} eq $_ } @hiddenitems; + } else { + push @items, $itm unless any { $itm->{'itemnumber'} eq $_ } @hiddenitems; + } } -} } else { # Or not @items = @all_items; @@ -525,8 +525,8 @@ my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); -my $marcurlsarray = GetMarcUrls ($record,$marcflavour); -my $marchostsarray = GetMarcHosts($record,$marcflavour); +my $marcurlsarray = GetMarcUrls ($record,$marcflavour,$dat->{issn}); +my $marchostsarray = GetMarcHosts($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); $template->param( -- 1.6.5 From magnus at enger.priv.no Thu Dec 22 11:02:52 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Thu, 22 Dec 2011 11:02:52 +0100 Subject: [Koha-patches] [PATCH] Bug 7375 - Update minimum version of Perl to 5.10 Message-ID: <1324548172-5519-1-git-send-email-magnus@enger.priv.no> - Change the installer script to look for at least 5.10/5.010000 - Change the template to ask for the correct version To test: - Run through the webinstaller on 5.10 or newer and check that there are no errors. - Ideally: Run through the webinstaller on an older version than 5.10 and check that there *is* an error, asking for 5.10 or newer. --- installer/install.pl | 2 +- .../prog/en/modules/installer/step1.tt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/install.pl b/installer/install.pl index ae478b6..1619f50 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -59,7 +59,7 @@ if ( $step && $step == 1 ) { $template->param( language => 1 ); $template->param( 'checkmodule' => 1 ); # we start with the assumption that there are no problems and set this to 0 if there are - unless ( $] >= 5.008008 ) { # Bug 4505 + unless ( $] >= 5.010000 ) { # Bug 7375 $template->param( problems => 1, perlversion => 1, checkmodule => 0 ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt index dbc3736..52c52c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt @@ -49,8 +49,8 @@ listed, please inform your systems administrator.

          I encountered some problems.

            [% IF ( perlversion ) %] -
          • Your perl version seems to be obsolete. - Please upgrade to a newer version of Perl (at least Version 5.006001).
          • +
          • Your Perl version seems to be obsolete. + Please upgrade to a newer version of Perl (at least Version 5.10).
          • [% END %]
          [% END %] -- 1.7.5.4 From henridamien.laurent at biblibre.com Thu Dec 22 17:11:39 2011 From: henridamien.laurent at biblibre.com (Henri-Damien LAURENT) Date: Thu, 22 Dec 2011 17:11:39 +0100 Subject: [Koha-patches] [PATCH] Bug 6842 FU : library transfer limits edits not stored Message-ID: <1324570299-22866-1-git-send-email-henridamien.laurent@biblibre.com> Followup : Changes the DeleteBranchTransferLimits signature : one now needs to delete only the limits for ONE branch --- C4/Circulation.pm | 11 +++++++---- admin/branch_transfer_limits.pl | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 02e13c0..efd7dc0 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2938,14 +2938,17 @@ sub CreateBranchTransferLimit { =head2 DeleteBranchTransferLimits - DeleteBranchTransferLimits(); +DeleteBranchTransferLimits($frombranch); + +Deletes all the branch transfer limits for one branch =cut sub DeleteBranchTransferLimits { - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("TRUNCATE TABLE branch_transfer_limits"); - $sth->execute(); + my $branch = shift; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare("DELETE FROM branch_transfer_limits WHERE fromBranch = ?"); + $sth->execute($branch); } sub ReturnLostItem{ diff --git a/admin/branch_transfer_limits.pl b/admin/branch_transfer_limits.pl index 8c6f42e..e7422a6 100755 --- a/admin/branch_transfer_limits.pl +++ b/admin/branch_transfer_limits.pl @@ -93,7 +93,8 @@ while ( my $row = $sth->fetchrow_hashref ) { ## If Form Data Passed, Update the Database if ( $input->param('updateLimits') ) { - DeleteBranchTransferLimits(); + DeleteBranchTransferLimits($branchcode); + foreach my $code ( @codes ) { foreach my $toBranch ( @branchcodes ) { -- 1.7.7.3 From henridamien.laurent at biblibre.com Thu Dec 22 17:12:13 2011 From: henridamien.laurent at biblibre.com (Henri-Damien LAURENT) Date: Thu, 22 Dec 2011 17:12:13 +0100 Subject: [Koha-patches] [PATCH] Bug 6842 library transfer limits edits not stored Message-ID: <1324570333-22929-1-git-send-email-henridamien.laurent@biblibre.com> This was owed to the bug 6689 Table sorter. It would embed a form in an other form, which is not licit in xhtml. This solution relies on the dataTables patches (bug 6836) and fixes the edit problem with keeping the pagination. --- .../en/modules/admin/branch_transfer_limits.tt | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 5e4e58f..7c10e9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -1,8 +1,9 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Library Checkin and Transfer Policy [% INCLUDE 'doc-head-close.inc' %] - - + + + @@ -102,9 +100,6 @@

          Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]

          Check All | Uncheck All

          -
          - [% INCLUDE 'table-pager.inc' perpage='20' %] -
          -- 1.7.7.3 From judit at calyx.net.au Mon Dec 19 12:16:50 2011 From: judit at calyx.net.au (Judit) Date: Mon, 19 Dec 2011 06:16:50 -0500 Subject: [Koha-patches] [PATCH] [ENH] Add --disabled to koha-list command Message-ID: <1324293410-1934-1-git-send-email-judit@calyx.net.au> Add --disabled to koha-list command --- debian/scripts/koha-list | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/scripts/koha-list b/debian/scripts/koha-list index 1e19f1a..459e5ca 100755 --- a/debian/scripts/koha-list +++ b/debian/scripts/koha-list @@ -34,9 +34,10 @@ help() { Lists Koha instances, optionally only those that are enabled or have email turned on. -Usage: $0 [--enabled] [--email] [-h] +Usage: $0 [--enabled|--disabled] [--email|--noemail] [-h] Options: --enabled only show instances that are enabled + --disabled only show instances that are disabled --email only show instances that have email enabled --noemail only show instances that do not have email enabled -h this help @@ -47,9 +48,10 @@ eoh } enabled=no +disabled=no email=no noemail=no -args=$(getopt -l enabled,email,noemail -o h -n $0 -- "$@") +args=$(getopt -l enabled,disabled,email,noemail -o h -n $0 -- "$@") set -- $args while [ ! -z "$1" ] do @@ -57,6 +59,7 @@ do -h) help; exit;; --email) email=yes;; --enabled) enabled=yes;; + --disabled) disabled=yes;; --noemail) noemail=yes;; *) break;; esac @@ -68,6 +71,7 @@ sort | while read name do [ "$enabled" = yes ] && ! is_enabled "$name" && continue + [ "$disabled" = yes ] && is_enabled "$name" && continue [ "$email" = yes ] && [ ! -e /var/lib/koha/$name/email.enabled ] && continue [ "$noemail" = yes ] && [ -e /var/lib/koha/$name/email.enabled ] && continue echo "$name" -- 1.7.4.1 From oleonard at myacpl.org Tue Dec 27 17:27:38 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 27 Dec 2011 11:27:38 -0500 Subject: [Koha-patches] [PATCH] Bug 7031 Follow-up, More options for AdvancedSearchTypes Message-ID: <1325003258-27678-1-git-send-email-oleonard@myacpl.org> This follow-up patch corrects some markup errors and removes some markup which I think is superfluous: - Using template FILTER command to remove invalid punctuation from ID attributes (to quiet the HTML validator) - Removing
          since options are bordered by the tab box now - Correcting the conditional which controls the table markup to prevent extra/missing
          - Adding missing ID attribute in the OPAC template --- .../prog/en/modules/catalogue/advsearch.tt | 10 ++++------ .../opac-tmpl/prog/en/modules/opac-advsearch.tt | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt index acf133d..28f445c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt @@ -112,18 +112,15 @@ [% FOREACH advsearchloo IN advancedsearchesloop %]
          -
          - Limit to any of the following: +

          Limit to any of the following:

          [% FOREACH itemtypeloo IN advsearchloo.code_loop %] - - [% UNLESS ( loop.count % 5 ) %][% END %] + [% IF ( loop.last ) %][% ELSE %][% UNLESS ( loop.count % 5 ) %][% END %][% END %] [% END %] -
          - [% END %] @@ -283,6 +280,7 @@ + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt index 4847ae3..d4e92b4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt @@ -158,11 +158,10 @@ [% FOREACH itemtypeloo IN advsearchloo.code_loop %] - - [% UNLESS ( loop.count % 5 ) %][% END %] + [% IF ( loop.last ) %][% ELSE %][% UNLESS ( loop.count % 5 ) %][% END %][% END %] [% END %] -
          @@ -172,7 +171,7 @@
          Language

          - [% FOREACH search_languages_loo IN search_languages_loop %] [% IF ( search_languages_loo.selected ) %] -- 1.7.3 From oleonard at myacpl.org Tue Dec 27 20:59:24 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 27 Dec 2011 14:59:24 -0500 Subject: [Koha-patches] [PATCH] Bug 7381 - wrong isbn showing on the staff search results Message-ID: <1325015964-29968-1-git-send-email-oleonard@myacpl.org> Outputting the "raw" ISBN. In the case of multiples, ISBNs are concatenated with " | " Using a T:T filter to make these a comma-separated list. --- .../prog/en/modules/catalogue/results.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 4b4e088..52969f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -493,7 +493,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %] [% IF ( SEARCH_RESULT.edition ) %]Edition: [% SEARCH_RESULT.edition %][% END %] [% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages %][% END %] - [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %] [% IF ( SEARCH_RESULT.normalized_isbn ) %]ISBN: [% SEARCH_RESULT.normalized_isbn %][% END %] + [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %] [% IF ( SEARCH_RESULT.isbn ) %]ISBN: [% SEARCH_RESULT.isbn | replace('\s\|', ', ')%][% END %] [% SEARCH_RESULT.description %] [% IF ( SEARCH_RESULT.timestamp ) %] (modified on [% SEARCH_RESULT.timestamp %])[% END %] [% IF ( SEARCH_RESULT.cn_class ) %][[% SEARCH_RESULT.cn_class %]][% END %] -- 1.7.3 From magnus at enger.priv.no Tue Dec 27 22:59:18 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Tue, 27 Dec 2011 22:59:18 +0100 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_6787_-_Fast_Add_framewor?= =?utf-8?q?k_for_NORMARC?= Message-ID: <1325023158-7112-1-git-send-email-magnus@enger.priv.no> The new framework will be called "Hurtigkatalogisering". To test: - Make sure the nb-NO translation is installed - Run through the web installer on an empty database - Select nb-NO as the installation language - Select NORMARC as the marcflavour - Include normarc_fastadd_framework in the installed data - Check that the framework looks ok in: -- More > Cataloguing -- More > Administration > MARC framework --- .../Valgfritt/normarc_fastadd_framework.sql | 127 ++++++++++++++++++++ .../Valgfritt/normarc_fastadd_framework.txt | 1 + 2 files changed, 128 insertions(+), 0 deletions(-) create mode 100644 installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql create mode 100644 installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt diff --git a/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql b/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql new file mode 100644 index 0000000..279d6db --- /dev/null +++ b/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql @@ -0,0 +1,127 @@ +-- This file is part of Koha. +-- +-- Copyright 2011 Magnus Enger Libriotech +-- +-- Koha is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- Koha is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along +-- with this program; if not, write to the Free Software Foundation, Inc., +-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +INSERT IGNORE INTO biblio_framework VALUES ( 'FA','Hurtigkatalogisering' ); + +DELETE FROM marc_tag_structure WHERE frameworkcode='FA'; +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('000','Postens hode','Postens hode','0','1','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('001','Identifikasjonsnummer','Identifikasjonsnummer','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('008','Informasjonskoder','Informasjonskoder','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('015','Andre bibliografiske kontrollnummer (R)','Andre bibliografiske kontrollnummer (R)','1','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('020','Internasjonalt standard boknummer (ISBN)','Internasjonalt standard boknummer (ISBN)','1','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('024','Andre standardnumre','Andre standardnumre','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('025','Europeisk artikkelnummer (EAN)','Europeisk artikkelnummer (EAN)','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('100','Hovedordningsord personnavn','Hovedordningsord personnavn','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('245','Tittel og ansvarsopplysninger','Tittel og ansvarsopplysninger','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('250','Utgave','Utgave','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('260','Utgivelse, distribusjon osv','Utgivelse, distribusjon osv','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('300','Fysisk beskrivelse','Fysisk beskrivelse','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('500','Generell note (R)','Generell note (R)','1','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('942','Andre opplysninger (Koha)','Andre opplysninger (Koha)','0','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('952','Eksemplarinformasjon (Koha)','Eksemplarinformasjon (Koha)','1','0','','FA'); +INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('999','Kontrollnummer (Koha)','Kontrollnummer (Koha)','1','0','','FA'); + + +DELETE FROM marc_subfield_structure WHERE frameworkcode='FA'; +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('000','@','Postens hode','Postens hode','0','1','','0','','','normarc_leader.pl','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('001','@','Identifikasjonsnummer','Identifikasjonsnummer','0','0','','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('008','@','Informasjonskoder','Informasjonskoder','0','0','','0','','','normarc_field_008.pl','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('015','a','Nummer','Nummer','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('015','b','Kilde','Kilde','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','a','ISBN','ISBN','0','0','biblioitems.isbn','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','b','Innbindingsinformasjon','Innbindingsinformasjon','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','c','Leveringsbetingelser','Leveringsbetingelser','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','g','Andre tilf','Andre tilf','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','z','Feil ISBN','Feil ISBN','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','a','Standardnummer','Standardnummer','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','c','Leveringsbetingelser','Leveringsbetingelser','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','g','Andre tilf?yelser','Andre tilf?yelser','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','z','Feil standardnummer','Feil standardnummer','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('025','a','Nummer','Nummer','0','0','0','0','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','8','Andre karakteristika forbundet med navn','Andre karakteristika forbundet med navn','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','a','Navn','Navn','0','0','biblio.author','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','b','Nummer','Nummer','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','c','Andre tilf?yelser','Andre tilf?yelser','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','d','?rstall forbundet med navn','?rstall forbundet med navn','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','e','Betegnelse for funksjon','Betegnelse for funksjon','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','j','Nasjonalitet','Nasjonalitet','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','q','Mer fullstendig navneform','Mer fullstendig navneform','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','w','Sorteringsdelfelt for delfelt $a','Sorteringsdelfelt for delfelt $a','0','0','0','1','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','a','Tittel','Tittel','0','0','biblio.title','2','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','b','Annen tittelinformasjon','Annen tittelinformasjon','0','0','bibliosubtitle.subtitle','2','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','c','Ansvarsangivelse','Ansvarsangivelse','0','0','0','2','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','h','Generell materialbetegnelse','Generell materialbetegnelse','0','0','0','2','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('250','a','Utgave, opplag etc','Utgave, opplag etc','0','0','0','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('250','b','Ansvarshavende','Ansvarshavende','0','0','0','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','a','Sted (R)','Sted (R)','1','0','biblioitems.place','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','b','Navn p','Navn p','0','0','biblioitems.publishercode','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','c','?r','?r','0','0','biblio.copyrightdate','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','e','Trykkested eller produksjonssted','Trykkested eller produksjonssted','0','0','0','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','f','Trykkeriets eller produsentens navn','Trykkeriets eller produsentens navn','0','0','0','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','g','Trykke?r eller produksjons?r','Trykke?r eller produksjons?r','0','0','0','2','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','a','Omfang','Omfang','0','0','biblioitems.pages','3','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','b','Illustrasjonsmateriale og andre fysiske detaljer','Illustrasjonsmateriale og andre fysiske detaljer','0','0','biblioitems.illus','3','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','c','Format','Format','0','0','biblioitems.size','3','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','e','Bilag','Bilag','0','0','0','3','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('500','a','Notens tekst','Notens tekst','0','0','biblio.notes','5','','','','0','0','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','0','Antall utl?n','Antall utl?n','0','0','biblioitems.totalissues','9','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','2','Kilde for klassifikasjon','Kilde for klassifikasjon','0','0','biblioitems.cn_source','9','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','6','Koha normalisert klassifikasjon for sortering','Koha normalisert klassifikasjon for sortering','0','0','biblioitems.cn_sort','-1','','','','0','7','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','c','Koha [standard] dokumenttype','Koha dokumenttype','0','1','biblioitems.itemtype','9','itemtypes','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','e','Utgave','Utgave','0','0','','9','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','h','Klassifikasjon del','Klassifikasjon del','0','0','biblioitems.cn_class','9','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','i','Eksemplar del','Eksemplar del','1','0','biblioitems.cn_item','9','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','k','Hyllesignatur prefiks','Hyllesignatur prefiks','0','0','','9','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','m','Hyllesignatur postfiks','Hyllesignatur postfiks','0','0','biblioitems.cn_suffix','9','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','n','Skjul i OPAC','Skjul i OPAC','0','0','','9','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','s','Periodikamark','Periodikamark','0','0','biblio.serial','9','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','0','Trukket tilbake','Trukket tilbake','0','0','items.wthdrawn','10','WITHDRAWN','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','1','Tapt','Tapt','0','0','items.itemlost','10','LOST','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','2','Kilde for klassifikasjon','Kilde for klassifikasjon','0','0','items.cn_source','10','cn_source','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','3','Materialespesifikasjon (innbundet ','Materialespesifikasjon (innbundet ','0','0','items.materials','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','4','Skadet','Skadet','0','0','items.damaged','10','DAMAGED','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','5','Begrensninger p','Begrensninger p','0','0','items.restricted','10','RESTRICTED','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','6','Koha normalisert klassifikasjon for sortering','Koha normalisert klassifikasjon for sortering','0','0','items.cn_sort','-1','','','','0','7','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','7','Ikke til utl?n','Ikke til utl?n','0','0','items.notforloan','10','NOT_LOAN','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','8','Koha samling','Koha samling','0','0','items.ccode','10','CCODE','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','9','Koha eksemplarnummer (autogenerert)','Koha eksemplarnummer','0','0','items.itemnumber','-1','','','','0','7','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','a','Plassering (eiende filial)','Plassering (eiende filial)','0','0','items.homebranch','10','branches','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','b','Annen plassering (midlertidig filial)','Annen plassering (midlertidig filial)','0','0','items.holdingbranch','10','branches','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','c','Hylleplassering','Hylleplassering','0','0','items.location','10','LOC','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','d','Anskaffelsesdato','Anskaffelsesdato','0','0','items.dateaccessioned','10','','','dateaccessioned.pl','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','e','Kilde for anskaffelse','Kilde for anskaffelse','0','0','items.booksellerid','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','f','Kodet plasseringskvalifikator','Kodet plasseringskvalifikator','0','0','items.coded_location_qualifier','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','g','Pris (normal innkj?pspris)','Pris (normal innkj?pspris)','0','0','items.price','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','h','Serienummerering / kronologi','Serienummerering / kronologi','0','0','items.enumchron','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','j','Samling','Samling','0','0','items.stack','10','STACK','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','l','Koha utl?n','Koha utl?n','0','0','items.issues','10','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','m','Koha fornyinger','Koha fornyinger','0','0','items.renewals','10','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','n','Koha reserveringer','Koha reserveringer','0','0','items.reserves','10','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','o','Koha hyllesignatur','Koha hyllesignatur','0','0','items.itemcallnumber','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','p','Strekkode','Strekkode','0','0','items.barcode','10','','','barcode.pl','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','q','Koha utl?nt','Koha utl?nt','0','0','items.onloan','10','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','r','Koha dato sist sett','Koha dato sist sett','0','0','items.datelastseen','10','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','s','Koha dato sist utl?nt','Koha dato sist utl?nt','0','0','items.datelastborrowed','10','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','t','Eksemplarnummer','Eksemplarnummer','0','0','items.copynumber','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','u','Uniform Resource Identifier (URI)','Uniform Resource Identifier (URI)','0','0','items.uri','10','','','','1','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','v','Pris (erstatningspris)','Pris (erstatningspris)','0','0','items.replacementprice','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','w','Pris gjelder fra','Pris gjelder fra','0','0','items.replacementpricedate','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','x','Intern note','Intern note','1','0','items.paidfor','10','','','','0','7','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','y','Koha dokumenttype','Koha dokumenttype','0','0','items.itype','10','itemtypes','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','z','Synlig note','Synlig note','0','0','items.itemnotes','10','','','','0','-1','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('999','c','Koha biblionummer','Koha biblionummer','0','0','biblio.biblionumber','-1','','','','0','-5','FA','','',''); +INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('999','d','Koha biblioitemnummer','Koha biblioitemnummer','0','0','biblioitems.biblioitemnumber','-1','','','','0','-5','FA','','',''); diff --git a/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt b/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt new file mode 100644 index 0000000..e7a0dcb --- /dev/null +++ b/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt @@ -0,0 +1 @@ +Rammeverk for hurtigkatalogisering i NORMARC. Inneholder et begrenset utvalg felter. -- 1.7.5.4 From srdjan at catalyst.net.nz Wed Dec 28 04:15:02 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Wed, 28 Dec 2011 16:15:02 +1300 Subject: [Koha-patches] [PATCH] bug_7001: Issue and Reserve slips are notices. In-Reply-To: References: Message-ID: <1325042102-18267-1-git-send-email-srdjan@catalyst.net.nz> Branches can have their own version of notices - added branchcode to letter table. Support html notices - added is_html to letter table. GetPreparedletter() is the interface for compiling letters (notices). Sysprefs for notice and slips stylesheets. --- C4/Circulation.pm | 20 +- C4/Letters.pm | 583 +++++++++++++------- C4/Members.pm | 81 +++- C4/Message.pm | 12 +- C4/Print.pm | 139 ++---- C4/Reserves.pm | 103 +++-- C4/Suggestions.pm | 22 +- acqui/booksellers.pl | 7 +- circ/circulation.pl | 3 +- circ/hold-transfer-slip.pl | 27 +- .../data/mysql/de-DE/mandatory/sample_notices.sql | 2 +- .../data/mysql/en/mandatory/sample_notices.sql | 84 +++- .../data/mysql/es-ES/mandatory/sample_notices.sql | 2 +- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 2 +- installer/data/mysql/it-IT/necessari/notices.sql | 2 +- installer/data/mysql/kohastructure.sql | 4 +- .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 2 +- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 2 +- installer/data/mysql/sysprefs.sql | 3 + .../data/mysql/uk-UA/mandatory/sample_notices.sql | 2 +- installer/data/mysql/updatedatabase.pl | 98 ++++- .../prog/en/includes/circ-toolbar.inc | 4 +- .../en/modules/admin/preferences/circulation.pref | 5 + .../en/modules/admin/preferences/staff_client.pref | 5 + .../prog/en/modules/batch/print-notices.tt | 6 +- .../prog/en/modules/circ/hold-transfer-slip.tt | 54 -- .../prog/en/modules/circ/printslip.tt | 28 + .../prog/en/modules/members/moremember-receipt.tt | 76 --- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 113 +++- members/memberentry.pl | 5 +- members/moremember.pl | 10 - members/printslip.pl | 89 +++ misc/cronjobs/advance_notices.pl | 78 ++-- misc/cronjobs/gather_print_notices.pl | 14 +- misc/cronjobs/overdue_notices.pl | 86 ++-- t/db_dependent/lib/KohaTest/Letters.pm | 5 +- t/db_dependent/lib/KohaTest/Letters/GetLetter.pm | 3 +- t/db_dependent/lib/KohaTest/Members.pm | 1 + t/db_dependent/lib/KohaTest/Print.pm | 5 +- t/db_dependent/lib/KohaTest/Reserves.pm | 1 + tools/letter.pl | 214 +++++--- 42 files changed, 1261 insertions(+), 743 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt create mode 100755 members/printslip.pl diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a6f4f2..cff3fa7 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2655,11 +2655,18 @@ sub SendCirculationAlert { borrowernumber => $borrower->{borrowernumber}, message_name => $message_name{$type}, }); - my $letter = C4::Letters::getletter('circulation', $type); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'borrowers', $borrower->{borrowernumber}); - C4::Letters::parseletter($letter, 'branches', $branch); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $type, + branchcode => $branch, + tables => { + 'biblio' => $item->{biblionumber}, + 'biblioitems' => $item->{biblionumber}, + 'borrowers' => $borrower, + 'branches' => $branch, + } + ) or return; + my @transports = @{ $borrower_preferences->{transports} }; # warn "no transports" unless @transports; for (@transports) { @@ -2674,7 +2681,8 @@ sub SendCirculationAlert { $message->update; } } - $letter; + + return $letter; } =head2 updateWrongTransfer diff --git a/C4/Letters.pm b/C4/Letters.pm index 2420e4a..7f195d6 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -26,6 +26,7 @@ use Encode; use Carp; use C4::Members; +use C4::Members::Attributes qw(GetBorrowerAttributes); use C4::Branch; use C4::Log; use C4::SMS; @@ -42,7 +43,7 @@ BEGIN { $VERSION = 3.01; @ISA = qw(Exporter); @EXPORT = qw( - &GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts GetPrintMessages + &GetLetters &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages ); } @@ -117,13 +118,26 @@ sub GetLetters (;$) { return \%letters; } -sub getletter ($$) { - my ( $module, $code ) = @_; +my %letter; +sub getletter ($$$) { + my ( $module, $code, $branchcode ) = @_; + + if (C4::Context->preference('IndependantBranches') && $branchcode){ + $$branchcode = C4::Context->userenv->{'branch'}; + } + + if ( my $l = $letter{$module}{$code}{$branchcode} ) { + return { %$l }; # deep copy + } + my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("select * from letter where module=? and code=?"); - $sth->execute( $module, $code ); - my $line = $sth->fetchrow_hashref; - return $line; + my $sth = $dbh->prepare("select * from letter where module=? and code=? and (branchcode = ? or branchcode = '') order by branchcode desc limit 1"); + $sth->execute( $module, $code, $branchcode ); + my $line = $sth->fetchrow_hashref + or return; + $line->{'content-type'} = 'text/html; charset="UTF-8"' if $line->{is_html}; + $letter{$module}{$code}{$branchcode} = $line; + return { %$line }; } =head2 addalert ($borrowernumber, $type, $externalid) @@ -178,7 +192,7 @@ sub delalert ($) { sub getalert (;$$$) { my ( $borrowernumber, $type, $externalid ) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT * FROM alert WHERE"; + my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE"; my @bind; if ($borrowernumber and $borrowernumber =~ /^\d+$/) { $query .= " borrowernumber=? AND "; @@ -234,70 +248,65 @@ sub findrelatedto ($$) { parameters : - $type : the type of alert - $externalid : the id of the "object" to query - - $letter : the letter to send. + - $letter_code : the letter to send. send an alert to all borrowers having put an alert on a given subject. =cut sub SendAlerts { - my ( $type, $externalid, $letter ) = @_; + my ( $type, $externalid, $letter_code ) = @_; my $dbh = C4::Context->dbh; if ( $type eq 'issue' ) { - # warn "sending issues..."; - my $letter = getletter( 'serial', $letter ); - # prepare the letter... # search the biblionumber my $sth = $dbh->prepare( "SELECT biblionumber FROM subscription WHERE subscriptionid=?"); $sth->execute($externalid); - my ($biblionumber) = $sth->fetchrow; - - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - - # parsing biblio information - parseletter( $letter, 'biblio', $biblionumber ); - parseletter( $letter, 'biblioitems', $biblionumber ); + my ($biblionumber) = $sth->fetchrow + or warn( "No subscription for '$externalid'" ), + return; + my %letter; # find the list of borrowers to alert my $alerts = getalert( '', 'issue', $externalid ); foreach (@$alerts) { - # and parse borrower ... - my $innerletter = $letter; my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'}); - parseletter( $innerletter, 'borrowers', $_->{'borrowernumber'} ); + my $email = $borinfo->{email} or next; + + # warn "sending issues..."; + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'serial', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $_->{branchcode}, + 'biblio' => $biblionumber, + 'biblioitems' => $biblionumber, + 'borrowers' => $borinfo, + }, + want_librarian => 1, + ) or return; # ... then send mail - if ( $borinfo->{email} ) { - my %mail = ( - To => $borinfo->{email}, - From => $borinfo->{email}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - + my %mail = ( + To => $email, + From => $email, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; # warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; - } } } elsif ( $type eq 'claimacquisition' ) { # warn "sending issues..."; - my $letter = getletter( 'claimacquisition', $letter ); # prepare the letter... # search the biblionumber @@ -307,52 +316,43 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{booksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{booksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; - } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimacquisition', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) - { - my %mail = ( - To => $databookseller->{bookselleremail} - . ( - $databookseller->{contemail} - ? "," . $databookseller->{contemail} - : "" - ), - From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => "" . $letter->{title}, + Message => "" . $letter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + if ( C4::Context->preference("LetterLog") ) { logaction( "ACQUISITION", @@ -360,16 +360,13 @@ sub SendAlerts { "", "order list : " . join( ",", @$externalid ) - . "\n$innerletter->{title}\n$innerletter->{content}" + . "\n$letter->{title}\n$letter->{content}" ); } } elsif ( $type eq 'claimissues' ) { # warn "sending issues..."; - my $letter = getletter( 'claimissues', $letter ); - - # prepare the letter... # search the biblionumber my $strsth = "select serial.*,subscription.*, biblio.* from serial LEFT JOIN subscription on serial.subscriptionid=subscription.subscriptionid LEFT JOIN biblio on serial.biblionumber=biblio.biblionumber where serial.serialid IN (" @@ -377,81 +374,76 @@ sub SendAlerts { my $sthorders = $dbh->prepare($strsth); $sthorders->execute; my $dataorders = $sthorders->fetchall_arrayref( {} ); - parseletter( $letter, 'aqbooksellers', - $dataorders->[0]->{aqbooksellerid} ); + my $sthbookseller = $dbh->prepare("select * from aqbooksellers where id=?"); $sthbookseller->execute( $dataorders->[0]->{aqbooksellerid} ); my $databookseller = $sthbookseller->fetchrow_hashref; - # parsing branch info - my $userenv = C4::Context->userenv; - parseletter( $letter, 'branches', $userenv->{branch} ); - - # parsing librarian name - $letter->{content} =~ s/<>/$userenv->{firstname}/g; - $letter->{content} =~ s/<>/$userenv->{surname}/g; - $letter->{content} =~ - s/<>/$userenv->{emailaddress}/g; - foreach my $data ( @{$dataorders} ) { - if ( $letter->{content} =~ m/(<<.*>>)/ ) { - my $line = $1; - foreach my $field ( keys %{$data} ) { - $line =~ s/(<<[^\.]+.$field>>)/$data->{$field}/; - } - $letter->{content} =~ s/(<<.*>>)/$line\n$1/; - } + my @email; + push @email, $databookseller->{bookselleremail} if $databookseller->{bookselleremail}; + push @email, $databookseller->{contemail} if $databookseller->{contemail}; + unless (@email) { + warn "Bookseller $dataorders->[0]->{booksellerid} without emails"; + return; } - $letter->{content} =~ s/<<[^>]*>>//g; - my $innerletter = $letter; + + # prepare the letter... + my $userenv = C4::Context->userenv; + my $letter = GetPreparedLetter ( + module => 'claimissues', + letter_code => $letter_code, + branchcode => $userenv->{branch}, + tables => { + 'branches' => $userenv->{branch}, + 'aqbooksellers' => $databookseller, + }, + repeat => $dataorders, + want_librarian => 1, + ) or return; # ... then send mail - if ( $databookseller->{bookselleremail} - || $databookseller->{contemail} ) { - my $mail_to = $databookseller->{bookselleremail}; - if ($databookseller->{contemail}) { - if (!$mail_to) { - $mail_to = $databookseller->{contemail}; - } else { - $mail_to .= q|,|; - $mail_to .= $databookseller->{contemail}; - } - } - my $mail_subj = $innerletter->{title}; - my $mail_msg = $innerletter->{content}; - $mail_msg ||= q{}; - $mail_subj ||= q{}; + my $mail_subj = $letter->{title}; + my $mail_msg = $letter->{content}; + $mail_msg ||= q{}; + $mail_subj ||= q{}; - my %mail = ( - To => $mail_to, - From => $userenv->{emailaddress}, - Subject => $mail_subj, - Message => $mail_msg, - 'Content-Type' => 'text/plain; charset="utf8"', - ); - sendmail(%mail) or carp $Mail::Sendmail::error; - logaction( - "ACQUISITION", - "CLAIM ISSUE", - undef, - "To=" - . $databookseller->{contemail} - . " Title=" - . $innerletter->{title} - . " Content=" - . $innerletter->{content} - ) if C4::Context->preference("LetterLog"); - } + my %mail = ( + To => join( ','. @email), + From => $userenv->{emailaddress}, + Subject => $mail_subj, + Message => $mail_msg, + 'Content-Type' => 'text/plain; charset="utf8"', + ); + sendmail(%mail) or carp $Mail::Sendmail::error; + + logaction( + "ACQUISITION", + "CLAIM ISSUE", + undef, + "To=" + . $databookseller->{contemail} + . " Title=" + . $letter->{title} + . " Content=" + . $letter->{content} + ) if C4::Context->preference("LetterLog"); } # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { - # must parse the password special, before it's hashed. - $letter->{content} =~ s/<>/$externalid->{'password'}/g; - - parseletter( $letter, 'borrowers', $externalid->{'borrowernumber'}); - parseletter( $letter, 'branches', $externalid->{'branchcode'} ); - my $branchdetails = GetBranchDetail($externalid->{'branchcode'}); + my $letter = GetPreparedLetter ( + module => 'members', + letter_code => $letter_code, + branchcode => $externalid->{'branchcode'}, + tables => { + 'branches' => $branchdetails, + 'borrowers' => $externalid->{'borrowernumber'}, + }, + substitute => { 'borrowers.password' => $externalid->{'password'} }, + want_librarian => 1, + ) or return; + my %mail = ( To => $externalid->{'emailaddr'}, From => $branchdetails->{'branchemail'} || C4::Context->preference("KohaAdminEmailAddress"), @@ -463,24 +455,148 @@ sub SendAlerts { } } -=head2 parseletter($letter, $table, $pk) - - parameters : - - $letter : a hash to letter fields (title & content useful) - - $table : the Koha table to parse. - - $pk : the primary key to query on the $table table - parse all fields from a table, and replace values in title & content with the appropriate value - (not exported sub, used only internally) +=head2 GetPreparedLetter( %params ) + + %params hash: + module => letter module, mandatory + letter_code => letter code, mandatory + branchcode => for letter selection, if missing default system letter taken + tables => a hashref with table names as keys. Values are either: + - a scalar - primary key value + - an arrayref - primary key values + - a hashref - full record + substitute => custom substitution key/value pairs + repeat => records to be substituted on consecutive lines: + - an arrayref - tries to guess what needs substituting by + taking remaining << >> tokensr; not recommended + - a hashref token => @tables - replaces << >> << >> + subtemplate for each @tables row; table is a hashref as above + want_librarian => boolean, if set to true triggers librarian details + substitution from the userenv + Return value: + letter fields hashref (title & content useful) =cut -our %handles = (); -our %columns = (); +sub GetPreparedLetter { + my %params = @_; + + my $module = $params{module} or croak "No module"; + my $letter_code = $params{letter_code} or croak "No letter_code"; + my $branchcode = $params{branchcode} || ''; + + my $letter = getletter( $module, $letter_code, $branchcode ) + or warn( "No $module $letter_code letter"), + return; + + my $tables = $params{tables}; + my $substitute = $params{substitute}; + my $repeat = $params{repeat}; + $tables || $substitute || $repeat + or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), + return; + my $want_librarian = $params{want_librarian}; + + if ($substitute) { + while ( my ($token, $val) = each %$substitute ) { + $letter->{title} =~ s/<<$token>>/$val/g; + $letter->{content} =~ s/<<$token>>/$val/g; + } + } + + if ($want_librarian) { + # parsing librarian name + my $userenv = C4::Context->userenv; + $letter->{content} =~ s/<>/$userenv->{firstname}/go; + $letter->{content} =~ s/<>/$userenv->{surname}/go; + $letter->{content} =~ s/<>/$userenv->{emailaddress}/go; + } + + my ($repeat_no_enclosing_tags, $repeat_enclosing_tags); + + if ($repeat) { + if (ref ($repeat) eq 'ARRAY' ) { + $repeat_no_enclosing_tags = $repeat; + } else { + $repeat_enclosing_tags = $repeat; + } + } + + if ($repeat_enclosing_tags) { + while ( my ($tag, $tag_tables) = each %$repeat_enclosing_tags ) { + if ( $letter->{content} =~ m!<$tag>(.*)!s ) { + my $subcontent = $1; + my @lines = map { + my %subletter = ( title => '', content => $subcontent ); + _substitute_tables( \%subletter, $_ ); + $subletter{content}; + } @$tag_tables; + $letter->{content} =~ s!<$tag>.*!join( "\n", @lines )!se; + } + } + } + + if ($tables) { + _substitute_tables( $letter, $tables ); + } + + if ($repeat_no_enclosing_tags) { + if ( $letter->{content} =~ m/[^\n]*<<.*>>[^\n]*/so ) { + my $line = $&; + my $i = 1; + my @lines = map { + my $c = $line; + $c =~ s/<>/$i/go; + foreach my $field ( keys %{$_} ) { + $c =~ s/(<<[^\.]+.$field>>)/$_->{$field}/; + } + $i++; + $c; + } @$repeat_no_enclosing_tags; + + my $replaceby = join( "\n", @lines ); + $letter->{content} =~ s/\Q$line\E/$replaceby/s; + } + } + + $letter->{content} =~ s/<<\S*>>//go; #remove any stragglers +# $letter->{content} =~ s/<<[^>]*>>//go; + + return $letter; +} + +sub _substitute_tables { + my ( $letter, $tables ) = @_; + while ( my ($table, $param) = each %$tables ) { + next unless $param; + + my $ref = ref $param; -sub parseletter_sth { + my $values; + if ($ref && $ref eq 'HASH') { + $values = $param; + } + else { + my @pk; + my $sth = _parseletter_sth($table); + unless ($sth) { + warn "_parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; + return; + } + $sth->execute( $ref ? @$param : $param ); + + $values = $sth->fetchrow_hashref; + } + + _parseletter ( $letter, $table, $values ); + } +} + +my %handles = (); +sub _parseletter_sth { my $table = shift; unless ($table) { - carp "ERROR: parseletter_sth() called without argument (table)"; + carp "ERROR: _parseletter_sth() called without argument (table)"; return; } # check cache first @@ -494,9 +610,12 @@ sub parseletter_sth { ($table eq 'borrowers' ) ? "SELECT * FROM $table WHERE borrowernumber = ?" : ($table eq 'branches' ) ? "SELECT * FROM $table WHERE branchcode = ?" : ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE suggestionid = ?" : - ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : undef ; + ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : + ($table eq 'aqorders' ) ? "SELECT * FROM $table WHERE ordernumber = ?" : + ($table eq 'opac_news' ) ? "SELECT * FROM $table WHERE idnew = ?" : + undef ; unless ($query) { - warn "ERROR: No parseletter_sth query for table '$table'"; + warn "ERROR: No _parseletter_sth query for table '$table'"; return; # nothing to get } unless ($handles{$table} = C4::Context->dbh->prepare($query)) { @@ -506,25 +625,21 @@ sub parseletter_sth { return $handles{$table}; # now cache is populated for that $table } -sub parseletter { - my ( $letter, $table, $pk, $pk2 ) = @_; - unless ($letter) { - carp "ERROR: parseletter() 1st argument 'letter' empty"; - return; - } - my $sth = parseletter_sth($table); - unless ($sth) { - warn "parseletter_sth('$table') failed to return a valid sth. No substitution will be done for that table."; - return; - } - if ( $pk2 ) { - $sth->execute($pk, $pk2); - } else { - $sth->execute($pk); - } +=head2 _parseletter($letter, $table, $values) - my $values = $sth->fetchrow_hashref; - + parameters : + - $letter : a hash to letter fields (title & content useful) + - $table : the Koha table to parse. + - $values : table record hashref + parse all fields from a table, and replace values in title & content with the appropriate value + (not exported sub, used only internally) + +=cut + +my %columns = (); +sub _parseletter { + my ( $letter, $table, $values ) = @_; + # TEMPORARY hack until the expirationdate column is added to reserves if ( $table eq 'reserves' && $values->{'waitingdate'} ) { my @waitingdate = split /-/, $values->{'waitingdate'}; @@ -538,16 +653,51 @@ sub parseletter { )->output(); } + if ($letter->{content} && $letter->{content} =~ /<>/) { + my @da = localtime(); + my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); + $letter->{content} =~ s/<>/$todaysdate/go; + } # and get all fields from the table - my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table"); - $columns->execute; - while ( ( my $field ) = $columns->fetchrow_array ) { - my $replacefield = "<<$table.$field>>"; - $values->{$field} =~ s/\p{P}(?=$)//g if $values->{$field}; - my $replacedby = $values->{$field} || ''; - ($letter->{title} ) and $letter->{title} =~ s/$replacefield/$replacedby/g; - ($letter->{content}) and $letter->{content} =~ s/$replacefield/$replacedby/g; +# my $columns = $columns{$table}; +# unless ($columns) { +# $columns = $columns{$table} = C4::Context->dbh->selectcol_arrayref("SHOW COLUMNS FROM $table"); +# } +# foreach my $field (@$columns) { + + while ( my ($field, $val) = each %$values ) { + my $replacetablefield = "<<$table.$field>>"; + my $replacefield = "<<$field>>"; + $val =~ s/\p{P}(?=$)//g if $val; + my $replacedby = defined ($val) ? $val : ''; + ($letter->{title} ) and do { + $letter->{title} =~ s/$replacetablefield/$replacedby/g; + $letter->{title} =~ s/$replacefield/$replacedby/g; + }; + ($letter->{content}) and do { + $letter->{content} =~ s/$replacetablefield/$replacedby/g; + $letter->{content} =~ s/$replacefield/$replacedby/g; + }; + } + + if ($table eq 'borrowers' && $letter->{content}) { + if ( my $attributes = GetBorrowerAttributes($values->{borrowernumber}) ) { + my %attr; + foreach (@$attributes) { + my $code = $_->{code}; + my $val = $_->{value_description} || $_->{value}; + $val =~ s/\p{P}(?=$)//g if $val; + next unless $val gt ''; + $attr{$code} ||= []; + push @{ $attr{$code} }, $val; + } + while ( my ($code, $val_ar) = each %attr ) { + my $replacefield = "<>"; + my $replacedby = join ',', @$val_ar; + $letter->{content} =~ s/$replacefield/$replacedby/g; + } + } } return $letter; } @@ -732,31 +882,32 @@ returns your letter object, with the content updated. sub _add_attachments { my $params = shift; - return unless 'HASH' eq ref $params; - foreach my $required_parameter (qw( letter attachments message )) { - return unless exists $params->{$required_parameter}; - } - return $params->{'letter'} unless @{ $params->{'attachments'} }; + my $letter = $params->{'letter'}; + my $attachments = $params->{'attachments'}; + return $letter unless @$attachments; + my $message = $params->{'message'}; # First, we have to put the body in as the first attachment - $params->{'message'}->attach( - Type => 'TEXT', - Data => $params->{'letter'}->{'content'}, + $message->attach( + Type => $letter->{'content-type'} || 'TEXT', + Data => $letter->{'is_html'} + ? _wrap_html($letter->{'content'}, $letter->{'title'}) + : $letter->{'content'}, ); - foreach my $attachment ( @{ $params->{'attachments'} } ) { - $params->{'message'}->attach( + foreach my $attachment ( @$attachments ) { + $message->attach( Type => $attachment->{'type'}, Data => $attachment->{'content'}, Filename => $attachment->{'filename'}, ); } # we're forcing list context here to get the header, not the count back from grep. - ( $params->{'letter'}->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); - $params->{'letter'}->{'content-type'} =~ s/^Content-Type:\s+//; - $params->{'letter'}->{'content'} = $params->{'message'}->body_as_string; + ( $letter->{'content-type'} ) = grep( /^Content-Type:/, split( /\n/, $params->{'message'}->header_as_string ) ); + $letter->{'content-type'} =~ s/^Content-Type:\s+//; + $letter->{'content'} = $message->body_as_string; - return $params->{'letter'}; + return $letter; } @@ -823,14 +974,17 @@ sub _send_message_by_email ($;$$$) { my $utf8 = decode('MIME-Header', $message->{'subject'} ); $message->{subject}= encode('MIME-Header', $utf8); + my $subject = encode('utf8', $message->{'subject'}); my $content = encode('utf8', $message->{'content'}); + my $content_type = $message->{'content_type'} || 'text/plain; charset="UTF-8"'; + my $is_html = $content_type =~ m/html/io; my %sendmail_params = ( To => $to_address, From => $message->{'from_address'} || C4::Context->preference('KohaAdminEmailAddress'), - Subject => encode('utf8', $message->{'subject'}), + Subject => $subject, charset => 'utf8', - Message => $content, - 'content-type' => $message->{'content_type'} || 'text/plain; charset="UTF-8"', + Message => $is_html ? _wrap_html($content, $subject) : $content, + 'content-type' => $content_type, ); $sendmail_params{'Auth'} = {user => $username, pass => $password, method => $method} if $username; if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) { @@ -850,6 +1004,27 @@ sub _send_message_by_email ($;$$$) { } } +sub _wrap_html { + my ($content, $title) = @_; + + my $css = C4::Context->preference("NoticeCSS") || ''; + $css = qq{} if $css; + return < + + +$title + +$css + + +$content + + +EOS +} + sub _send_message_by_sms ($) { my $message = shift or return undef; my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} ); diff --git a/C4/Members.pm b/C4/Members.pm index 1d7bc42..9f42cea 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -23,7 +23,7 @@ package C4::Members; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Dates qw(format_date_in_iso); +use C4::Dates qw(format_date_in_iso format_date); use Digest::MD5 qw(md5_base64); use Date::Calc qw/Today Add_Delta_YM check_date Date_to_Days/; use C4::Log; # logaction @@ -31,8 +31,10 @@ use C4::Overdues; use C4::Reserves; use C4::Accounts; use C4::Biblio; +use C4::Letters; use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable); use C4::Members::Attributes qw(SearchIdMatchingAttribute); +use C4::NewsChannels; #get slip news our ($VERSION, at ISA, at EXPORT, at EXPORT_OK,$debug); @@ -91,6 +93,8 @@ BEGIN { &DeleteMessage &GetMessages &GetMessagesCount + + &IssueSlip ); #Modify data @@ -2227,7 +2231,80 @@ sub DeleteMessage { logaction("MEMBERS", "DELCIRCMESSAGE", $message->{'borrowernumber'}, $message->{'message'}) if C4::Context->preference("BorrowersLog"); } -END { } # module clean-up code here (global destructor) +=head2 IssueSlip + + IssueSlip($branchcode, $borrowernumber, $quickslip) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) + + $quickslip is boolean, to indicate whether we want a quick slip + +=cut + +sub IssueSlip { + my ($branch, $borrowernumber, $quickslip) = @_; + +# return unless ( C4::Context->boolean_preference('printcirculationslips') ); + + my $today = POSIX::strftime("%Y-%m-%d", localtime); + + my $issueslist = GetPendingIssues($borrowernumber); + foreach my $it (@$issueslist){ + if ($it->{'issuedate'} eq $today) { + $it->{'today'} = 1; + } + elsif ($it->{'date_due'} le $today) { + $it->{'overdue'} = 1; + } + + $it->{'date_due'}=format_date($it->{'date_due'}); + } + my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; + + my ($letter_code, %repeat); + if ( $quickslip ) { + $letter_code = 'ISSUEQSLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'today'} } @issues ], + ); + } + else { + $letter_code = 'ISSUESLIP'; + %repeat = ( + 'checkedout' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { !$_->{'overdue'} } @issues ], + + 'overdue' => [ map { + 'biblio' => $_, + 'items' => $_, + 'issues' => $_, + }, grep { $_->{'overdue'} } @issues ], + + 'news' => [ map { + $_->{'timestamp'} = $_->{'newdate'}; + { opac_news => $_ } + } @{ GetNewsToDisplay("slip") } ], + ); + } + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $letter_code, + branchcode => $branch, + tables => { + 'branches' => $branch, + 'borrowers' => $borrowernumber, + }, + repeat => \%repeat, + ); +} 1; diff --git a/C4/Message.pm b/C4/Message.pm index 16272ff..4b88970 100644 --- a/C4/Message.pm +++ b/C4/Message.pm @@ -18,9 +18,15 @@ How to add a new message to the queue: use C4::Items; my $borrower = { borrowernumber => 1 }; my $item = C4::Items::GetItem(1); - my $letter = C4::Letters::getletter('circulation', 'CHECKOUT'); - C4::Letters::parseletter($letter, 'biblio', $item->{biblionumber}); - C4::Letters::parseletter($letter, 'biblioitems', $item->{biblionumber}); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'CHECKOUT', + branchcode => $branch, + tables => { + 'biblio', $item->{biblionumber}, + 'biblioitems', $item->{biblionumber}, + }, + ); C4::Message->enqueue($letter, $borrower->{borrowernumber}, 'email'); How to update a borrower's last checkout message: diff --git a/C4/Print.pm b/C4/Print.pm index 2ba7584..2343fa4 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -20,8 +20,6 @@ package C4::Print; use strict; #use warnings; FIXME - Bug 2505 use C4::Context; -use C4::Members; -use C4::Dates qw(format_date); use vars qw($VERSION @ISA @EXPORT); @@ -30,7 +28,7 @@ BEGIN { $VERSION = 3.01; require Exporter; @ISA = qw(Exporter); - @EXPORT = qw(&remoteprint &printreserve &printslip); + @EXPORT = qw(&printslip); } =head1 NAME @@ -47,28 +45,48 @@ The functions in this module handle sending text to a printer. =head1 FUNCTIONS -=head2 remoteprint +=cut - &remoteprint($items, $borrower); +=comment + my $slip = <<"EOF"; +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Date: $todaysdate; -Prints the list of items in C<$items> to a printer. +ITEM RESERVED: +$itemdata->{'title'} ($itemdata->{'author'}) +barcode: $itemdata->{'barcode'} + +COLLECT AT: $branchname -C<$borrower> is a reference-to-hash giving information about a patron. -This may be gotten from C<&GetMemberDetails>. The patron's name -will be printed in the output. +BORROWER: +$bordata->{'surname'}, $bordata->{'firstname'} +card number: $bordata->{'cardnumber'} +Phone: $bordata->{'phone'} +$bordata->{'streetaddress'} +$bordata->{'suburb'} +$bordata->{'town'} +$bordata->{'emailaddress'} -C<$items> is a reference-to-list, where each element is a -reference-to-hash describing a borrowed item. C<$items> may be gotten -from C<&GetBorrowerIssues>. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +EOF =cut +=head2 printslip + + &printslip($slip) + +print a slip for the given $borrowernumber and $branchcode + +=cut + +sub printslip ($) { + my ($slip) = @_; + + return unless ( C4::Context->boolean_preference('printcirculationslips') ); + # FIXME - It'd be nifty if this could generate pretty PostScript. -sub remoteprint ($$) { - my ($items, $borrower) = @_; - (return) - unless ( C4::Context->boolean_preference('printcirculationslips') ); my $queue = ''; # FIXME - If 'queue' is undefined or empty, then presumably it should @@ -93,100 +111,13 @@ sub remoteprint ($$) { # print $queue; #open (FILE,">/tmp/$file"); - my $i = 0; - # FIXME - This is HLT-specific. Put this stuff in a customizable - # site-specific file somewhere. - print PRINTER "Horowhenua Library Trust\r\n"; - print PRINTER "Phone: 368-1953\r\n"; - print PRINTER "Fax: 367-9218\r\n"; - print PRINTER "Email: renewals\@library.org.nz\r\n\r\n\r\n"; - print PRINTER "$borrower->{'cardnumber'}\r\n"; - print PRINTER - "$borrower->{'title'} $borrower->{'initials'} $borrower->{'surname'}\r\n"; - - # FIXME - Use for ($i = 0; $items->[$i]; $i++) - # Or better yet, foreach $item (@{$items}) - while ( $items->[$i] ) { - - # print $i; - my $itemdata = $items->[$i]; - - # FIXME - This is just begging for a Perl format. - print PRINTER "$i $itemdata->{'title'}\r\n"; - print PRINTER "$itemdata->{'barcode'}"; - print PRINTER " " x 15; - print PRINTER "$itemdata->{'date_due'}\r\n"; - $i++; - } + print PRINTER $slip; print PRINTER "\r\n" x 7 ; close PRINTER; #system("lpr /tmp/$file"); } -sub printreserve { - my ( $branchname, $bordata, $itemdata ) = @_; - my $printer = ''; - (return) unless ( C4::Context->boolean_preference('printreserveslips') ); - if ( $printer eq "" || $printer eq 'nulllp' ) { - open( PRINTER, ">>/tmp/kohares" ) - or die "Could not write to /tmp/kohares"; - } - else { - open( PRINTER, "| lpr -P $printer >/dev/null" ) - or die "Couldn't write to queue:$!\n"; - } - my @da = localtime(); - my $todaysdate = "$da[2]:$da[1] " . C4::Dates->today(); - my $slip = <<"EOF"; -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Date: $todaysdate; - -ITEM RESERVED: -$itemdata->{'title'} ($itemdata->{'author'}) -barcode: $itemdata->{'barcode'} - -COLLECT AT: $branchname - -BORROWER: -$bordata->{'surname'}, $bordata->{'firstname'} -card number: $bordata->{'cardnumber'} -Phone: $bordata->{'phone'} -$bordata->{'streetaddress'} -$bordata->{'suburb'} -$bordata->{'town'} -$bordata->{'emailaddress'} - - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -EOF - print PRINTER $slip; - close PRINTER; - return $slip; -} - -=head2 printslip - - &printslip($borrowernumber) - -print a slip for the given $borrowernumber - -=cut - -#' -sub printslip ($) { - my $borrowernumber = shift; - my $borrower = GetMemberDetails($borrowernumber); - my $issueslist = GetPendingIssues($borrowernumber); - foreach my $it (@$issueslist){ - $it->{'date_due'}=format_date($it->{'date_due'}); - } - my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist; - remoteprint(\@issues, $borrower ); -} - -END { } # module clean-up code here (global destructor) - 1; __END__ diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 359bbad..d2af1c5 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -121,6 +121,8 @@ BEGIN { &AlterPriority &ToggleLowestPriority + + &ReserveSlip ); @EXPORT_OK = qw( MergeHolds ); } @@ -194,32 +196,31 @@ sub AddReserve { # Send e-mail to librarian if syspref is active if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){ my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); - my $biblio = GetBiblioData($biblionumber); - my $letter = C4::Letters::getletter( 'reserves', 'HOLDPLACED'); - my $branchcode = $borrower->{branchcode}; - my $branch_details = C4::Branch::GetBranchDetail($branchcode); - my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - - my %keys = (%$borrower, %$biblio); - foreach my $key (keys %keys) { - my $replacefield = "<<$key>>"; - $letter->{content} =~ s/$replacefield/$keys{$key}/g; - $letter->{title} =~ s/$replacefield/$keys{$key}/g; + my $branch_details = C4::Branch::GetBranchDetail($borrower->{branchcode}); + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => 'HOLDPLACED', + branchcode => $branch, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + }, + ) ) { + + my $admin_email_address =$branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); + + C4::Letters::EnqueueLetter( + { letter => $letter, + borrowernumber => $borrowernumber, + message_transport_type => 'email', + from_address => $admin_email_address, + to_address => $admin_email_address, + } + ); } - - C4::Letters::EnqueueLetter( - { letter => $letter, - borrowernumber => $borrowernumber, - message_transport_type => 'email', - from_address => $admin_email_address, - to_address => $admin_email_address, - } - ); - - } - #} ($const eq "o" || $const eq "e") or return; # FIXME: why not have a useful return value? $query = qq/ @@ -1720,21 +1721,21 @@ sub _koha_notify_reserve { my $admin_email_address = $branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); - my $letter = getletter( 'reserves', $letter_code ); - die "Could not find a letter called '$letter_code' in the 'reserves' module" unless( $letter ); + my $letter = C4::Letters::GetPreparedLetter ( + module => 'reserves', + letter_code => $letter_code, + branchcode => $reserve->{branchcode}, + tables => { + 'branches' => $branch_details, + 'borrowers' => $borrower, + 'biblio' => $biblionumber, + 'reserves' => $reserve, + 'items', $reserve->{'itemnumber'}, + }, + substitute => { today => C4::Dates->new()->output() }, + ) or die "Could not find a letter called '$letter_code' in the 'reserves' module"; - C4::Letters::parseletter( $letter, 'branches', $reserve->{'branchcode'} ); - C4::Letters::parseletter( $letter, 'borrowers', $borrowernumber ); - C4::Letters::parseletter( $letter, 'biblio', $biblionumber ); - C4::Letters::parseletter( $letter, 'reserves', $borrowernumber, $biblionumber ); - if ( $reserve->{'itemnumber'} ) { - C4::Letters::parseletter( $letter, 'items', $reserve->{'itemnumber'} ); - } - my $today = C4::Dates->new()->output(); - $letter->{'title'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<>/$today/g; - $letter->{'content'} =~ s/<<[a-z0-9_]+\.[a-z0-9]+>>//g; #remove any stragglers if ( $print_mode ) { C4::Letters::EnqueueLetter( { @@ -1908,6 +1909,36 @@ sub MergeHolds { } +=head2 ReserveSlip + + ReserveSlip($branchcode, $borrowernumber, $biblionumber) + + Returns letter hash ( see C4::Letters::GetPreparedLetter ) or undef + +=cut + +sub ReserveSlip { + my ($branch, $borrowernumber, $biblionumber) = @_; + +# return unless ( C4::Context->boolean_preference('printreserveslips') ); + + my $reserve = GetReserveInfo($borrowernumber,$biblionumber ) + or return; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => 'RESERVESLIP', + branchcode => $branch, + tables => { + 'reserves' => $reserve, + 'branches' => $reserve->{branchcode}, + 'borrowers' => $reserve, + 'biblio' => $reserve, + 'items' => $reserve, + }, + ); +} + =head1 AUTHOR Koha Development Team diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index ccc0c8e..6c10fdf 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -371,20 +371,24 @@ sub ModSuggestion { if ($suggestion->{STATUS}) { # fetch the entire updated suggestion so that we can populate the letter my $full_suggestion = GetSuggestion($suggestion->{suggestionid}); - my $letter = C4::Letters::getletter('suggestions', $full_suggestion->{STATUS}); - if ($letter) { - C4::Letters::parseletter($letter, 'branches', $full_suggestion->{branchcode}); - C4::Letters::parseletter($letter, 'borrowers', $full_suggestion->{suggestedby}); - C4::Letters::parseletter($letter, 'suggestions', $full_suggestion->{suggestionid}); - C4::Letters::parseletter($letter, 'biblio', $full_suggestion->{biblionumber}); - my $enqueued = C4::Letters::EnqueueLetter({ + if ( my $letter = C4::Letters::GetPreparedLetter ( + module => 'suggestions', + letter_code => $full_suggestion->{STATUS}, + branchcode => $full_suggestion->{branchcode}, + tables => { + 'branches' => $full_suggestion->{branchcode}, + 'borrowers' => $full_suggestion->{suggestedby}, + 'suggestions' => $full_suggestion, + 'biblio' => $full_suggestion->{biblionumber}, + }, + ) ) { + C4::Letters::EnqueueLetter({ letter => $letter, borrowernumber => $full_suggestion->{suggestedby}, suggestionid => $full_suggestion->{suggestionid}, LibraryName => C4::Context->preference("LibraryName"), message_transport_type => 'email', - }); - if (!$enqueued){warn "can't enqueue letter $letter";} + }) or warn "can't enqueue letter $letter"; } } return $status_update_table; diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 634eb93..745d040 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -111,16 +111,11 @@ for my $vendor (@suppliers) { for my $basket ( @{$baskets} ) { my $authorisedby = $basket->{authorisedby}; - my $basketbranch = ''; # set a blank branch to start with - if ( GetMember( borrowernumber => $authorisedby ) ) { - # authorisedby may not be a valid borrowernumber; it's not foreign-key constrained! - $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode}; - } if ($userenv->{'flags'} & 1 || #user is superlibrarian (haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and ($viewbaskets eq 'all' || #user is allowed to see all baskets - ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq $basketbranch) || #basket belongs to user's branch + ($viewbaskets eq 'branch' && $authorisedby && $userbranch eq GetMember( borrowernumber => $authorisedby )->{branchcode}) || #basket belongs to user's branch ($basket->{authorisedby} && $viewbaskets == 'user' && $authorisedby == $loggedinuser) #user created this basket ) ) diff --git a/circ/circulation.pl b/circ/circulation.pl index c95e59b..f5d6cb6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -24,7 +24,6 @@ use strict; #use warnings; FIXME - Bug 2505 use CGI; use C4::Output; -use C4::Print; use C4::Auth qw/:DEFAULT get_session/; use C4::Dates qw/format_date/; use C4::Branch; # GetBranches @@ -176,7 +175,7 @@ if ( $barcode eq '' && $query->param('charges') eq 'yes' ) { } if ( $print eq 'yes' && $borrowernumber ne '' ) { - printslip( $borrowernumber ); + PrintIssueSlip($branch, $borrowernumber); $query->param( 'borrowernumber', '' ); $borrowernumber = ''; } diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl index f581464..492dac7 100755 --- a/circ/hold-transfer-slip.pl +++ b/circ/hold-transfer-slip.pl @@ -25,8 +25,6 @@ use C4::Output; use CGI; use C4::Auth; use C4::Reserves; -use C4::Branch; -use C4::Dates qw/format_date format_date_in_iso/; use vars qw($debug); @@ -41,7 +39,7 @@ my $transfer = $input->param('transfer'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "circ/hold-transfer-slip.tmpl", + template_name => "circ/printslip.tmpl", query => $input, type => "intranet", authnotrequired => 0, @@ -50,14 +48,21 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $reserveinfo = GetReserveInfo($borrowernumber,$biblionumber ); -my $pulldate = C4::Dates->new(); -$reserveinfo->{'pulldate'} = $pulldate->output(); -$reserveinfo->{'branchname'} = GetBranchName($reserveinfo->{'branchcode'}); -$reserveinfo->{'transferrequired'} = $transfer; - -$template->param( reservedata => [ $reserveinfo ] , - ); +my $userenv = C4::Context->userenv; +my ($slip, $is_html); +if ( my $letter = ReserveSlip ($userenv->{branch}, $borrowernumber, $biblionumber) ) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} +else { + $slip = "Reserve not found"; +} +$template->param( + slip => $slip, + plain => !$is_html, + title => "Koha -- Circulation: Transfers", + stylesheet => C4::Context->preference("SlipCSS"), +); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 166c36d..efdad91 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r < ('reserves', 'HOLD_PRINT', 'Vormerkbenachrichtigung (Print)', 'Vormerkbenachrichtigung (Print)', '<>\r\n<>\r\n<>\r\n<>\r\n<> <>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<> <>\r\n<>\r\n<>\r\n<> <>\r\n<>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nLiebe(r) <> <>,\r\n\r\nF??r Sie liegt seit dem <> eine Vormerkung zur Abholung bereit:\r\n\r\nTitel: <>\r\nVerfasser: <>\r\nSignatur: <>\r\n'), ('circulation','CHECKIN','R??ckgabequittung (Zusammenfassung)','R??ckgabequittung','Die folgenden Medien wurden zur??ckgegeben:\r\n----\r\n<>\r\n----\r\nVielen Dank.'), ('circulation','CHECKOUT','Ausleihquittung (Zusammenfassung)','Ausleihquittung','Die folgenden Medien wurden entliehen:\r\n----\r\n<>\r\n----\r\nVielen Dank f??r Ihren Besuch in <>.'), -('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <> (<<biblionumber>>) durch den Benutzer <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Neue Vormerkung', 'Neue Vormerkung','Folgender Titel wurde vorgemerkt: <<biblio.title>> (<<biblio.biblionumber>>) durch den Benutzer <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Anschaffungsvorschlag wurde angenommen', 'Ihr Anschaffungsvorschlag wurde angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> by <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und wird Ihn sobald wie m??glich im Buchhandel bestellen. Sie erhalten Nachricht, sobald die Bestellung abgeschlossen ist und sobald der Titel in der Bibliotek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Vorgeschlagenes Medium verf??gbar', 'Das vorgeschlagene Medium ist jetzt verf??gbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Bestand der Bibliothek verf??gbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu k??nnen, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verf??gbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 689fa0f..8c9f4bd 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -11,8 +11,90 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'); +INSERT INTO `letter` (module, code, name, title, content, is_html) +VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style="text-align: center; font-style:italic;">News</h4> +<news> +<div class="newsitem"> +<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5> +<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.new>></p> +<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1), +('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1), +('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<reserves> +<div> +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> + <h4><<biblio.title>></h4> + <h5><<biblio.author>></h5> + <ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> + </ul> + <p>Notes: + <pre><<reserves.reservenotes>></pre> + </p> +</div> +</reserves>', 1); + diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 977e59d..acffe73 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup at <<branches.branchname>>', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 5287d9f..0c2a3f5 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1168,10 +1168,12 @@ DROP TABLE IF EXISTS `letter`; CREATE TABLE `letter` ( -- table for all notice templates in Koha `module` varchar(20) NOT NULL default '', -- Koha module that triggers this notice `code` varchar(20) NOT NULL default '', -- unique identifier for this notice + `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out `name` varchar(100) NOT NULL default '', -- plain text name for this notice + `is_html` tinyint(1) default 0, `title` varchar(200) NOT NULL default '', -- subject line of the notice `content` text, -- body text for the notice - PRIMARY KEY (`module`,`code`) + PRIMARY KEY (`module`,`code`, `branchcode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index cdb5529..08b452e 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -32,7 +32,7 @@ VALUES ('circulation','ODUE','Purring','Purring p?? dokument','<<borrowers.first ('reserves', 'HOLD_PRINT', 'Hentemelding (p?? papir)', 'Hentemelding', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nDu har et reservert dokument som kan hentes fra <<reserves.waitingdate>>:\r\n\r\nTittel: <<biblio.title>>\r\nForfatter: <<biblio.author>>\r\nEksemplar: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Innlevering','Melding om innlevering','F??lgende dokument har blitt innlevert:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), ('circulation','CHECKOUT','Utl??n','Melding om utl??n','F??lgende dokument har blitt l??nt ut:\r\n----\r\n<<biblio.title>>\r\n----\r\nVennlig hilsen\r\nBiblioteket'), -('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<title>> (<<biblionumber>>) av <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Melding om reservasjon', 'Melding om reservasjon','F??lgende dokument har blitt reservert : <<biblio.title>> (<<biblio.biblionumber>>) av <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Forslag godtatt', 'Innkj??psforslag godtatt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert forslaget i dag. Dokumentet vil bli bestilt s?? fort det lar seg gj??re. Du vil f?? en ny melding n??r bestillingen er gjort, og n??r dokumentet ankommer biblioteket.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Foresl??tt dokument tilgjengelig', 'Foresl??tt dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet n?? er innlemmet i samlingen.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Innkj??psforslag i bestilling', 'Innkj??psforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foresl??tt at biblioteket kj??per inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av ?? informere deg om at dokumentet du foreslo n?? er i bestilling.\n\nDu vil f?? en ny melding n??r dokumentet er tilgjengelig.\n\nEr det noe du lurer p??, vennligst kontakt oss p?? <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 6be2eb8..f0844f3 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -13,7 +13,7 @@ VALUES ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 689fa0f..bf3324d 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -11,7 +11,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 128c9b2..e9aac60 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -328,4 +328,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free'); + diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 358205b..b637343 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -10,7 +10,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f ('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'), ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'), ('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'), -('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).'), +('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).'), ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 67708fa..f136b70 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4497,7 +4497,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (Add 461 subfield 9 to default framework)\n"; SetVersion ($DBversion); } - } $DBversion = "3.05.00.018"; @@ -4585,6 +4584,103 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.06.03.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `letter` DROP PRIMARY KEY"); + $dbh->do("ALTER TABLE `letter` ADD `branchcode` varchar(10) default NULL AFTER `code`"); + $dbh->do("ALTER TABLE `letter` ADD PRIMARY KEY (`module`,`code`, `branchcode`)"); + $dbh->do("ALTER TABLE `letter` ADD `is_html` tinyint(1) default 0 AFTER `name`"); + print "Added branchcode and is_html to letter table\n"; + + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout> + +<h4>Overdues</h4> +<overdue> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</overdue> + +<hr> + +<h4 style=\"text-align: center; font-style:italic;\">News</h4> +<news> +<div class=\"newsitem\"> +<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5> +<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.new>></p> +<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.timestamp>></p> +<hr /> +</div> +</news>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<h3><<branches.branchname>></h3> +Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> +(<<borrowers.cardnumber>>) <br /> + +<<today>><br /> + +<h4>Checked Out Today</h4> +<checkedout> +<p> +<<biblio.title>> <br /> +Barcode: <<items.barcode>><br /> +Date due: <<issues.date_due>><br /> +</p> +</checkedout>', 1)"); + $dbh->do("INSERT INTO `letter` (module, code, name, title, content, is_html) + VALUES ('circulation','RESERVESLIP','Reserve Slip','Reserve Slip', '<h5>Date: <<today>></h5> + +<h3> Transfer to/Hold in <<branches.branchname>></h3> + +<h3><<borrowers.surname>>, <<borrowers.firstname>></h3> + +<ul> + <li><<borrowers.cardnumber>></li> + <li><<borrowers.phone>></li> + <li> <<borrowers.address>><br /> + <<borrowers.address2>><br /> + <<borrowers.city >> <<borrowers.zipcode>> + </li> + <li><<borrowers.email>></li> +</ul> +<br /> +<h3>ITEM ON HOLD</h3> +<h4><<biblio.title>></h4> +<h5><<biblio.author>></h5> +<ul> + <li><<items.barcode>></li> + <li><<items.itemcallnumber>></li> + <li><<reserves.waitingdate>></li> +</ul> +<p>Notes: +<pre><<reserves.reservenotes>></pre> +</p>', 1)"); + + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoticeCSS','','Notices CSS url.',NULL,'free')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SlipCSS','','Slips CSS url.',NULL,'free')"); + + $dbh->do("UPDATE `letter` SET content = replace(content, '<<title>>', '<<biblio.title>>') WHERE code = 'HOLDPLACED')"); + + print "Upgrade to $DBversion done (Add branchcode and is_html to letter table; Add NoticeCSS and SlipCSS sysprefs)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) 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 913076f..6fdd720 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc @@ -42,8 +42,10 @@ function update_child() { }); // YUI Toolbar Functions + var slip_re = /slip/; function printx_window(print_type) { - window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); + var handler = print_type.match(slip_re) ? "printslip" : "moremember"; + window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&print=" + print_type, "printwindow"); return false; } function searchToHold(){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index f4946b5..b3b279c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -91,6 +91,11 @@ Circulation: yes: Record no: "Don't record" - local use when an unissued item is checked in. + - + - Include the stylesheet at + - pref: NoticeCSS + class: url + - on Notices. (This should be a complete URL, starting with <code>http://</code>.) Checkout Policy: - - pref: AllowNotForLoanOverride diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index df0a434..efa33a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -83,6 +83,11 @@ Staff Client: Results: "Results page (for future use, Results XSLT not functional at this time)." Both: "Both Results and Details pages (for future use, Results XSLT not functional at this time)." - 'Note: The corresponding XSLT option must be turned on.' + - + - Include the stylesheet at + - pref: SlipCSS + class: url + - on Issue and Reserve Slips. (This should be a complete URL, starting with <code>http://</code>.) Options: - - pref: viewMARC diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt index 1904381..73f9e61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt @@ -8,11 +8,7 @@ --> </style> [% IF ( stylesheet ) %] - <style type="text/css"> - <!-- - [% stylesheet %] - --> - </style> + <link rel="stylesheet" type="text/css" href="[% stylesheet %]"> [% END %] </head> <body> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt deleted file mode 100644 index 18d45aa..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/hold-transfer-slip.tt +++ /dev/null @@ -1,54 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -<title>Koha -- Circulation: Transfers -[% INCLUDE 'doc-head-close-receipt.inc' %] - - -

          - -[% FOREACH reservedat IN reservedata %] - -
          Date: [% reservedat.pulldate %]
          -

          [% IF ( reservedat.transferrequired ) %]Transfer to [% reservedat.branchname %] [% ELSE %]Hold in [% reservedat.branchname %][% END %]

          - -
          - -

          [% reservedat.surname %], [% reservedat.firstname %]

          - -
            -
          • [% reservedat.cardnumber %]
          • - [% IF ( reservedat.phone ) %] -
          • [% reservedat.phone %]
          • - [% END %] -
          • - [% reservedat.address %]
            - [% IF ( reservedat.address2 ) %][% reservedat.address2 %]
            [% END %] - [% reservedat.city %] [% reservedat.zip %] -
          • - [% IF ( reservedat.email ) %] -
          • [% reservedat.email %]
          • - [% END %] -
          -
          -

          ITEM ON HOLD

          -

          [% reservedat.title |html %]

          -
          [% reservedat.author %]
          -
            - [% IF ( reservedat.barcode ) %]
          • [% reservedat.barcode %]
          • [% END %] - [% IF ( reservedat.itemcallnumber ) %]
          • [% reservedat.itemcallnumber %]
          • [% END %] - [% IF ( reservedat.waitingdate ) %]
          • [% reservedat.waitingdate %]
          • [% END %] -
          - [% IF ( reservedat.reservenotes ) %] -

          Notes: [% reservedat.reservenotes %]

          - [% END %] - - - -[% END %] -
          -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt new file mode 100644 index 0000000..a790069 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt @@ -0,0 +1,28 @@ +[% INCLUDE 'doc-head-open.inc' %] +[% title %] + + + +[% IF stylesheet %] + +[% END %] + + + + +
          + +[% IF plain %] +
          +[% slip %]
          +
          +[% ELSE %] +[% slip %] +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt deleted file mode 100644 index 4a85ccb..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt +++ /dev/null @@ -1,76 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Print Receipt for [% cardnumber %] - - - - - - - - -
          - -

          [% LibraryName %]

          -[% IF ( branchname ) %][% branchname %]
          [% END %] -Checked out to [% firstname %] [% surname %]
          -([% cardnumber %])
          - -[% todaysdate %]
          - -[% IF ( quickslip ) %] -

          Checked Out Today

          -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -[% IF ( issueloo.today ) %] -

          [% issueloo.title |html %]
          -Barcode: [% issueloo.barcode %]
          -Date due: [% issueloo.date_due %]

          - [% END %] - [% END %] - [% END %] - -[% ELSE %] -

          Checked Out

          -[% FOREACH issueloo IN issueloop %] -[% IF ( issueloo.red ) %][% ELSE %] -

          [% issueloo.title |html %]
          -Barcode: [% issueloo.barcode %]
          -Date due: [% issueloo.date_due %]

          - [% END %] - [% END %] - -[% END %] - -[% IF ( quickslip ) %] -[% ELSE %] -[% IF ( overdues_exist ) %] -

          Overdues

          - [% FOREACH issueloo IN issueloop %] - [% IF ( issueloo.red ) %] -

          [% issueloo.title |html %]
          -Barcode: [% issueloo.barcode %]
          -Date due: [% issueloo.date_due %]

          -[% END %] -[% END %] -[% END %] -[% END %] - -[% IF ( koha_news_count ) %] -

          News

          - - [% FOREACH koha_new IN koha_news %] -
          [% koha_new.title %]
          -

          [% koha_new.new %]

          -

          Posted on [% koha_new.newdate %] - -


          - [% END %] -[% END %] - - -[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 063236e..b64477e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -10,6 +10,10 @@ $(document).ready(function() { sortList: [[0,0]], headers: { 3: {sorter:false},4: { sorter: false }} }); + + $('#branch').change(function() { + $('#selectlibrary').submit(); + }); }); [% IF ( add_form ) %] @@ -114,7 +118,7 @@ $(document).ready(function() {
          - [% IF ( no_op_set ) %] +[% IF ( no_op_set ) %]
          + + [% UNLESS independant_branch %] +

          +

          + + Select a library : + +
          +

          + [% END %] +
          @@ -135,41 +155,71 @@ $(document).ready(function() { [% IF ( search ) %]

          You Searched for [% searchfield %]

          [% END %] - [% IF ( letter ) %] + [% IF ( letter && !independant_branch) %] + [% select_for_copy = BLOCK %] + + [% END %] + [% END %] +
          + + - [% FOREACH lette IN letter %] - [% UNLESS ( loop.odd ) %] + + [% FOREACH lette IN letter %] + [% can_edit = lette.branchcode || !independant_branch %] + [% UNLESS ( loop.odd ) %] - [% ELSE %] + [% ELSE %] - [% END %] + [% END %] + + - [% END %] + [% END %] +
          Branch Module Code Name     
          [% lette.branchname || "(All libraries)" %] [% lette.module %] [% lette.code %] [% lette.name %] - Edit + [% IF can_edit %] + Edit + [% END %] - [% IF ( lette.protected ) %] - - - [% ELSE %] - Delete - [% END %] + [% IF !independant_branch || !lette.branchcode %] +
          + + + + + [% IF independant_branch %] + + [% ELSE %] + [% select_for_copy %] + [% END %] + +
          + [% END %] +
          + [% IF !lette.protected && can_edit %] + Delete + [% END %]
          - [% END %] +[% END %] - [% END %] - [% IF ( add_form ) %] +[% IF ( add_form ) %]
          @@ -182,6 +232,20 @@ $(document).ready(function() {
          [% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]
            + + [% IF independant_branch %] + + [% ELSE %] +
          1. + + +
          2. + [% END %]
          3. @@ -235,6 +299,9 @@ $(document).ready(function() {
          4. + +
          5. +
          6. @@ -253,16 +320,16 @@ $(document).ready(function() {
          - [% END %] +[% END %] - [% IF ( add_validate ) %] +[% IF ( add_validate ) %] Data recorded
          - [% END %] +[% END %] - [% IF ( delete_confirm ) %] +[% IF ( delete_confirm ) %]

          Delete Notice?

          @@ -290,14 +357,14 @@ $(document).ready(function() { - [% END %] +[% END %] - [% IF ( delete_confirmed ) %] +[% IF ( delete_confirmed ) %] Data deleted - [% END %] +[% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index c047873..f345351 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -338,10 +338,7 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ # if we manage to find a valid email address, send notice if ($emailaddr) { $newdata{emailaddr} = $emailaddr; - my $letter = getletter ('members', "ACCTDETAILS:$newdata{'branchcode'}") ; - # if $branch notice fails, then email a default notice instead. - $letter = getletter ('members', "ACCTDETAILS") if !$letter; - SendAlerts ( 'members' , \%newdata , $letter ) if $letter + SendAlerts ( 'members', \%newdata, "ACCTDETAILS" ); } } diff --git a/members/moremember.pl b/members/moremember.pl index 6e5407c..9277deb 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -51,7 +51,6 @@ use C4::Reserves; use C4::Branch; # GetBranchName use C4::Overdues qw/CheckBorrowerDebarred/; use C4::Form::MessagingPreferences; -use C4::NewsChannels; #get slip news use List::MoreUtils qw/uniq/; use C4::Members::Attributes qw(GetBorrowerAttributes); @@ -483,13 +482,4 @@ $template->param( quickslip => $quickslip, ); -#Get the slip news items -my $all_koha_news = &GetNewsToDisplay("slip"); -my $koha_news_count = scalar @$all_koha_news; - -$template->param( - koha_news => $all_koha_news, - koha_news_count => $koha_news_count -); - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printslip.pl b/members/printslip.pl new file mode 100755 index 0000000..eba8d68 --- /dev/null +++ b/members/printslip.pl @@ -0,0 +1,89 @@ +#!/usr/bin/perl + +# Copyright 2000-2002 Katipo Communications +# Copyright 2010 BibLibre +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +=head1 moremember.pl + + script to do a borrower enquiry/bring up borrower details etc + Displays all the details about a borrower + written 20/12/99 by chris at katipo.co.nz + last modified 21/1/2000 by chris at katipo.co.nz + modified 31/1/2001 by chris at katipo.co.nz + to not allow items on request to be renewed + + needs html removed and to use the C4::Output more, but its tricky + +=cut + +use strict; +#use warnings; FIXME - Bug 2505 +use CGI; +use C4::Context; +use C4::Auth; +use C4::Output; +use C4::Members; +use C4::Koha; + +#use Smart::Comments; +#use Data::Dumper; + +use vars qw($debug); + +BEGIN { + $debug = $ENV{DEBUG} || 0; +} + +my $input = new CGI; +$debug or $debug = $input->param('debug') || 0; +my $print = $input->param('print'); +my $error = $input->param('error'); + +# circ staff who process checkouts but can't edit +# patrons still need to be able to print receipts +my $flagsrequired = { circulate => "circulate_remaining_permissions" }; + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "circ/printslip.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => $flagsrequired, + debug => 1, + } +); + +my $borrowernumber = $input->param('borrowernumber'); +my $branch=C4::Context->userenv->{'branch'}; +my ($slip, $is_html); +if (my $letter = IssueSlip ($branch, $borrowernumber, $print eq "qslip")) { + $slip = $letter->{content}; + $is_html = $letter->{is_html}; +} + +$template->param( + slip => $slip, + plain => !$is_html, + title => "Print Receipt for $borrowernumber", + stylesheet => C4::Context->preference("SlipCSS"), + error => $error, +); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index 1fa358f..09c4017 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -79,13 +79,10 @@ patrons. It queues them in the message queue, which is processed by the process_message_queue.pl cronjob. See the comments in the script for directions on changing the script. This script has the following parameters : - -c Confirm and remove this help & warning - -m maximum number of days in advance to send advance notices. - -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. - -v verbose - -i csv list of fields that get substituted into templates in places - of the EEitems.contentEE placeholder. Defaults to - issuedate,title,barcode,author + -c Confirm and remove this help & warning + -m maximum number of days in advance to send advance notices. + -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. + -v verbose ENDUSAGE # Since advance notice options are not visible in the web-interface @@ -157,8 +154,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'DUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -166,13 +161,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } else { $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, @@ -189,8 +185,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'PREDUE'; - $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($upcoming->{'borrowernumber'},$upcoming->{'itemnumber'},$borrower_preferences->{'days_in_advance'}); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -198,13 +192,14 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $upcoming->{'borrowernumber'}, branchcode => $upcoming->{'branchcode'}, biblionumber => $biblio->{'biblionumber'}, itemnumber => $upcoming->{'itemnumber'}, substitute => { 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; } } @@ -250,8 +245,6 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my $letter_type = 'PREDUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,$borrower_preferences->{'days_in_advance'}); my $titles = ""; @@ -259,12 +252,13 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; print $letter->{'content'}; @@ -290,20 +284,19 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { next PATRON unless $borrower_preferences; # how could this happen? my $letter_type = 'DUEDGST'; - my $letter = C4::Letters::getletter( 'circulation', $letter_type ); - die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; $sth->execute($borrowernumber,'0'); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { my @item_info = map { $_ =~ /^date|date$/ ? format_date($item_info->{$_}) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", at item_info) . "\n"; } - $letter = parse_letter( { letter => $letter, + my $letter = parse_letter( { letter_code => $letter_type, borrowernumber => $borrowernumber, substitute => { count => $count, 'items.content' => $titles } - } ); + } ) + or die "no letter of type '$letter_type' found. Please see sample_notices.sql"; if ($nomail) { local $, = "\f"; @@ -323,40 +316,35 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { =head2 parse_letter - - =cut sub parse_letter { my $params = shift; - foreach my $required ( qw( letter borrowernumber ) ) { + foreach my $required ( qw( letter_code borrowernumber ) ) { return unless exists $params->{$required}; } - if ( $params->{'substitute'} ) { - while ( my ($key, $replacedby) = each %{$params->{'substitute'}} ) { - my $replacefield = "<<$key>>"; - - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } - } - - C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); + my %table_params = ( 'borrowers' => $params->{'borrowernumber'} ); - if ( $params->{'branchcode'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + if ( my $p = $params->{'branchcode'} ) { + $table_params{'branches'} = $p; } - if ( $params->{'itemnumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'issues', $params->{'itemnumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'itemnumber'} ); + if ( my $p = $params->{'itemnumber'} ) { + $table_params{'issues'} = $p; + $table_params{'items'} = $p; } - if ( $params->{'biblionumber'} ) { - C4::Letters::parseletter( $params->{'letter'}, 'biblio', $params->{'biblionumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $params->{'biblionumber'} ); + if ( my $p = $params->{'biblionumber'} ) { + $table_params{'biblio'} = $p; + $table_params{'biblioitems'} = $p; } - return $params->{'letter'}; + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $table_params{'branches'}, + substitute => $params->{'substitute'}, + tables => \%table_params, + ); } 1; diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index a72d6a6..165b16e 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -39,11 +39,9 @@ use Getopt::Long; sub usage { print STDERR < \$stylesheet, 'h|help' => \$help, ) || usage( 1 ); @@ -71,16 +68,9 @@ exit unless( @messages ); open OUTPUT, '>', File::Spec->catdir( $output_directory, "holdnotices-" . $today->output( 'iso' ) . ".html" ); my $template = C4::Templates::gettemplate( 'batch/print-notices.tmpl', 'intranet', new CGI ); -my $stylesheet_contents = ''; - -if ($stylesheet) { - open STYLESHEET, '<', $stylesheet; - while ( ) { $stylesheet_contents .= $_ } - close STYLESHEET; -} $template->param( - stylesheet => $stylesheet_contents, + stylesheet => C4::Context->preference("NoticeCSS"), today => $today->output(), messages => \@messages, ); diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 71e6a05..93061b4 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -460,16 +460,6 @@ END_SQL { $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i."; - my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} ); - - unless ($letter) { - $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; - - # might as well skip while PERIOD, no other borrowers are going to work. - # FIXME : Does this mean a letter must be defined in order to trigger a debar ? - next PERIOD; - } - if ( $overdue_rules->{"debarred$i"} ) { #action taken is debarring @@ -494,11 +484,12 @@ END_SQL my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", @item_info) . "\n"; $itemcount++; - push @items, { itemnumber => $item_info->{'itemnumber'}, biblionumber => $item_info->{'biblionumber'} }; + push @items, $item_info; } $sth2->finish; - $letter = parse_letter( - { letter => $letter, + + my $letter = parse_letter( + { letter_code => $overdue_rules->{"letter$i"}, borrowernumber => $borrowernumber, branchcode => $branchcode, items => \@items, @@ -509,6 +500,13 @@ END_SQL } } ); + unless ($letter) { + $verbose and warn "Message '$overdue_rules->{letter$i}' content not found"; + + # might as well skip while PERIOD, no other borrowers are going to work. + # FIXME : Does this mean a letter must be defined in order to trigger a debar ? + next PERIOD; + } if ( $exceededPrintNoticesMaxLines ) { $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; @@ -643,54 +641,56 @@ substituted keys and values. =cut -sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:parseletter +sub parse_letter { my $params = shift; - foreach my $required (qw( letter borrowernumber )) { + foreach my $required (qw( letter_code borrowernumber )) { return unless exists $params->{$required}; } - my $todaysdate = C4::Dates->new()->output("syspref"); - $params->{'letter'}->{title} =~ s/<>/$todaysdate/g; - $params->{'letter'}->{content} =~ s/<>/$todaysdate/g; + my $substitute = $params->{'substitute'} || {}; + $substitute->{today} ||= C4::Dates->new()->output("syspref"); - if ( $params->{'substitute'} ) { - while ( my ( $key, $replacedby ) = each %{ $params->{'substitute'} } ) { - my $replacefield = "<<$key>>"; - $params->{'letter'}->{title} =~ s/$replacefield/$replacedby/g; - $params->{'letter'}->{content} =~ s/$replacefield/$replacedby/g; - } + my %tables = ( 'borrowers' => $params->{'borrowernumber'} ); + if ( my $p = $params->{'branchcode'} ) { + $tables{'branches'} = $p; } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'borrowers', $params->{'borrowernumber'} ); - - if ( $params->{'branchcode'} ) { - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'branches', $params->{'branchcode'} ); + my $currency_format; + if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/o) { # process any fine tags... + $currency_format = $1; + $params->{'letter'}->{'content'} =~ s/.*<\/fine>/<>/o; } - if ( $params->{'items'} ) { + my @item_tables; + if ( my $i = $params->{'items'} ) { my $item_format = ''; - PROCESS_ITEMS: - while (scalar(@{$params->{'items'}}) > 0) { - my $item = shift @{$params->{'items'}}; + foreach my $item (@$i) { my $fine = GetFine($item->{'itemnumber'}, $params->{'borrowernumber'}); if (!$item_format) { $params->{'letter'}->{'content'} =~ m/(.*<\/item>)/; $item_format = $1; } - if ($params->{'letter'}->{'content'} =~ m/(.*)<\/fine>/) { # process any fine tags... - my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL); - $params->{'letter'}->{'content'} =~ s/.*<\/fine>/$formatted_fine/; - } - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $item->{'biblionumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'items', $item->{'itemnumber'} ); - $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'issues', $item->{'itemnumber'} ); - $params->{'letter'}->{'content'} =~ s/(.*<\/item>)/$1\n$item_format/ if scalar(@{$params->{'items'}} > 0); + $item->{'fine'} = currency_format($currency_format, "$fine", FMT_SYMBOL) + if $currency_format; + + push @item_tables, { + 'biblio' => $item->{'biblionumber'}, + 'biblioitems' => $item->{'biblionumber'}, + 'items' => $item, + 'issues' => $item->{'itemnumber'}, + }; } } - $params->{'letter'}->{'content'} =~ s/<\/{0,1}?item>//g; # strip all remaining item tags... - return $params->{'letter'}; + + return C4::Letters::GetPreparedLetter ( + module => 'circulation', + letter_code => $params->{'letter_code'}, + branchcode => $params->{'branchcode'}, + tables => \%tables, + substitute => $substitute, + repeat => { item => \@item_tables }, + ); } =head2 prepare_letter_for_printing diff --git a/t/db_dependent/lib/KohaTest/Letters.pm b/t/db_dependent/lib/KohaTest/Letters.pm index 97d58fb..f2d7b0d 100644 --- a/t/db_dependent/lib/KohaTest/Letters.pm +++ b/t/db_dependent/lib/KohaTest/Letters.pm @@ -12,13 +12,12 @@ sub testing_class { 'C4::Letters' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( getletter - addalert + my @methods = qw( addalert delalert getalert findrelatedto SendAlerts - parseletter + GetPreparedLetter ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm index 76b6ab4..53e5439 100644 --- a/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm +++ b/t/db_dependent/lib/KohaTest/Letters/GetLetter.pm @@ -10,7 +10,7 @@ use Test::More; sub GetLetter : Test( 6 ) { my $self = shift; - my $letter = getletter( 'circulation', 'ODUE' ); + my $letter = getletter( 'circulation', 'ODUE', '' ); isa_ok( $letter, 'HASH' ) or diag( Data::Dumper->Dump( [ $letter ], [ 'letter' ] ) ); @@ -21,7 +21,6 @@ sub GetLetter : Test( 6 ) { ok( exists $letter->{'name'}, 'name' ); ok( exists $letter->{'title'}, 'title' ); - } 1; diff --git a/t/db_dependent/lib/KohaTest/Members.pm b/t/db_dependent/lib/KohaTest/Members.pm index 5646be1..dfde7da 100644 --- a/t/db_dependent/lib/KohaTest/Members.pm +++ b/t/db_dependent/lib/KohaTest/Members.pm @@ -52,6 +52,7 @@ sub methods : Test( 1 ) { GetBorrowersWhoHaveNeverBorrowed GetBorrowersWithIssuesHistoryOlderThan GetBorrowersNamesAndLatestIssue + IssueSlip ); can_ok( $self->testing_class, @methods ); diff --git a/t/db_dependent/lib/KohaTest/Print.pm b/t/db_dependent/lib/KohaTest/Print.pm index 02fd5fb..d35ab34 100644 --- a/t/db_dependent/lib/KohaTest/Print.pm +++ b/t/db_dependent/lib/KohaTest/Print.pm @@ -12,10 +12,7 @@ sub testing_class { 'C4::Print' }; sub methods : Test( 1 ) { my $self = shift; - my @methods = qw( remoteprint - printreserve - printslip - ); + my @methods = qw( printslip ); can_ok( $self->testing_class, @methods ); } diff --git a/t/db_dependent/lib/KohaTest/Reserves.pm b/t/db_dependent/lib/KohaTest/Reserves.pm index 8b05dd0..6416ac3 100644 --- a/t/db_dependent/lib/KohaTest/Reserves.pm +++ b/t/db_dependent/lib/KohaTest/Reserves.pm @@ -33,6 +33,7 @@ sub methods : Test( 1 ) { GetReserveInfo _FixPriority _Findgroupreserve + ReserveSlip ); can_ok( $self->testing_class, @methods ); diff --git a/tools/letter.pl b/tools/letter.pl index f5dc0c6..7cfca55 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -46,14 +46,34 @@ use CGI; use C4::Auth; use C4::Context; use C4::Output; +use C4::Branch; # GetBranches -# letter_exists($module, $code) -# - return true if a letter with the given $module and $code exists +# _letter_from_where($branchcode,$module, $code) +# - return FROM WHERE clause and bind args for a letter +sub _letter_from_where { + my ($branchcode, $module, $code) = @_; + my $sql = q{FROM letter WHERE branchcode = ? AND module = ? AND code = ?}; + my @args = ($branchcode || '', $module, $code); +# Mysql is retarded. cause branchcode is part of the primary key it cannot be null. How does that +# work with foreign key constraint I wonder... + +# if ($branchcode) { +# $sql .= " AND branchcode = ?"; +# push @args, $branchcode; +# } else { +# $sql .= " AND branchcode IS NULL"; +# } + + return ($sql, \@args); +} + +# letter_exists($branchcode,$module, $code) +# - return true if a letter with the given $branchcode, $module and $code exists sub letter_exists { - my ($module, $code) = @_; + my ($sql, $args) = _letter_from_where(@_); my $dbh = C4::Context->dbh; - my $letters = $dbh->selectall_arrayref(q{SELECT name FROM letter WHERE module = ? AND code = ?}, undef, $module, $code); - return @{$letters}; + my $letter = $dbh->selectrow_hashref("SELECT * $sql", undef, @$args); + return $letter; } # $protected_letters = protected_letters() @@ -67,14 +87,12 @@ sub protected_letters { my $input = new CGI; my $searchfield = $input->param('searchfield'); my $script_name = '/cgi-bin/koha/tools/letter.pl'; +my $branchcode = $input->param('branchcode'); my $code = $input->param('code'); my $module = $input->param('module'); my $content = $input->param('content'); -my $op = $input->param('op'); +my $op = $input->param('op') || ''; my $dbh = C4::Context->dbh; -if (!defined $module ) { - $module = q{}; -} my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -87,32 +105,38 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -if (!defined $op) { - $op = q{}; # silence errors from eq -} +my $my_branch = C4::Context->preference("IndependantBranches") + ? C4::Context->userenv()->{'branch'} + : undef; # we show only the TMPL_VAR names $op $template->param( + independant_branch => $my_branch, script_name => $script_name, action => $script_name ); +if ($op eq 'copy') { + add_copy(); + $op = 'add_form'; +} + if ($op eq 'add_form') { - add_form($module, $code); + add_form($branchcode, $module, $code); } elsif ( $op eq 'add_validate' ) { add_validate(); $op = q{}; # next operation is to return to default screen } elsif ( $op eq 'delete_confirm' ) { - delete_confirm($module, $code); + delete_confirm($branchcode, $module, $code); } elsif ( $op eq 'delete_confirmed' ) { - delete_confirmed($module, $code); + delete_confirmed($branchcode, $module, $code); $op = q{}; # next operation is to return to default screen } else { - default_display($searchfield); + default_display($branchcode,$searchfield); } # Do this last as delete_confirmed resets @@ -125,23 +149,21 @@ if ($op) { output_html_with_http_headers $input, $cookie, $template->output; sub add_form { - my ($module, $code ) = @_; + my ($branchcode,$module, $code ) = @_; my $letter; # if code has been passed we can identify letter and its an update action if ($code) { - $letter = $dbh->selectrow_hashref(q{SELECT module, code, name, title, content FROM letter WHERE module=? AND code=?}, - undef, $module, $code); + $letter = letter_exists($branchcode,$module, $code); + } + if ($letter) { $template->param( modify => 1 ); $template->param( code => $letter->{code} ); } else { # initialize the new fields $letter = { - module => $module, - code => q{}, - name => q{}, - title => q{}, - content => q{}, + branchcode => $branchcode, + module => $module, }; $template->param( adding => 1 ); } @@ -173,14 +195,20 @@ sub add_form { {value => q{}, text => '---ITEMS---' }, {value => 'items.content', text => 'items.content'}, add_fields('issues','borrowers'); + if ($module eq 'circulation') { + push @{$field_selection}, add_fields('opac_news'); + } } $template->param( - name => $letter->{name}, - title => $letter->{title}, - content => $letter->{content}, - module => $module, - $module => 1, + branchcode => $letter->{branchcode}, + name => $letter->{name}, + is_html => $letter->{is_html}, + title => $letter->{title}, + content => $letter->{content}, + module => $module, + $module => 1, + branchloop => _branchloop($branchcode), SQLfieldname => $field_selection, ); return; @@ -188,37 +216,56 @@ sub add_form { sub add_validate { my $dbh = C4::Context->dbh; - my $module = $input->param('module'); - my $oldmodule = $input->param('oldmodule'); - my $code = $input->param('code'); - my $name = $input->param('name'); - my $title = $input->param('title'); - my $content = $input->param('content'); - if (letter_exists($oldmodule, $code)) { + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode') || ''; + my $module = $input->param('module'); + my $oldmodule = $input->param('oldmodule'); + my $code = $input->param('code'); + my $name = $input->param('name'); + my $is_html = $input->param('is_html'); + my $title = $input->param('title'); + my $content = $input->param('content'); + if (letter_exists($oldbranchcode,$oldmodule, $code)) { $dbh->do( - q{UPDATE letter SET module = ?, code = ?, name = ?, title = ?, content = ? WHERE module = ? AND code = ?}, + q{UPDATE letter SET branchcode = ?, module = ?, name = ?, is_html = ?, title = ?, content = ? WHERE branchcode = ? AND module = ? AND code = ?}, undef, - $module, $code, $name, $title, $content, - $oldmodule, $code + $branchcode, $module, $name, $is_html || 0, $title, $content, + $oldbranchcode, $oldmodule, $code ); } else { $dbh->do( - q{INSERT INTO letter (module,code,name,title,content) VALUES (?,?,?,?,?)}, + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, undef, - $module, $code, $name, $title, $content + $branchcode, $module, $code, $name, $is_html || 0, $title, $content ); } # set up default display - default_display(); - return; + default_display($branchcode); +} + +sub add_copy { + my $dbh = C4::Context->dbh; + my $oldbranchcode = $input->param('oldbranchcode'); + my $branchcode = $input->param('branchcode'); + my $module = $input->param('module'); + my $code = $input->param('code'); + + return if letter_exists($branchcode,$module, $code); + + my $old_letter = letter_exists($oldbranchcode,$module, $code); + + $dbh->do( + q{INSERT INTO letter (branchcode,module,code,name,is_html,title,content) VALUES (?,?,?,?,?,?,?)}, + undef, + $branchcode, $module, $code, $old_letter->{name}, $old_letter->{is_html}, $old_letter->{title}, $old_letter->{content} + ); } sub delete_confirm { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; my $dbh = C4::Context->dbh; - my $letter = $dbh->selectrow_hashref(q|SELECT name FROM letter WHERE module = ? AND code = ?|, - { Slice => {} }, - $module, $code); + my $letter = letter_exists($branchcode, $module, $code); + $template->param( branchcode => $branchcode ); $template->param( code => $code ); $template->param( module => $module); $template->param( name => $letter->{name}); @@ -226,40 +273,54 @@ sub delete_confirm { } sub delete_confirmed { - my ($module, $code) = @_; + my ($branchcode, $module, $code) = @_; + my ($sql, $args) = _letter_from_where($branchcode, $module, $code); my $dbh = C4::Context->dbh; - $dbh->do('DELETE FROM letter WHERE module=? AND code=?',{},$module,$code); + $dbh->do("DELETE $sql", undef, @$args); # setup default display for screen - default_display(); + default_display($branchcode); return; } sub retrieve_letters { - my $searchstring = shift; + my ($branchcode, $searchstring) = @_; + + $branchcode = $my_branch if $branchcode && $my_branch; + my $dbh = C4::Context->dbh; - if ($searchstring) { - if ($searchstring=~m/(\S+)/) { - $searchstring = $1 . q{%}; - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter WHERE code LIKE ? ORDER BY module, code', - { Slice => {} }, $searchstring); - } + my ($sql, @where, @args); + $sql = "SELECT branchcode, module, code, name, branchname + FROM letter + LEFT OUTER JOIN branches USING (branchcode)"; + if ($searchstring && $searchstring=~m/(\S+)/) { + $searchstring = $1 . q{%}; + push @where, 'code LIKE ?'; + push @args, $searchstring; } - else { - return $dbh->selectall_arrayref('SELECT module, code, name FROM letter ORDER BY module, code', { Slice => {} }); + elsif ($branchcode) { + push @where, 'branchcode = ?'; + push @args, $branchcode || ''; } - return; + elsif ($my_branch) { + push @where, "(branchcode = ? OR branchcode = '')"; + push @args, $my_branch; + } + + $sql .= " WHERE ".join(" AND ", @where) if @where; + $sql .= " ORDER BY module, code, branchcode"; +# use Data::Dumper; die Dumper($sql, \@args); + return $dbh->selectall_arrayref($sql, { Slice => {} }, @args); } sub default_display { - my $searchfield = shift; - my $results; + my ($branchcode, $searchfield) = @_; + if ( $searchfield ) { $template->param( search => 1 ); $template->param( searchfield => $searchfield ); - $results = retrieve_letters($searchfield); - } else { - $results = retrieve_letters(); } + my $results = retrieve_letters($branchcode,$searchfield); + my $loop_data = []; my $protected_letters = protected_letters(); foreach my $row (@{$results}) { @@ -267,8 +328,27 @@ sub default_display { push @{$loop_data}, $row; } - $template->param( letter => $loop_data ); - return; + + $template->param( + letter => $loop_data, + branchloop => _branchloop($branchcode), + ); +} + +sub _branchloop { + my ($branchcode) = @_; + + my $branches = GetBranches(); + my @branchloop; + for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { + push @branchloop, { + value => $thisbranch, + selected => $branchcode && $thisbranch eq $branchcode, + branchname => $branches->{$thisbranch}->{'branchname'}, + }; + } + + return \@branchloop; } sub add_fields { -- 1.6.5 From jonathan.druart at biblibre.com Wed Dec 28 09:46:29 2011 From: jonathan.druart at biblibre.com (Jonathan Druart) Date: Wed, 28 Dec 2011 09:46:29 +0100 Subject: [Koha-patches] [PATCH 1/1] Bug 5347: Followup Adds columns claims_count and claimed_date in aqorders Message-ID: <1325061989-6436-1-git-send-email-jonathan.druart@biblibre.com> FIX encoding problem --- C4/Letters.pm | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 883f706..b4ba478 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -22,8 +22,6 @@ use warnings; use MIME::Lite; use Mail::Sendmail; -use Encode; -use Carp; use C4::Members; use C4::Branch; @@ -390,8 +388,8 @@ sub SendAlerts { my %mail = ( To => $to, From => $userenv->{emailaddress}, - Subject => "" . $innerletter->{title}, - Message => "" . $innerletter->{content}, + Subject => Encode::encode( "utf8", "" . $innerletter->{title} ), + Message => Encode::encode( "utf8", "" . $innerletter->{content} ), 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail) or carp $Mail::Sendmail::error; -- 1.7.7.3 From magnus at enger.priv.no Wed Dec 28 11:40:32 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Wed, 28 Dec 2011 11:40:32 +0100 Subject: [Koha-patches] [PATCH] [ENH] Add --disabled to koha-list command In-Reply-To: <1324293410-1934-1-git-send-email-judit@calyx.net.au> References: <1324293410-1934-1-git-send-email-judit@calyx.net.au> Message-ID: Hiya! Is there a bug for this patch? Please remember to update debian/docs/koha-list.xml so the manual page for the command stays in sync with the code. Best regards, Magnus Enger libriotech.no On 19 December 2011 12:16, Judit wrote: > Add --disabled to koha-list command > --- > ?debian/scripts/koha-list | ? ?8 ++++++-- > ?1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/debian/scripts/koha-list b/debian/scripts/koha-list > index 1e19f1a..459e5ca 100755 > --- a/debian/scripts/koha-list > +++ b/debian/scripts/koha-list > @@ -34,9 +34,10 @@ help() { > ?Lists Koha instances, optionally only those that are enabled or have > ?email turned on. > > -Usage: $0 [--enabled] [--email] [-h] > +Usage: $0 [--enabled|--disabled] [--email|--noemail] [-h] > ?Options: > ? ? --enabled ? ? ? only show instances that are enabled > + ? ?--disabled ? ? ?only show instances that are disabled > ? ? --email ? ? ? ? only show instances that have email enabled > ? ? --noemail ? ? ? only show instances that do not have email enabled > ? ? -h ? ? ? ? ? ? ?this help > @@ -47,9 +48,10 @@ eoh > ?} > > ?enabled=no > +disabled=no > ?email=no > ?noemail=no > -args=$(getopt -l enabled,email,noemail -o h -n $0 -- "$@") > +args=$(getopt -l enabled,disabled,email,noemail -o h -n $0 -- "$@") > ?set -- $args > ?while [ ! -z "$1" ] > ?do > @@ -57,6 +59,7 @@ do > ? ? ? ? ?-h) help; exit;; > ? ? --email) email=yes;; > ? --enabled) enabled=yes;; > + ?--disabled) disabled=yes;; > ? --noemail) noemail=yes;; > ? ? ? ? ? *) break;; > ? ? esac > @@ -68,6 +71,7 @@ sort | > ?while read name > ?do > ? ? [ "$enabled" = yes ] && ! is_enabled "$name" && continue > + ? ?[ "$disabled" = yes ] && is_enabled "$name" && continue > ? ? [ "$email" = yes ] && [ ! -e /var/lib/koha/$name/email.enabled ] && continue > ? ? [ "$noemail" = yes ] && [ -e /var/lib/koha/$name/email.enabled ] && continue > ? ? echo "$name" > -- > 1.7.4.1 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ From oleonard at myacpl.org Wed Dec 28 17:45:10 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Wed, 28 Dec 2011 11:45:10 -0500 Subject: [Koha-patches] [PATCH] Bug 6842 Alternate fix, Branch transfer limits broken Message-ID: <1325090710-7478-1-git-send-email-oleonard@myacpl.org> The patch which moved the table pager markup into an include undid the fix which was previously pushed for this problem. Re-implementing the fix in the pager include is a simpler fix which doesn't depend on the Datatables plugin. The markup change in table-pager.inc fixes the problem in branch transfer limits and does not affect functionality on other pages. The changes in this patch to branch_transfer_limits.tt and staff-global.css are for cosmetic reasons only. --- .../intranet-tmpl/prog/en/css/staff-global.css | 3 +++ .../intranet-tmpl/prog/en/includes/table-pager.inc | 4 ++-- .../en/modules/admin/branch_transfer_limits.tt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) 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 9eb7fa2..c61f946 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2133,3 +2133,6 @@ div.pager input.pagedisplay { font-weight: bold; text-align : center; } +div.pager p { + margin: 0; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc index 961c07b..17d43d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc @@ -1,4 +1,4 @@ -
          \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 5e4e58f..0e8805e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -102,7 +102,7 @@

          Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]

          Check All | Uncheck All

          -
          +
          [% INCLUDE 'table-pager.inc' perpage='20' %]
          -- 1.7.3 From chrisc at catalyst.net.nz Wed Dec 28 21:13:31 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 29 Dec 2011 09:13:31 +1300 Subject: [Koha-patches] [PATCH 2/3] Bug 929 : Follow up, making some improvements to the spent page More to come In-Reply-To: <1325103212-17289-1-git-send-email-chrisc@catalyst.net.nz> References: <1325103212-17289-1-git-send-email-chrisc@catalyst.net.nz> Message-ID: <1325103212-17289-2-git-send-email-chrisc@catalyst.net.nz> --- acqui/spent.pl | 3 ++- .../intranet-tmpl/prog/en/modules/acqui/spent.tt | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/acqui/spent.pl b/acqui/spent.pl index f252386..8108401 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -57,7 +57,7 @@ my $query = <param( spent => \@spent, total => $total ); +$template->{VARS}->{'fund'} = $bookfund; $sth->finish; $dbh->disconnect; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt index f5f2bdf..bb71cd4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -6,7 +6,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
          @@ -14,7 +14,7 @@
          -

          Budgets & Bookfunds

          +

          Bookfund [% fund %]

          Spent

          @@ -23,12 +23,13 @@
          - + - + + @@ -48,7 +49,7 @@ [% order.ordernumber %] + + -- 1.7.5.4 From chrisc at catalyst.net.nz Wed Dec 28 21:13:30 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 29 Dec 2011 09:13:30 +1300 Subject: [Koha-patches] [PATCH 1/3] Bug 929 : Reinstating the breakdown of budgets Message-ID: <1325103212-17289-1-git-send-email-chrisc@catalyst.net.nz> --- acqui/ordered.pl | 108 +++++++++++++++++ acqui/spent.pl | 121 ++++++++++++++++++++ .../prog/en/modules/acqui/acqui-home.tt | 8 +- .../intranet-tmpl/prog/en/modules/acqui/ordered.tt | 86 ++++++++++++++ .../intranet-tmpl/prog/en/modules/acqui/spent.tt | 101 ++++++++++++++++ 5 files changed, 420 insertions(+), 4 deletions(-) create mode 100755 acqui/ordered.pl create mode 100755 acqui/spent.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt diff --git a/acqui/ordered.pl b/acqui/ordered.pl new file mode 100755 index 0000000..5796f07 --- /dev/null +++ b/acqui/ordered.pl @@ -0,0 +1,108 @@ +#!/usr/bin/perl + +# Copyright 2008 - 2009 BibLibre SARL +# Copyright 2010 Catalyst IT Limited +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +=head1 NAME + +committed.pl + +=head1 DESCRIPTION + +this script is to show orders ordered but not yet received + +=cut + + +use C4::Context; +use strict; +use warnings; +use CGI; +use C4::Auth; +use C4::Output; + +my $dbh = C4::Context->dbh; +my $input = new CGI; +my $fund_id = $input->param('fund'); +my $start = $input->param('start'); +my $end = $input->param('end'); + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "acqui/ordered.tt", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { acquisition => 1 }, + debug => 1, + } +); + +my $query = < quantityreceived OR quantityreceived IS NULL) +EOQ + +my $sth = $dbh->prepare($query); + +$sth->execute( $fund_id); +if ($sth->err) { + die "Error occurred fetching records: ".$sth->errstr; +} +my @ordered; + +my $total = 0; +while ( my $data = $sth->fetchrow_hashref ) { + my $left = $data->{'tleft'}; + if ( !$left || $left eq '' ) { + $left = $data->{'quantity'}; + } + if ( $left && $left > 0 ) { + my $subtotal = $left * $data->{'ecost'}; + $data->{subtotal} = sprintf ("%.2f", $subtotal); + $data->{'left'} = $left; + push @ordered, $data; + $total += $subtotal; + } +} +$total = sprintf ("%.2f", $total); +$template->param( + ordered => \@ordered, + total => $total +); +$sth->finish; +$dbh->disconnect; + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/acqui/spent.pl b/acqui/spent.pl new file mode 100755 index 0000000..f252386 --- /dev/null +++ b/acqui/spent.pl @@ -0,0 +1,121 @@ +#!/usr/bin/perl + +# script to show a breakdown of committed and spent budgets + +# Copyright 2002-2009 Katipo Communications Limited +# Copyright 2010 Catalyst IT Limited +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +=head1 NAME + + spent.pl + +=head1 DESCRIPTION + +this script is designed to show the spent amount in budges + +=cut + + +use C4::Context; +use C4::Auth; +use C4::Output; +use strict; +use CGI; + +my $dbh = C4::Context->dbh; +my $input = new CGI; +my $bookfund = $input->param('fund'); +my $start = $input->param('start'); +my $end = $input->param('end'); + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "acqui/spent.tt", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { acquisition => 1 }, + debug => 1, + } +); + +my $query = <prepare($query); +$sth->execute( $bookfund); +if ($sth->err) { + die "An error occurred fetching records: ".$sth->errstr; +} +my $total = 0; +my $toggle; +my @spent; +while ( my $data = $sth->fetchrow_hashref ) { + my $recv = $data->{'quantityreceived'}; + if ( $recv > 0 ) { + my $subtotal = $recv * ($data->{'unitprice'} + $data->{'freight'}); + $data->{'subtotal'} = sprintf ("%.2f", $subtotal); + $data->{'freight'} = sprintf ("%.2f", $data->{'freight'}); + $data->{'unitprice'} = sprintf ("%.2f", $data->{'unitprice'} ); + $total += $subtotal; + + if ($toggle) { + $toggle = 0; + } + else { + $toggle = 1; + } + $data->{'toggle'} = $toggle; + push @spent, $data; + } + +} +$total = sprintf ("%.2f", $total); + +$template->param( + spent => \@spent, + total => $total +); +$sth->finish; + +$dbh->disconnect; +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index 86650eb..09ec874 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -122,8 +122,8 @@ $(document).ready(function() { - - + + [% ELSE %] @@ -136,8 +136,8 @@ $(document).ready(function() { - - + + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt new file mode 100644 index 0000000..7c72cb1 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -0,0 +1,86 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › Acquisitions › Ordered +[% INCLUDE 'doc-head-close.inc' %] + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'acquisitions-search.inc' %] + + + +
          + +
          +
          +
          + +

          Budgets & Bookfunds

          +

          Ordered

          + +
          Title Order Supplier Vendor Invoice Itemtype Receieved Received Unit Price Freight per Item Date Ordered Date Received Subtotal
          - [% order.booksellerid %] + [% order.booksellerid %] [% order.booksellerinvoicenumber %] @@ -66,6 +67,9 @@ [% order.freight %] + [% order.entrydate %] + [% order.datereceived %] @@ -84,6 +88,7 @@ [% total %] [% loop_budge.budget_owner %] [% loop_budge.budget_branchname %] [% loop_budge.budget_amount %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %] [% loop_budge.budget_avail %]
          [% loop_budge.budget_owner %] [% loop_budge.budget_branchname %] [% loop_budge.budget_amount %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %] [% loop_budge.budget_avail %]
          + + + + + + + + + + + + +[% FOREACH order IN ordered %] + [% IF loop.odd %] + + [% ELSE %] + + [% END %] + + + + + + + + +[% END %] + + + + + + + + + + + + + +
          Title Order Itemtype Left on Order Estimated cost per unit Budget Date Subtotal
          + [% order.title %] + + [% order.ordernumber %] + + [% order.itype %] + + [% order.left %] + + [% order.ecost %] + + [% order.budgetdate %] + + [% order.subtotal %] +
          Total + [% total %] +
          + +
          +
          +
          +[% INCLUDE 'acquisitions-menu.inc' %] +
          +
          +[% INCLUDE 'intranet-bottom.inc' %] + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt new file mode 100644 index 0000000..f5f2bdf --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -0,0 +1,101 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › Acquisitions › Spent +[% INCLUDE 'doc-head-close.inc' %] + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'acquisitions-search.inc' %] + + + +
          + +
          +
          +
          + +

          Budgets & Bookfunds

          +

          Spent

          + + + + + + + + + + + + + + + + + + +[% FOREACH order IN spent %] + [% IF loop.odd %] + + [% ELSE %] + + [% END %] + + + + + + + + + + + + +[% END %] + + + + + + + + + + + + + + + +
          Title Order Supplier Invoice Itemtype Receieved Unit Price Freight per Item Date Received Subtotal
          + [% order.title %] + + [% order.ordernumber %] + + [% order.booksellerid %] + + [% order.booksellerinvoicenumber %] + + [% order.itype %] + + [% order.quantityreceived %] + + [% order.unitprice %] + + [% order.freight %] + + [% order.datereceived %] + + [% order.subtotal %] +
          Total + [% total %] +
          + +
          +
          +
          +[% INCLUDE 'acquisitions-menu.inc' %] +
          +
          +[% INCLUDE 'intranet-bottom.inc' %] -- 1.7.5.4 From chrisc at catalyst.net.nz Wed Dec 28 21:13:32 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 29 Dec 2011 09:13:32 +1300 Subject: [Koha-patches] [PATCH 3/3] Bug 929 : Last follow up, implementing the last of Katrins suggestions In-Reply-To: <1325103212-17289-1-git-send-email-chrisc@catalyst.net.nz> References: <1325103212-17289-1-git-send-email-chrisc@catalyst.net.nz> Message-ID: <1325103212-17289-3-git-send-email-chrisc@catalyst.net.nz> Date formatting Links Nomenclature changes --- acqui/ordered.pl | 37 +++++++++------- acqui/spent.pl | 46 +++++++++----------- .../intranet-tmpl/prog/en/modules/acqui/ordered.tt | 15 ++++-- 3 files changed, 50 insertions(+), 48 deletions(-) diff --git a/acqui/ordered.pl b/acqui/ordered.pl index 5796f07..97a4da5 100755 --- a/acqui/ordered.pl +++ b/acqui/ordered.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # Copyright 2008 - 2009 BibLibre SARL -# Copyright 2010 Catalyst IT Limited +# Copyright 2010,2011 Catalyst IT Limited # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the @@ -27,19 +27,19 @@ this script is to show orders ordered but not yet received =cut - use C4::Context; use strict; use warnings; use CGI; use C4::Auth; use C4::Output; +use C4::Dates; -my $dbh = C4::Context->dbh; -my $input = new CGI; +my $dbh = C4::Context->dbh; +my $input = new CGI; my $fund_id = $input->param('fund'); -my $start = $input->param('start'); -my $end = $input->param('end'); +my $start = $input->param('start'); +my $end = $input->param('end'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -56,7 +56,7 @@ my $query = < quantityreceived OR quantityreceived IS NULL) + GROUP BY aqorders.ordernumber EOQ my $sth = $dbh->prepare($query); -$sth->execute( $fund_id); -if ($sth->err) { - die "Error occurred fetching records: ".$sth->errstr; +$sth->execute($fund_id); +if ( $sth->err ) { + die "Error occurred fetching records: " . $sth->errstr; } my @ordered; @@ -91,18 +92,20 @@ while ( my $data = $sth->fetchrow_hashref ) { } if ( $left && $left > 0 ) { my $subtotal = $left * $data->{'ecost'}; - $data->{subtotal} = sprintf ("%.2f", $subtotal); + $data->{subtotal} = sprintf( "%.2f", $subtotal ); $data->{'left'} = $left; push @ordered, $data; $total += $subtotal; } + my $entrydate = C4::Dates->new( $data->{'entrydate'}, 'iso' ); + $data->{'entrydate'} = $entrydate->output("syspref"); } -$total = sprintf ("%.2f", $total); -$template->param( - ordered => \@ordered, - total => $total -); +$total = sprintf( "%.2f", $total ); + +$template->{VARS}->{'fund'} = $fund_id; +$template->{VARS}->{'ordered'} = \@ordered; +$template->{VARS}->{'total'} = $total; + $sth->finish; -$dbh->disconnect; output_html_with_http_headers $input, $cookie, $template->output; diff --git a/acqui/spent.pl b/acqui/spent.pl index 8108401..4058b59 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -3,7 +3,7 @@ # script to show a breakdown of committed and spent budgets # Copyright 2002-2009 Katipo Communications Limited -# Copyright 2010 Catalyst IT Limited +# Copyright 2010,2011 Catalyst IT Limited # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the @@ -14,7 +14,7 @@ # Koha is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License along # with Koha; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -29,11 +29,12 @@ this script is designed to show the spent amount in budges =cut - use C4::Context; use C4::Auth; use C4::Output; +use C4::Dates; use strict; +use warnings; use CGI; my $dbh = C4::Context->dbh; @@ -82,9 +83,9 @@ WHERE GROUP BY aqorders.ordernumber EOQ my $sth = $dbh->prepare($query); -$sth->execute( $bookfund); -if ($sth->err) { - die "An error occurred fetching records: ".$sth->errstr; +$sth->execute($bookfund); +if ( $sth->err ) { + die "An error occurred fetching records: " . $sth->errstr; } my $total = 0; my $toggle; @@ -92,31 +93,24 @@ my @spent; while ( my $data = $sth->fetchrow_hashref ) { my $recv = $data->{'quantityreceived'}; if ( $recv > 0 ) { - my $subtotal = $recv * ($data->{'unitprice'} + $data->{'freight'}); - $data->{'subtotal'} = sprintf ("%.2f", $subtotal); - $data->{'freight'} = sprintf ("%.2f", $data->{'freight'}); - $data->{'unitprice'} = sprintf ("%.2f", $data->{'unitprice'} ); - $total += $subtotal; - - if ($toggle) { - $toggle = 0; - } - else { - $toggle = 1; - } - $data->{'toggle'} = $toggle; + my $subtotal = $recv * ( $data->{'unitprice'} + $data->{'freight'} ); + $data->{'subtotal'} = sprintf( "%.2f", $subtotal ); + $data->{'freight'} = sprintf( "%.2f", $data->{'freight'} ); + $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} ); + $total += $subtotal; + my $entrydate = C4::Dates->new( $data->{'entrydate'}, 'iso' ); + $data->{'entrydate'} = $entrydate->output("syspref"); + my $datereceived = C4::Dates->new( $data->{'datereceived'}, 'iso' ); + $data->{'datereceived'} = $datereceived->output("syspref"); push @spent, $data; } } -$total = sprintf ("%.2f", $total); +$total = sprintf( "%.2f", $total ); -$template->param( - spent => \@spent, - total => $total -); -$template->{VARS}->{'fund'} = $bookfund; +$template->{VARS}->{'fund'} = $bookfund; +$template->{VARS}->{'spent'} = \@spent; +$template->{VARS}->{'total'} = $total; $sth->finish; -$dbh->disconnect; output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt index 7c72cb1..29e78ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -6,7 +6,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
          @@ -14,18 +14,19 @@
          -

          Budgets & Bookfunds

          -

          Ordered

          +

          Bookfunds

          +

          Ordered - [% fund %]

          + - + @@ -43,6 +44,9 @@ [% order.ordernumber %] + + -- 1.7.5.4 From chrisc at catalyst.net.nz Thu Dec 29 10:04:12 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 29 Dec 2011 22:04:12 +1300 Subject: [Koha-patches] [PATCH 4/4] Bug 929 : Followup fixing date formatting Message-ID: <1325149452-8923-1-git-send-email-chrisc@catalyst.net.nz> This patch introduces a Filter (KohaDates) for use in templates [% USE KohaDates %] [% somevariable | $KohaDates %] This will format the date in the format specified by the systempreference --- C4/Templates.pm | 1 + Koha/Template/Plugin/KohaDates.pm | 31 ++++++++++++++++++++ acqui/ordered.pl | 2 - acqui/spent.pl | 4 -- .../intranet-tmpl/prog/en/modules/acqui/ordered.tt | 5 ++- .../intranet-tmpl/prog/en/modules/acqui/spent.tt | 5 ++- 6 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 Koha/Template/Plugin/KohaDates.pm diff --git a/C4/Templates.pm b/C4/Templates.pm index 7585727..d150a16 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -58,6 +58,7 @@ sub new { my $template = Template->new( { EVAL_PERL => 1, ABSOLUTE => 1, + PLUGIN_BASE => 'Koha::Template::Plugin', INCLUDE_PATH => [ "$htdocs/$theme/$lang/includes", "$htdocs/$theme/en/includes" diff --git a/Koha/Template/Plugin/KohaDates.pm b/Koha/Template/Plugin/KohaDates.pm new file mode 100644 index 0000000..749f6e2 --- /dev/null +++ b/Koha/Template/Plugin/KohaDates.pm @@ -0,0 +1,31 @@ +package Koha::Template::Plugin::KohaDates; + +# Copyright Catalyst IT 2011 + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use Template::Plugin::Filter; +use base qw( Template::Plugin::Filter ); + +use C4::Dates; + +sub filter { + my ($self,$text) = @_; + my $date = C4::Dates->new( $text, 'iso' ); + return $date->output("syspref"); +} + +1; \ No newline at end of file diff --git a/acqui/ordered.pl b/acqui/ordered.pl index 97a4da5..c3c4c4e 100755 --- a/acqui/ordered.pl +++ b/acqui/ordered.pl @@ -97,8 +97,6 @@ while ( my $data = $sth->fetchrow_hashref ) { push @ordered, $data; $total += $subtotal; } - my $entrydate = C4::Dates->new( $data->{'entrydate'}, 'iso' ); - $data->{'entrydate'} = $entrydate->output("syspref"); } $total = sprintf( "%.2f", $total ); diff --git a/acqui/spent.pl b/acqui/spent.pl index 4058b59..c2f5299 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -98,10 +98,6 @@ while ( my $data = $sth->fetchrow_hashref ) { $data->{'freight'} = sprintf( "%.2f", $data->{'freight'} ); $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} ); $total += $subtotal; - my $entrydate = C4::Dates->new( $data->{'entrydate'}, 'iso' ); - $data->{'entrydate'} = $entrydate->output("syspref"); - my $datereceived = C4::Dates->new( $data->{'datereceived'}, 'iso' ); - $data->{'datereceived'} = $datereceived->output("syspref"); push @spent, $data; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt index 29e78ba..a95eeae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Ordered [% INCLUDE 'doc-head-close.inc' %] @@ -41,7 +42,7 @@ [% order.title %]
          Title Order Vendor Itemtype Left on Order Estimated cost per unit Budget Date Date Ordered Subtotal
          + [% order.booksellerid %] + [% order.itype %] @@ -52,7 +56,7 @@ [% order.ecost %] - [% order.budgetdate %] + [% order.entrydate %] [% order.subtotal %] @@ -68,6 +72,7 @@ [% total %] - [% order.ordernumber %] + [% order.ordernumber %] [% order.booksellerid %] @@ -56,7 +57,7 @@ [% order.ecost %] - [% order.entrydate %] + [% order.entrydate | $KohaDates %] [% order.subtotal %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt index bb71cd4..1c41cc7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Spent [% INCLUDE 'doc-head-close.inc' %] @@ -67,10 +68,10 @@ [% order.freight %] - [% order.entrydate %] + [% order.entrydate | $KohaDates %] - [% order.datereceived %] + [% order.datereceived | $KohaDates %] [% order.subtotal %] -- 1.7.5.4 From oleonard at myacpl.org Thu Dec 29 18:48:40 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 29 Dec 2011 12:48:40 -0500 Subject: [Koha-patches] [PATCH] Bug 3651 Follow-up, Require patron login to send shelves and baskets Message-ID: <1325180920-16663-1-git-send-email-oleonard@myacpl.org> The fix for Bug 4289, "Add a syspref 'OpacPublic', to hide OPAC search-bar and force authentication on all OPAC pages" incorrectly made some page permissions dependent on the value of the OpacPublic setting. Some pages should require authentication no matter what. This patch returns opac-sendbasket.pl to the state it was in before Bug 4289, Bug 4274 notwithstanding. I have added the authentication requirement to opac-sendshelf.pl to match. --- opac/opac-sendbasket.pl | 2 +- opac/opac-sendshelf.pl | 2 +- opac/opac-userupdate.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index df1b4c5..6a6e825 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -39,7 +39,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( template_name => "opac-sendbasketform.tmpl", query => $query, type => "opac", - authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), + authnotrequired => 0, flagsrequired => { borrow => 1 }, } ); diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index 1de95ae..6e60bc9 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -41,7 +41,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( template_name => "opac-sendshelfform.tmpl", query => $query, type => "opac", - authnotrequired => 1, + authnotrequired => 0, flagsrequired => { borrow => 1 }, } ); diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index f8273ce..86e562a 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -40,7 +40,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( template_name => "opac-userupdate.tmpl", query => $query, type => "opac", - authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), + authnotrequired => 0, flagsrequired => { borrow => 1 }, debug => 1, } -- 1.7.3 From Katrin.Fischer.83 at web.de Fri Dec 30 09:15:39 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 30 Dec 2011 09:15:39 +0100 Subject: [Koha-patches] [PATCH] Bug 5347: Follow up - Fix warnings, check/uncheck all and makes error message translatable Message-ID: <1325232939-4349-1-git-send-email-Katrin.Fischer.83@web.de> This patch fixes some minor problems found in late order management: 1) Silences 2 warns in Letters.pm After patch is applied no more warns should show up in the logs. 2) Fixes check/uncheck all When limiting on one vendor the checkbox in the last header column was doing nothing. I changed the checkbox to 2 links 'check all' and 'uncheck all' as it's done in other templates. 3) Email has been sent. The message was hardcoded into the lateorders.pl file and not translatable. I moved it to the template and changed the wording slightly. Note: The error message 'The bookseller has no email' comes from Letters.pm. I didn't change that, because I was not sure where it is used. The error message as is can not be translated and should be moved into the templates too. --- C4/Letters.pm | 4 ++-- acqui/lateorders.pl | 2 +- .../prog/en/modules/acqui/lateorders.tt | 11 +++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 5cde41d..5e3089b 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -393,7 +393,7 @@ sub SendAlerts { 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail) or carp $Mail::Sendmail::error; - warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; + warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}" if $debug; if ( C4::Context->preference("LetterLog") ) { logaction( "ACQUISITION", "Send Acquisition claim letter", "", "order list : " . join( ",", @$externalid ) . "\n$innerletter->{title}\n$innerletter->{content}" ) if $type eq 'claimacquisition'; logaction( "ACQUISITION", "CLAIM ISSUE", undef, "To=" . $mail{To} . " Title=" . $innerletter->{title} . " Content=" . $innerletter->{content} ) if $type eq 'claimissues'; @@ -402,7 +402,7 @@ sub SendAlerts { die "This bookseller has no email\n"; } - warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}"; + warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}" if $debug; } # send an "account details" notice to a newly created user diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 2482ffb..998899e 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -85,7 +85,7 @@ if ($op and $op eq "send_alert"){ if ( $@ ) { $template->param(error_claim => $@); } else { - $template->param(info_claim => "Emails have been sent"); + $template->{VARS}->{'info_claim'} = 1; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 8227722..5ce1fae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -1,6 +1,7 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Late orders [% INCLUDE 'doc-head-close.inc' %] + @@ -35,7 +38,7 @@ $(document).ready(function() {
          [% error_claim %]
          [% END %] [% IF info_claim %] -
          [% info_claim %]
          +
          Email has been sent.
          [% END %] [% IF ( lateorders ) %]
          @@ -50,7 +53,7 @@ $(document).ready(function() {

          [% END %] - +
          @@ -61,7 +64,7 @@ $(document).ready(function() { [% IF Supplier %] - + [% ELSE %] [% END %] @@ -103,7 +106,7 @@ $(document).ready(function() { -- 1.7.5.4 From Katrin.Fischer.83 at web.de Fri Dec 30 09:18:43 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 30 Dec 2011 09:18:43 +0100 Subject: [Koha-patches] [PATCH] Bug 929: Follow up - showing fund code instead of internal number Message-ID: <1325233123-4486-1-git-send-email-Katrin.Fischer.83@web.de> --- acqui/ordered.pl | 4 ++-- acqui/spent.pl | 4 ++-- .../prog/en/modules/acqui/acqui-home.tt | 8 ++++---- .../intranet-tmpl/prog/en/modules/acqui/ordered.tt | 8 ++++---- .../intranet-tmpl/prog/en/modules/acqui/spent.tt | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/acqui/ordered.pl b/acqui/ordered.pl index b681afb..f38264f 100755 --- a/acqui/ordered.pl +++ b/acqui/ordered.pl @@ -38,8 +38,7 @@ use C4::Dates; my $dbh = C4::Context->dbh; my $input = new CGI; my $fund_id = $input->param('fund'); -my $start = $input->param('start'); -my $end = $input->param('end'); +my $fund_code = $input->param('fund_code'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -103,6 +102,7 @@ $total = sprintf( "%.2f", $total ); $template->{VARS}->{'fund'} = $fund_id; $template->{VARS}->{'ordered'} = \@ordered; $template->{VARS}->{'total'} = $total; +$template->{VARS}->{'fund_code'} = $fund_code; $sth->finish; diff --git a/acqui/spent.pl b/acqui/spent.pl index a50b7ae..12260c0 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -40,8 +40,7 @@ use CGI; my $dbh = C4::Context->dbh; my $input = new CGI; my $bookfund = $input->param('fund'); -my $start = $input->param('start'); -my $end = $input->param('end'); +my $fund_code = $input->param('fund_code'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -107,6 +106,7 @@ $total = sprintf( "%.2f", $total ); $template->{VARS}->{'fund'} = $bookfund; $template->{VARS}->{'spent'} = \@spent; $template->{VARS}->{'total'} = $total; +$template->{VARS}->{'fund_code'} = $fund_code; $sth->finish; output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index 09ec874..03cdc2d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -122,8 +122,8 @@ $(document).ready(function() { - - + + [% ELSE %] @@ -136,8 +136,8 @@ $(document).ready(function() { - - + + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt index 018d807..93540c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -7,7 +7,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
          @@ -15,8 +15,8 @@
          -

          Bookfunds

          -

          Ordered - [% fund %]

          +

          Fund: [% fund_code %]

          +

          Ordered

          Order Date VendorClaimed date Check all
          Uncheck all
          [% lateorder.claimed_date %] [% UNLESS lateorder.budget_lock %] - + [% END %] [% loop_budge.budget_owner %] [% loop_budge.budget_branchname %] [% loop_budge.budget_amount %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %] [% loop_budge.budget_avail %]
          [% loop_budge.budget_owner %] [% loop_budge.budget_branchname %] [% loop_budge.budget_amount %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %] [% loop_budge.budget_avail %]
          @@ -56,7 +56,7 @@ - - -
          [% order.ecost %] + [% order.entrydate | $KohaDates %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt index 49bcedb..c6825c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -7,7 +7,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] - +
          @@ -15,7 +15,7 @@
          -

          Bookfund [% fund %]

          +

          Fund: [% fund_code %]

          Spent

          @@ -67,10 +67,10 @@
          [% order.freight %] + [% order.entrydate | $KohaDates %] + [% order.datereceived | $KohaDates %] -- 1.7.5.4 From tomascohen at gmail.com Fri Dec 30 13:21:47 2011 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Fri, 30 Dec 2011 09:21:47 -0300 Subject: [Koha-patches] [PATCH] Bug 6193 - Follow up: use SetEnv and remove memcached from koha-conf.xml Message-ID: <1325247707-31991-1-git-send-email-tomascohen@gmail.com> --- C4/Auth.pm | 17 ++++------------- C4/Biblio.pm | 11 ++++------- C4/Context.pm | 25 +++++++++++++++++++++++++ C4/Languages.pm | 14 ++++---------- etc/koha-conf.xml | 2 -- 5 files changed, 37 insertions(+), 32 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e360e10..7cc3be1 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -35,7 +35,7 @@ use POSIX qw/strftime/; use List::MoreUtils qw/ any /; # use utf8; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout $servers $memcached); +use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout); BEGIN { sub psgi_env { any { /^psgi\./ } keys %ENV } @@ -61,16 +61,7 @@ BEGIN { if ($cas) { import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url); } - $servers = C4::Context->config('memcached_servers'); - if ($servers) { - require Cache::Memcached; - $memcached = Cache::Memcached->new({ - servers => [ $servers ], - debug => 0, - compress_threshold => 10_000, - namespace => C4::Context->config('memcached_namespace') || 'koha', - }); - } + } =head1 NAME @@ -1422,8 +1413,8 @@ sub get_session { elsif ($storage_method eq 'Pg') { $session = new CGI::Session("driver:PostgreSQL;serializer:yaml;id:md5", $sessionID, {Handle=>$dbh}); } - elsif ($storage_method eq 'memcached' && $servers){ - $session = new CGI::Session("driver:memcached;serializer:yaml;id:md5", $sessionID, { Memcached => $memcached } ); + elsif ($storage_method eq 'memcached' && C4::Context->ismemcached){ + $session = new CGI::Session("driver:memcached;serializer:yaml;id:md5", $sessionID, { Memcached => C4::Context->memcached } ); } else { # catch all defaults to tmp should work on all systems diff --git a/C4/Biblio.pm b/C4/Biblio.pm index ac78ae3..74a7483 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -137,16 +137,13 @@ BEGIN { } eval { - my $servers = C4::Context->config('memcached_servers'); - if ($servers) { + if (C4::Context->ismemcached) { require Memoize::Memcached; import Memoize::Memcached qw(memoize_memcached); - my $memcached = { - servers => [$servers], - key_prefix => C4::Context->config('memcached_namespace') || 'koha', - }; - memoize_memcached( 'GetMarcStructure', memcached => $memcached, expire_time => 600 ); #cache for 10 minutes + memoize_memcached( 'GetMarcStructure', + memcached => C4::Context->memcached, + expire_time => 600 ); #cache for 10 minutes } }; diff --git a/C4/Context.pm b/C4/Context.pm index c2ed85c..d6c2e9a 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -253,6 +253,31 @@ sub read_config_file { # Pass argument naming config file to read return $koha; # Return value: ref-to-hash holding the configuration } +=head2 ismemcached + +Returns the value of the $ismemcached variable (0/1) + +=cut + +sub ismemcached { + return $ismemcached; +} + +=head2 memcached + +If $ismemcached is true, returns the $memcache variable. +Returns undef otherwise + +=cut + +sub memcached { + if ($ismemcached) { + return $memcached; + } else { + return undef; + } +} + # db_scheme2dbi # Translates the full text name of a database into de appropiate dbi name # diff --git a/C4/Languages.pm b/C4/Languages.pm index 091d3bb..0cc288e 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -26,19 +26,13 @@ use C4::Context; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); eval { - my $servers = C4::Context->config('memcached_servers'); - if ($servers) { + if (C4::Context->ismemcached) { require Memoize::Memcached; import Memoize::Memcached qw(memoize_memcached); - my $memcached = { - servers => [ $servers ], - key_prefix => C4::Context->config('memcached_namespace') || 'koha', - }; - - memoize_memcached('getTranslatedLanguages', memcached => $memcached, expire_time => 600); #cache for 10 minutes - memoize_memcached('getFrameworkLanguages' , memcached => $memcached, expire_time => 600); - memoize_memcached('getAllLanguages', memcached => $memcached, expire_time => 600); + memoize_memcached('getTranslatedLanguages', memcached => C4::Context->memcached, expire_time => 600); #cache for 10 minutes + memoize_memcached('getFrameworkLanguages' , memcached => C4::Context->memcached, expire_time => 600); + memoize_memcached('getAllLanguages', memcached => C4::Context->memcached, expire_time => 600); } }; diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index 686a15b..f5e2c0f 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -275,7 +275,5 @@ __PAZPAR2_TOGGLE_XML_POST__ http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2 __MISC_DIR__/koha-install-log 0 - __MEMCACHED_SERVERS__ - __MEMCACHED_NAMESPACE__ -- 1.7.5.4