--- /dev/null
+# This file maintains name/email mappings for git-shortlog use
+# For more information on the use of this file see '$ git shortlog -h'
+# Name to mail mapping: the name in the right column will be mapped to the email addy in the left
+
+James Mason <mason@kohaaloha.com>
+Henri-Damien Laurent <henridamien.laurent@biblibre.com>
+Alex Arnaud <alex.arnaud@biblibre.com>
+Chris Cormack <chrisc@catalyst.net.nz>
+Chris Nighswonger <cnighswonger@foundations.edu>
+Colin Campbell <colin.campbell@ptfs-europe.com>
+D Ruth Bavousett <ruth@bywatersolutions.com>
+Frédéric Demians <f.demians@tamil.fr>
+Frédérick Capovilla <frederick.capovilla@libeo.com>
+Galen Charlton <gmc@esilibrary.com>
+Greg Barniskis <gbarniskis@gmail.com>
+Ian Walls <ian.walls@bywatersolutions.com>
+Janusz Kaczmarek <januszop@gmail.com>
+Jared Camins-Esakov <jcamins@cpbibliography.com>
+Jonathan Druart <jonathan.druart@biblibre.com>
+Joy Nelson <joy@bywatersolutions.com>
+Juan Sieira <juan.sieira@xercode.es>
+Katrin Fischer <katrin.fischer@bsz-bw.de>
+Larry Baerveldt <larry@bywatersolutions.com>
+Liz Rea <lrea@nekls.org>
+MJ Ray <mjr@phonecoop.coop>
+Magnus Enger <magnus@enger.priv.no>
+Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
+Marcel de Rooy <marcel@libdevelop.rijksmuseum.nl>
+Mason James <mtj@kohaaloha.com>
+Matthias Meusburger <matthias.meusburger@biblibre.com>
+Maxime Pelletier <maxime.pelletier@libeo.com>
+Meenakshi R <meenakshi.r@osslabs.biz>
+Nicole Engard <nengard@bywatersolutions.com>
+Owen Leonard <oleonard@myacpl.org>
+Paul Poulain <paul.poulain@biblibre.com>
+Robin Sheat <robin@catalyst.net.nz>
+Srdjan Jankovic <srdjan@catalyst.net.nz>
+
+# Name to name mapping: the name in the right column will be mapped to the name in the left
+
+Chris Nighswonger Chris R. Nighswonger
+Jared Camins-Esakov Jared CAMINS-ESAKOV
+
+# Mail to mail mapping: the email addy in the right column will be mapped to the email addy in the left
+
+<cnighswonger@foundations.edu> <chris.nighswonger@gmail.com>
+<frederick.capovilla@libeo.com> <fredericiapovilla@sys-tech.net>
+<katrin.fischer@bsz-bw.de> <Katrin.Fischer.83@web.de>
+<jcamins@cpbibliography.com> <jcamins@bywatersolutions.com>
+<jcamins@cpbibliography.com> <camins@numismatics.org>
+<jcamins@cpbibliography.com> <koha@cpbibliography.com>
&GetOrderNumber &GetLateOrders &GetOrderFromItemnumber
&SearchOrder &GetHistory &GetRecentAcqui
&ModReceiveOrder &ModOrderBiblioitemNumber
+ &GetCancelledOrders
&NewOrderItem &ModOrderItem
&GetContracts &GetContract
&GetItemnumbersFromOrder
+
+ &AddClaim
);
}
=cut
sub NewOrderItem {
- #my ($biblioitemnumber,$ordernumber, $biblionumber) = @_;
my ($itemnumber, $ordernumber) = @_;
my $dbh = C4::Context->dbh;
my $query = qq|
$sth->execute( $biblioitemnumber, $ordernumber, $biblionumber );
}
+=head3 GetCancelledOrders
+
+ my @orders = GetCancelledOrders($basketno, $orderby);
+
+Returns cancelled orders for a basket
+
+=cut
+
+sub GetCancelledOrders {
+ my ( $basketno, $orderby ) = @_;
+
+ return () unless $basketno;
+
+ my $dbh = C4::Context->dbh;
+ my $query = "
+ SELECT biblio.*, biblioitems.*, aqorders.*, aqbudgets.*
+ FROM aqorders
+ LEFT JOIN aqbudgets ON aqbudgets.budget_id = aqorders.budget_id
+ LEFT JOIN biblio ON biblio.biblionumber = aqorders.biblionumber
+ LEFT JOIN biblioitems ON biblioitems.biblionumber = biblio.biblionumber
+ WHERE basketno = ?
+ AND (datecancellationprinted IS NOT NULL
+ AND datecancellationprinted <> '0000-00-00')
+ ";
+
+ $orderby = "aqorders.datecancellationprinted desc, aqorders.timestamp desc"
+ unless $orderby;
+ $query .= " ORDER BY $orderby";
+ my $sth = $dbh->prepare($query);
+ $sth->execute($basketno);
+ my $results = $sth->fetchall_arrayref( {} );
+
+ return @$results;
+}
+
+
#------------------------------------------------------------#
=head3 ModReceiveOrder
)
= @_;
my $dbh = C4::Context->dbh;
-# warn "DATE BEFORE : $daterecieved";
-# $daterecieved=POSIX::strftime("%Y-%m-%d",CORE::localtime) unless $daterecieved;
-# warn "DATE REC : $daterecieved";
$datereceived = C4::Dates->output('iso') unless $datereceived;
my $suggestionid = GetSuggestionFromBiblionumber( $dbh, $biblionumber );
if ($suggestionid) {
ModSuggestion( {suggestionid=>$suggestionid,
- STATUS=>'AVAILABLE',
- biblionumber=> $biblionumber}
- );
+ STATUS=>'AVAILABLE',
+ biblionumber=> $biblionumber}
+ );
}
my $sth=$dbh->prepare("
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,
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;
$line->{count} = $cnt++;
$line->{toggle} = 1 if $cnt % 2;
push @order_loop, $line;
- $line->{creationdate} = format_date( $line->{creationdate} );
- $line->{datereceived} = format_date( $line->{datereceived} );
$total_qty += $line->{'quantity'};
$total_qtyreceived += $line->{'quantityreceived'};
$total_price += $line->{'quantity'} * $line->{'ecost'};
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__
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'),
+ OPACLocalCoverImages => C4::Context->preference('OPACLocalCoverImages'),
+ AllowMultipleCovers => C4::Context->preference('AllowMultipleCovers'),
);
}
else {
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"));
}
- $template->param(listloop=>[{shelfname=>"Freelist", shelfnumber=>110}]);
return ( $template, $borrowernumber, $cookie, $flags);
}
$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');
$session->flush;
$session->delete();
C4::Context->_unset_userenv($sessionID);
- _session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime));
+ #_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime));
$sessionID = undef;
$userid = undef;
$info{'timed_out'} = 1;
$session->delete();
C4::Context->_unset_userenv($sessionID);
- _session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime));
+ #_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime));
$userid = undef;
$sessionID = undef;
}
$info{'different_ip'} = 1;
$session->delete();
C4::Context->_unset_userenv($sessionID);
- _session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'});
+ #_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'});
$sessionID = undef;
$userid = undef;
}
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')) {
$userid = $retuserid if ($retuserid ne '');
}
if ($return) {
- _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime));
+ #_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime));
if ( $flags = haspermission( $userid, $flagsrequired ) ) {
$loggedin = 1;
}
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) {
}
my $date=POSIX::strftime("%y%m%d",localtime);
if (!$record->field('008')) {
- $record->insert_fields_ordered(
- MARC::Field->new('008',$date."|||a|||||| | ||| d")
- );
+ # Get a valid default value for field 008
+ my $default_008 = C4::Context->preference('MARCAuthorityControlField008');
+ if(!$default_008 or length($default_008)<34) {
+ $default_008 = '|| aca||aabn | a|a d';
+ }
+ else {
+ $default_008 = substr($default_008,0,34);
+ }
+
+ $record->insert_fields_ordered( MARC::Field->new('008',$date.$default_008) );
}
if (!$record->field('040')) {
$record->insert_fields_ordered(
SetUTF8Flag($record);
my $dbh = C4::Context->dbh;
- $frameworkcode = "" unless $frameworkcode;
+ $frameworkcode = "" if !$frameworkcode || $frameworkcode eq "Default"; # XXX
_strip_item_fields($record, $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;
+ }
+ return (0, undef);
}
=head2 GetMarcBiblio
$separator = C4::Context->preference('authoritysep');
}
push @subfields_loop,
- { code => $subfieldcode,
+ { tag => $field->tag(),
+ code => $subfieldcode,
value => $value,
link_loop => \@this_link_loop,
separator => $separator
This function builds partial MARC::Record from a hash
Hash entries can be from biblio or biblioitems.
-This function is called in acquisition module, to create a basic catalogue entry from user entry
+This function is called in acquisition module, to create a basic catalogue
+entry from user entry
=cut
+
sub TransformKohaToMarc {
- my ($hash) = @_;
- my $sth = C4::Context->dbh->prepare( "SELECT tagfield,tagsubfield FROM marc_subfield_structure WHERE frameworkcode=? AND kohafield=?" );
+ my $hash = shift;
my $record = MARC::Record->new();
SetMarcUnicodeFlag( $record, C4::Context->preference("marcflavour") );
- foreach ( keys %{$hash} ) {
- &TransformKohaToMarcOneField( $sth, $record, $_, $hash->{$_}, '' );
+ my $db_to_marc = C4::Context->marcfromkohafield;
+ while ( my ($name, $value) = each %$hash ) {
+ next unless my $dtm = $db_to_marc->{''}->{$name};
+ my ($tag, $letter) = @$dtm;
+ foreach my $value ( split(/\s?\|\s?/, $value, -1) ) {
+ if ( my $field = $record->field($tag) ) {
+ $field->add_subfields( $letter => $value );
+ }
+ else {
+ $record->insert_fields_ordered( MARC::Field->new(
+ $tag, " ", " ", $letter => $value ) );
+ }
+ }
+
}
return $record;
}
return $hostmarcfield;
}
-
-=head2 TransformKohaToMarcOneField
-
- $record = TransformKohaToMarcOneField( $sth, $record, $kohafieldname, $value, $frameworkcode );
-
-=cut
-
-sub TransformKohaToMarcOneField {
- my ( $sth, $record, $kohafieldname, $value, $frameworkcode ) = @_;
- $frameworkcode = '' unless $frameworkcode;
- my $tagfield;
- my $tagsubfield;
-
- if ( !defined $sth ) {
- my $dbh = C4::Context->dbh;
- $sth = $dbh->prepare( "SELECT tagfield,tagsubfield FROM marc_subfield_structure WHERE frameworkcode=? AND kohafield=?" );
- }
- $sth->execute( $frameworkcode, $kohafieldname );
- if ( ( $tagfield, $tagsubfield ) = $sth->fetchrow ) {
- my @values = split(/\s?\|\s?/, $value, -1);
-
- foreach my $itemvalue (@values){
- my $tag = $record->field($tagfield);
- if ($tag) {
- $tag->add_subfields( $tagsubfield => $itemvalue );
- $record->delete_field($tag);
- $record->insert_fields_ordered($tag);
- }
- else {
- $record->add_fields( $tagfield, " ", " ", $tagsubfield => $itemvalue );
- }
- }
- }
- return $record;
-}
-
=head2 TransformHtmlToXml
$xml = TransformHtmlToXml( $tags, $subfields, $values, $indicator,
# 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 ) {
+
+ # 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
+ );
- if ( $biblio_tag != $biblioitem_tag ) {
+ # 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
$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);
}
}
Day_of_Week
Add_Delta_Days
check_date
+ Delta_Days
);
use POSIX qw(strftime);
use C4::Branch; # GetBranches
# find reserves.....
# That'll save a database query.
- my ( $resfound, $resrec ) =
+ my ( $resfound, $resrec, undef ) =
CheckReserves( $itemnumber );
if ( $resfound and not $ignoreRs ) {
$resrec->{'ResFound'} = $resfound;
=head2 CanBookBeIssued
( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $borrower,
- $barcode, $duedatespec, $inprocess );
+ $barcode, $duedatespec, $inprocess, $ignore_reserves );
Check if a book can be issued.
=item C<$duedatespec> is a C4::Dates object.
-=item C<$inprocess>
+=item C<$inprocess> boolean switch
+=item C<$ignore_reserves> boolean switch
=back
=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 ));
$needsconfirmation{issued_borrowernumber} = $currborinfo->{'borrowernumber'};
}
- # See if the item is on reserve.
- my ( $restype, $res ) = 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
);
}
- # See if the item is on reserve.
- my ( $restype, $res ) =
- C4::Reserves::CheckReserves( $item->{'itemnumber'} );
- if ($restype) {
- my $resbor = $res->{'borrowernumber'};
- if ( $resbor eq $borrower->{'borrowernumber'} ) {
- # The item is reserved by the current patron
- ModReserveFill($res);
- }
- elsif ( $restype eq "Waiting" ) {
- # warn "Waiting";
- # The item is on reserve and waiting, but has been
- # reserved by some other patron.
- }
- elsif ( $restype eq "Reserved" ) {
- # warn "Reserved";
- # The item is reserved by someone else.
- if ($cancelreserve) { # cancel reserves on this item
- CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
- }
- }
- if ($cancelreserve) {
- CancelReserve($res->{'biblionumber'}, 0, $res->{'borrowernumber'});
- }
- else {
- # set waiting reserve to first in reserve queue as book isn't waiting now
- ModReserve(1,
- $res->{'biblionumber'},
- $res->{'borrowernumber'},
- $res->{'branchcode'}
- );
- }
- }
+ MoveReserve( $item->{'itemnumber'}, $borrower->{'borrowernumber'}, $cancelreserve );
# Starting process for transfer job (checking transfert and validate it if we have one)
my ($datesent) = GetTransfers($item->{'itemnumber'});
CartToShelf( $item->{'itemnumber'} );
}
$item->{'issues'}++;
+
+ ## If item was lost, it has now been found, reverse any list item charges if neccessary.
+ if ( $item->{'itemlost'} ) {
+ _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
+ }
+
ModItem({ issues => $item->{'issues'},
holdingbranch => C4::Context->userenv->{'branch'},
itemlost => 0,
# 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'} );
+ my ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
if ($resfound) {
$resrec->{'ResFound'} = $resfound;
$messages->{'ResFound'} = $resrec;
my $item_id = @_ ? shift : $itemnumber; # Send the barcode if you want that logged in the description
my $dbh = C4::Context->dbh;
# check for charge made for lost book
- my $sth = $dbh->prepare("SELECT * FROM accountlines WHERE (itemnumber = ?) AND (accounttype='L' OR accounttype='Rep') ORDER BY date DESC");
+ my $sth = $dbh->prepare("SELECT * FROM accountlines WHERE itemnumber = ? AND accounttype IN ('L', 'Rep', 'W') ORDER BY date DESC, accountno DESC");
$sth->execute($itemnumber);
my $data = $sth->fetchrow_hashref;
$data or return; # bail if there is nothing to do
+ $data->{accounttype} eq 'W' and return; # Written off
# writeoff this amount
my $offset;
$error="too_many";
}
- my ( $resfound, $resrec ) = C4::Reserves::CheckReserves($itemnumber);
+ my ( $resfound, $resrec, undef ) = C4::Reserves::CheckReserves($itemnumber);
if ($resfound) {
$renewokay = 0;
$error="on_reserve"
=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{
use strict;
use warnings;
-use vars qw($VERSION $AUTOLOAD $context @context_stack);
+use vars qw($VERSION $AUTOLOAD $context @context_stack $servers $memcached $ismemcached);
BEGIN {
if ($ENV{'HTTP_USER_AGENT'}) {
$main::SIG{__DIE__} = \&CGI::Carp::confess;
}
} # else there is no browser to send fatals to!
+
+ # Check if there are memcached servers set
+ $servers = $ENV{'MEMCACHED_SERVERS'};
+ if ($servers) {
+ # Load required libraries and create the memcached object
+ require Cache::Memcached;
+ $memcached = Cache::Memcached->new({
+ servers => [ $servers ],
+ debug => 0,
+ compress_threshold => 10_000,
+ namespace => $ENV{'MEMCACHED_NAMESPACE'} || 'koha'
+ });
+ # Verify memcached available (set a variable and test the output)
+ $ismemcached = $memcached->set('ismemcached','1');
+ }
+
$VERSION = '3.00.00.036';
}
sub read_config_file { # Pass argument naming config file to read
my $koha = XMLin(shift, keyattr => ['id'], forcearray => ['listen', 'server', 'serverinfo'], suppressempty => '');
+
+ if ($ismemcached) {
+ $memcached->set('kohaconf',$koha);
+ }
+
return $koha; # Return value: ref-to-hash holding the configuration
}
file, which defaults to either the file given by the C<$KOHA_CONF>
environment variable, or F</etc/koha/koha-conf.xml>.
+It saves the koha-conf.xml values in the declared memcached server(s)
+if currently available and uses those values until them expire and
+re-reads them.
+
C<&new> does not set this context as the new default context; for
that, use C<&set_context>.
return undef;
}
}
- # Load the desired config file.
- $self = read_config_file($conf_fname);
- $self->{"config_file"} = $conf_fname;
+ if ($ismemcached) {
+ # retreive from memcached
+ $self = $memcached->get('kohaconf');
+ if (not defined $self) {
+ # not in memcached yet
+ $self = read_config_file($conf_fname);
+ }
+ } else {
+ # non-memcached env, read from file
+ $self = read_config_file($conf_fname);
+ }
+
+ $self->{"config_file"} = $conf_fname;
warn "read_config_file($conf_fname) returned undef" if !defined($self->{"config"});
return undef if !defined($self->{"config"});
sub set_preference {
my $self = shift;
- my $var = shift;
+ my $var = lc(shift);
my $value = shift;
my $dbh = C4::Context->dbh or return 0;
ON DUPLICATE KEY UPDATE value = VALUES(value)
" );
- $sth->execute( $var, $value );
+ if($sth->execute( $var, $value )) {
+ $sysprefs{$var} = $value;
+ }
$sth->finish;
}
return $prefformat;
}
+sub reset_prefformat { # subroutine to clear the prefformat, called when we change it
+ if (defined $prefformat){
+ $prefformat = C4::Context->preference('dateformat');
+ }
+}
+
our %format_map = (
iso => 'yyyy-mm-dd', # plus " HH:MM:SS"
metric => 'dd/mm/yyyy', # plus " HH:MM:SS"
$self->{'dateformat'} = $dformat = ( scalar(@_) >= 2 ) ? $_[1] : _prefformat();
( $format_map{$dformat} ) or croak "Invalid date format '$dformat' from " . ( ( scalar(@_) >= 2 ) ? 'argument' : 'system preferences' );
$self->{'dmy_arrayref'} = [ ( (@_) ? $self->dmy_map(shift) : localtime ) ];
- if ($debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; }
+ if ($debug && $debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; }
return $self;
}
package C4::ILSDI::Utility;
# Copyright 2009 SARL Biblibre
+# Copyright 2011 software.coop and MJ Ray
#
# This file is part of Koha.
#
use C4::Items;
use C4::Circulation;
use C4::Biblio;
-use C4::Reserves qw(GetReservesFromBorrowernumber);
+use C4::Reserves qw(GetReservesFromBorrowernumber CanBookBeReserved);
use C4::Context;
use C4::Branch qw/GetBranchName/;
use Digest::MD5 qw(md5_base64);
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
- &BorrowerExists &CanBookBeReserved &Availability
+ &BorrowerExists &Availability
);
}
return $sth->fetchrow;
}
-=head2 CanBookBeReserved
-
-Checks if a book (at bibliographic level) can be reserved by a borrower.
-
- if ( CanBookBeReserved($borrower, $biblionumber) ) {
- # Do stuff
- }
-
-=cut
-
-sub CanBookBeReserved {
- my ( $borrower, $biblionumber ) = @_;
-
- my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves");
- my $MAXOUTSTANDING = C4::Context->preference("maxoutstanding");
-
- my $out = 1;
-
- if ( $borrower->{'amountoutstanding'} > $MAXOUTSTANDING ) {
- $out = undef;
- }
- if ( $borrower->{gonenoaddress} eq 1 ) {
- $out = undef;
- }
- if ( $borrower->{lost} eq 1 ) {
- $out = undef;
- }
- if ( $borrower->{debarred} ) {
- $out = undef;
- }
- my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} );
- if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) {
- $out = undef;
- }
- foreach my $res (@reserves) {
- if ( $res->{'biblionumber'} == $biblionumber ) {
- $out = undef;
- }
- }
- my $issues = GetPendingIssues( $borrower->{'borrowernumber'} );
- foreach my $issue (@$issues) {
- if ( $issue->{'biblionumber'} == $biblionumber ) {
- $out = undef;
- }
- }
-
- return $out;
-}
-
=head2 Availability
Returns, for an itemnumber, an array containing availability information.
--- /dev/null
+package C4::Images;
+
+# Copyright (C) 2011 C & P Bibliography Services
+# Jared Camins-Esakov <jcamins@cpbibliograpy.com>
+#
+# 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 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;
+ if ( $sth->err ) {
+ warn "Database error!";
+ return undef;
+ }
+ else {
+ return $imagedata;
+ }
+}
+
+=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);
+ warn "Database error!" if $sth->errstr;
+ if ( !$sth->errstr && $sth->rows > 0 ) {
+ while ( my $row = $sth->fetchrow_hashref ) {
+ push @imagenumbers, $row->{'imagenumber'};
+ }
+ return @imagenumbers;
+ }
+ else {
+ return undef;
+ }
+}
+
+=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;
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;
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;
'required' => '0',
'min_ver' => '1.03',
},
+ 'Modern::Perl' => {
+ 'usage' => 'Core',
+ 'required' => '1',
+ 'min_ver' => '1.03',
+ },
};
1;
=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.
$serial = 1;
}
if ( $datedue eq '' ) {
- my ( $restype, $reserves ) =
+ my ( $restype, $reserves, undef ) =
C4::Reserves::CheckReserves( $data->{'itemnumber'} );
# Previous conditional check with if ($restype) is not needed because a true
# result for one item will result in subsequent items defaulting to this true
my @resultitems;
my $yaml = C4::Context->preference('OpacHiddenItems');
+ $yaml = "$yaml\n\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
if ($onloan){
$error = "book_on_loan"
}
- elsif ( C4::Context->userenv->{flags} & 1 and
+ elsif ( !(C4::Context->userenv->{flags} & 1) and
C4::Context->preference("IndependantBranches") and
(C4::Context->userenv->{branch} ne
$item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) )
my @imagesets = (); # list of hasrefs of image set data to pass to template
my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
-warn $paths->{'staff'}{'filesystem'};
foreach my $imagesubdir ( @subdirectories ) {
- warn $imagesubdir;
+ warn $imagesubdir if $DEBUG;
my @imagelist = (); # hashrefs of image info
my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
my $imagesetactive = 0;
sub _BAR {
my $self = shift;
- my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($llx)
+ my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($llx)
my $barcode_lly = $self->{'lly'} + $self->{'top_text_margin'}; # this places the bottom left of the barcode the top text margin distance above the bottom of the label ($lly)
my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width
my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height
sub _BIBBAR {
my $self = shift;
- my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($self->{'llx'})
+ my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($self->{'llx'})
my $barcode_lly = $self->{'lly'} + $self->{'top_text_margin'}; # this places the bottom left of the barcode the top text margin distance above the bottom of the label ($lly)
my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width
my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height
sub _BARBIB {
my $self = shift;
- my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($self->{'llx'})
+ my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($self->{'llx'})
my $barcode_lly = ($self->{'lly'} + $self->{'height'}) - $self->{'top_text_margin'}; # this places the bottom left of the barcode the top text margin distance below the top of the label ($self->{'lly'})
my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width
my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height
use MIME::Lite;
use Mail::Sendmail;
-use Encode;
-use Carp;
use C4::Members;
use C4::Branch;
sub SendAlerts {
my ( $type, $externalid, $letter ) = @_;
my $dbh = C4::Context->dbh;
+ my $strsth;
if ( $type eq 'issue' ) {
# warn "sending issues...";
);
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/<<LibrarianFirstname>>/$userenv->{firstname}/g;
- $letter->{content} =~ s/<<LibrarianSurname>>/$userenv->{surname}/g;
- $letter->{content} =~
- s/<<LibrarianEmailaddress>>/$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;
# parsing librarian name
$letter->{content} =~ s/<<LibrarianFirstname>>/$userenv->{firstname}/g;
$letter->{content} =~ s/<<LibrarianSurname>>/$userenv->{surname}/g;
- $letter->{content} =~
- s/<<LibrarianEmailaddress>>/$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/<<LibrarianEmailaddress>>/$userenv->{emailaddress}/g;
+
+ # Get Fields remplacement
+ my $order_format = $1 if ( $letter->{content} =~ m/(<order>.*<\/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 ( $order_format ) {
+ # For each order
+ foreach my $infos ( @orders_infos ) {
+ my $order_content = $order_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}?order>//g;
+ $letter->{content} =~ s/<order>.*<\/order>/$order_content\n$order_format/xms;
}
+ $letter->{content} =~ s/<order>.*<\/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 => Encode::encode( "utf8", "" . $innerletter->{title} ),
+ Message => Encode::encode( "utf8", "" . $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 $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';
+ }
+ } else {
+ return {error => "no_email" };
}
- }
- # send an "account details" notice to a newly created user
+
+ warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}" if $debug;
+ }
+
+ # 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/<<borrowers.password>>/$externalid->{'password'}/g;
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' } );
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;
my $dbh = C4::Context->dbh;
my $borrower = GetMember('borrowernumber'=>$borrowerid);
unless ($date){
- $date=POSIX::strftime("%Y-%m-%d",localtime());
+ $date = (C4::Context->preference('BorrowerRenewalPeriodBase') eq 'dateexpiry') ?
+ C4::Dates->new($borrower->{'dateexpiry'}, 'iso')->output("iso") :
+ C4::Dates->new()->output("iso");
$date = GetExpiryDate( $borrower->{'categorycode'}, $date );
}
my $sth = $dbh->do(<<EOF);
$options->{'Content-Style-Type' } = 'text/css';
$options->{'Content-Script-Type'} = 'text/javascript';
}
- # remove SUDOC specific NSB NSE
- $data =~ s/\x{C2}\x{98}|\x{C2}\x{9C}/ /g;
- $data =~ s/\x{C2}\x{88}|\x{C2}\x{89}/ /g;
-
+
# We can't encode here, that will double encode our templates, and xslt
# We need to fix the encoding as it comes out of the database, or when we pass the variables to templates
# to have spaces in them). Or perhaps if $queue eq "" and
# $env->{file} ne "", then that should mean "print to $env->{file}".
if ( $queue eq "" || $queue eq 'nulllp' ) {
- open( PRINTER, ">/tmp/kohaiss" );
+ return;
+ #open( PRINTER, ">/tmp/kohaiss" );
}
else {
}
sub printreserve {
+
+ # FIXME - make useful
+ return;
+
my ( $branchname, $bordata, $itemdata ) = @_;
my $printer = '';
(return) unless ( C4::Context->boolean_preference('printreserveslips') );
#'
sub printslip ($) {
+
+ #FIXME - make useful
+
my $borrowernumber = shift;
my $borrower = GetMemberDetails($borrowernumber);
my $issueslist = GetPendingIssues($borrowernumber);
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($_) for @privatefields;
+ $marc = $marc_record_obj->as_usmarc();
+ }
+ } else {
+ $error = "Feature not yet implemented\n";
+ }
return ($error,$marc);
}
# Getting the marcfields as an array
my @marcfieldsarray = split('\|', $marcfieldslist);
- # Separating the marcfields from the the user-supplied headers
+ # Separating the marcfields from the user-supplied headers
my @marcfields;
foreach (@marcfieldsarray) {
my @result = split('=', $_);
&ModReserveStatus
&ModReserveCancelAll
&ModReserveMinusPriority
+ &MoveReserve
&CheckReserves
&CanBookBeReserved
my ($itemnumber) = @_;
my $messages;
my $nextreservinfo;
- my ( $restype, $checkreserves ) = CheckReserves($itemnumber);
+ my ( undef, $checkreserves, undef ) = CheckReserves($itemnumber);
if ($checkreserves) {
my $iteminfo = GetItem($itemnumber);
if ( $iteminfo->{'holdingbranch'} ne $checkreserves->{'branchcode'} ) {
=head2 CheckReserves
- ($status, $reserve) = &CheckReserves($itemnumber);
- ($status, $reserve) = &CheckReserves(undef, $barcode);
+ ($status, $reserve, $all_reserves) = &CheckReserves($itemnumber);
+ ($status, $reserve, $all_reserves) = &CheckReserves(undef, $barcode);
Find a book in the reserves.
# note: we get the itemnumber because we might have started w/ just the barcode. Now we know for sure we have it.
my ( $biblio, $bibitem, $notforloan_per_itemtype, $notforloan_per_item, $itemnumber ) = $sth->fetchrow_array;
- return ( 0, 0 ) unless $itemnumber; # bail if we got nothing.
+ return ( '' ) unless $itemnumber; # bail if we got nothing.
# if item is not for loan it cannot be reserved either.....
# execpt where items.notforloan < 0 : This indicates the item is holdable.
- return ( 0, 0 ) if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype;
+ return ( '' ) if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype;
# Find this item in the reserves
my @reserves = _Findgroupreserve( $bibitem, $biblio, $itemnumber );
my $priority = 10000000;
foreach my $res (@reserves) {
if ( $res->{'itemnumber'} == $itemnumber && $res->{'priority'} == 0) {
- return ( "Waiting", $res ); # Found it
+ return ( "Waiting", $res, \@reserves ); # Found it
} else {
# See if this item is more important than what we've got so far
if ( $res->{'priority'} && $res->{'priority'} < $priority ) {
# We return the most important (i.e. next) reservation.
if ($highest) {
$highest->{'itemnumber'} = $item;
- return ( "Reserved", $highest );
- }
- else {
- return ( 0, 0 );
+ return ( "Reserved", $highest, \@reserves );
}
+
+ return ( '' );
}
=head2 CancelExpiredReserves
return $new_priority; # so the caller knows what priority they wind up receiving
}
+=head2 MoveReserve
+
+ MoveReserve( $itemnumber, $borrowernumber, $cancelreserve )
+
+Use when checking out an item to handle reserves
+If $cancelreserve boolean is set to true, it will remove existing reserve
+
+=cut
+
+sub MoveReserve {
+ my ( $itemnumber, $borrowernumber, $cancelreserve ) = @_;
+
+ my ( $restype, $res, $all_reserves ) = CheckReserves( $itemnumber );
+ return unless $res;
+
+ my $biblionumber = $res->{biblionumber};
+ my $biblioitemnumber = $res->{biblioitemnumber};
+
+ if ($res->{borrowernumber} == $borrowernumber) {
+ ModReserveFill($res);
+ }
+ else {
+ # warn "Reserved";
+ # The item is reserved by someone else.
+ # Find this item in the reserves
+
+ my $borr_res;
+ foreach (@$all_reserves) {
+ $_->{'borrowernumber'} == $borrowernumber or next;
+ $_->{'biblionumber'} == $biblionumber or next;
+
+ $borr_res = $_;
+ last;
+ }
+
+ if ( $borr_res ) {
+ # The item is reserved by the current patron
+ ModReserveFill($borr_res);
+ }
+
+ if ($cancelreserve) { # cancel reserves on this item
+ CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
+ CancelReserve($res->{'biblionumber'}, 0, $res->{'borrowernumber'});
+ }
+ }
+}
+
=head2 MergeHolds
MergeHolds($dbh,$to_biblio, $from_biblio);
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(getreview savereview updatereview numberofreviews numberofreviewsbybiblionumber
- getreviews getallreviews approvereview deletereview);
+ getreviews getallreviews approvereview unapprovereview deletereview);
}
=head1 NAME
my $review=getreview($biblionumber,$borrowernumber);
savereview($biblionumber,$borrowernumber,$review);
updatereview($biblionumber,$borrowernumber,$review);
- my $count=numberofreviews($biblionumber);
+ my $count=numberofreviews($status);
+ my $count=numberofreviewsbybiblionumber($biblionumber);
my $reviews=getreviews($biblionumber);
my $reviews=getallreviews($status);
$sth->execute( 1, $reviewid );
}
+=head2 unapprovereview
+
+ unapprovereview($reviewid);
+
+Takes a reviewid and marks that review as not approved
+
+=cut
+
+sub unapprovereview {
+ my ($reviewid) = @_;
+ my $dbh = C4::Context->dbh();
+ my $query = "UPDATE reviews
+ SET approved=?
+ WHERE reviewid=?";
+ my $sth = $dbh->prepare($query);
+ $sth->execute( 0, $reviewid );
+}
+
=head2 deletereview
deletereview($reviewid);
);
}
$debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}";
- for (qw(EXPIRED CHARGES CREDITS GNA LOST DEBARRED NOTES)) {
+ for (qw(EXPIRED CHARGES CREDITS GNA LOST DBARRED NOTES)) {
($flags->{$_}) or next;
if ($_ ne 'NOTES' and $flags->{$_}->{message}) {
$ilspatron{screen_msg} .= " -- " . $flags->{$_}->{message}; # show all but internal NOTES
$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) {
+++ /dev/null
-<acsconfig xmlns="http://openncip.org/acs-config/1.0/">
-<!-- above address gets nothing, it's just a namespace -->
- <error-detect enabled="true" />
-
-<!--
- Set Net::Server::PreFork runtime parameters
- syslog_ident will identify SIP2 Koha server entries in syslog
- For OpenSolaris, add: syslog_logsock=stream
--->
- <server-params
- min_servers='1'
- min_spare_servers='0'
- log_file='Sys::Syslog'
- syslog_ident='koha_sip'
- syslog_facility='local6'
- />
-
- <listeners>
-<!-- vestigial HTTP, never implemented: just use the OPAC!
- <service
- port="0:8080/tcp"
- transport="http"
- protocol="NCIP/1.0" />
--->
- <service
- port="8023/tcp"
- transport="telnet"
- protocol="SIP/2.00"
- timeout="60" />
-
- <service
- port="127.0.0.1:6001/tcp"
- transport="RAW"
- protocol="SIP/2.00"
- timeout="60" />
- </listeners>
-
- <accounts>
- <login id="term1" password="term1" delimiter="|" error-detect="enabled" institution="CPL" />
- <login id="koha" password="koha" delimiter="|" error-detect="enabled" institution="kohalibrary" />
- <login id="koha2" password="koha" institution="kohalibrary2" />
- <login id="lpl-sc" password="1234" institution="LPL" />
- <login id="lpl-sc-beacock" password="xyzzy"
- delimiter="|" error-detect="enabled" institution="LPL" />
- </accounts>
-
-<!--
-Institution tags are for enabled branches. There needs to be one
-institution stanza for each institution named in the accounts above.
-The implementation attribute is actually used to find the code to run,
-in our case "ILS".
--->
-
-<institutions>
- <institution id="MAIN" implementation="ILS" parms="">
- <policy checkin="true" renewal="true" checkout="true"
- status_update="false" offline="false"
- timeout="100"
- retries="5" />
- </institution>
- <institution id="CPL" implementation="ILS" parms="">
- <policy checkin="true" renewal="true" checkout="true"
- status_update="false" offline="false"
- timeout="25"
- retries="5" />
- </institution>
- <institution id="kohalibrary" implementation="ILS" parms="">
- <policy checkin="true" renewal="false" checkout="true"
- status_update="false" offline="false"
- timeout="100"
- retries="5" />
- </institution>
- <institution id="kohalibrary2" implementation="ILS" parms="">
- <policy checkin="true" renewal="false" checkout="true"
- timeout="100"
- retries="3" />
- </institution>
- <institution id="LPL" implementation="ILS">
- <policy checkin="true" renewal="false" checkout="true"
- timeout="100"
- retries="5" />
- </institution>
-</institutions>
-</acsconfig>
+++ /dev/null
-#!/bin/bash
-#
-# A sample script for starting SIP.
-# You probably want to specify new log destinations.
-#
-# Takes 3 optional arguments:
-# ~ SIPconfig.xml file to use
-# ~ file for STDOUT, default ~/sip.out
-# ~ file for STDERR, default ~/sip.err
-#
-# The STDOUT and STDERR files are only for the SIPServer process itself.
-# Actual SIP communication and transaction logs are handled by Syslog.
-#
-# Examples:
-# sip_run.sh /path/to/SIPconfig.xml
-# sip_run.sh ~/my_sip/SIPconfig.xml sip_out.log sip_err.log
-
-
-for x in HOME PERL5LIB KOHA_CONF ; do
- echo $x=${!x}
- if [ -z ${!x} ] ; then
- echo ERROR: $x not defined;
- exit 1;
- fi;
-done;
-unset x;
-cd $PERL5LIB/C4/SIP;
-echo;
-echo Running from `pwd`;
-
-sipconfig=${1:-`pwd`/SIPconfig.xml};
-outfile=${2:-$HOME/sip.out};
-errfile=${3:-$HOME/sip.err};
-
-echo "Calling (backgrounded):";
-echo "perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile";
-perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile &
+++ /dev/null
-#!/bin/bash
-
-. $HOME/.bash_profile
-
-# this is brittle: the primary server must have the lowest PPID
-# this is brittle: ps behavior is very platform-specific, only tested on Debian Etch
-
-target="SIPServer";
-PROCPID=$(ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep | head -1 | awk '{print $1}');
-
-if [ ! $PROCPID ] ; then
- echo "No processes found for $target";
- exit;
-fi
-
-echo "SIP Processes for this user ($USER):";
-ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep ;
-echo "Killing process #$PROCPID";
-kill $PROCPID;
# If reading or writing fails, then the server's dead,
# so there's no point in continuing.
- if (!write_msg({seqno => $seqno}, $test->{msg}, $sock)) {
- BAIL_OUT("Write failure in $test->{id}");
- } elsif (!($resp = <$sock>)) {
- BAIL_OUT("Read failure in $test->{id}");
+ if ( !write_msg( { seqno => $seqno }, $test->{msg}, $sock ) ) {
+ BAIL_OUT("Write failure in $test->{id}");
+ }
+
+ my $rv = sysread( $sock, $resp, 10000000 ); # 10000000 is a big number
+
+ if ( !$rv ) {
+ BAIL_OUT("Read failure in $test->{id}");
}
chomp($resp);
require Exporter;
use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
+eval {
+ my $servers = C4::Context->config('memcached_servers');
+ if ($servers) {
+ require Memoize::Memcached;
+ import Memoize::Memcached qw(memoize_memcached);
+
+ my $memcached = {
+ servers => [$servers],
+ key_prefix => C4::Context->config('memcached_namespace') || 'koha',
+ };
+
+ memoize_memcached( '_get_columns', memcached => $memcached, expire_time => 600000 ); #cache for 10 minutes
+ memoize_memcached( 'GetPrimaryKeys', memcached => $memcached, expire_time => 600000 ); #cache for 10 minutes
+ }
+};
+
BEGIN {
# set the version for version checking
$VERSION = 0.5;
SearchInTable
UpdateInTable
GetPrimaryKeys
+ clear_columns_cache
);
%EXPORT_TAGS = ( all =>[qw( InsertInTable DeleteInTable SearchInTable UpdateInTable GetPrimaryKeys)]
);
}
+my $tablename;
+my $hashref;
+
=head1 NAME
C4::SQLHelper - Perl Module containing convenience functions for SQL Handling
return grep { $hash_columns->{$_}->{'Key'} =~/PRI/i} keys %$hash_columns;
}
+
+=head2 clear_columns_cache
+
+ C4::SQLHelper->clear_columns_cache();
+
+cleans the internal cache of sysprefs. Please call this method if
+you update a tables structure. Otherwise, your new changes
+will not be seen by this process.
+
+=cut
+
+sub clear_columns_cache {
+ %$hashref = ();
+}
+
+
+
=head2 _get_columns
_get_columns($tablename)
=cut
sub _get_columns($) {
- my ($tablename)=@_;
- my $dbh=C4::Context->dbh;
- my $sth=$dbh->prepare_cached(qq{SHOW COLUMNS FROM $tablename });
- $sth->execute;
- my $columns= $sth->fetchall_hashref(qw(Field));
+ my ($tablename) = @_;
+ unless ( exists( $hashref->{$tablename} ) ) {
+ my $dbh = C4::Context->dbh;
+ my $sth = $dbh->prepare_cached(qq{SHOW COLUMNS FROM $tablename });
+ $sth->execute;
+ my $columns = $sth->fetchall_hashref(qw(Field));
+ $hashref->{$tablename} = $columns;
+ }
+ return $hashref->{$tablename};
}
=head2 _filter_columns
- _filter_columns($tablename,$research, $filtercolumns)
+=over 4
+
+_filter_columns($tablename,$research, $filtercolumns)
+
+=back
Given
- a tablename
use C4::Reserves; # CheckReserves
use C4::Debug;
use C4::Items;
+use C4::Charset;
use YAML;
use URI::Escape;
+use Business::ISBN;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
# 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
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)
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;
}
# 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';
my ($transfertfrom, $transfertto);
# is item on the reserve shelf?
- my $reservestatus = 0;
+ my $reservestatus = '';
my $reserveitem;
unless ($item->{wthdrawn}
# should map transit status to record indexed in Zebra.
#
($transfertwhen, $transfertfrom, $transfertto) = C4::Circulation::GetTransfers($item->{itemnumber});
- ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber});
+ ($reservestatus, $reserveitem, undef) = C4::Reserves::CheckReserves($item->{itemnumber});
}
# item is withdrawn, lost, damaged, not for loan, reserved or in transit
$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};
-
+
# can place hold on item ?
if ((!$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems'))
&& !$item->{itemlost}
}
}
} # 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};
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;
$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");
$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;
sub z3950_search_args {
my $bibrec = shift;
- $bibrec = { title => $bibrec } if !ref $bibrec;
+ my $isbn = Business::ISBN->new($bibrec);
+
+ if (defined $isbn && $isbn->is_valid)
+ {
+ $bibrec = { isbn => $bibrec } if !ref $bibrec;
+ }
+ else {
+ $bibrec = { title => $bibrec } if !ref $bibrec;
+ }
my $array = [];
for my $field (qw/ lccn isbn issn title author dewey subject /)
{
my $odd = 1;
while ( my $line = $sth->fetchrow_hashref ) {
- if ( $previousbiblio eq $line->{biblionumber} ) {
- $line->{title} = "";
- $line->{issn} = "";
- } else {
- $previousbiblio = $line->{biblionumber};
- $odd = -$odd;
- }
- $line->{toggle} = 1 if $odd == 1;
$line->{'cannotedit'} =
( C4::Context->preference('IndependantBranches')
&& C4::Context->userenv
=head2 getroutinglist
-($count,@routinglist) = getroutinglist($subscriptionid)
+@routinglist = getroutinglist($subscriptionid)
this gets the info from the subscriptionroutinglist for $subscriptionid
return :
-a count of the number of members on routinglist
the routinglist as an array. Each element of the array contains a hash_ref containing
routingid - a unique id, borrowernumber, ranking, and biblionumber of subscription
my ($subscriptionid) = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare(
- "SELECT routingid, borrowernumber, ranking, biblionumber
+ 'SELECT routingid, borrowernumber, ranking, biblionumber
FROM subscription
JOIN subscriptionroutinglist ON subscription.subscriptionid = subscriptionroutinglist.subscriptionid
- WHERE subscription.subscriptionid = ? ORDER BY ranking ASC
- "
+ WHERE subscription.subscriptionid = ? ORDER BY ranking ASC'
);
$sth->execute($subscriptionid);
- my @routinglist;
- my $count = 0;
- while ( my $line = $sth->fetchrow_hashref ) {
- $count++;
- push( @routinglist, $line );
- }
- return ( $count, @routinglist );
+ my $routinglist = $sth->fetchall_arrayref({});
+ return @{$routinglist};
}
=head2 countissuesfrom
else {
$htdocs = C4::Context->config('intrahtdocs');
}
-
my ($theme, $lang)= themelanguage( $htdocs, $tmplbase, $interface, $query);
my $template = Template->new(
{ EVAL_PERL => 1,
ABSOLUTE => 1,
+ PLUGIN_BASE => 'Koha::Template::Plugin',
+ COMPILE_EXT => C4::Context->config('template_cache_dir')?'.ttc':'',
+ COMPILE_DIR => C4::Context->config('template_cache_dir')?C4::Context->config('template_cache_dir'):'',,
INCLUDE_PATH => [
"$htdocs/$theme/$lang/includes",
"$htdocs/$theme/en/includes"
($query) or warn "no query in themelanguage";
# Select a language based on cookie, syspref available languages & browser
- my $is_intranet = $interface eq 'intranet';
- my @languages = split(",", C4::Context->preference(
- $is_intranet ? 'language' : 'opaclanguages'));
- my $lang;
- $lang = getlanguagecookie($query);
- unless ($lang) {
- my $http_accept_language = $ENV{ HTTP_ACCEPT_LANGUAGE };
- $lang = accept_language( $http_accept_language,
- getTranslatedLanguages($interface,'prog') );
- }
- # Ignore a lang not selected in sysprefs
- $lang = undef unless first { $_ eq $lang } @languages;
- # Fall back to English if necessary
- $lang = 'en' unless $lang;
+ my $lang = getlanguage($query, $interface);
+ # Select theme
+ my $is_intranet = $interface eq 'intranet';
my @themes = split(" ", C4::Context->preference(
$is_intranet ? "template" : "opacthemes" ));
push @themes, 'prog';
);
}
-sub getlanguagecookie {
- my ($query) = @_;
+
+sub getlanguage {
+ my ($query, $interface) = @_;
+
+ # Select a language based on cookie, syspref available languages & browser
+ my $is_intranet = $interface eq 'intranet';
+ my @languages = split(",", C4::Context->preference(
+ $is_intranet ? 'language' : 'opaclanguages'));
+
my $lang;
- if ($query->cookie('KohaOpacLanguage')){
- $lang = $query->cookie('KohaOpacLanguage') ;
- }else{
- $lang = $ENV{HTTP_ACCEPT_LANGUAGE};
-
+
+ # cookie
+ if ( $query->cookie('KohaOpacLanguage') ) {
+ $lang = $query->cookie('KohaOpacLanguage');
+ $lang =~ s/[^a-zA-Z_-]*//; # sanitize cookie
}
- $lang =~ s/[^a-zA-Z_-]*//; #sanitzie
+
+ # HTTP_ACCEPT_LANGUAGE
+ unless ($lang) {
+ my $http_accept_language = $ENV{ HTTP_ACCEPT_LANGUAGE };
+ $lang = accept_language( $http_accept_language,
+ getTranslatedLanguages($interface,'prog') );
+ }
+
+ # Ignore a lang not selected in sysprefs
+ $lang = undef unless first { $_ eq $lang } @languages;
+
+ # Fall back to English if necessary
+ $lang = 'en' unless $lang;
+
return $lang;
}
}
}
+=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();
--- /dev/null
+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
+
+=head2 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 $orderby;
+ 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++;
+ }
+
+ $orderby = " ORDER BY " . join(',', @orderbys) . " " if @orderbys;
+ return $orderby;
+}
+
+=head2 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
+
+=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);
+}
+
+=head2 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.
+
+=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;
+}
+
+=head2 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.
+
+=cut
+sub dt_build_query_simple {
+ my ( $value, $field ) = @_;
+ my $query;
+ my @params;
+ if( $value ) {
+ $query .= " AND $field = ? ";
+ push @params, $value;
+ }
+ return ( $query, \@params );
+}
+
+=head2 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.
+
+=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 );
+}
+
+=head2 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'.
+
+=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;
my $owner = $shelflist->{$element}->{'owner'};
my $canmanage = ShelfPossibleAction( $loggedinuser, $element, 'manage' );
my $sortfield = $shelflist->{$element}->{'sortfield'};
- if ( $sortfield eq 'author' ) {
- $shelflist->{$element}->{"authorsort"} = 'author';
- }
- if ( $sortfield eq 'year' ) {
- $shelflist->{$element}->{"yearsort"} = 'year';
+ if ( $sortfield ){
+ if ( $sortfield eq 'author' ) {
+ $shelflist->{$element}->{"authorsort"} = 'author';
+ } elsif ( $sortfield eq 'year' ) {
+ $shelflist->{$element}->{"yearsort"} = 'year';
+ }
}
$shelflist->{$element}->{"viewcategory$category"} = 1;
$shelflist->{$element}->{manageshelf} = $canmanage;
$qhash{$_} = $query->param($_) if $query->param($_);
}
( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash;
- if ( $shelfnumber ) {
+ if ( $shelfnumber && $totitems ) {
$template->param( pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) );
- } else {
+ } elsif ( $totshelves ) {
$template->param(
pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) );
}
sub transformMARCXML4XSLT {
my ($biblionumber, $record) = @_;
- my $frameworkcode = GetFrameworkCode($biblionumber);
+ my $frameworkcode = GetFrameworkCode($biblionumber) || '';
my $tagslib = &GetMarcStructure(1,$frameworkcode);
my @fields;
# FIXME: wish there was a better way to handle exceptions
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 = "<sysprefs>\n";
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
}
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 = '';
my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
- my ( $reservestatus, $reserveitem ) = C4::Reserves::CheckReserves($item->{itemnumber});
+ my ( $reservestatus, $reserveitem, undef ) = C4::Reserves::CheckReserves($item->{itemnumber});
if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} ||
(defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){
== 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.
--- /dev/null
+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
'./installer-CPAN.pl' => 'NONE',
'./installer' => 'INTRANET_CGI_DIR',
'./errors' => {target => 'INTRANET_CGI_DIR'},
+ './Koha' => 'PERL_MODULE_DIR',
'./koha-tmpl/intranet-tmpl' => {target => 'INTRANET_TMPL_DIR', trimdir => -1},
'./koha-tmpl/opac-tmpl' => {target => 'OPAC_TMPL_DIR', trimdir => -1},
'./kohaversion.pl' => 'INTRANET_CGI_DIR',
my $gist = $bookseller->{gstrate} // C4::Context->preference("gist") // 0;
$gist = 0 if $gist == 0.0000;
my $discount = $bookseller->{'discount'} / 100;
- my $total_rrp; # RRP Total, its value will be assigned to $total_rrp_gsti or $total_rrp_gste depending of $bookseller->{'listincgst'}
- my $total_rrp_gsti; # RRP Total, GST included
- my $total_rrp_gste; # RRP Total, GST excluded
- my $gist_rrp;
- my $total_rrp_est;
-
+ my $total_rrp = 0; # RRP Total, its value will be assigned to $total_rrp_gsti or $total_rrp_gste depending of $bookseller->{'listincgst'}
+ my $total_rrp_gsti = 0; # RRP Total, GST included
+ my $total_rrp_gste = 0; # RRP Total, GST excluded
+ my $gist_rrp = 0;
+ my $total_rrp_est = 0;
+
my $qty_total;
my @books_loop;
$line{biblios} = $countbiblio - 1;
$line{left_subscription} = 1 if scalar @subscriptions >= 1;
$line{subscriptions} = scalar @subscriptions;
- $line{left_holds} = 1 if $holds >= 1;
+ ($holds >= 1) ? $line{left_holds} = 1 : $line{left_holds} = 0;
$line{left_holds_on_order} = 1 if $line{left_holds}==1 && ($line{items} == 0 || $itemholds );
$line{holds} = $holds;
$line{holds_on_order} = $itemholds?$itemholds:$holds if $line{left_holds_on_order};
last;
}
+ my @cancelledorders = GetCancelledOrders($basketno);
+ foreach (@cancelledorders) {
+ $_->{'line_total'} = sprintf("%.2f", $_->{'ecost'} * $_->{'quantity'});
+ }
+
$template->param(
basketno => $basketno,
basketname => $basket->{'basketname'},
name => $bookseller->{'name'},
entrydate => C4::Dates->new($results[0]->{'entrydate'},'iso')->output,
books_loop => \@books_loop,
+ cancelledorders_loop => \@cancelledorders,
gist_rate => sprintf( "%.2f", $gist * 100 ) . '%',
total_rrp_gste => sprintf( "%.2f", $total_rrp_gste ),
total_est_gste => sprintf( "%.2f", $total_est_gste ),
--- /dev/null
+#!/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.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use strict;
+use warnings;
+use CGI;
+use C4::Context;
+use C4::Output;
+use C4::Auth;
+use C4::Budgets;
+
+=head1 NAME
+
+fetch_sort_dropbox.pl
+
+=head1 DESCRIPTION
+
+ This script fetches sort values for a given budget id. Currently it is used to dynamically fill
+ 'Statistic 1' and 'Statistic 2' comboboxes in neworderempty page. Values retrieved depend on
+ categories of authorized values defined in funds configuration.
+
+=head1 CGI PARAMETERS
+
+=over 4
+
+=item budget_id
+
+Budget identifier
+
+=item sort
+
+Sort number. 1 or 2 for the moment.
+
+=back
+
+=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",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {editcatalogue => 'edit_catalogue'},
+ debug => 0,
+ }
+);
+
+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/^\<select.*?\"\>//;
+$budget_authvalue_dropbox =~ s/\<\/select\>$//;
+chomp $budget_authvalue_dropbox;
+
+$template->param( return => $budget_authvalue_dropbox );
+output_html_with_http_headers $input, $cookie, $template->output;
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');
}
foreach my $item (keys %itemhash){
my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'},
- $itemhash{$item}->{'subfields'},
- $itemhash{$item}->{'field_values'},
- $itemhash{$item}->{'ind_tag'},
- $itemhash{$item}->{'indicator'},'ITEM');
+ $itemhash{$item}->{'subfields'},
+ $itemhash{$item}->{'field_values'},
+ $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 ) = @_;
+
+ 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");
$delay = 30; #default value for delay
}
+if ($op and $op eq "send_alert"){
+ my @ordernums = $input->param("claim_for");# FIXME: Fallback values?
+ my $err;
+ eval {
+ $err = SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value?
+ AddClaim ( $_ ) for @ordernums;
+ };
+ if ( $@ ) {
+ $template->param(error_claim => $@);
+ } elsif ( defined $err->{error} and $err->{error} eq "no_email" ) {
+ $template->{VARS}->{'error_claim'} = "no_email";
+ } else {
+ $template->{VARS}->{'info_claim'} = 1;
+ }
+}
+
my %supplierlist = GetBooksellersWithLateOrders($delay);
my (@sloopy); # supplier loop
foreach (keys %supplierlist){
}
$template->param(SUPPLIER_LOOP => \@sloopy);
$template->param(Supplier=>$supplierlist{$supplierid}) if ($supplierid);
+$template->param(SupplierId=>$supplierid) if ($supplierid);
my @lateorders = GetLateOrders($delay,$supplierid,$branch);
}
$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,
--- /dev/null
+#!/usr/bin/perl
+
+# Copyright 2008 - 2009 BibLibre SARL
+# 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
+# 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
+
+ordered.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;
+use C4::Dates;
+
+my $dbh = C4::Context->dbh;
+my $input = new CGI;
+my $fund_id = $input->param('fund');
+my $fund_code = $input->param('fund_code');
+
+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 = <<EOQ;
+SELECT
+ aqorders.basketno, aqorders.ordernumber,
+ quantity-quantityreceived AS tleft,
+ ecost, budgetdate, entrydate,
+ aqbasket.booksellerid,
+ itype,
+ title
+FROM (aqorders, aqbasket)
+LEFT JOIN biblio ON
+ biblio.biblionumber=aqorders.biblionumber
+LEFT JOIN aqorders_items ON
+ aqorders.ordernumber=aqorders_items.ordernumber
+LEFT JOIN items ON
+ items.itemnumber=aqorders_items.itemnumber
+WHERE
+ aqorders.basketno=aqbasket.basketno AND
+ budget_id=? AND
+ (datecancellationprinted IS NULL OR
+ datecancellationprinted='0000-00-00') AND
+ (quantity > 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;
+}
+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->{VARS}->{'fund'} = $fund_id;
+$template->{VARS}->{'ordered'} = \@ordered;
+$template->{VARS}->{'total'} = $total;
+$template->{VARS}->{'fund_code'} = $fund_code;
+
+$sth->finish;
+
+output_html_with_http_headers $input, $cookie, $template->output;
use C4::Output;
use C4::Dates qw/format_date/;
use C4::Bookseller qw/ GetBookSellerFromId /;
+use C4::Budgets qw/ GetBudget /;
use C4::Members;
use C4::Branch; # GetBranches
use C4::Items;
if ( @$results[0]->{'unitprice'} == 0 ) {
@$results[0]->{'unitprice'} = '';
}
+
+ my $authorisedby = @$results[0]->{'authorisedby'};
+ my $member = GetMember( borrowernumber => $authorisedby );
+
+ my $budget = GetBudget( @$results[0]->{'budget_id'} );
+
$template->param(
count => 1,
biblionumber => @$results[0]->{'biblionumber'},
copyrightdate => @$results[0]->{'copyrightdate'},
isbn => @$results[0]->{'isbn'},
seriestitle => @$results[0]->{'seriestitle'},
- bookfund => @$results[0]->{'bookfundid'},
+ bookfund => $budget->{budget_name},
quantity => @$results[0]->{'quantity'},
quantityreceivedplus1 => @$results[0]->{'quantityreceived'} + 1,
quantityreceived => @$results[0]->{'quantityreceived'},
rrp => @$results[0]->{'rrp'},
ecost => @$results[0]->{'ecost'},
unitprice => @$results[0]->{'unitprice'},
+ memberfirstname => $member->{firstname} || "",
+ membersurname => $member->{surname} || "",
invoice => $invoice,
datereceived => $datereceived->output(),
- datereceived_iso => $datereceived->output('iso'),
- notes => $order->{notes}
+ datereceived_iso => $datereceived->output('iso'),
+ notes => $order->{notes}
);
}
else {
--- /dev/null
+#!/usr/bin/perl
+
+# script to show a breakdown of committed and spent budgets
+
+# Copyright 2002-2009 Katipo Communications 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
+# 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 C4::Dates;
+use strict;
+use warnings;
+use CGI;
+
+my $dbh = C4::Context->dbh;
+my $input = new CGI;
+my $bookfund = $input->param('fund');
+my $fund_code = $input->param('fund_code');
+
+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 = <<EOQ;
+SELECT
+ aqorders.basketno, aqorders.ordernumber,
+ quantity-quantityreceived AS tleft,
+ ecost, budgetdate, entrydate,
+ aqbasket.booksellerid,
+ itype,
+ title,
+ aqorders.booksellerinvoicenumber,
+ quantityreceived,
+ unitprice,
+ freight,
+ datereceived,
+ aqorders.biblionumber
+FROM (aqorders, aqbasket)
+LEFT JOIN items ON
+ items.biblioitemnumber=aqorders.biblioitemnumber
+LEFT JOIN biblio ON
+ biblio.biblionumber=aqorders.biblionumber
+LEFT JOIN aqorders_items ON
+ aqorders.ordernumber=aqorders_items.ordernumber
+WHERE
+ aqorders.basketno=aqbasket.basketno AND
+ budget_id=? AND
+ (datecancellationprinted IS NULL OR
+ datecancellationprinted='0000-00-00')
+ GROUP BY aqorders.ordernumber
+EOQ
+my $sth = $dbh->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;
+ push @spent, $data;
+ }
+
+}
+$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;
}
else {
my @id = $input->param('id');
+
+ if ( not defined @id ) {
+ # empty server list -> report and exit
+ $template->param( emptyserverlist => 1 );
+ output_html_with_http_headers $input, $cookie, $template->output;
+ exit;
+ }
+
my @oConnection;
my @oResult;
+ my @errconn;
my $s = 0;
my $query;
my $nterms;
$query .= " \@attr 1=21 \"$subject\" ";
$nterms++;
}
- if ($lccn) {
+ if ($lccn) {
$query .= " \@attr 1=9 $lccn ";
$nterms++;
}
$sth->execute($servid);
while ( $server = $sth->fetchrow_hashref ) {
warn "serverinfo ".join(':',%$server) if $DEBUG;
- my $noconnection = 0;
my $option1 = new ZOOM::Options();
$option1->option( 'async' => 1 );
$option1->option( 'elementSetName', 'F' );
my ( $error, $errmsg, $addinfo, $diagset ) =
$oConnection[$k]->error_x();
if ($error) {
- warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n"
- if $DEBUG;
-
+ if ($error =~ m/^(10000|10007)$/ ) {
+ push(@errconn, {'server' => $serverhost[$k]});
+ }
+ $DEBUG and warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n";
}
else {
my $numresults = $oResult[$k]->size();
)
= ImportBreeding( $marcdata, 2, $serverhost[$k], $encoding[$k], $random, 'z3950' );
my %row_data;
- if ( $i % 2 ) {
- $toggle = 1;
- }
- else {
- $toggle = 0;
- }
- $row_data{toggle} = $toggle;
$row_data{server} = $servername[$k];
$row_data{isbn} = $oldbiblio->{isbn};
$row_data{lccn} = $oldbiblio->{lccn};
$row_data{breedingid} = $breedingid;
$row_data{biblionumber} = $biblionumber;
push( @breeding_loop, \%row_data );
-
+
} else {
- push(@breeding_loop,{'toggle'=>($i % 2)?1:0,'server'=>$servername[$k],'title'=>join(': ',$oConnection[$k]->error_x()),'breedingid'=>-1,'biblionumber'=>-1});
+ push(@breeding_loop,{'server'=>$servername[$k],'title'=>join(': ',$oConnection[$k]->error_x()),'breedingid'=>-1,'biblionumber'=>-1});
} # $rec
} # upto 5 results
} #$numresults
breeding_loop => \@breeding_loop,
server => $servername[$k],
numberpending => $numberpending,
+ errconn => \@errconn
);
output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0;
- # print $template->output if $firstresult !=1;
+ # print $template->output if $firstresult !=1;
$firstresult++;
}
displayresults();
- we show the record having primkey=$primkey and ask for deletion validation form
if $op=delete_confirmed
- we delete the record having primkey=$primkey
+ if $op=duplicate_form
+ - displays the duplication of budget period form (allowing specification of dates)
+ if $op=duplicate_budget
+ - we perform the duplication of the budget period specified as budget_period_id
=cut
use C4::Acquisition;
use C4::Budgets;
use C4::Debug;
+use C4::SQLHelper;
my $dbh = C4::Context->dbh;
$op='else';
}
+# display the form for duplicating
+elsif ( $op eq 'duplicate_form'){
+ $template->param(
+ DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ 'duplicate_form' => '1',
+ 'budget_period_id' => $budget_period_id,
+ );
+}
+
+# handle the actual duplication
+elsif ( $op eq 'duplicate_budget' ){
+ die "please specify a budget period id\n" if( !defined $budget_period_id || $budget_period_id eq '' );
+ my $startdate = $input->param('budget_period_startdate');
+ my $enddate = $input->param('budget_period_enddate');
+
+ my $data = GetBudgetPeriod( $budget_period_id);
+
+ $data->{'budget_period_startdate'} = $startdate;
+ $data->{'budget_period_enddate'} = $enddate;
+ delete $data->{'budget_period_id'};
+ my $new_budget_period_id = C4::SQLHelper::InsertInTable('aqbudgetperiods', $data);
+
+ my $tree = GetBudgetHierarchy( $budget_period_id );
+
+ # hash mapping old ids to new
+ my %old_new;
+ # hash mapping old parent ids to list of new children ids
+ # only store a child here if the parents old id isnt in the old_new map
+ # when the parent is found, this map will be used, and then the entry removed and their id placed in old_new
+ my %parent_children;
+
+ for my $entry( @$tree ){
+ die "serious errors, parent period $budget_period_id doesnt match child ", $entry->{'budget_period_id'}, "\n" if( $entry->{'budget_period_id'} != $budget_period_id );
+ my $orphan = 0; # set to 1 if we need to make an entry in parent_children
+ my $old_id = delete $entry->{'budget_id'};
+ my $parent_id = delete $entry->{'budget_parent_id'};
+ $entry->{'budget_period_id'} = $new_budget_period_id;
+
+ if( !defined $parent_id ){
+ } elsif( defined $parent_id && $parent_id eq '' ){
+ } elsif( defined $old_new{$parent_id} ){
+ # set parent id now
+ $entry->{'budget_parent_id'} = $old_new{$parent_id};
+ } else {
+ # make an entry in parent_children
+ $parent_children{$parent_id} = [] unless defined $parent_children{$parent_id};
+ $orphan = 1;
+ }
+
+ # write it to db
+ my $new_id = C4::SQLHelper::InsertInTable('aqbudgets', $entry);
+ $old_new{$old_id} = $new_id;
+ push @{$parent_children{$parent_id}}, $new_id if $orphan;
+
+ # deal with any children
+ if( defined $parent_children{$old_id} ){
+ # tell my children my new id
+ for my $child ( @{$parent_children{$old_id}} ){
+ C4::SQLHelper::UpdateInTable('aqcudgets', [ 'budget_id' => $child, 'budget_parent_id' => $new_id ]);
+ }
+ delete $parent_children{$old_id};
+ }
+ }
+
+ # display the list of budgets
+ $op = 'else';
+}
+
# DEFAULT - DISPLAY AQPERIODS TABLE
# -------------------------------------------------------------------
# display the list of budget periods
sub _print_to_csv {
my ( $header, $results ) = @_;
- binmode STDOUT, ":encoding(UTF-8)";
+ binmode STDOUT, ':encoding(UTF-8)';
my $csv = Text::CSV_XS->new(
{ sep_char => $del,
my $duplicate_entry = 0;
if ( $id ) { # Update
- my $sth = $dbh->prepare( "SELECT category, authorised_value FROM authorised_values WHERE id='$id' ");
- $sth->execute();
+ my $sth = $dbh->prepare( "SELECT category, authorised_value FROM authorised_values WHERE id = ? ");
+ $sth->execute($id);
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();
+ "WHERE category = ? AND authorised_value = ? and id <> ? ");
+ $sth->execute($new_category, $new_authorised_value, $id);
($duplicate_entry) = $sth->fetchrow_array();
- warn "**** duplicate_entry = $duplicate_entry";
}
unless ( $duplicate_entry ) {
my $sth=$dbh->prepare( 'UPDATE authorised_values
}
else { # Insert
my $sth = $dbh->prepare_cached( "SELECT COUNT(*) FROM authorised_values " .
- "WHERE category = '$new_category' AND authorised_value = '$new_authorised_value' ");
- $sth->execute();
+ "WHERE category = ? AND authorised_value = ? ");
+ $sth->execute($new_category, $new_authorised_value);
($duplicate_entry) = $sth->fetchrow_array();
unless ( $duplicate_entry ) {
my $sth=$dbh->prepare( 'INSERT INTO authorised_values
## If Form Data Passed, Update the Database
if ( $input->param('updateLimits') ) {
- DeleteBranchTransferLimits();
+ DeleteBranchTransferLimits($branchcode);
+
foreach my $code ( @codes ) {
foreach my $toBranch ( @branchcodes ) {
foreach my $piece ( @$line ) {
if ( ref( $piece ) eq 'HASH' ) {
+ if ( !$piece->{'pref'} ){ next; }
if ( $piece->{'pref'} =~ /^$searchfield$/i ) {
my ( undef, $LINES ) = TransformPrefsToHTML( $data, $searchfield );
sub matches {
my ( $text, $terms ) = @_;
- return !grep( { $text !~ /$_/i } @$terms );
+ if ( $text ) { return !grep( { $text !~ /$_/i } @$terms ); }
}
my $dbh = C4::Context->dbh;
$tabsysprefs{NotifyBorrowerDeparture} = "Patrons";
$tabsysprefs{memberofinstitution} = "Patrons";
$tabsysprefs{BorrowerMandatoryField} = "Patrons";
+$tabsysprefs{BorrowerUnwantedField} = "Patrons";
$tabsysprefs{borrowerRelationship} = "Patrons";
$tabsysprefs{BorrowersTitles} = "Patrons";
$tabsysprefs{patronimages} = "Patrons";
use C4::Context;
use C4::AuthoritiesMarc;
use utf8;
-use open qw( :std :utf8 );
+use open qw[ :std :encoding(utf8) ];
my $dbh=C4::Context->dbh;
my $datatypes_query = $dbh->prepare(<<ENDSQL);
}
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 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) {
subscriptiontitle => $subscriptiontitle,
);
}
+my $record = GetMarcBiblio($biblionumber);
$template->param (
ISBD => $res,
biblionumber => $biblionumber,
isbdview => 1,
z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
- C4::Search::enabled_staff_search_views
+ ocoins => GetCOinSBiblio($record),
+ C4::Search::enabled_staff_search_views,
);
output_html_with_http_headers $query, $cookie, $template->output;
);
my $record = GetMarcBiblio($biblionumber);
+$template->param( ocoins => GetCOinSBiblio($record) );
if ( not defined $record ) {
# biblionumber invalid -> report and exit
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;
+use C4::Images;
# use Smart::Comments;
}
$template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") );
+$template->param( ocoins => GetCOinSBiblio($record) );
# some useful variables for enhanced content;
# in each case, we're grabbing the first value we find in
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});
$analytics_flag=1;
$item->{countanalytics} = $countanalytics;
}
-
+ if ($item->{'materials'} ne ''){
+ $materials_flag = 1;
+ }
push @itemloop, $item;
}
hostrecords => $hostrecords,
analytics_flag => $analytics_flag,
C4::Search::enabled_staff_search_views,
+ materials => $materials_flag,
);
if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) {
}
}
+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') );
}
+# 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;
my $op=$query->param("op");
my $format=$query->param("format");
+my $error = '';
if ($op eq "export") {
my $biblionumber = $query->param("bib");
if ($biblionumber){
$marc = marc2modsxml($marc);
}
elsif ($format =~ /dc/) {
- my $error;
($error,$marc) = marc2dcxml($marc,1);
$format = "dublin-core.xml";
}
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");
--- /dev/null
+#!/usr/bin/perl
+#
+# Copyright (C) 2011 C & P Bibliography Services
+# Jared Camins-Esakov <jcamins@cpbibliograpy.com>
+#
+# 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 C4::Images;
+
+$| = 1;
+
+my $DEBUG = 0;
+my $data = new CGI;
+my $imagenumber;
+
+=head1 NAME
+
+image.pl - Script for retrieving and formatting local cover images for display
+
+=head1 SYNOPSIS
+
+<img src="image.pl?imagenumber=X" />
+<img src="image.pl?biblionumber=X" />
+<img src="image.pl?imagenumber=X&thumbnail=1" />
+<img src="image.pl?biblionumber=X&thumbnail=1" />
+
+=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
+
+error() unless C4::Context->preference("OPACLocalCoverImages");
+
+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 = RetrieveImage($imagenumber);
+
+ error() unless $imagedata;
+
+ 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 <at> foundations <dot> edu
+
+modified for local cover images by Koustubha Kale kmkale <at> anantcorp <dot> com
+
+=cut
--- /dev/null
+#!/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::Items;
+use C4::Output;
+use C4::Images;
+use C4::Search;
+
+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 $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}->{'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;
my $biblionumber = $params->{'biblionumber'};
my $itemnumber = $params->{'itemnumber'};
+if (C4::Context->preference("HidePatronName")) {
+ $template->param(HidePatronName => 1);
+}
+
my ($issues,$biblio,$barcode);
if ($itemnumber){
$issues=GetItemIssues($itemnumber);
my $languages_limit_loop = getAllLanguages();
$template->param(search_languages_loop => $languages_limit_loop,);
- # use the global setting by default
- if ( C4::Context->preference("expandedSearchOption") == 1) {
- $template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
- }
- # but let the user override it
- if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
- $template->param( expanded_options => $cgi->param('expanded_options'));
+ # Expanded search options in advanced search:
+ # use the global setting by default, but let the user override it
+ {
+ my $expanded = $cgi->param('expanded_options');
+ $expanded = C4::Context->preference("expandedSearchOption") || 0
+ if !defined($expanded) || $expanded !~ /^0|1$/;
+ $template->param( expanded_options => $expanded );
}
$template->param(virtualshelves => C4::Context->preference("virtualshelves"));
# $ %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};
+ }
}
my @results;
## I. BUILD THE QUERY
-my $lang = C4::Templates::getlanguagecookie($cgi);
+my $lang = C4::Templates::getlanguage($cgi, 'intranet');
( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by,$scan,$lang);
## parse the query_cgi string and put it into a form suitable for <input>s
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 );
$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) {
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}) {
$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
## Build the page numbers on the bottom of the page
my @page_numbers;
# 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
total => $total,
opacfacets => 1,
facets_loop => $facets,
- displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
+ displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
scan => $scan,
search_error => $error,
);
}
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 developer computer on a production one
# (the cgidir differs)
my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder";
unless ( opendir( DIR, "$cgidir" ) ) {
value=\"$value\" \/>
";
}
- elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) {
- $subfield_data{marc_value} =
- "<input type=\"text\"
- id=\"".$subfield_data{id}."\"
- name=\"".$subfield_data{id}."\"
- class=\"input_marceditor\"
- tabindex=\"1\"
- size=\"67\"
- maxlength=\"$max_length\"
- value=\"$value\"
- \/>";
-
- # it's a standard field
- }
else {
+ # it's a standard field
if (
length($value) > 100
or
# 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 );
+ foreach my $line (@newresults) {
+ if ( not exists $line->{'size'} ) { $line->{'size'} = "" }
+ }
$template->param(
total => $total_hits,
query => $query,
my @hostitemnumbers;
-my $analyticfield = '773';
-if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') {
- $analyticfield = '773';
-} elsif ($marcflavour eq 'UNIMARC') {
- $analyticfield = '461';
-}
-foreach my $hostfield ($temp->field($analyticfield)){
- if ($hostfield->subfield('0')){
- my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1);
- my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) );
- foreach my $hostitem ($hostrecord->field($itemfield)){
- if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
- push (@fields, $hostitem);
- push (@hostitemnumbers, $hostfield->subfield('9'));
+if ( C4::Context->preference('EasyAnalyticalRecords') ) {
+ my $analyticfield = '773';
+ if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') {
+ $analyticfield = '773';
+ } elsif ($marcflavour eq 'UNIMARC') {
+ $analyticfield = '461';
+ }
+ foreach my $hostfield ($temp->field($analyticfield)){
+ if ($hostfield->subfield('0')){
+ my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1);
+ my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) );
+ foreach my $hostitem ($hostrecord->field($itemfield)){
+ if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
+ push (@fields, $hostitem);
+ push (@hostitemnumbers, $hostfield->subfield('9'));
+ }
}
}
}
}
-
foreach my $field (@fields) {
next if ( $field->tag() < 10 );
}
}
$this_row{itemnumber} = $subfieldvalue if ($field->tag() eq $itemtagfield && $subfieldcode eq $itemtagsubfield);
- foreach my $hostitemnumber (@hostitemnumbers){
+
+ if ( C4::Context->preference('EasyAnalyticalRecords') ) {
+ foreach my $hostitemnumber (@hostitemnumbers){
if ($this_row{itemnumber} eq $hostitemnumber){
$this_row{hostitemflag} = 1;
$this_row{hostbiblionumber}= GetBiblionumberFromItemnumber($hostitemnumber);
last;
}
- }
+ }
-# my $countanalytics=GetAnalyticsCount($this_row{itemnumber});
-# if ($countanalytics > 0){
+# my $countanalytics=GetAnalyticsCount($this_row{itemnumber});
+# if ($countanalytics > 0){
# $this_row{countanalytics} = $countanalytics;
-# }
+# }
+ }
}
if (%this_row) {
C4::Context->userenv &&
C4::Context->userenv->{flags}!=1 &&
C4::Context->userenv->{branch};
-my $branch = C4::Context->userenv->{branch};
-if ($frameworkcode eq 'FA'){
- $branch = $input->param('branch');
-}
+my $branch = $input->param('branch') || C4::Context->userenv->{branch};
my $branches = GetBranchesLoop($branch,$onlymine); # build once ahead of time, instead of multiple times later.
# We generate form, from actuel record
next if subfield_is_koha_internal_p($subfieldtag);
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10");
- $subfieldlib->{hidden} = 1
- if $tagslib->{$tag}->{$subfieldtag}->{authorised_value} eq 'LOST';
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i);
push @fields, "$tag$subfieldtag";
use C4::Items;
use C4::Biblio;
use C4::Serials;
+use C4::Koha;
use C4::Reserves qw/MergeHolds/;
my $input = new CGI;
# Rewriting the leader
$record->leader(GetMarcBiblio($tobiblio)->leader());
- my $frameworkcode = &GetFrameworkCode($tobiblio);
+ my $frameworkcode = $input->param('frameworkcode');
my @notmoveditems;
# Modifying the reference record
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 $record1 = GetMarcBiblio($biblionumber[0]);
+
+ my $data2 = GetBiblioData($biblionumber[1]);
+ my $record2 = GetMarcBiblio($biblionumber[1]);
+
+ # Checks if both records use the same framework
+ my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]);
+ my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]);
+
+
+ my $subtitle1 = GetRecordValue('subtitle', $record1, $frameworkcode1);
+ my $subtitle2 = GetRecordValue('subtitle', $record2, $frameworkcode1);
+
+ 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'},
+ subtitle1 => $subtitle1,
+ title2 => $data2->{'title'},
+ subtitle2 => $subtitle2
+ );
+ 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;
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 developer computer on a production one
# (the cgidir differs)
my $cgidir = C4::Context->intranetdir ."/cgi-bin";
my $vbdir = "$cgidir/cataloguing/value_builder";
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.
$it->{'borrowernumber'},$it->{'itemnumber'}
);
$it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
- my ( $restype, $reserves ) = CheckReserves( $it->{'itemnumber'} );
+ my ( $restype, $reserves, undef ) = CheckReserves( $it->{'itemnumber'} );
$it->{'can_renew'} = $can_renew;
$it->{'can_confirm'} = !$can_renew && !$restype;
$it->{'renew_error'} = $restype;
circview => 1,
soundon => C4::Context->preference("SoundOn"),
fast_cataloging => $fast_cataloging,
+ CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
# save stickyduedate to session
$strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' ";
}
}
- $strsth.=" AND borrowers.flags = '" . $borflagsfilter . "' " if $borflagsfilter;
+ if ( $borflagsfilter eq 'gonenoaddress' ) {
+ $strsth .= " AND borrowers.gonenoaddress <> 0";
+ }
+ elsif ( $borflagsfilter eq 'debarred' ) {
+ $strsth .= " AND borrowers.debarred >= CURDATE()" ;
+ }
+ elsif ( $borflagsfilter eq 'lost') {
+ $strsth .= " AND borrowers.lost <> 0";
+ }
$strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter;
$strsth.=" AND date_due < '" . $datedueto . "' " if $datedueto;
$strsth.=" AND date_due > '" . $dateduefrom . "' " if $dateduefrom;
itemtype => $biblio->{'itemtype'},
ccode => $biblio->{'ccode'},
itembiblionumber => $biblio->{'biblionumber'},
+ additional_materials => $biblio->{'materials'}
);
my %input = (
libmarc-xml-perl,
libmemoize-memcached-perl,
libmime-lite-perl,
+ libmodern-perl-perl,
libnet-ldap-perl,
libnet-server-perl,
libnet-z3950-zoom-perl,
<refsynopsisdiv>
<cmdsynopsis>
<command>koha-create</command>
- <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option></arg>
+ <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
<arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
<arg><option>--zebralang</option> en|nb|fr</arg>
<arg><option>--defaultsql</option> /path/to/some.sql</arg>
<arg><option>--configfile</option> /path/to/config</arg>
+ <arg><option>--passwdfile</option> /path/to/passwd</arg>
+ <arg><option>--database</option> database</arg>
<arg><option>--adminuser</option> n</arg>
<arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg>
</cmdsynopsis>
<varlistentry>
<term><option>--create-db</option></term>
<listitem>
- <para>Create a new datbase on localhost. If the database you want to use does not reside on localhost, you can use <option>--request-db</option> and <option>--populate-db</option>, see below.</para>
+ <para>Create a new database on localhost. If the database you want to use does not reside on localhost, you can use <option>--request-db</option> and <option>--populate-db</option>, see below. If the database already exists, you can use <option>--use-db</option>, see below.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--populate-db</option></term>
<listitem>
- <para>When you have run koha-create with the <option>--request-db</option> option, and a database has been set up, you can finnish your installation by running <command>koha-create</command> with this option.</para>
+ <para>When you have run koha-create with the <option>--request-db</option> option, and a database has been set up, you can finish your installation by running <command>koha-create</command> with this option.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--use-db</option></term>
+ <listitem>
+ <para>When the database you want to use has already been populated, you can run <command>koha-create</command> with this option to take care of all the other set-up configuration.</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
+ <term><option>--database</option></term>
+ <listitem>
+ <para>MySQL database to use.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--defaultsql</option></term>
<listitem>
<para>Path to an SQL-file other than the one pointed to in the default or alternative config file. Corresponds to the DEFAULTSQL config file variable.</para>
</varlistentry>
<varlistentry>
+ <term><option>--passwdfile</option></term>
+ <listitem>
+ <para>Path to an alternative passwd file. This file is in the same format as the default (Koha) passwd file, see below for details.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--zebralang</option></term>
<listitem>
<para>Primary language for Zebra indexing. Corresponds to the ZEBRA_LANGUAGE config file variable.</para>
</varlistentry>
<varlistentry>
+ <term><option>OPACPORT</option></term>
+ <listitem>
+ <para>The port for the OPAC.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>OPACPREFIX</option></term>
+ <listitem>
+ <para>This is inserted before the instance name when forming Apache ServerName. For subdomains, make sure it ends with a period.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>OPACSUFFIX</option></term>
+ <listitem>
+ <para>This is inserted after the instance name, but before the domain name, when forming Apache ServerName.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>INTRAPORT</option></term>
<listitem>
<para>The port for the intranet. If you set this to empty or 80, then you must also define INTRAPREFIX or INTRASUFFIX.</para>
<para>Configuration variables are read from this file, if it exists.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option><filename>/etc/koha/passwd</filename></option></term>
+ <listitem>
+ <para>Pre-selected database credentials are read from this file, if it exists. The format for this file is instancename:username:passwd:database. Database is optional, but the other three are required if you want to use pre-determined database user credentials.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsynopsisdiv>
<cmdsynopsis>
- <command>koha-remove</command> <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
+ <command>koha-remove</command>
+ <arg><option>--keep-mysql</option></arg>
+ <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
+ <refsect1><title>Options</title>
+ <variablelist>
+ <varlistentry>
+ <term><option>--keep-mysql</option></term>
+ <listitem>
+ <para>Leave the MySQL database and user when removing the Koha instance.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
<refsect1><title>Description</title>
<para>Remove a Koha instance.</para>
</refsect1>
-
+
<refsect1><title>See also</title>
<simplelist type="inline">
<member><command>koha-disable(8)</command></member>
<member><command>koha-restore(8)</command></member>
</simplelist>
</refsect1>
-
+
</refentry>
</article>
set -e
-usage="Usage: $0 [--create-db|--request-db|--populate-db] \
+usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
[--marcflavor marc21|normarc|unimarc] \
[--zebralang en|nb|fr] \
[--defaultsql /path/to/some.sql] \
- [--configfile /path/to/config] [--adminuser n] instancename"
+ [--configfile /path/to/config] [--passwdfile /path/to/passwd] \
+ [--database database] [--adminuser n] instancename"
die() {
echo "$@" 1>&2
exit 1
}
+# UPPER CASE VARIABLES - from configfile or default value
+# lower case variables - generated within this script
generate_config_file() {
touch "$2"
chown "root:$username" "$2"
chmod 0640 "$2"
sed -e "s/__KOHASITE__/$name/g" \
- -e "s/__OPACPORT__/80/g" \
+ -e "s/__OPACPORT__/$OPACPORT/g" \
-e "s/__INTRAPORT__/$INTRAPORT/g" \
- -e "s/__OPACSERVER__/$domain/g" \
+ -e "s/__OPACSERVER__/$opacdomain/g" \
-e "s/__INTRASERVER__/$intradomain/g" \
-e "s/__ZEBRA_PASS__/$zebrapwd/g" \
-e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
# Set defaults and read config file, if it exists.
DOMAIN=""
+OPACPORT="80"
+OPACPREFIX=""
+OPACSUFFIX=""
INTRAPORT="8080"
INTRAPREFIX=""
INTRASUFFIX=""
ZEBRA_MARC_FORMAT="marc21"
ZEBRA_LANGUAGE="en"
ADMINUSER="1"
+PASSWDFILE="/etc/koha/passwd"
if [ -e /etc/koha/koha-sites.conf ]
then
. /etc/koha/koha-sites.conf
fi
-[ $# -ge 2 ] && [ $# -le 12 ] || die $usage
+[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
-TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile:,adminuser: \
+TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,use-db,marcflavor:,zebralang:,defaultsql:,configfile:,passwdfile:,adminuser: \
-n "$0" -- "$@"`
# Note the quotes around `$TEMP': they are essential!
-c|--create-db) op=create ; shift ;;
-r|--request-db) op=request ; shift ;;
-p|--populate-db) op=populate ; shift ;;
+ -u|--use-db) op=use ; shift ;;
-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
-f|--configfile) configfile="$2" ; shift 2 ;;
+ -s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;;
+ -b|--database) CLO_DATABASE="$2" ; shift 2 ;;
-a|--adminuser) CLO_ADMINUSER="$2" ; shift 2 ;;
--) shift ; break ;;
*) die "Internal error processing command line arguments" ;;
then
ADMINUSER="$CLO_ADMINUSER"
fi
+if [ "$CLO_PASSWDFILE" != "" ]
+then
+ PASSWDFILE="$CLO_PASSWDFILE"
+fi
name="$1"
-domain="$name$DOMAIN"
-if [ "$INTRAPORT" = 80 ] || [ "$INTRAPORT" = "" ]
+opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN"
+intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN"
+
+
+if [ `cat $PASSWDFILE | grep "^$name:"` ]
then
- intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN"
-else
- intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN:$INTRAPORT"
+ passwdline=`cat $PASSWDFILE | grep "^$name:"`
+ mysqluser=`echo $passwdline | cut -d ":" -f 2`
+ mysqlpwd=`echo $passwdline | cut -d ":" -f 3`
+ mysqldb=`echo $passwdline | cut -d ":" -f 4`
fi
+# The order of precedence for MySQL database name is:
+# default < passwd file < command line
+if [ "$mysqldb" = "" ]
+then
+ mysqldb="koha_$name"
+fi
+if [ "$CLO_DATABASE" != "" ]
+then
+ mysqldb="$CLO_DATABASE"
+fi
-mysqldb="koha_$name"
+if [ "$mysqluser" = "" ]
+then
+ mysqluser="koha_$name"
+fi
mysqlhost="$(getmysqlhost)"
-mysqluser="koha_$name"
-if [ "$op" = create ] || [ "$op" = request ]
+if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
then
- mysqlpwd="$(pwgen -1)"
+ if [ "$mysqlpwd" = "" ]
+ then
+ mysqlpwd="$(pwgen -1)"
+ fi
else
mysqlpwd="$(getinstancemysqlpassword $name)"
fi
-if [ "$op" = create ] || [ "$op" = request ]
+if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
then
# Create new user and group.
username="$name-koha"
eof
fi #`
+ if [ "$op" = use ]
+ then
+ mysql --defaults-extra-file=/etc/mysql/koha-common.cnf --force <<eof
+CREATE USER \`$mysqluser\`@'%' IDENTIFIED BY '$mysqlpwd';
+GRANT ALL PRIVILEGES ON \`$mysqldb\`.* TO \`$mysqluser\`;
+FLUSH PRIVILEGES;
+eof
+ fi #`
+
# Generate and install Apache site-available file and log dir.
generate_config_file apache-site.conf.in \
"/etc/apache2/sites-available/$name"
fi
-if [ "$op" = create ] || [ "$op" = populate ]
+if [ "$op" = create ] || [ "$op" = populate ] || [ "$op" = use ]
then
# Reconfigure Apache.
a2ensite "$name"
set -e
+args=$(getopt -l keep-mysql -o k -n $0 -- "$@")
+set -- $args
+while [ ! -z "$1" ]
+do
+ case "$1" in
+ -k|--keep-mysql) keepmysql=1; exit;;
+ *) break;;
+ esac
+ shift
+done
+
for name in "$@"
do
echo "Removing Koha instance $name"
- mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
+ if [ "$keepmysql" != "1" ]
+ then
+ mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
DROP USER \`koha_$name\`;
DROP DATABASE \`koha_$name\`;
FLUSH PRIVILEGES;
eof
+ fi #`
koha-stop-zebra $name
[ -f "/etc/apache2/sites-available/$name" ] && \
December 6 2011 Albert Oller becomes the 163th developer to have a patch pushed
December 7 2011 Jon Aker becomes the 164th developer to have a patch pushed
December 13 2011 Fabio Tiana becomes the 165th developer to have a patch pushed
+December 15 2011 Duncan Tyler becomes the 166th developer to have a patch pushed
+December 15 2011 Marc Balmer becomes the 167th developer to have a patch pushed
+January 16 2012 Jesse Maseto becomes the 168th developer to have a patch pushed
+January 17 2012 Connor Dewar becomes the 169th developer to have a patch pushed (as part of the Catalyst Open Source Academy)
+January 17 2012 Sam Sanders becomes the 170th developer to have a patch pushed (as part of the Catalyst Open Source Academy)
+January 18 2012 Olivier Crouzet becomes the 171st developer to have a patch pushed
+January 31 2012 Bart Jorgensen becomes the 172st developer to have a patch pushed
+January 31 2012 Kate Henderson becomes the 173st developer to have a patch pushed
+January 31 2012 Jono Mingard becomes the 174st developer to have a patch pushed
+January 31 2012 Jorgia Kelsey becomes the 175st developer to have a patch pushed
+February 1 2012 Aleksa Vujicic becomes the 176th developer to have a patch pushed
+February 1 2012 Peter Lorimer becomes the 177th developer to have a patch pushed
+
--- /dev/null
+<acsconfig xmlns="http://openncip.org/acs-config/1.0/">
+<!-- above address gets nothing, it's just a namespace -->
+ <error-detect enabled="true" />
+
+<!--
+ Set Net::Server::PreFork runtime parameters
+ syslog_ident will identify SIP2 Koha server entries in syslog
+ For OpenSolaris, add: syslog_logsock=stream
+-->
+ <server-params
+ min_servers='1'
+ min_spare_servers='0'
+ log_file='Sys::Syslog'
+ syslog_ident='koha_sip'
+ syslog_facility='local6'
+ />
+
+ <listeners>
+<!-- vestigial HTTP, never implemented: just use the OPAC!
+ <service
+ port="0:8080/tcp"
+ transport="http"
+ protocol="NCIP/1.0" />
+-->
+ <service
+ port="8023/tcp"
+ transport="telnet"
+ protocol="SIP/2.00"
+ timeout="60" />
+
+ <service
+ port="127.0.0.1:6001/tcp"
+ transport="RAW"
+ protocol="SIP/2.00"
+ timeout="60" />
+ </listeners>
+
+ <accounts>
+ <login id="term1" password="term1" delimiter="|" error-detect="enabled" institution="CPL" />
+ <login id="koha" password="koha" delimiter="|" error-detect="enabled" institution="kohalibrary" />
+ <login id="koha2" password="koha" institution="kohalibrary2" />
+ <login id="lpl-sc" password="1234" institution="LPL" />
+ <login id="lpl-sc-beacock" password="xyzzy"
+ delimiter="|" error-detect="enabled" institution="LPL" />
+ </accounts>
+
+<!--
+Institution tags are for enabled branches. There needs to be one
+institution stanza for each institution named in the accounts above.
+The implementation attribute is actually used to find the code to run,
+in our case "ILS".
+-->
+
+<institutions>
+ <institution id="MAIN" implementation="ILS" parms="">
+ <policy checkin="true" renewal="true" checkout="true"
+ status_update="false" offline="false"
+ timeout="100"
+ retries="5" />
+ </institution>
+ <institution id="CPL" implementation="ILS" parms="">
+ <policy checkin="true" renewal="true" checkout="true"
+ status_update="false" offline="false"
+ timeout="25"
+ retries="5" />
+ </institution>
+ <institution id="kohalibrary" implementation="ILS" parms="">
+ <policy checkin="true" renewal="false" checkout="true"
+ status_update="false" offline="false"
+ timeout="100"
+ retries="5" />
+ </institution>
+ <institution id="kohalibrary2" implementation="ILS" parms="">
+ <policy checkin="true" renewal="false" checkout="true"
+ timeout="100"
+ retries="3" />
+ </institution>
+ <institution id="LPL" implementation="ILS">
+ <policy checkin="true" renewal="false" checkout="true"
+ timeout="100"
+ retries="5" />
+ </institution>
+</institutions>
+</acsconfig>
# TransferLog __LOG_DIR__/koha-opac-access_log
SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
SetEnv PERL5LIB "__PERL_MODULE_DIR__"
+ SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
+ SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
<IfModule mod_gzip.c>
mod_gzip_on yes
# TransferLog __LOG_DIR__/koha-access_log
SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
SetEnv PERL5LIB "__PERL_MODULE_DIR__"
+ SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
+ SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
Options +FollowSymLinks
ErrorDocument 400 /cgi-bin/koha/errors/400.pl
Title-uniform-see 1=Title-uniform-see
Title-uniform-seealso 1=Title-uniform-seealso
-#Authority-number Koha-Auth-Number The identifier of the the authority
+#Authority-number Koha-Auth-Number The identifier of the authority
# record, stored in 001 in the authority record, and $9/$0 in the
# field that record is linked to in the bib record
Authority-Number 1=Koha-Auth-Number
uppercase {0-9}{A-Z}
# Breaking characters
-space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’
+space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’{\x88-\x89}{\x98-\x9C}
# Characters to be considered equivalent for sorting purposes
equivalent aáàãåâăąȧǎȁȃ
map Č c
map ȼ c
map Ȼ c
+map Ċ c
+map ċ c
+map Ĉ c
+map ĉ c
# G
map ǥ g
map Ǥ g
# K
map ḵ k
map Ḵ k
+map Ḱ k
+map ḱ k
# Y
map ý y
map Ý y
map (^\[SD\]) @
map (^\[S\.D\.\]) @
map (\x88.*\x89)) @
-
# Breaking characters
-space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~{\x88-\x89}
+space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’{\x88-\x89}{\x98-\x9C}
# Characters to be considered equivalent for searching purposes.
equivalent æä(ae)
melm 611$t Name-and-title,Title,Subject,Subject:p
melm 611$9 Koha-Auth-Number
melm 611 Conference-name,Name,Subject,Subject:p
-melm 630$n Thematic-number,Subject:Subject:p
+melm 630$n Thematic-number,Subject,Subject:p
melm 630$r Music-key,Subject,Subject:p
melm 630$9 Koha-Auth-Number
melm 630 Subject,Subject:p
melm 785 Title,Title:p,Title-later,Related-periodical
melm 787$w Record-control-number
-melm 800$a Name-and-title
+melm 800$a Name-and-title,Title-series:w,Title-series:p
#melm 800$t author,Author-title,Name-and-title,Title,Title-series
-melm 800$t Author-title,Name-and-title,Title,Title-series
+melm 800$t Author-title,Name-and-title,Title,Title-series:w,Title-series:p
melm 800$9 Koha-Auth-Number
melm 800$w Record-control-number
melm 800 Author,Author-name-personal,Name,Personal-name
-melm 810$a Name-and-title
-melm 810$t Author-title,Name-and-title,Title,Title-series
+melm 810$a Name-and-title,Title-series:w,Title-series:p
+melm 810$t Author-title,Name-and-title,Title,Title-series:w,Title-series:p
melm 810$w Record-control-number
melm 810$9 Koha-Auth-Number
melm 810 Author,Corporate-name,Author-name-corporate,Name
-melm 811$a Name-and-title
+melm 811$a Name-and-title,Title-series:w,Title-series:p
melm 811$9 Koha-Auth-Number
#melm 811$t author,Author-title,Name-and-title,Title,Title-series
-melm 811$t Author-title,Name-and-title,Title,Title-series
+melm 811$t Author-title,Name-and-title,Title,Title-series:w,Title-series:p
melm 811$w Record-control-number
melm 811 Author,Author-name-corporate,Name,Conference-name
melm 830$w Record-control-number
melm 830$9 Koha-Auth-Number
-melm 830 Title,Title-series
-melm 840 Title,Title-series
+melm 830 Title,Title-series:w,Title-series:p
+melm 840 Title,Title-series:w,Title-series:p
###############################
# Koha Local-Use Biblio Indexes
C4::Context->_unset_userenv($sessionID);
$sessionID = undef;
$userid = undef;
- open L, ">>/tmp/sessionlog";
- my $time = localtime( time() );
- printf L "%20s from %16s logged out at %30s (manually).\n", $userid,
- $ip, $time;
- close L;
+ # Commented out due to its lack of usefulness
+ # open L, ">>/tmp/sessionlog";
+ # my $time = localtime( time() );
+ # printf L "%20s from %16s logged out at %30s (manually).\n", $userid,
+ # $ip, $time;
+ # close L;
}
}
unless ($userid) {
my ( $return, $cardnumber ) = checkpw( $userid, $password );
if ($return) {
$loggedin = 1;
- open L, ">>/tmp/sessionlog";
- my $time = localtime( time() );
- printf L "%20s from %16s logged in at %30s.\n", $userid,
- $ENV{'REMOTE_ADDR'}, $time;
- close L;
+ # open L, ">>/tmp/sessionlog";
+ # my $time = localtime( time() );
+ # printf L "%20s from %16s logged in at %30s.\n", $userid,
+ # $ENV{'REMOTE_ADDR'}, $time;
+ # close L;
$cookie = $query->cookie( CGISESSID => $sessionID );
if ( $return == 2 ) {
--- /dev/null
+#! /usr/bin/perl
+use strict;
+use warnings;
+use C4::Context;
+my $dbh=C4::Context->dbh;
+$dbh->do(<<ENDOFRENEWAL);
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
+ENDOFRENEWAL
+print "Upgrade done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
--- /dev/null
+#! /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";
INSERT INTO `letter` (module, code, name, title, content)
VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nTelefon: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Gebühr: <fine>EUR</fine></item>\n\nVielen Dank für die schnelle Erledigung.\n\n<<branches.branchname>> Ihr Bibliotheksteam\n'),
-('claimacquisition','ACQCLAIM','Reklamation (Erwerbung)','Titel nicht eingetroffen','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> bestellt) (je $<<aqorders.listprice>> €) sind nicht eingetroffen.'),
+('claimacquisition','ACQCLAIM','Reklamation (Erwerbung)','Titel nicht eingetroffen','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> bestellt) (je $<<aqorders.listprice>> €) sind nicht eingetroffen.</order>'),
('serial','RLIST','Umlaufliste','Zeitschrift ist jetzt verfügbar','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nDas folgende Heft ist jetzt verfügbar:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nBitte holen Sie es sobald möglich ab.'),
('members','ACCTDETAILS','Kontoinformationen - Standard','Ihr neues Benutzerkonto','Liebe/r <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nDie Daten Ihres neuen Benutzerkontos sind:\r\n\r\nBenutzer: <<borrowers.userid>>\r\nPasswort: <<borrowers.password>>\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 <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nDie folgenden Medien sind ab heute fällig:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
(13, 'manage_csv_profiles', 'CSV-Profile für Export verwalten'),
(13, 'moderate_tags', 'Von Benutzern vergebene Tags moderieren'),
(13, 'rotating_collections', 'Wandernde Sammlungen verwalten'),
+ (13, 'upload_local_cover_images', 'Upload local cover images'),
(15, 'check_expiration', 'Ablauf eines Abonnements prüfen'),
(15, 'claim_serials', 'Fehlende Hefte reklamieren'),
(15, 'create_subscription', 'Neues Abonnement anlegen'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, ''),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, ''),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, ''),
('546', 'Fußnote zur Sprache', 'Fußnote zur Sprache', 1, 0, NULL, ''),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, ''),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, ''),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'BKS'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'BKS'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'BKS'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'BKS'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'BKS'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'BKS'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'CF'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'CF'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'CF'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'CF'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'CF'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'CF'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'SR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'SR'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'SR'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'SR'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'SR'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'SR'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'VR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'VR'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'VR'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'VR'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'VR'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'VR'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'AR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'AR'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'AR'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'AR'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'AR'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'AR'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'KT'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'KT'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'KT'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'KT'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'KT'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'KT'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'IR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'IR'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'IR'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'IR'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'IR'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'IR'),
('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'SER'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'SER'),
+ ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'SER'),
('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'SER'),
('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'SER'),
('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'SER'),
INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
(3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
(4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
INSERT INTO `letter` (module, code, name, title, content)
VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nPhone: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>\n\nThank-you for your prompt attention to this matter.\n\n<<branches.branchname>> Staff\n'),
-('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.'),
+('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>'),
('serial','RLIST','Routing List','Serial is now available','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following issue is now available:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nPlease pick it up at your convenience.'),
('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <<borrowers.userid>>\r\nPassword: <<borrowers.password>>\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@yoursite.org'),
('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item is now due:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
(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'),
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', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.wthdrawn', 10, 'WITHDRAWN', '', '', 0, 0, '', '', '', NULL),
- ('952', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL),
+ ('952', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, -5, '', '', '', NULL),
('952', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'items.cn_source', 10, 'cn_source', '', '', NULL, 0, '', '', '', NULL),
('952', '3', 'Materials specified (bound volume or other part)', 'Materials specified (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', NULL, -1, '', '', '', NULL),
('952', '4', 'Damaged status', 'Damaged status', 0, 0, 'items.damaged', 10, 'DAMAGED', '', '', NULL, 0, '', '', '', NULL),
('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
(3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
(4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
INSERT INTO `letter` (module, code, name, title, content)
VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nPhone: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>\n\nThank-you for your prompt attention to this matter.\n\n<<branches.branchname>> Staff\n'),
-('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.'),
+('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>'),
('serial','RLIST','Routing List','Serial is now available','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following issue is now available:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nPlease pick it up at your convenience.'),
('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <<borrowers.userid>>\r\nPassword: <<borrowers.password>>\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@yoursite.org'),
('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item is now due:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
(3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
(4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
(module, code, name, title, content)
VALUES
('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nPhone: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>\n\nThank-you for your prompt attention to this matter.\n\n<<branches.branchname>> Staff\n'),
-('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.'),
+('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>'),
('serial','RLIST','Routing List','Serial is now available','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following issue is now available:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nPlease pick it up at your convenience.'),
('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <<borrowers.userid>>\r\nPassword: <<borrowers.password>>\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@yoursite.org'),
('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item is now due:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
(13, 'rotating_collections', 'Gérer les collections tournantes'),
(13, 'items_batchmod', 'Modifier les exemplaires par lot'),
(13, 'items_batchdel', 'Supprimer les exemplaires par lot'),
+ (13, 'upload_local_cover_images', 'Téléchargement des images de couverture'),
(15, 'check_expiration', 'Contrôler l''expiration d''un périodique'),
(15, 'claim_serials', 'Réclamer les périodiques manquants'),
(15, 'create_subscription', 'Créer de nouveaux abonnements'),
('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
INSERT INTO `letter` (module, code, name, title, content)
VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nPhone: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>\n\nThank-you for your prompt attention to this matter.\n\n<<branches.branchname>> Staff\n'),
-('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.'),
+('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>'),
('serial','RLIST','Routing List','Serial is now available','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following issue is now available:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nPlease pick it up at your convenience.'),
('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <<borrowers.userid>>\r\nPassword: <<borrowers.password>>\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@yoursite.org'),
('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item is now due:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
(13, 'manage_csv_profiles', 'Gestisci i profili CSV di export'),
(13, 'moderate_tags', 'Modera i tag inseriti dagli utenti'),
(13, 'rotating_collections', 'Gestisci le collezioni circolanti (rotating collections)'),
+ (13, 'upload_local_cover_images', 'Upload local cover images'),
(15, 'check_expiration', 'Controlla la scadenza di una risora in continuazione'),
(15, 'claim_serials', 'Richiedi i fascicoli non arrivati'),
(15, 'create_subscription', 'Crea un nuovo abbonamento'),
`cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
`cn_sort` varchar(30) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting
`ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
- `materials` varchar(10) default NULL, -- materials specified (MARC21 952$3)
+ `materials` text default NULL, -- materials specified (MARC21 952$3)
`uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y)
`more_subfields_xml` longtext default NULL, -- additional 952 subfields in XML format
--
DROP TABLE IF EXISTS `need_merge_authorities`;
-CREATE TABLE `need_merge_authorities` (
- `id` int NOT NULL auto_increment PRIMARY KEY,
- `authid` bigint NOT NULL,
- `done` tinyint DEFAULT 0
+CREATE TABLE `need_merge_authorities` ( -- keeping track of authority records still to be merged by merge_authority cron job (used only if pref dontmerge is ON)
+ `id` int NOT NULL auto_increment PRIMARY KEY, -- unique id
+ `authid` bigint NOT NULL, -- reference to authority record
+ `done` tinyint DEFAULT 0 -- indication whether merge has been executed (0=not done, 1= done, 2= in progress)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
`cancellationdate` date default NULL, -- the date this hold was cancelled
`reservenotes` mediumtext, -- notes related to this hold
`priority` smallint(6) default NULL, -- where in the queue the patron sits
- `found` varchar(1) default NULL, -- a one letter code defining what the the status is of the hold is after it has been confirmed
+ `found` varchar(1) default NULL, -- a one letter code defining what the status is of the hold is after it has been confirmed
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this hold was last updated
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library
`cancellationdate` date default NULL, -- the date this hold was cancelled
`reservenotes` mediumtext, -- notes related to this hold
`priority` smallint(6) default NULL, -- where in the queue the patron sits
- `found` varchar(1) default NULL, -- a one letter code defining what the the status is of the hold is after it has been confirmed
+ `found` varchar(1) default NULL, -- a one letter code defining what the status is of the hold is after it has been confirmed
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this hold was last updated
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library
`isbn` varchar(30) default NULL, -- isbn of the suggested item
`mailoverseeing` smallint(1) default 0,
`biblionumber` int(11) default NULL, -- foreign key linking the suggestion to the biblio table after the suggestion has been ordered
- `reason` text, -- reason for making the suggestion
+ `reason` text, -- reason for accepting or rejecting the suggestion
+ `patronreason` text, -- reason for making the suggestion
budgetid INT(11), -- foreign key linking the suggested budget to the aqbudgets table
branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
collectiontitle text default NULL, -- collection name for the suggested item
--
DROP TABLE IF EXISTS `aqbooksellers`;
-CREATE TABLE `aqbooksellers` (
- `id` int(11) NOT NULL auto_increment,
- `name` mediumtext NOT NULL,
- `address1` mediumtext,
- `address2` mediumtext,
- `address3` mediumtext,
- `address4` mediumtext,
- `phone` varchar(30) default NULL,
- `accountnumber` mediumtext,
- `othersupplier` mediumtext,
- `currency` varchar(3) NOT NULL default '',
- `booksellerfax` mediumtext,
- `notes` mediumtext,
- `bookselleremail` mediumtext,
- `booksellerurl` mediumtext,
- `contact` varchar(100) default NULL,
- `postal` mediumtext,
- `url` varchar(255) default NULL,
- `contpos` varchar(100) default NULL,
- `contphone` varchar(100) default NULL,
- `contfax` varchar(100) default NULL,
- `contaltphone` varchar(100) default NULL,
- `contemail` varchar(100) default NULL,
- `contnotes` mediumtext,
- `active` tinyint(4) default NULL,
- `listprice` varchar(10) default NULL,
- `invoiceprice` varchar(10) default NULL,
- `gstreg` tinyint(4) default NULL,
- `listincgst` tinyint(4) default NULL,
- `invoiceincgst` tinyint(4) default NULL,
- `gstrate` decimal(6,4) default NULL,
- `discount` float(6,4) default NULL,
- `fax` varchar(50) default NULL,
+CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquisitions
+ `id` int(11) NOT NULL auto_increment, -- primary key and unique identifier assigned by Koha
+ `name` mediumtext NOT NULL, -- vendor name
+ `address1` mediumtext, -- first line of vendor physical address
+ `address2` mediumtext, -- second line of vendor physical address
+ `address3` mediumtext, -- third line of vendor physical address
+ `address4` mediumtext, -- fourth line of vendor physical address
+ `phone` varchar(30) default NULL, -- vendor phone number
+ `accountnumber` mediumtext, -- unused in Koha
+ `othersupplier` mediumtext, -- unused in Koha
+ `currency` varchar(3) NOT NULL default '', -- unused in Koha
+ `booksellerfax` mediumtext, -- vendor fax number
+ `notes` mediumtext, -- order notes
+ `bookselleremail` mediumtext, -- vendor email
+ `booksellerurl` mediumtext, -- unused in Koha
+ `contact` varchar(100) default NULL, -- name of contact at vendor
+ `postal` mediumtext, -- vendor postal address (all lines)
+ `url` varchar(255) default NULL, -- vendor web address
+ `contpos` varchar(100) default NULL, -- contact person's position
+ `contphone` varchar(100) default NULL, -- contact's phone number
+ `contfax` varchar(100) default NULL, -- contact's fax number
+ `contaltphone` varchar(100) default NULL, -- contact's alternate phone number
+ `contemail` varchar(100) default NULL, -- contact's email address
+ `contnotes` mediumtext, -- notes related to the contact
+ `active` tinyint(4) default NULL, -- is this vendor active (1 for yes, 0 for no)
+ `listprice` varchar(10) default NULL, -- currency code for list prices
+ `invoiceprice` varchar(10) default NULL, -- currency code for invoice prices
+ `gstreg` tinyint(4) default NULL, -- is your library charged tax (1 for yes, 0 for no)
+ `listincgst` tinyint(4) default NULL, -- is tax included in list prices (1 for yes, 0 for no)
+ `invoiceincgst` tinyint(4) default NULL, -- is tax included in invoice prices (1 for yes, 0 for no)
+ `gstrate` decimal(6,4) default NULL, -- the tax rate the library is charged
+ `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor
+ `fax` varchar(50) default NULL, -- vendor fax number
PRIMARY KEY (`id`),
KEY `listprice` (`listprice`),
KEY `invoiceprice` (`invoiceprice`),
`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`),
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 */;
INSERT INTO `letter` (module, code, name, title, content)
VALUES ('circulation','ODUE','Purring','Purring på dokument','<<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nTelefon: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nE-post: <<branches.branchemail>>\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<item>"<<biblio.title>>" av <<biblio.author>>, <<items.itemcallnumber>>, Strekkode: <<items.barcode>> Gebyr: <fine>GBP</fine></item>\n\nPå forhånd takk.\n\n<<branches.branchname>>\n'),
-('claimacquisition','ACQCLAIM','Periodikapurring','Eksemplar ikke mottatt','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nBestillingsnummer <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) har ikke blitt mottatt.'),
+('claimacquisition','ACQCLAIM','Periodikapurring','Eksemplar ikke mottatt','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Bestillingsnummer <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) har ikke blitt mottatt.</order>'),
('serial','RLIST','Sirkulasjon','Et dokument er nå tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nDette dokumentet er tilgjengelig:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nVennligst kom og hent det når det passer.'),
('members','ACCTDETAILS','Mal for kontodetaljer - STANDARD','Dine nye kontodetaljer i Koha.','Hei <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nDine nye detaljer er:\r\n\r\nBruker: <<borrowers.userid>>\r\nPassord: <<borrowers.password>>\r\n\r\nDersom det oppstår problemer, vennligst kontakt biblioteket.\r\n\r\nVennlig hilsen,\r\nBiblioteket\r\nkohaadmin@yoursite.org'),
('circulation','DUE','Innleveringspåminnelse','Innleveringspåminnelse','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nDette dokumentet må nå leveres:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
(3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
(4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
--- /dev/null
+-- 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','','','');
--- /dev/null
+Rammeverk for hurtigkatalogisering i NORMARC. Inneholder et begrenset utvalg felter.
VALUES
('circulation','ODUE','Overdue Notice',
'Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nPhone: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>\n\nThank-you for your prompt attention to this matter.\n\n<<branches.branchname>> Staff\n'),
-('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.'),
+('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>'),
('serial','RLIST','Routing List','Serial is now available','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following issue is now available:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nPlease pick it up at your convenience.'),
('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <<borrowers.userid>>\r\nPassword: <<borrowers.password>>\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@yoursite.org'),
('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item is now due:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
(13, 'moderate_tags', 'Moderate patron tags'),
(16, 'execute_reports', 'Execute SQL reports'),
(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'),
('541','ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE','IMMEDIATE SOURCE OF ACQUISITION NOTE',1,0,NULL,''),
('543','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]',1,0,NULL,''),
('544','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE',1,0,NULL,''),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
('546','UWAGA O JĘZYKU','LANGUAGE NOTE',1,0,NULL,''),
('547','ZŁOŻONA UWAGA O POPRZEDNIM TYTULE','FORMER TITLE COMPLEXITY NOTE',1,0,NULL,''),
('550','UWAGA DOTYCZĄCA INSTYTUCJI SPRAWCZEJ','ISSUING BODY NOTE',1,0,NULL,''),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+ ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
(3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
(4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
(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'),
INSERT INTO `letter` (module, code, name, title, content)
VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nPhone: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>\n\nThank-you for your prompt attention to this matter.\n\n<<branches.branchname>> Staff\n'),
-('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.'),
+('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>'),
('serial','RLIST','Routing List','Serial is now available','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following issue is now available:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nPlease pick it up at your convenience.'),
('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <<borrowers.userid>>\r\nPassword: <<borrowers.password>>\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@yoursite.org'),
('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item is now due:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
VALUES
('circulation','ODUE','Уведомление о просрочке','Единица прострочена','Любезный <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nПо нашим нынешним записям, у Вас есть простроченные экземпляры. Ваша библиотека не взимает штрафы за опоздание, но, пожалуйста, поверните или обновите их как можно скорее.\r\n\r\n<<branches.branchname>><<branches.branchaddress1>><<branches.branchaddress2>><<branches.branchaddress3>><<branches.branchphone>><<branches.branchfax>><<branches.branchemail>>Если Вы зарегистрировали пароль в библиотеке, вы можете использовать его с вашим номером библиотечного билета для продолжения онлайн. Если экземпляр имеет просрочки более чем на 30 дней, Вы не сможете использовать Ваш читательский билет пока не вернете экземпляр. Следующий экземпляр в настоящее время является просроченным:\r\n\r\n<<items.content>>'),
-('claimacquisition','ACQCLAIM','Требование приобретения','Экземпляр не получено','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nНомер заказа <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> каждый) получено не было.'),
+('claimacquisition','ACQCLAIM','Требование приобретения','Экземпляр не получено','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Номер заказа <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> каждый) получено не было.</order>'),
('serial','RLIST','Список скерування','Сериальные издания уже доступное','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nСледующий выпуск уже доступен:\r\n\r\n<<items.content>>\r\n\r\nПросьба забрать его в любое удобное для Вас время.'),
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ThingISBN',0,'Use with FRBRizeEditions. If ON, Koha will use the ThingISBN web service in the Editions tab on the detail pages.','','YesNo');
-- I18N/L10N
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dateformat','us','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy/mm/dd)','metric|us|iso','Choice');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dateformat','us','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd)','metric|us|iso','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opaclanguages','en','Set the default language in the OPAC.',NULL,'Languages');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opaclanguagesdisplay',0,'If ON, enables display of Change Language feature on OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowersTitles','Mr|Mrs|Miss|Ms','Define appropriate Titles for patrons',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free');
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 ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',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');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
+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');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define export options available on OPAC detail page.','','free');
(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'),
INSERT INTO `letter` (module, code, name, title, content)
VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.firstname>> <<borrowers.surname>>,\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<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>> <<branches.branchaddress3>>\nPhone: <<branches.branchphone>>\nFax: <<branches.branchfax>>\nEmail: <<branches.branchemail>>\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<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>\n\nThank-you for your prompt attention to this matter.\n\n<<branches.branchname>> Staff\n'),
-('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nOrdernumber <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.'),
+('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>'),
('serial','RLIST','Routing List','Serial is now available','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following issue is now available:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nPlease pick it up at your convenience.'),
('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <<borrowers.userid>>\r\nPassword: <<borrowers.password>>\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@yoursite.org'),
('circulation','DUE','Item Due Reminder','Item Due Reminder','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item is now due:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'),
VALUES
('circulation','ODUE','Повідомлення про прострочення','Одиниця прострочена','Добродію <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nПо нашим нинішнім записам, у Вас є прострочені екземпляри. Ваша бібліотека не стягує штрафи за запізнення, але, будь ласка, поверніть або оновіть їх як можна швидше.\r\n\r\n<<branches.branchname>><<branches.branchaddress1>><<branches.branchaddress2>><<branches.branchaddress3>><<branches.branchphone>><<branches.branchfax>><<branches.branchemail>>Якщо Ви зареєстрували пароль у бібліотеці, ви можете використовувати його з Вашим номером бібліотечного квитка для продовження онлайн. Якщо примірник має прострочення більш ніж на 30 днів, Ви не зможете використовувати Ваш читацький квиток доки не повернете примірник. Наступний примірник в даний час є простроченим:\r\n\r\n<<items.content>>'),
-('claimacquisition','ACQCLAIM','Вимога придбання','Примірник не отримано','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\nНомер замовлення <<aqorders.ordernumber>> (<<aqorders.title>>) (<<aqorders.quantity>> замовлено) (<<aqorders.listprice>> кожний) отримано не було.'),
+('claimacquisition','ACQCLAIM','Вимога придбання','Примірник не отримано','<<aqbooksellers.name>>\r\n<<aqbooksellers.address1>>\r\n<<aqbooksellers.address2>>\r\n<<aqbooksellers.address3>>\r\n<<aqbooksellers.address4>>\r\n<<aqbooksellers.phone>>\r\n\r\n<order>Номер замовлення <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> замовлено) (<<aqorders.listprice>> кожний) отримано не було.</order>'),
('serial','RLIST','Список направления','Серіальне видання вже доступне','<<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nНаступний випуск вже доступний:\r\n\r\n<<items.content>>\r\n\r\nПрохання забрати його в будь-який зручний для Вас час.'),
SetVersion ($DBversion);
}
-$DBversion = "3.06.00.001";
+$DBversion = "3.07.00.001";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
- my $borrowers = $dbh->selectcol_arrayref( "SELECT borrowernumber from borrowers where debarred <>0;", { Columns => [1] } );
+ my $borrowers = $dbh->selectcol_arrayref( "SELECT borrowernumber from borrowers where debarred =1;", { Columns => [1] } );
$dbh->do("ALTER TABLE borrowers MODIFY debarred DATE DEFAULT NULL;");
$dbh->do( "UPDATE borrowers set debarred='9999-12-31' where borrowernumber IN (" . join( ",", @$borrowers ) . ");" ) if ($borrowers and scalar(@$borrowers)>0);
$dbh->do("ALTER TABLE borrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;");
$dbh->do("ALTER TABLE deletedborrowers MODIFY debarred DATE DEFAULT NULL;");
$dbh->do("ALTER TABLE deletedborrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;");
print "Upgrade done (Change borrowers.debarred into Date )\n";
-
SetVersion($DBversion);
}
-$DBversion = "3.06.00.002";
+$DBversion = "3.07.00.002";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
$dbh->do("UPDATE borrowers SET debarred=NULL WHERE debarred='0000-00-00';");
print "Setting NULL to debarred where 0000-00-00 is stored (bug 7272)\n";
SetVersion($DBversion);
}
-$DBversion = "3.06.02.001";
+$DBversion = "3.07.00.003";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
$dbh->do(" UPDATE `message_attributes` SET message_name='Item_Due' WHERE message_name='Item_DUE'");
print "Updating message_name in message_attributes\n";
SetVersion($DBversion);
}
+$DBversion = "3.07.00.004";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE `suggestions` ADD `patronreason` TEXT NULL AFTER `reason`");
+ print "Upgrade to $DBversion done (Add column to suggestions table to store patrons' reasons for submitting a suggestion. )\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.07.00.005";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BorrowerUnwantedField','','Name the fields you don''t need to store for a patron''s account',NULL,'free')");
+ print "Upgrade to $DBversion done (BorrowerUnwantedField syspref)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.07.00.006";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');");
+ print "Upgrade to $DBversion done (Add syspref CircAutoPrintQuickSlip to control what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window (default value, 3.6 behaviour) or clear the screen (previous 3.6 behaviour). )\n";
+ SetVersion($DBversion);
+}
+
+
+$DBversion = "3.07.00.007";
+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);
+}
+
+$DBversion = '3.07.00.008';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ if (C4::Context->preference("marcflavour") eq 'MARC21') {
+ if (C4::Context->preference("opaclanguages") eq "de") {
+ $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, '');");
+ } else {
+ $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, '');");
+ }
+ }
+ print "Upgrade to $DBversion done (add MARC21 field 545 to framework)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.07.00.009";
+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);
+}
+
+$DBversion = "3.07.00.010";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $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 to $DBversion done (Added support for local cover images)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.07.00.011";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do(<<ENDOFRENEWAL);
+ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
+ENDOFRENEWAL
+ print "Upgrade to $DBversion done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.07.00.012";
+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);
+}
+
+$DBversion = "3.07.00.013"; #FIXME
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define available export options on OPAC detail page.','','free');");
+ print "Upgrade to $DBversion done (Bug 7345: Add system preference OpacExportOptions.)\n";
+ SetVersion($DBversion);
+}
+
+
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)
my $version = shift;
# remove the 3 last . to have a Perl number
$version =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/;
+ # three X's at the end indicate that you are testing patch with dbrev
+ # change it into 999
+ # prevents error on a < comparison between strings (should be: lt)
+ $version =~ s/XXX$/999/;
return $version;
}
=cut
sub SetVersion {
- my $kohaversion = TransformToNum(shift);
+ return if $_[0]=~ /XXX$/;
+ #you are testing a patch with a db revision; do not change version
+ my $kohaversion = TransformToNum($_[0]);
if (C4::Context->preference('Version')) {
my $finish=$dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='Version'");
$finish->execute($kohaversion);
$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 );
}
}
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
--- /dev/null
+input.search_init {
+ color: #999999;
+}
+.sorting_asc {
+ padding-right: 19px;
+ background: url("../../img/asc.gif") no-repeat scroll right center #EEEEEE;
+}
+.sorting_desc {
+ padding-right: 19px;
+ background: url("../../img/desc.gif") no-repeat scroll right center #EEEEEE;
+}
+.sorting {
+ padding-right: 19px;
+ background: url("../../img/ascdesc.gif") 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;
+}
+
+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%;
+}
+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;
+}
}
.submit input, .submit input:focus, .button {
- background: url(../../img/button-bg.gif );
- border: 1px solid #999;
- border-left-color: #ccc;
- border-top-color: #ccc;
- color: #333;
+ border: 1px outset #999999;
+ border-top-color: #666;
+ border-left-color: #666;
+ -moz-border-radius : 2px;
+ padding: 0.25em;
+ 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;
padding: 0.25em;
}
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 */
+ -moz-border-top-left-radius: 5px;
+ border-top-left-radius: 5px;
+ -moz-border-bottom-left-radius: 5px;
+ border-bottom-left-radius: 5px;
border: 1px solid #000;
font-size: 111%;
margin: .5em 0;
font-weight: bold;
text-align : center;
}
+a.localimage img {
+ border : 1px solid #0000CC;
+ margin : 0 .5em;
+ padding : .3em;
+}
+div.pager p {
+ margin: 0;
+}
[% IF ( CAN_user_reserveforothers ) %]
[% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% IF ( object ) %][% object %][% ELSE %][% biblionumber %][% END %]">Holds</a></li>
[% END %]
- [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% IF ( object ) %][% object %]&analyze=1[% ELSE %][% biblionumber %]&analyze=1[% END %]">Analytics</a></li>[% END %]
+ [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% IF ( object ) %][% object %]&analyze=1[% ELSE %][% biblionumber %]&analyze=1[% END %]">Analytics</a></li>[% END %]
[% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&biblionumber=[% biblionumber %]">Subscription(s)</a></li>[% END %]
</ul>
[% IF ( budget_period_id ) %]
var periods_menu = [
{ text: _("Edit budget") + " '[% budget_period_description %]'", url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=[% budget_period_id %]" },
- <!-- { text: _("Duplicate budget") + " '[% budget_period_description %]'" } -->
+ { text: _("Duplicate budget") + " '[% budget_period_description %]'", url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=duplicate_form&budget_period_id=[% budget_period_id %]" },
]
[% END %]
[% 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 || OPACLocalCoverImages) %][% 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 %]
{ text: _("Dublin Core (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=dc&op=export&bib=[% biblionumber %]" },
{ text: _("MARCXML"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcxml&op=export&bib=[% biblionumber %]" },
{ text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marc8&op=export&bib=[% biblionumber %]" },
- { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=[% biblionumber %]" }
+ { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=[% biblionumber %]" },
+ { text: _("MARC (Unicode/UTF-8, Standard)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcstd&op=export&bib=[% biblionumber %]" }
];
new YAHOO.widget.Button({
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
var HoldForButton = new YAHOO.widget.Button({
id: "holdfor",
type: "split",
- label: "Place hold",
+ label: _("Place hold"),
name: "holdfor",
menu: HoldForButtonMenu,
container: this,
<li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
[% END %]
[% END %]
- <li>[% IF ( address ) %]
- [% address %]
+ [% IF ( address or address2 ) %]
+ [% IF ( address ) %]
+ <li>[% address %]</li>
+ [% END %]
+ [% IF ( address2 ) %]
+ <li>[% address2 %]</li>
+ [% END %]
[% ELSE %]
- <span class="empty">No address stored.</span>
- [% END %]</li>
- [% IF ( address2 ) %]
- <li>[% address2 %]</li>
- [% END %]<li>
+ <li><span class="empty" id="noadressstored">No address stored.</span></li>
+ [% END %]
[% IF ( city ) %]
[% city %][% IF ( state ) %], [% state %][% END %]
[% zipcode %][% IF ( country ) %], [% country %][% END %]
[% ELSE %]
- <span class="empty">No city stored.</span>
+ <span class="empty" id="nocitystored">No city stored.</span>
[% END %]</li>
<li>[% IF ( phone ) %]
[% phone %]
[% IF ( phonepro ) %]
[% phonepro %]
[% ELSE %]
- <span class="empty">No phone stored.</span>
+ <span class="empty" id="nophonestored">No phone stored.</span>
[% END %]
[% END %]
[% END %]</li>
<li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="[% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
[% END %]
[% END %]
- <li>[% IF borrower.address %]
- [% borrower.address %]
+ [% IF ( borrower.address or borrower.address2 ) %]
+ [% IF ( borrower.address ) %]
+ <li>[% borrower.address %]</li>
+ [% END %]
+ [% IF ( borrower.address2 ) %]
+ <li>[% borrower.address2 %]</li>
+ [% END %]
[% ELSE %]
- <span class="empty">No address stored.</span>
- [% END %]</li>
- [% IF borrower.address2 %]
- <li>[% borrower.address2 %]</li>
- [% END %]<li>
+ <li><span class="empty" id="noaddressstored">No address stored.</span></li>
+ [% END %]
+ <li>
[% IF borrower.city %]
[% borrower.city %][% IF borrower.state %], [% borrower.state %][% END %]
[% borrower.zipcode %][% IF ( borrower.country ) %], [% borrower.country %][% END %]
[% ELSE %]
- <span class="empty">No city stored.</span>
+ <span class="empty" id="nocitystored">No city stored.</span>
[% END %]</li>
<li>[% IF borrower.phone %]
[% borrower.phone %]
[% IF borrower.phonepro %]
[% borrower.phonepro %]
[% ELSE %]
- <span class="empty">No phone stored.</span>
+ <span class="empty" id="nophonestored">No phone stored.</span>
[% END %]
[% END %]
[% END %]</li>
[% END %]
[% END %]
[% IF ( CAN_user_borrowers ) %]
- [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C">Add child</a></li>[% END %]
+ [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C">Add child</a></li>[% END %]
[% IF ( CAN_user_staffaccess ) %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %]
[% END %]
<li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]">Duplicate</a></li>
--- /dev/null
+<script type="text/javascript">
+//<![CDATA[
+ var MSG_DT_FIRST = _("First");
+ var MSG_DT_LAST = _("Last");
+ var MSG_DT_NEXT = _("Next");
+ var MSG_DT_PREVIOUS = _("Previous");
+ var MSG_DT_EMPTY_TABLE = _("No data available in table");
+ var MSG_DT_INFO = _("Showing _START_ to _END_ of _TOTAL_");
+ var MSG_DT_INFO_EMPTY = _("No entries to show");
+ var MSG_DT_INFO_FILTERED = _("(filtered from _MAX_ total entries)");
+ var MSG_DT_LENGTH_MENU = _("Show _MENU_ entries");
+ var MSG_DT_LOADING_RECORDS = _("Loading...");
+ var MSG_DT_PROCESSING = _("Processing...");
+ var MSG_DT_SEARCH = _("Search:");
+ var MSG_DT_ZERO_RECORDS = _("No matching records found");
+//]]>
+</script>
-[% IF ( dateformat_us ) %](MM/DD/YYYY)[% ELSIF ( dateformat_metric ) %](DD/MM/YYYY)[% ELSE %](YYYY/MM/DD)[% END %]
\ No newline at end of file
+[% IF ( dateformat_us ) %](MM/DD/YYYY)[% ELSIF ( dateformat_metric ) %](DD/MM/YYYY)[% ELSE %](YYYY-MM-DD)[% END %]
\ No newline at end of file
[% IF ( virtualshelves || intranetbookbag ) %]
<script type="text/javascript" language="javascript" src="[% themelang %]/js/basket.js"></script>
[% END %]
+[% IF LocalCoverImages %]
+<script type="text/javascript" language="javascript" src="[% themelang %]/js/localcovers.js"></script>
+<script type="text/javascript" language="javascript">
+//<![CDATA[
+var NO_LOCAL_JACKET = _("No cover image available");
+//]]>
+</script>
+[% END %]
[% ELSE %]
You are not logged in |
[% END %]
- <a href="/cgi-bin/koha/help.pl" id="helper" onclick="window.open('/cgi-bin/koha/help.pl?url='+escape(document.url),'Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); return false;">[ ? ]</a>
+ <a href="/cgi-bin/koha/help.pl" id="helper" onclick="var link=window.open('','Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); link.location='/cgi-bin/koha/help.pl'; return false;">[ ? ]</a>
</div>
</div>
<li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&category_type=A">Edit</a></li>
[% END %]
[% END %]
- [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C">Add child</a></li>[% END %]
+ [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C">Add child</a></li>[% END %]
[% IF CAN_user_staffaccess %]<li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li> [% END %]
<li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]">Duplicate</a></li>
<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=page">Print Page</a></li>
label: _("Edit"),
name: "editmenubutton",
menu: editmenu,
- container: "editmenuc",
+ container: "editmenuc"
});
[% END %]
-<div class="pager"><form class="formpager" action=""><label>Page(s):
+<div class="pager"><p class="formpager" action=""><label>Page(s):
<img src="[% interface %]/prog/img/first.png" alt="" class="first"/>
<img src="[% interface %]/prog/img/prev.png" alt="" class="prev"/>
<input type="text" size="5" class="pagedisplay"/></label>
[% IF ( perpage == 100) %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
[% IF ( perpage == 200) %]<option value="200" selected="selected">200</option>[% ELSE %]<option value="200">200</option>[% END %]
</select></label>
-</form></div>
\ No newline at end of file
+</p></div>
\ No newline at end of file
[% IF ( CAN_user_tools_manage_staged_marc ) %]
<li><a href="/cgi-bin/koha/tools/manage-marc-import.pl">Staged MARC management</a></li>
[% END %]
+ [% IF ( CAN_user_tools_upload_local_cover_images ) %]
+ <li><a href="/cgi-bin/koha/tools/upload-cover-image.pl">Upload Local Cover Image</a></li>
+ [% END %]
</ul>
<h5>Additional Tools</h5>
<ul>
{ 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 %]
];
[% END %]
</ul>
</div>
-
\ No newline at end of file
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<children.length; j=j+1) {
// The yahoo drag and drop is (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
ddtarget = YAHOO.util.DragDropMgr.getDDById(children[j].id);
if( ! ddtarget ) {
new DDList(children[j].id);
}
function cloneItemBlock(index) {
var original = document.getElementById(index); //original <div>
- 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.
// 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<origin.length; i++) {
+ selectelem[i].selectedIndex = origin[i].selectedIndex;
+ }
+ origin = null;
+ selectelem = null;
+ return tmp;
+ }
+
$(document).ready(function(){
$(".cloneItemBlock").click(function(){
var clonedRow = $(this).parent().parent().clone(true);
function showCart(){
var position = $("#cartmenulink").offset();
+ var scrolld = $(window).scrollTop();
var top = position.top + $("#cartmenulink").outerHeight();
+ if( scrolld > top ){
+ top = scrolld + 15;
+ }
var left = position.left
$("#cartDetails").css("position","absolute").css("top",top);
$("#cartDetails").css("position","absolute").css("left",left);
--- /dev/null
+// 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"
+ },
+ "sDom": '<"top pager"ilpf>t<"bottom pager"ip>'
+};
+
+
+// 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<c; i++) {
+ iRow = aiRows[i];
+ var aData = this.fnGetData(iRow);
+ var sValue = aData[iColumn];
+ // ignore empty values?
+ if (bIgnoreEmpty == true && sValue.length == 0) continue;
+ // ignore unique values?
+ else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -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
+// <a href="foo.pl">bar</a> 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 = $('<span style="white-space:nowrap">' + _("From") + '<input type="text" id="' + id + 'from" readonly="readonly" placeholder=\'' + _("Pick date") + '\' size="7" /><a title="Delete this filter" style="cursor:pointer" onclick=\'$("#' + id + 'from").val("").change();\' >×</a></span><br/><span style="white-space:nowrap">' + _("To") + '<input type="text" id="' + id + 'to" readonly="readonly" placeholder=\'' + _("Pick date") + '\' size="7" /><a title="Delete this filter" style="cursor:pointer" onclick=\'$("#' + id + 'to").val("").change();\' >×</a></span>');
+ $(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 );
+}
+
+$.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<iLen ; i++ )
+ {
+ var buttons = an[i].getElementsByTagName('span');
+ if ( oSettings._iDisplayStart === 0 )
+ {
+ buttons[0].className = "paginate_disabled_first";
+ buttons[1].className = "paginate_disabled_previous";
+ }
+ else
+ {
+ buttons[0].className = "paginate_enabled_first";
+ buttons[1].className = "paginate_enabled_previous";
+ }
+
+ if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() )
+ {
+ buttons[2].className = "paginate_disabled_next";
+ buttons[3].className = "paginate_disabled_last";
+ }
+ else
+ {
+ buttons[2].className = "paginate_enabled_next";
+ buttons[3].className = "paginate_enabled_last";
+ }
+ }
+ }
+};
--- /dev/null
+if (typeof KOHA == "undefined" || !KOHA) {
+ var KOHA = {};
+}
+
+/**
+ * A namespace for local cover related functions.
+ */
+KOHA.LocalCover = {
+
+
+ /**
+ * Search all:
+ * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail"></div>
+ * or
+ * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail-preview"></div>
+ * and run a search with all collected isbns to Open Library Book Search.
+ * The result is asynchronously returned by OpenLibrary and catched by
+ * olCallBack().
+ */
+ GetCoverFromBibnumber: function(uselink) {
+ $("div [id^=local-thumbnail]").each(function(i) {
+ var mydiv = this;
+ var message = document.createElement("span");
+ $(message).attr("class","no-image");
+ $(message).html(NO_LOCAL_JACKET);
+ $(mydiv).append(message);
+ var img = $("<img />").attr('src',
+ '/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class"))
+ .load(function () {
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
+ } else {
+ if (uselink) {
+ var a = $("<a />").attr('href', '/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=' + $(mydiv).attr("class"));
+ $(a).append(img);
+ $(mydiv).append(a);
+ } else {
+ $(mydiv).append(img);
+ }
+ $(mydiv).children('.no-image').remove();
+ }
+ })
+ });
+ }
+};
Version 2.0.6 (2006-05-03)\r
Added new theme_advanced_source_editor_wrap option, this gives the possibility to force word wrapping.\r
Added new support for using div,blockquote,dt,dd,code,samp as a items in the theme_advanced_blockformats option.\r
- Added new strict_loading_mode option, this switches the loading method from document.write to DOM.\r
- Added new hidden_tab_class, display_tab_class options for resolving the MSIE image dimension bug.\r
- Added new absolute layer support, this was added to a new plugin called layer.\r
- Added new CSS style properties support, this was as a plugin called style.\r
- Fixed bug where TinyMCE was reporting a warning when inserting a image while running on HTTPS.\r
- Fixed bug where pressing the browser back button after submit removed empty paragraphs in MSIE.\r
- Fixed bug where links the the same page as the editor page was converted into a /.\r
- Fixed bug where the getSelectedHTML method was returning undefined when selecting controls in MSIE.\r
- Fixed bug with unterminated string literal errors where reported in some browsers.\r
- Fixed bug where src and href where converted into xsrc and xhref in text.\r
- Fixed bug where two characters where removed by backspace sometimes in Gecko.\r
- Fixed bug where class drop list wasn't visible in some of the table dialogs.\r
- Fixed bug where br elements where incorrectly removed within paragraphs on backspace.\r
+ Added new strict_loading_mode option, this switches the loading method from document.write to DOM.
+ Added new hidden_tab_class, display_tab_class options for resolving the MSIE image dimension bug.
+ Added new absolute layer support, this was added to a new plugin called layer.
+ Added new CSS style properties support, this was as a plugin called style.
+ Fixed bug where TinyMCE was reporting a warning when inserting a image while running on HTTPS.
+ Fixed bug where pressing the browser back button after submit removed empty paragraphs in MSIE.
+ Fixed bug where links the same page as the editor page was converted into a /.
+ Fixed bug where the getSelectedHTML method was returning undefined when selecting controls in MSIE.
+ Fixed bug with unterminated string literal errors where reported in some browsers.
+ Fixed bug where src and href where converted into xsrc and xhref in text.
+ Fixed bug where two characters where removed by backspace sometimes in Gecko.
+ Fixed bug where class drop list wasn't visible in some of the table dialogs.
+ Fixed bug where br elements where incorrectly removed within paragraphs on backspace.
Fixed bug where drag/drop operations failed in MSIE when editor height was set to a % value.\r
Fixed bug where width/height was lost on images if they where placed in hidden tabs in MSIE.\r
Fixed bugs with CSS auto import parsing, contributed by Scott Eade.\r
Fixed stange issue where elements sometimes disappeared in MSIE.\r
Fixed URL convertion problems with onmouseover, onmouseout image urls in advimage plugin.\r
Fixed URL convertion problems with Flash plugin.\r
- Fixed the experimental Safari support, some features work some doesn't.\r
- Fixed bug where multiple a elements where created when updating links on images in FF/Mozilla.\r
- Fixed bug in importCSS function, was having a meaning less if statement.\r
- Fixed so the contextmenu plugin uses images from the configurated theme instead of the advanced theme.\r
- Fixed so the external_link_list_url/external_image_list_url options can use relative or absolute path.\r
- Fixed so the external_link_list_url/external_image_list_url has a random query parameter to prevent it from cache.\r
- Added new mceInsertRawHTML command, this inserts raw as it is HTML code in the the selected position.\r
- Added paste plain text plugin contributed by Ryan Demmer, converted it into a paste plugin.\r
- Added updated paste plugin contributed by speednet, includes paste directly feature for MSIE.\r
- Added split/merge table cells support, to table plugin and context menus.\r
- Added cut/copy/paste table rows functionality to context menu and table plugin.\r
- Added new mceSetContent command, this does the same as the setContent function.\r
- Added new clear all/new document icon to advanced theme.\r
+ Fixed the experimental Safari support, some features work some doesn't.
+ Fixed bug where multiple a elements where created when updating links on images in FF/Mozilla.
+ Fixed bug in importCSS function, was having a meaning less if statement.
+ Fixed so the contextmenu plugin uses images from the configurated theme instead of the advanced theme.
+ Fixed so the external_link_list_url/external_image_list_url options can use relative or absolute path.
+ Fixed so the external_link_list_url/external_image_list_url has a random query parameter to prevent it from cache.
+ Added new mceInsertRawHTML command, this inserts raw as it is HTML code in the selected position.
+ Added paste plain text plugin contributed by Ryan Demmer, converted it into a paste plugin.
+ Added updated paste plugin contributed by speednet, includes paste directly feature for MSIE.
+ Added split/merge table cells support, to table plugin and context menus.
+ Added cut/copy/paste table rows functionality to context menu and table plugin.
+ Added new mceSetContent command, this does the same as the setContent function.
+ Added new clear all/new document icon to advanced theme.
Added new remove formatting and select text color icons.\r
Added new directionality plugin to better support languages that write from right to left.\r
Added new fullscreen plugin, enables users to toggle fullscreen editing mode.\r
-/* This file contains the CSS data for the editable area(iframe) of TinyMCE */\r
-/* You can extend this CSS by adding your own CSS file with the the content_css option */\r
-\r
-body, td, pre {\r
- font-family: Verdana, Arial, Helvetica, sans-serif;\r
- font-size: 10px;\r
-}\r
-\r
+/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
+/* You can extend this CSS by adding your own CSS file with the content_css option */
+
+body, td, pre {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
body {\r
background-color: #FFFFFF;\r
}\r
--- /dev/null
+/*
+ * 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<s;r++)if(l[r].childNodes.length!==0){l[r].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[r].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:
+g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,r){var s=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),G=p.createElement("span"),x=p.createElement("span");s.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;G.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var v=g.oClasses;s.className=v.sPageButton+" "+v.sPageFirst;w.className=v.sPageButton+" "+v.sPagePrevious;G.className=
+v.sPageButton+" "+v.sPageNext;x.className=v.sPageButton+" "+v.sPageLast;l.appendChild(s);l.appendChild(w);l.appendChild(y);l.appendChild(G);l.appendChild(x);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(G).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&r(g)});i("span",l).bind("mousedown.DT",function(){return false}).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+"_first");w.setAttribute("id",g.sTableId+"_previous");G.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,l){if(g.aanFeatures.p){var r=o.oPagination.iFullNumbersShowPages,s=Math.floor(r/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,G=
+"",x,v=g.oClasses;if(w<r){s=1;x=w}else if(y<=s){s=1;x=r}else if(y>=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?'<span class="'+v.sPageButton+'">'+r+"</span>":'<span class="'+v.sPageButtonActive+'">'+r+"</span>";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;r<s;r++)if(x[r].childNodes.length!==0){z=i("span:eq(2)",x[r]);z.html(G);i("span",z).bind("click.DT",
+Y).bind("mousedown.DT",V).bind("selectstart.DT",V);z=x[r].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];i(z).removeClass(v.sPageButton+" "+v.sPageButtonActive+" "+v.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+v.sPageButtonStaticDisabled;z[1].className+=" "+v.sPageButtonStaticDisabled}else{z[0].className+=" "+v.sPageButton;z[1].className+=" "+v.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+v.sPageButtonStaticDisabled;z[3].className+=" "+
+v.sPageButtonStaticDisabled}else{z[2].className+=" "+v.sPageButton;z[3].className+=" "+v.sPageButton}}}}}};o.oSort={"string-asc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-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 g<l?1:g>l?-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<g.length;s++){l=g.charAt(s);if("0123456789.".indexOf(l)==-1)return null;if(l=="."){if(r)return null;r=true}}return"numeric"},function(g){var l=Date.parse(g);
+if(l!==null&&!isNaN(l)||typeof g=="string"&&g.length===0)return"date";return null},function(g){if(typeof g=="string"&&g.indexOf("<")!=-1&&g.indexOf(">")!=-1)return"html";return null}];o.fnVersionCheck=function(g){var l=function(x,v){for(;x.length<v;)x+="0";return x},r=o.sVersion.split(".");g=g.split(".");for(var s="",w="",y=0,G=g.length;y<G;y++){s+=l(r[y],3);w+=l(g[y],3)}return parseInt(s,10)>=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;d<b;d++){if(d%3===0&&d!==0)c=","+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=o.oStdClasses;this.bSortCellsTop=this.bSorted=this.bFiltered=false;this.oInit=null}function r(a){return function(){var b=
+[A(this[o.iApiIndex])].concat(Array.prototype.slice.call(arguments));return o.oApi[a].apply(this,b)}}function s(a){var b,c,d=a.iInitDisplayStart;if(a.bInitialised===false)setTimeout(function(){s(a)},200);else{xa(a);V(a);L(a,a.aoHeader);a.nTFoot&&L(a,a.aoFooter);K(a,true);a.oFeatures.bAutoWidth&&ea(a);b=0;for(c=a.aoColumns.length;b<c;b++)if(a.aoColumns[b].sWidth!==null)a.aoColumns[b].nTh.style.width=u(a.aoColumns[b].sWidth);if(a.oFeatures.bSort)R(a);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);
+else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide)a.fnServerData.call(a.oInstance,a.sAjaxSource,[],function(f){var e=f;if(a.sAjaxDataProp!=="")e=Z(a.sAjaxDataProp)(f);for(b=0;b<e.length;b++)v(a,e[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)R(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}K(a,false);w(a,f)},a);else if(!a.oFeatures.bServerSide){K(a,false);w(a)}}}function w(a,b){a._bInitComplete=true;if(typeof a.fnInitComplete=="function")typeof b!=
+"undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a)}function y(a,b,c){n(a.oLanguage,b,"sProcessing");n(a.oLanguage,b,"sLengthMenu");n(a.oLanguage,b,"sEmptyTable");n(a.oLanguage,b,"sLoadingRecords");n(a.oLanguage,b,"sZeroRecords");n(a.oLanguage,b,"sInfo");n(a.oLanguage,b,"sInfoEmpty");n(a.oLanguage,b,"sInfoFiltered");n(a.oLanguage,b,"sInfoPostFix");n(a.oLanguage,b,"sSearch");if(typeof b.oPaginate!="undefined"){n(a.oLanguage.oPaginate,b.oPaginate,"sFirst");n(a.oLanguage.oPaginate,
+b.oPaginate,"sPrevious");n(a.oLanguage.oPaginate,b.oPaginate,"sNext");n(a.oLanguage.oPaginate,b.oPaginate,"sLast")}typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&n(a.oLanguage,b,"sZeroRecords","sEmptyTable");typeof b.sLoadingRecords=="undefined"&&typeof b.sZeroRecords!="undefined"&&n(a.oLanguage,b,"sZeroRecords","sLoadingRecords");c&&s(a)}function G(a,b){var c=a.aoColumns.length;b={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],
+sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:c,mDataProp:c,fnGetData:null,fnSetData:null,sSortDataType:"std",sDefaultContent:null,sContentPadding:"",nTh:b?b:p.createElement("th"),nTf:null};a.aoColumns.push(b);if(typeof a.aoPreSearchCols[c]=="undefined"||a.aoPreSearchCols[c]===null)a.aoPreSearchCols[c]={sSearch:"",bRegex:false,bSmart:true};else{if(typeof a.aoPreSearchCols[c].bRegex==
+"undefined")a.aoPreSearchCols[c].bRegex=true;if(typeof a.aoPreSearchCols[c].bSmart=="undefined")a.aoPreSearchCols[c].bSmart=true}x(a,c,null)}function x(a,b,c){b=a.aoColumns[b];if(typeof c!="undefined"&&c!==null){if(typeof c.sType!="undefined"){b.sType=c.sType;b._bAutoType=false}n(b,c,"bVisible");n(b,c,"bSearchable");n(b,c,"bSortable");n(b,c,"sTitle");n(b,c,"sName");n(b,c,"sWidth");n(b,c,"sWidth","sWidthOrig");n(b,c,"sClass");n(b,c,"fnRender");n(b,c,"bUseRendered");n(b,c,"iDataSort");n(b,c,"mDataProp");
+n(b,c,"asSorting");n(b,c,"sSortDataType");n(b,c,"sDefaultContent");n(b,c,"sContentPadding")}b.fnGetData=Z(b.mDataProp);b.fnSetData=ya(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=false;if(!b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableNone;b.sSortingClassJUI=""}else if(b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortable;b.sSortingClassJUI=a.oClasses.sSortJUI}else if(i.inArray("asc",
+b.asSorting)!=-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableAsc;b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed}else if(i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)!=-1){b.sSortingClass=a.oClasses.sSortableDesc;b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed}}function v(a,b){var c;c=typeof b.length=="number"?b.slice():i.extend(true,{},b);b=a.aoData.length;var d={nTr:null,_iId:a.iNextId++,_aData:c,_anHidden:[],_sRowStripe:""};a.aoData.push(d);for(var f,
+e=0,h=a.aoColumns.length;e<h;e++){c=a.aoColumns[e];typeof c.fnRender=="function"&&c.bUseRendered&&c.mDataProp!==null&&N(a,b,e,c.fnRender({iDataRow:b,iDataColumn:e,aData:d._aData,oSettings:a}));if(c._bAutoType&&c.sType!="string"){f=H(a,b,e,"type");if(f!==null&&f!==""){f=fa(f);if(c.sType===null)c.sType=f;else if(c.sType!=f)c.sType="string"}}}a.aiDisplayMaster.push(b);a.oFeatures.bDeferRender||z(a,b);return b}function z(a,b){var c=a.aoData[b],d;if(c.nTr===null){c.nTr=p.createElement("tr");typeof c._aData.DT_RowId!=
+"undefined"&&c.nTr.setAttribute("id",c._aData.DT_RowId);typeof c._aData.DT_RowClass!="undefined"&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,e=a.aoColumns.length;f<e;f++){var h=a.aoColumns[f];d=p.createElement("td");d.innerHTML=typeof h.fnRender=="function"&&(!h.bUseRendered||h.mDataProp===null)?h.fnRender({iDataRow:b,iDataColumn:f,aData:c._aData,oSettings:a}):H(a,b,f,"display");if(h.sClass!==null)d.className=h.sClass;if(h.bVisible){c.nTr.appendChild(d);c._anHidden[f]=null}else c._anHidden[f]=
+d}}}function Y(a){var b,c,d,f,e,h,j,k,m;if(a.bDeferLoading||a.sAjaxSource===null){j=a.nTBody.childNodes;b=0;for(c=j.length;b<c;b++)if(j[b].nodeName.toUpperCase()=="TR"){k=a.aoData.length;a.aoData.push({nTr:j[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});a.aiDisplayMaster.push(k);h=j[b].childNodes;d=e=0;for(f=h.length;d<f;d++){m=h[d].nodeName.toUpperCase();if(m=="TD"||m=="TH"){N(a,k,e,i.trim(h[d].innerHTML));e++}}}}j=$(a);h=[];b=0;for(c=j.length;b<c;b++){d=0;for(f=j[b].childNodes.length;d<
+f;d++){e=j[b].childNodes[d];m=e.nodeName.toUpperCase();if(m=="TD"||m=="TH")h.push(e)}}h.length!=j.length*a.aoColumns.length&&J(a,1,"Unexpected number of TD elements. Expected "+j.length*a.aoColumns.length+" and got "+h.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.");d=0;for(f=a.aoColumns.length;d<f;d++){if(a.aoColumns[d].sTitle===null)a.aoColumns[d].sTitle=a.aoColumns[d].nTh.innerHTML;j=a.aoColumns[d]._bAutoType;
+m=typeof a.aoColumns[d].fnRender=="function";e=a.aoColumns[d].sClass!==null;k=a.aoColumns[d].bVisible;var t,q;if(j||m||e||!k){b=0;for(c=a.aoData.length;b<c;b++){t=h[b*f+d];if(j&&a.aoColumns[d].sType!="string"){q=H(a,b,d,"type");if(q!==""){q=fa(q);if(a.aoColumns[d].sType===null)a.aoColumns[d].sType=q;else if(a.aoColumns[d].sType!=q)a.aoColumns[d].sType="string"}}if(m){q=a.aoColumns[d].fnRender({iDataRow:b,iDataColumn:d,aData:a.aoData[b]._aData,oSettings:a});t.innerHTML=q;a.aoColumns[d].bUseRendered&&
+N(a,b,d,q)}if(e)t.className+=" "+a.aoColumns[d].sClass;if(k)a.aoData[b]._anHidden[d]=null;else{a.aoData[b]._anHidden[d]=t;t.parentNode.removeChild(t)}}}}}function V(a){var b,c,d;a.nTHead.getElementsByTagName("tr");if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);if(a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}}else{var f=p.createElement("tr");b=0;
+for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;c.innerHTML=a.aoColumns[b].sTitle;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);f.appendChild(c)}i(a.nTHead).html("")[0].appendChild(f);W(a.aoHeader,a.nTHead)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=p.createElement("div");f.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(f);var e=p.createElement("span");e.className=a.oClasses.sSortIcon;f.appendChild(e);c.appendChild(f)}}d=function(){this.onselectstart=
+function(){return false};return false};if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable!==false){ga(a,a.aoColumns[b].nTh,b);i(a.aoColumns[b].nTh).bind("mousedown.DT",d)}else i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);a.oClasses.sFooterTH!==""&&i(">tr>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<d;b++)if(typeof c[b]!="undefined")a.aoColumns[b].nTf=c[b]}}function L(a,b,c){var d,f,
+e,h=[],j=[],k=a.aoColumns.length;if(typeof c=="undefined")c=false;d=0;for(f=b.length;d<f;d++){h[d]=b[d].slice();h[d].nTr=b[d].nTr;for(e=k-1;e>=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d<f;d++){if(h[d].nTr){a=0;for(e=h[d].nTr.childNodes.length;a<e;a++)h[d].nTr.removeChild(h[d].nTr.childNodes[0])}e=0;for(b=h[d].length;e<b;e++){k=c=1;if(typeof j[d][e]=="undefined"){h[d].nTr.appendChild(h[d][e].cell);for(j[d][e]=1;typeof h[d+c]!="undefined"&&h[d][e].cell==h[d+
+c][e].cell;){j[d+c][e]=1;c++}for(;typeof h[d][e+k]!="undefined"&&h[d][e].cell==h[d][e+k].cell;){for(a=0;a<c;a++)j[d+a][e+k]=1;k++}h[d][e].cell.setAttribute("rowspan",c);h[d][e].cell.setAttribute("colspan",k)}}}}function C(a){var b,c,d=[],f=0,e=false;b=a.asStripClasses.length;c=a.aoOpenRows.length;if(!(a.fnPreDrawCallback!==null&&a.fnPreDrawCallback.call(a.oInstance,a)===false)){a.bDrawing=true;if(typeof a.iInitDisplayStart!="undefined"&&a.iInitDisplayStart!=-1){a._iDisplayStart=a.oFeatures.bServerSide?
+a.iInitDisplayStart:a.iInitDisplayStart>=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;h<j;h++){var k=a.aoData[a.aiDisplay[h]];k.nTr===null&&z(a,a.aiDisplay[h]);var m=k.nTr;if(b!==0){var t=a.asStripClasses[f%b];if(k._sRowStripe!=
+t){i(m).removeClass(k._sRowStripe).addClass(t);k._sRowStripe=t}}if(typeof a.fnRowCallback=="function"){m=a.fnRowCallback.call(a.oInstance,m,a.aoData[a.aiDisplay[h]]._aData,f,h);if(!m&&!e){J(a,0,"A node was not returned by fnRowCallback");e=true}}d.push(m);f++;if(c!==0)for(k=0;k<c;k++)m==a.aoOpenRows[k].nParent&&d.push(a.aoOpenRows[k].nTr)}}else{d[0]=p.createElement("tr");if(typeof a.asStripClasses[0]!="undefined")d[0].className=a.asStripClasses[0];e=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));
+if(a.iDraw==1&&a.sAjaxSource!==null&&!a.oFeatures.bServerSide)e=a.oLanguage.sLoadingRecords;else if(typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0)e=a.oLanguage.sEmptyTable;b=p.createElement("td");b.setAttribute("valign","top");b.colSpan=X(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=e;d[f].appendChild(b)}typeof a.fnHeaderCallback=="function"&&a.fnHeaderCallback.call(a.oInstance,i(">tr",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<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);e!==null&&e.appendChild(a.nTBody)}for(b=a.aoDrawCallback.length-
+1;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<b;f++){d=a.aoColumns[f].mDataProp;c.push({name:"mDataProp_"+f,value:typeof d=="function"?"function":d})}if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++){c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch});c.push({name:"bRegex_"+
+f,value:a.aoPreSearchCols[f].bRegex});c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}}if(a.oFeatures.bSort!==false){d=a.aaSortingFixed!==null?a.aaSortingFixed.length:0;var e=a.aaSorting.length;c.push({name:"iSortingCols",value:d+e});for(f=0;f<d;f++){c.push({name:"iSortCol_"+f,value:a.aaSortingFixed[f][0]});c.push({name:"sSortDir_"+f,value:a.aaSortingFixed[f][1]})}for(f=0;f<e;f++){c.push({name:"iSortCol_"+(f+d),value:a.aaSorting[f][0]});c.push({name:"sSortDir_"+(f+d),value:a.aaSorting[f][1]})}for(f=
+0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(h){Aa(a,h)},a);return false}else return true}function Aa(a,b){if(typeof b.sEcho!="undefined")if(b.sEcho*1<a.iDraw)return;else a.iDraw=b.sEcho*1;if(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))ia(a);a._iRecordsTotal=b.iTotalRecords;a._iRecordsDisplay=b.iTotalDisplayRecords;var c=ha(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=
+Ba(a,b.sColumns);b=Z(a.sAjaxDataProp)(b);for(var f=0,e=b.length;f<e;f++)if(c){for(var h=[],j=0,k=a.aoColumns.length;j<k;j++)h.push(b[f][d[j]]);v(a,h)}else v(a,b[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=false;C(a);a.bAjaxDataGet=true;K(a,false)}function xa(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=p.createElement("div");a.nTableWrapper.className=a.oClasses.sWrapper;a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper");
+a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,e,h,j,k,m,t,q=0;q<d.length;q++){e=0;h=d[q];if(h=="<"){j=p.createElement("div");k=d[q+1];if(k=="'"||k=='"'){m="";for(t=2;d[q+t]!=k;){m+=d[q+t];t++}if(m=="H")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";else if(m=="F")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";if(m.indexOf(".")!=-1){k=m.split(".");j.setAttribute("id",k[0].substr(1,
+k[0].length-1));j.className=k[1]}else if(m.charAt(0)=="#")j.setAttribute("id",m.substr(1,m.length-1));else j.className=m;q+=t}c.appendChild(j);c=j}else if(h==">")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;t<k;t++)if(h==j[t].cFeature){if(f=j[t].fnInit(a))e=1;break}}if(e==1&&f!==null){if(typeof a.aanFeatures[h]!="object")a.aanFeatures[h]=[];a.aanFeatures[h].push(f);c.appendChild(f)}}b.parentNode.replaceChild(a.nTableWrapper,b)}function Fa(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),f=p.createElement("div"),e=p.createElement("div"),h=p.createElement("div"),j=a.nTable.cloneNode(false),
+k=a.nTable.cloneNode(false),m=a.nTable.getElementsByTagName("thead")[0],t=a.nTable.getElementsByTagName("tfoot").length===0?null:a.nTable.getElementsByTagName("tfoot")[0],q=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?o.oJUIClasses:o.oStdClasses;c.appendChild(d);e.appendChild(h);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(j);j.appendChild(m);if(t!==null){b.appendChild(e);h.appendChild(k);k.appendChild(t)}b.className=q.sScrollWrapper;c.className=q.sScrollHead;d.className=
+q.sScrollHeadInner;f.className=q.sScrollBody;e.className=q.sScrollFoot;h.className=q.sScrollFootInner;if(a.oScroll.bAutoCss){c.style.overflow="hidden";c.style.position="relative";e.style.overflow="hidden";f.style.overflow="auto"}c.style.border="0";c.style.width="100%";e.style.border="0";d.style.width="150%";j.removeAttribute("id");j.style.marginLeft="0";a.nTable.style.marginLeft="0";if(t!==null){k.removeAttribute("id");k.style.marginLeft="0"}d=i(">caption",a.nTable);h=0;for(k=d.length;h<k;h++)j.appendChild(d[h]);
+if(a.oScroll.sX!==""){c.style.width=u(a.oScroll.sX);f.style.width=u(a.oScroll.sX);if(t!==null)e.style.width=u(a.oScroll.sX);i(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(t!==null)e.scrollLeft=this.scrollLeft})}if(a.oScroll.sY!=="")f.style.height=u(a.oScroll.sY);a.aoDrawCallback.push({fn:Ia,sName:"scrolling"});a.oScroll.bInfinite&&i(f).scroll(function(){if(!a.bDrawing)if(i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()<a.fnRecordsDisplay()){ja(a,
+"next");E(a);C(a)}});a.nScrollHead=c;a.nScrollFoot=e;return b}function Ia(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,e,h,j,k,m,t,q,I=[];h=a.nTable.getElementsByTagName("thead");h.length>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;f<e;f++){t=Ja(a,f);O[f].style.width=a.aoColumns[t].sWidth}a.nTFoot!==null&&P(function(B){B.style.width=""},k.getElementsByTagName("tr"));f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){a.nTable.style.width="100%";if(i.browser.msie&&i.browser.version<=7)a.nTable.style.width=u(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!==
+"")a.nTable.style.width=u(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()<i(a.nTable).height()){a.nTable.style.width=u(f-a.oScroll.iBarWidth);if(i(a.nTable).outerWidth()>f-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()<f)if(a.oScroll.sX==="")J(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you enable x-scrolling or increase the width the table has in which to be drawn");else a.oScroll.sXInner!==""&&J(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you increase the sScrollXInner property to allow it to draw in a larger area, or simply remove that parameter to allow automatic calculation");
+if(a.oScroll.sY==="")if(i.browser.msie&&i.browser.version<=7)d.style.height=u(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=u(a.oScroll.sY);j=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight<d.offsetHeight)d.style.height=u(i(a.nTable).height()+j)}j=i(a.nTable).outerWidth();c.style.width=u(j);b.style.width=u(j+a.oScroll.iBarWidth);if(a.nTFoot!==null){b=a.nScrollFoot.getElementsByTagName("div")[0];
+c=b.getElementsByTagName("table")[0];b.style.width=u(a.nTable.offsetWidth+a.oScroll.iBarWidth);c.style.width=u(a.nTable.offsetWidth)}if(a.bSorted||a.bFiltered)d.scrollTop=0}function ca(a){if(a.oFeatures.bAutoWidth===false)return false;ea(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function Da(a){var b=a.oLanguage.sSearch;b=b.indexOf("_INPUT_")!==-1?b.replace("_INPUT_",'<input type="text" />'):b===""?'<input type="text" />':b+' <input type="text" />';
+var c=p.createElement("div");c.className=a.oClasses.sFilter;c.innerHTML="<label>"+b+"</label>";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<e;f++)d[f]!=this.parentNode&&i("input",d[f]).val(this.value);this.value!=a.oPreviousSearch.sSearch&&M(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})});
+b.bind("keypress.DT",function(d){if(d.keyCode==13)return false});return c}function M(a,b,c){Ka(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)La(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,a.aoPreSearchCols[b].bSmart);o.afnFiltering.length!==0&&Ma(a);a.bFiltered=true;a._iDisplayStart=0;E(a);C(a);ka(a,0)}function Ma(a){for(var b=o.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,e=0,h=a.aiDisplay.length;e<h;e++){var j=a.aiDisplay[e-f];if(!b[c](a,da(a,j,"filter"),
+j)){a.aiDisplay.splice(e-f,1);f++}}}function La(a,b,c,d,f){if(b!==""){var e=0;b=la(b,d,f);for(d=a.aiDisplay.length-1;d>=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<a.aiDisplayMaster.length;c++)e.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var h=0;for(c=0;c<a.asDataSearch.length;c++)if(!e.test(a.asDataSearch[c])){a.aiDisplay.splice(c-h,1);h++}}a.oPreviousSearch.sSearch=b;a.oPreviousSearch.bRegex=d;a.oPreviousSearch.bSmart=f}function ka(a,b){a.asDataSearch.splice(0,a.asDataSearch.length);b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:
+a.aiDisplay;for(var c=0,d=b.length;c<d;c++)a.asDataSearch[c]=na(a,da(a,b[c],"filter"))}function na(a,b){var c="";if(typeof a.__nTmpFilter=="undefined")a.__nTmpFilter=p.createElement("div");for(var d=a.__nTmpFilter,f=0,e=a.aoColumns.length;f<e;f++)if(a.aoColumns[f].bSearchable)c+=ma(b[f],a.aoColumns[f].sType)+" ";if(c.indexOf("&")!==-1){d.innerHTML=c;c=d.textContent?d.textContent:d.innerText;c=c.replace(/\n/g," ").replace(/\r/g,"")}return c}function la(a,b,c){if(c){a=b?a.split(" "):oa(a).split(" ");
+a="^(?=.*?"+a.join(")(?=.*?")+").*$";return new RegExp(a,"i")}else{a=b?a:oa(a);return new RegExp(a,"i")}}function ma(a,b){if(typeof o.ofnSearch[b]=="function")return o.ofnSearch[b](a);else if(b=="html")return a.replace(/\n/g," ").replace(/<.*?>/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.length;c++){var t=h[c][0];f=pa(a,t);e=a.aoColumns[t].sSortDataType;if(typeof o.afnSortData[e]!="undefined"){var q=o.afnSortData[e](a,t,f);f=0;for(e=d.length;f<e;f++)N(a,f,t,q[f])}}c=0;for(d=a.aiDisplayMaster.length;c<d;c++)j[a.aiDisplayMaster[c]]=c;var I=h.length;a.aiDisplayMaster.sort(function(O,B){var F,qa;for(c=0;c<I;c++){F=m[h[c][0]].iDataSort;qa=m[F].sType;F=k[(qa?qa:"string")+"-"+h[c][1]](H(a,O,F,"sort"),H(a,B,F,"sort"));
+if(F!==0)return F}return k["numeric-asc"](j[O],j[B])})}if((typeof b=="undefined"||b)&&!a.oFeatures.bDeferRender)T(a);a.bSorted=true;if(a.oFeatures.bFilter)M(a,a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;E(a);C(a)}}function ga(a,b,c,d){i(b).bind("click.DT",function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var h,j;if(f.shiftKey){for(var k=false,m=0;m<a.aaSorting.length;m++)if(a.aaSorting[m][0]==c){k=true;h=a.aaSorting[m][0];j=a.aaSorting[m][2]+
+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")a.aaSorting.splice(m,1);else{a.aaSorting[m][1]=a.aoColumns[h].asSorting[j];a.aaSorting[m][2]=j}break}k===false&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else if(a.aaSorting.length==1&&a.aaSorting[0][0]==c){h=a.aaSorting[0][0];j=a.aaSorting[0][2]+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")j=0;a.aaSorting[0][1]=a.aoColumns[h].asSorting[j];a.aaSorting[0][2]=j}else{a.aaSorting.splice(0,a.aaSorting.length);a.aaSorting.push([c,a.aoColumns[c].asSorting[0],
+0])}R(a)};if(a.oFeatures.bProcessing){K(a,true);setTimeout(function(){e();a.oFeatures.bServerSide||K(a,false)},0)}else e();typeof d=="function"&&d(a)}})}function T(a){var b,c,d,f,e,h=a.aoColumns.length,j=a.oClasses;for(b=0;b<h;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){e=a.aoColumns[b].sSortingClass;
+d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){e=f[c][1]=="asc"?j.sSortAsc:j.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(e);if(a.bJUI){c=i("span",a.aoColumns[b].nTh);c.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed);c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:f[d][1]=="asc"?j.sSortJUIAsc:j.sSortJUIDesc)}}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);e=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=
+Q(a);if(a.oFeatures.bDeferRender)i(d).removeClass(e+"1 "+e+"2 "+e+"3");else if(d.length>=h)for(b=0;b<h;b++)if(d[b].className.indexOf(e+"1")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"1",""))}else if(d[b].className.indexOf(e+"2")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"2",""))}else if(d[b].className.indexOf(e+"3")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(" "+
+e+"3",""))}j=1;var k;for(b=0;b<f.length;b++){k=parseInt(f[b][0],10);c=0;for(a=d.length/h;c<a;c++)d[h*c+k].className+=" "+e+j;j<3&&j++}}}function Ha(a){if(a.oScroll.bInfinite)return null;var b=p.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;o.oPagination[a.sPaginationType].fnInit(a,b,function(c){E(c);C(c)});typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(c){o.oPagination[c.sPaginationType].fnUpdate(c,function(d){E(d);C(d)})},sName:"pagination"});return b}
+function ja(a,b){var c=a._iDisplayStart;if(b=="first")a._iDisplayStart=0;else if(b=="previous"){a._iDisplayStart=a._iDisplayLength>=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<a.fnRecordsDisplay())a._iDisplayStart+=a._iDisplayLength}else a._iDisplayStart=0;else if(b=="last")if(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;b++)i(a[b]).html(e)}}function Ca(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+(a.sTableId===""?"":'name="'+a.sTableId+'_length"')+">",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<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";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="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";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;c<d;c++)h[c]!=this.parentNode&&i("select",h[c]).val(e);a._iDisplayLength=parseInt(e,10);E(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;C(a)});return f}function Ea(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.r==
+"undefined"&&b.setAttribute("id",a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility=b?"visible":"hidden"}}function Ja(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(c==b)return d}return null}function pa(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===
+true&&c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function U(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c;return null}function X(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===true&&b++;return b}function E(a){a._iDisplayEnd=a.oFeatures.bPaginate===false?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.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;e<f;e++)if(a.aoColumns[e].bVisible){d++;if(a.aoColumns[e].sWidth!==null){c=Oa(a.aoColumns[e].sWidthOrig,a.nTable.parentNode);if(c!==
+null)a.aoColumns[e].sWidth=u(c);b++}}if(f==h.length&&b===0&&d==f&&a.oScroll.sX===""&&a.oScroll.sY==="")for(e=0;e<a.aoColumns.length;e++){c=i(h[e]).width();if(c!==null)a.aoColumns[e].sWidth=u(c)}else{b=a.nTable.cloneNode(false);e=a.nTHead.cloneNode(true);d=p.createElement("tbody");c=p.createElement("tr");b.removeAttribute("id");b.appendChild(e);if(a.nTFoot!==null){b.appendChild(a.nTFoot.cloneNode(true));P(function(k){k.style.width=""},b.getElementsByTagName("tr"))}b.appendChild(d);d.appendChild(c);
+d=i("thead th",b);if(d.length===0)d=i("tbody tr:eq(0)>td",b);h=S(a,e);for(e=d=0;e<f;e++){var j=a.aoColumns[e];if(j.bVisible&&j.sWidthOrig!==null&&j.sWidthOrig!=="")h[e-d].style.width=u(j.sWidthOrig);else if(j.bVisible)h[e-d].style.width="";else d++}for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d=Pa(a,e);if(d!==null){d=d.cloneNode(true);if(a.aoColumns[e].sContentPadding!=="")d.innerHTML+=a.aoColumns[e].sContentPadding;c.appendChild(d)}}f=a.nTable.parentNode;f.appendChild(b);if(a.oScroll.sX!==""&&a.oScroll.sXInner!==
+"")b.style.width=u(a.oScroll.sXInner);else if(a.oScroll.sX!==""){b.style.width="";if(i(b).width()<f.offsetWidth)b.style.width=u(f.offsetWidth)}else if(a.oScroll.sY!=="")b.style.width=u(f.offsetWidth);b.style.visibility="hidden";Qa(a,b);f=i("tbody tr:eq(0)",b).children();if(f.length===0)f=S(a,i("thead",b)[0]);if(a.oScroll.sX!==""){for(e=d=c=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c+=a.aoColumns[e].sWidthOrig===null?i(f[d]).outerWidth():parseInt(a.aoColumns[e].sWidth.replace("px",""),
+10)+(i(f[d]).outerWidth()-i(f[d]).width());d++}b.style.width=u(c);a.nTable.style.width=u(c)}for(e=d=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c=i(f[d]).width();if(c!==null&&c>0)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<a.aoData.length;f++){var e=H(a,f,b,"display")+"";e=e.replace(/<.*?>/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;c<a.length;c++)if(a[c]!=b[c])return 2;return 0}function fa(a){for(var b=o.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(f!==null)return f}return"string"}function A(a){for(var b=0;b<D.length;b++)if(D[b].nTable==a)return D[b];return null}function aa(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function $(a){for(var b=[],c=0,d=a.aoData.length;c<d;c++)a.aoData[c].nTr!==null&&b.push(a.aoData[c].nTr);return b}function Q(a,b){var c=[],d,f,e,h,j;f=0;var k=a.aoData.length;
+if(typeof b!="undefined"){f=b;k=b+1}for(f=f;f<k;f++){j=a.aoData[f];if(j.nTr!==null){b=[];e=0;for(h=j.nTr.childNodes.length;e<h;e++){d=j.nTr.childNodes[e].nodeName.toLowerCase();if(d=="td"||d=="th")b.push(j.nTr.childNodes[e])}e=d=0;for(h=a.aoColumns.length;e<h;e++)if(a.aoColumns[e].bVisible)c.push(b[e-d]);else{c.push(j._anHidden[e]);d++}}}return c}function oa(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function ra(a,b){for(var c=-1,d=
+0,f=a.length;d<f;d++)if(a[d]==b)c=d;else a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function Ba(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d<f;d++)for(var e=0;e<f;e++)if(a.aoColumns[d].sName==b[e]){c.push(e);break}return c}function ha(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";if(b.length==d)return"";return b.slice(0,-1)}function J(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(b===0)if(o.sErrMode==
+"alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function ia(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);E(a)}function sa(a){if(!(!a.oFeatures.bStateSave||typeof a.bDestroying!="undefined")){var b,c,d,f="{";f+='"iCreate":'+(new Date).getTime()+",";f+='"iStart":'+(a.oScroll.bInfinite?0:a._iDisplayStart)+",";f+='"iEnd":'+(a.oScroll.bInfinite?a._iDisplayLength:
+a._iDisplayEnd)+",";f+='"iLength":'+a._iDisplayLength+",";f+='"sFilter":"'+encodeURIComponent(a.oPreviousSearch.sSearch)+'",';f+='"sFilterEsc":'+!a.oPreviousSearch.bRegex+",";f+='"aaSorting":[ ';for(b=0;b<a.aaSorting.length;b++)f+="["+a.aaSorting[b][0]+',"'+a.aaSorting[b][1]+'"],';f=f.substring(0,f.length-1);f+="],";f+='"aaSearchCols":[ ';for(b=0;b<a.aoPreSearchCols.length;b++)f+='["'+encodeURIComponent(a.aoPreSearchCols[b].sSearch)+'",'+!a.aoPreSearchCols[b].bRegex+"],";f=f.substring(0,f.length-
+1);f+="],";f+='"abVisCols":[ ';for(b=0;b<a.aoColumns.length;b++)f+=a.aoColumns[b].bVisible+",";f=f.substring(0,f.length-1);f+="]";b=0;for(c=a.aoStateSave.length;b<c;b++){d=a.aoStateSave[b].fn(a,f);if(d!=="")f=d}f+="}";Sa(a.sCookiePrefix+a.sInstance,f,a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)}}function Ta(a,b){if(a.oFeatures.bStateSave){var c,d,f;d=ta(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=typeof i.parseJSON=="function"?i.parseJSON(d.replace(/'/g,'"')):eval("("+d+")")}catch(e){return}d=
+0;for(f=a.aoStateLoad.length;d<f;d++)if(!a.aoStateLoad[d].fn(a,c))return;a.oLoadedState=i.extend(true,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.oPreviousSearch.sSearch=decodeURIComponent(c.sFilter);a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();if(typeof c.sFilterEsc!="undefined")a.oPreviousSearch.bRegex=!c.sFilterEsc;if(typeof c.aaSearchCols!="undefined")for(d=0;d<c.aaSearchCols.length;d++)a.aoPreSearchCols[d]=
+{sSearch:decodeURIComponent(c.aaSearchCols[d][0]),bRegex:!c.aaSearchCols[d][1]};if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++){b.saved_aoColumns[d]={};b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}}function Sa(a,b,c,d,f){var e=new Date;e.setTime(e.getTime()+c*1E3);c=wa.location.pathname.split("/");a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();var h;if(f!==null){h=typeof i.parseJSON=="function"?i.parseJSON(b):eval("("+b+")");b=f(a,h,e.toGMTString(),
+c.join("/")+"/")}else b=a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString()+"; path="+c.join("/")+"/";f="";e=9999999999999;if((ta(a)!==null?p.cookie.length:b.length+p.cookie.length)+10>4096){a=p.cookie.split(";");for(var j=0,k=a.length;j<k;j++)if(a[j].indexOf(d)!=-1){var m=a[j].split("=");try{h=eval("("+decodeURIComponent(m[1])+")")}catch(t){continue}if(typeof h.iCreate!="undefined"&&h.iCreate<e){f=m[0];e=h.iCreate}}if(f!=="")p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+
+"/"}p.cookie=b}function ta(a){var b=wa.location.pathname.split("/");a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";b=p.cookie.split(";");for(var c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function W(a,b){b=b.getElementsByTagName("tr");var c,d,f,e,h,j,k,m,t=function(O,B,F){for(;typeof O[B][F]!="undefined";)F++;return F};a.splice(0,a.length);d=0;for(j=b.length;d<
+j;d++)a.push([]);d=0;for(j=b.length;d<j;d++){f=0;for(k=b[d].childNodes.length;f<k;f++){c=b[d].childNodes[f];if(c.nodeName.toUpperCase()=="TD"||c.nodeName.toUpperCase()=="TH"){var q=c.getAttribute("colspan")*1,I=c.getAttribute("rowspan")*1;q=!q||q===0||q===1?1:q;I=!I||I===0||I===1?1:I;m=t(a,d,0);for(h=0;h<q;h++)for(e=0;e<I;e++){a[d+e][m+h]={cell:c,unique:q==1?true:false};a[d+e].nTr=b[d]}}}}}function S(a,b,c){var d=[];if(typeof c=="undefined"){c=a.aoHeader;if(typeof b!="undefined"){c=[];W(c,b)}}b=0;
+for(var f=c.length;b<f;b++)for(var e=0,h=c[b].length;e<h;e++)if(c[b][e].unique&&(typeof d[e]=="undefined"||!a.bSortCellsTop))d[e]=c[b][e].cell;return d}function Ua(){var a=p.createElement("p"),b=a.style;b.width="100%";b.height="200px";var c=p.createElement("div");b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.overflow="hidden";c.appendChild(a);p.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=
+c.clientWidth;p.body.removeChild(c);return b-a}function P(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var e=0,h=b[d].childNodes.length;e<h;e++)if(b[d].childNodes[e].nodeType==1)typeof c!="undefined"?a(b[d].childNodes[e],c[d].childNodes[e]):a(b[d].childNodes[e])}function n(a,b,c,d){if(typeof d=="undefined")d=c;if(typeof b[c]!="undefined")a[d]=b[c]}function da(a,b,c){for(var d=[],f=0,e=a.aoColumns.length;f<e;f++)d.push(H(a,b,f,c));return d}function H(a,b,c,d){var f=a.aoColumns[c];if((c=f.fnGetData(a.aoData[b]._aData))===
+undefined){if(a.iDrawError!=a.iDraw&&f.sDefaultContent===null){J(a,0,"Requested unknown parameter '"+f.mDataProp+"' from the data source for row "+b);a.iDrawError=a.iDraw}return f.sDefaultContent}if(c===null&&f.sDefaultContent!==null)c=f.sDefaultContent;if(d=="display"&&c===null)return"";return c}function N(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function Z(a){if(a===null)return function(){return null};else if(typeof a=="function")return function(c){return a(c)};else if(typeof a==
+"string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c){return c[b[0]][b[1]]}:b.length==3?function(c){return c[b[0]][b[1]][b[2]]}:function(c){for(var d=0,f=b.length;d<f;d++)c=c[b[d]];return c}}else return function(c){return c[a]}}function ya(a){if(a===null)return function(){};else if(typeof a=="function")return function(c,d){return a(c,d)};else if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c,d){c[b[0]][b[1]]=d}:b.length==3?function(c,
+d){c[b[0]][b[1]][b[2]]=d}:function(c,d){for(var f=0,e=b.length-1;f<e;f++)c=c[b[f]];c[b[b.length-1]]=d}}else return function(c,d){c[a]=d}}this.oApi={};this.fnDraw=function(a){var b=A(this[o.iApiIndex]);if(typeof a!="undefined"&&a===false){E(b);C(b)}else ba(b)};this.fnFilter=function(a,b,c,d,f){var e=A(this[o.iApiIndex]);if(e.oFeatures.bFilter){if(typeof c=="undefined")c=false;if(typeof d=="undefined")d=true;if(typeof f=="undefined")f=true;if(typeof b=="undefined"||b===null){M(e,{sSearch:a,bRegex:c,
+bSmart:d},1);if(f&&typeof e.aanFeatures.f!="undefined"){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else{e.aoPreSearchCols[b].sSearch=a;e.aoPreSearchCols[b].bRegex=c;e.aoPreSearchCols[b].bSmart=d;M(e,e.oPreviousSearch,1)}}};this.fnSettings=function(){return A(this[o.iApiIndex])};this.fnVersionCheck=o.fnVersionCheck;this.fnSort=function(a){var b=A(this[o.iApiIndex]);b.aaSorting=a;R(b)};this.fnSortListener=function(a,b,c){ga(A(this[o.iApiIndex]),a,b,c)};this.fnAddData=function(a,
+b){if(a.length===0)return[];var c=[],d,f=A(this[o.iApiIndex]);if(typeof a[0]=="object")for(var e=0;e<a.length;e++){d=v(f,a[e]);if(d==-1)return c;c.push(d)}else{d=v(f,a);if(d==-1)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();if(typeof b=="undefined"||b)ba(f);return c};this.fnDeleteRow=function(a,b,c){var d=A(this[o.iApiIndex]);a=typeof a=="object"?U(d,a):a;var f=d.aoData.splice(a,1),e=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ra(d.aiDisplayMaster,a);ra(d.aiDisplay,a);typeof b==
+"function"&&b.call(this,d,f);if(d._iDisplayStart>=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<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a){(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr);b.aoOpenRows.splice(c,1);return 0}return 1};this.fnGetData=function(a,b){var c=A(this[o.iApiIndex]);if(typeof a!="undefined"){a=typeof a=="object"?U(c,a):a;if(typeof b!=
+"undefined")return H(c,a,b,"");return typeof c.aoData[a]!="undefined"?c.aoData[a]._aData:null}return aa(c)};this.fnGetNodes=function(a){var b=A(this[o.iApiIndex]);if(typeof a!="undefined")return typeof b.aoData[a]!="undefined"?b.aoData[a].nTr:null;return $(b)};this.fnGetPosition=function(a){var b=A(this[o.iApiIndex]),c=a.nodeName.toUpperCase();if(c=="TR")return U(b,a);else if(c=="TD"||c=="TH"){c=U(b,a.parentNode);for(var d=Q(b,c),f=0;f<b.aoColumns.length;f++)if(d[f]==a)return[c,pa(b,f),f]}return null};
+this.fnUpdate=function(a,b,c,d,f){var e=A(this[o.iApiIndex]);b=typeof b=="object"?U(e,b):b;if(i.isArray(a)&&typeof a=="object"){e.aoData[b]._aData=a.slice();for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(H(e,b,c),b,c,false,false)}else if(typeof a=="object"){e.aoData[b]._aData=i.extend(true,{},a);for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(H(e,b,c),b,c,false,false)}else{a=a;N(e,b,c,a);if(e.aoColumns[c].fnRender!==null){a=e.aoColumns[c].fnRender({iDataRow:b,iDataColumn:c,aData:e.aoData[b]._aData,
+oSettings:e});e.aoColumns[c].bUseRendered&&N(e,b,c,a)}if(e.aoData[b].nTr!==null)Q(e,b)[c].innerHTML=a}c=i.inArray(b,e.aiDisplay);e.asDataSearch[c]=na(e,da(e,b,"filter"));if(typeof f=="undefined"||f)ca(e);if(typeof d=="undefined"||d)ba(e);return 0};this.fnSetColumnVis=function(a,b,c){var d=A(this[o.iApiIndex]),f,e;e=d.aoColumns.length;var h,j;if(d.aoColumns[a].bVisible!=b){if(b){for(f=j=0;f<a;f++)d.aoColumns[f].bVisible&&j++;j=j>=X(d);if(!j)for(f=a;f<e;f++)if(d.aoColumns[f].bVisible){h=f;break}f=0;
+for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null)j?d.aoData[f].nTr.appendChild(d.aoData[f]._anHidden[a]):d.aoData[f].nTr.insertBefore(d.aoData[f]._anHidden[a],Q(d,f)[h])}else{f=0;for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null){h=Q(d,f)[a];d.aoData[f]._anHidden[a]=h;h.parentNode.removeChild(h)}}d.aoColumns[a].bVisible=b;L(d,d.aoHeader);d.nTFoot&&L(d,d.aoFooter);f=0;for(e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=X(d);if(typeof c=="undefined"||c){ca(d);C(d)}sa(d)}};this.fnPageChange=
+function(a,b){var c=A(this[o.iApiIndex]);ja(c,a);E(c);if(typeof b=="undefined"||b)C(c)};this.fnDestroy=function(){var a=A(this[o.iApiIndex]),b=a.nTableWrapper.parentNode,c=a.nTBody,d,f;a.bDestroying=true;d=0;for(f=a.aoColumns.length;d<f;d++)a.aoColumns[d].bVisible===false&&this.fnSetColumnVis(d,true);i(a.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>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;d<f;d++)a.aoData[d].nTr!==null&&c.appendChild(a.aoData[d].nTr);if(a.oFeatures.bAutoWidth===true)a.nTable.style.width=u(a.sDestroyWidth);
+i(">tr:even",c).addClass(a.asDestoryStrips[0]);i(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;d<f;d++)D[d]==a&&D.splice(d,1);a=null};this.fnAdjustColumnSizing=function(a){var b=A(this[o.iApiIndex]);ca(b);if(typeof a=="undefined"||a)this.fnDraw(false);else if(b.oScroll.sX!==""||b.oScroll.sY!=="")this.oApi._fnScrollDraw(b)};for(var ua in o.oApi)if(ua)this[ua]=r(ua);this.oApi._fnExternApiFunc=r;this.oApi._fnInitalise=s;this.oApi._fnInitComplete=w;this.oApi._fnLanguageProcess=y;this.oApi._fnAddColumn=
+G;this.oApi._fnColumnOptions=x;this.oApi._fnAddData=v;this.oApi._fnCreateTr=z;this.oApi._fnGatherData=Y;this.oApi._fnBuildHead=V;this.oApi._fnDrawHead=L;this.oApi._fnDraw=C;this.oApi._fnReDraw=ba;this.oApi._fnAjaxUpdate=za;this.oApi._fnAjaxUpdateDraw=Aa;this.oApi._fnAddOptionsHtml=xa;this.oApi._fnFeatureHtmlTable=Fa;this.oApi._fnScrollDraw=Ia;this.oApi._fnAjustColumnSizing=ca;this.oApi._fnFeatureHtmlFilter=Da;this.oApi._fnFilterComplete=M;this.oApi._fnFilterCustom=Ma;this.oApi._fnFilterColumn=La;
+this.oApi._fnFilter=Ka;this.oApi._fnBuildSearchArray=ka;this.oApi._fnBuildSearchRow=na;this.oApi._fnFilterCreateSearch=la;this.oApi._fnDataToSearch=ma;this.oApi._fnSort=R;this.oApi._fnSortAttachListener=ga;this.oApi._fnSortingClasses=T;this.oApi._fnFeatureHtmlPaginate=Ha;this.oApi._fnPageChange=ja;this.oApi._fnFeatureHtmlInfo=Ga;this.oApi._fnUpdateInfo=Na;this.oApi._fnFeatureHtmlLength=Ca;this.oApi._fnFeatureHtmlProcessing=Ea;this.oApi._fnProcessingDisplay=K;this.oApi._fnVisibleToColumnIndex=Ja;this.oApi._fnColumnIndexToVisible=
+pa;this.oApi._fnNodeToDataIndex=U;this.oApi._fnVisbleColumns=X;this.oApi._fnCalculateEnd=E;this.oApi._fnConvertToWidth=Oa;this.oApi._fnCalculateColumnWidths=ea;this.oApi._fnScrollingWidthAdjust=Qa;this.oApi._fnGetWidestNode=Pa;this.oApi._fnGetMaxLenString=Ra;this.oApi._fnStringToCss=u;this.oApi._fnArrayCmp=Va;this.oApi._fnDetectType=fa;this.oApi._fnSettingsFromNode=A;this.oApi._fnGetDataMaster=aa;this.oApi._fnGetTrNodes=$;this.oApi._fnGetTdNodes=Q;this.oApi._fnEscapeRegex=oa;this.oApi._fnDeleteIndex=
+ra;this.oApi._fnReOrderIndex=Ba;this.oApi._fnColumnOrdering=ha;this.oApi._fnLog=J;this.oApi._fnClearTable=ia;this.oApi._fnSaveState=sa;this.oApi._fnLoadState=Ta;this.oApi._fnCreateCookie=Sa;this.oApi._fnReadCookie=ta;this.oApi._fnDetectHeader=W;this.oApi._fnGetUniqueThs=S;this.oApi._fnScrollBarWidth=Ua;this.oApi._fnApplyToChildren=P;this.oApi._fnMap=n;this.oApi._fnGetRowData=da;this.oApi._fnGetCellData=H;this.oApi._fnSetCellData=N;this.oApi._fnGetObjectDataFn=Z;this.oApi._fnSetObjectDataFn=ya;var va=
+this;return this.each(function(){var a=0,b,c,d,f;a=0;for(b=D.length;a<b;a++){if(D[a].nTable==this)if(typeof g=="undefined"||typeof g.bRetrieve!="undefined"&&g.bRetrieve===true)return D[a].oInstance;else if(typeof g.bDestroy!="undefined"&&g.bDestroy===true){D[a].oInstance.fnDestroy();break}else{J(D[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).");
+return}if(D[a].sTableId!==""&&D[a].sTableId==this.getAttribute("id")){D.splice(a,1);break}}var e=new l;D.push(e);var h=false,j=false;a=this.getAttribute("id");if(a!==null){e.sTableId=a;e.sInstance=a}else e.sInstance=o._oExternConfig.iNextUnique++;if(this.nodeName.toLowerCase()!="table")J(e,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{e.nTable=this;e.oInstance=va.length==1?va:i(this).dataTable();e.oApi=va.oApi;e.sDestroyWidth=i(this).width();if(typeof g!=
+"undefined"&&g!==null){e.oInit=g;n(e.oFeatures,g,"bPaginate");n(e.oFeatures,g,"bLengthChange");n(e.oFeatures,g,"bFilter");n(e.oFeatures,g,"bSort");n(e.oFeatures,g,"bInfo");n(e.oFeatures,g,"bProcessing");n(e.oFeatures,g,"bAutoWidth");n(e.oFeatures,g,"bSortClasses");n(e.oFeatures,g,"bServerSide");n(e.oFeatures,g,"bDeferRender");n(e.oScroll,g,"sScrollX","sX");n(e.oScroll,g,"sScrollXInner","sXInner");n(e.oScroll,g,"sScrollY","sY");n(e.oScroll,g,"bScrollCollapse","bCollapse");n(e.oScroll,g,"bScrollInfinite",
+"bInfinite");n(e.oScroll,g,"iScrollLoadGap","iLoadGap");n(e.oScroll,g,"bScrollAutoCss","bAutoCss");n(e,g,"asStripClasses");n(e,g,"fnPreDrawCallback");n(e,g,"fnRowCallback");n(e,g,"fnHeaderCallback");n(e,g,"fnFooterCallback");n(e,g,"fnCookieCallback");n(e,g,"fnInitComplete");n(e,g,"fnServerData");n(e,g,"fnFormatNumber");n(e,g,"aaSorting");n(e,g,"aaSortingFixed");n(e,g,"aLengthMenu");n(e,g,"sPaginationType");n(e,g,"sAjaxSource");n(e,g,"sAjaxDataProp");n(e,g,"iCookieDuration");n(e,g,"sCookiePrefix");
+n(e,g,"sDom");n(e,g,"bSortCellsTop");n(e,g,"oSearch","oPreviousSearch");n(e,g,"aoSearchCols","aoPreSearchCols");n(e,g,"iDisplayLength","_iDisplayLength");n(e,g,"bJQueryUI","bJUI");n(e.oLanguage,g,"fnInfoCallback");typeof g.fnDrawCallback=="function"&&e.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"});typeof g.fnStateSaveCallback=="function"&&e.aoStateSave.push({fn:g.fnStateSaveCallback,sName:"user"});typeof g.fnStateLoadCallback=="function"&&e.aoStateLoad.push({fn:g.fnStateLoadCallback,sName:"user"});
+if(e.oFeatures.bServerSide&&e.oFeatures.bSort&&e.oFeatures.bSortClasses)e.aoDrawCallback.push({fn:T,sName:"server_side_sort_classes"});else e.oFeatures.bDeferRender&&e.aoDrawCallback.push({fn:T,sName:"defer_sort_classes"});if(typeof g.bJQueryUI!="undefined"&&g.bJQueryUI){e.oClasses=o.oJUIClasses;if(typeof g.sDom=="undefined")e.sDom='<"H"lfr>t<"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<b;a++)if(d.filter(":lt(2)").hasClass(e.asStripClasses[a])){c=true;break}if(c){e.asDestoryStrips=["",""];if(i(d[0]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[0]+=
+e.oClasses.sStripOdd+" ";if(i(d[0]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[0]+=e.oClasses.sStripEven;if(i(d[1]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[1]+=e.oClasses.sStripOdd+" ";if(i(d[1]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[1]+=e.oClasses.sStripEven;d.removeClass(e.asStripClasses.join(" "))}c=[];var k;a=this.getElementsByTagName("thead");if(a.length!==0){W(e.aoHeader,a[0]);c=S(e)}if(typeof g.aoColumns=="undefined"){k=[];a=0;for(b=c.length;a<b;a++)k.push(null)}else k=
+g.aoColumns;a=0;for(b=k.length;a<b;a++){if(typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b){if(k[a]===null)k[a]={};k[a].bVisible=g.saved_aoColumns[a].bVisible}G(e,c?c[a]:null)}if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;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<d;c++)if(typeof m[c]=="number"&&m[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<f;b++)if(m[c]=="_all"||i(e.aoColumns[b].nTh).hasClass(m[c]))x(e,b,g.aoColumnDefs[a])}}if(typeof k!="undefined"){a=0;for(b=k.length;a<b;a++)x(e,a,k[a])}a=0;for(b=e.aaSorting.length;a<b;a++){if(e.aaSorting[a][0]>=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;c<d;c++)if(e.aaSorting[a][1]==k.asSorting[c]){e.aaSorting[a][2]=c;break}}T(e);a=i(">thead",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;a<g.aaData.length;a++)v(e,g.aaData[a]);
+else Y(e);e.aiDisplay=e.aiDisplayMaster.slice();e.bInitialised=true;h===false&&s(e)}})}})(jQuery,window,document);
* </p>
* <p>
* This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI.
- * The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object.
+ * The configuration object expects the following case-sensitive properties, with the "strings" property being a nested object.
* Any properties which are not provided will use the default values (defined in the CalendarNavigator class).
* </p>
* <dl>
* </p>
* <p>
* This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI.
- * The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object.
+ * The configuration object expects the following case-sensitive properties, with the "strings" property being a nested object.
* Any properties which are not provided will use the default values (defined in the CalendarNavigator class).
* </p>
* <dl>
locked: false,
/**
- * Provides additional information about the the current set of
+ * Provides additional information about the current set of
* interactions. Can be accessed from the event handlers. It
* contains the following properties:
*
locked: false,
/**
- * Provides additional information about the the current set of
+ * Provides additional information about the current set of
* interactions. Can be accessed from the event handlers. It
* contains the following properties:
*
/**
* @attribute collapse
- * @description Boolean indicating if the the titlebar should have a collapse button.
+ * @description Boolean indicating if the titlebar should have a collapse button.
* The collapse button will not remove the toolbar, it will minimize it to the titlebar
* @default false
* @type Boolean
/**
* @attribute collapse
- * @description Boolean indicating if the the titlebar should have a collapse button.
+ * @description Boolean indicating if the titlebar should have a collapse button.
* The collapse button will not remove the toolbar, it will minimize it to the titlebar
* @default false
* @type Boolean
/**
* @attribute collapse
- * @description Boolean indicating if the the titlebar should have a collapse button.
+ * @description Boolean indicating if the titlebar should have a collapse button.
* The collapse button will not remove the toolbar, it will minimize it to the titlebar
* @default false
* @type Boolean
/**
* @attribute collapse
- * @description Boolean indicating if the the titlebar should have a collapse button.
+ * @description Boolean indicating if the titlebar should have a collapse button.
* The collapse button will not remove the toolbar, it will minimize it to the titlebar
* @default false
* @type Boolean
TIMEOUT: 2000,
/**
- * Called by the the helper for detecting script load in Safari
+ * Called by the helper for detecting script load in Safari
* @method _finalize
* @param id {string} the transaction id
* @private
TIMEOUT: 2000,
/**
- * Called by the the helper for detecting script load in Safari
+ * Called by the helper for detecting script load in Safari
* @method _finalize
* @param id {string} the transaction id
* @private
/**
* @method _onVisibleChange
-* @description Change event handler for the the menu's "visible" configuration
+* @description Change event handler for the menu's "visible" configuration
* property.
* @private
* @param {String} p_sType String representing the name of the event that
/*
- Only clear the the "width" configuration property if it was set the
+ Only clear the "width" configuration property if it was set the
"_setScrollHeight" method and wasn't changed by some other means after it was set.
*/
/**
* @method _onVisibleChange
-* @description Change event handler for the the menu's "visible" configuration
+* @description Change event handler for the menu's "visible" configuration
* property.
* @private
* @param {String} p_sType String representing the name of the event that
/*
- Only clear the the "width" configuration property if it was set the
+ Only clear the "width" configuration property if it was set the
"_setScrollHeight" method and wasn't changed by some other means after it was set.
*/
* @param {String} cat The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
- * @param {String} src The source of the the message (opt)
+ * @param {String} src The source of the message (opt)
* @return {Boolean} True if the log operation was successful.
*/
YAHOO.log = function(msg, cat, src) {
* @param {String} cat The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
- * @param {String} src The source of the the message (opt)
+ * @param {String} src The source of the message (opt)
* @return {Boolean} True if the log operation was successful.
*/
YAHOO.log = function(msg, cat, src) {
* @param {String} cat The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
- * @param {String} src The source of the the message (opt)
+ * @param {String} src The source of the message (opt)
* @return {Boolean} True if the log operation was successful.
*/
YAHOO.log = function(msg, cat, src) {
TIMEOUT: 2000,
/**
- * Called by the the helper for detecting script load in Safari
+ * Called by the helper for detecting script load in Safari
* @method _finalize
* @param id {string} the transaction id
* @private
this.comboBase = YUI.info.comboBase;
/**
- * If configured, YUI will use the the combo handler on the
+ * If configured, YUI will use the combo handler on the
* Yahoo! CDN to pontentially reduce the number of http requests
* required.
* @property combine
* @param {String} cat The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
- * @param {String} src The source of the the message (opt)
+ * @param {String} src The source of the message (opt)
* @return {Boolean} True if the log operation was successful.
*/
YAHOO.log = function(msg, cat, src) {
TIMEOUT: 2000,
/**
- * Called by the the helper for detecting script load in Safari
+ * Called by the helper for detecting script load in Safari
* @method _finalize
* @param id {string} the transaction id
* @private
this.comboBase = YUI.info.comboBase;
/**
- * If configured, YUI will use the the combo handler on the
+ * If configured, YUI will use the combo handler on the
* Yahoo! CDN to pontentially reduce the number of http requests
* required.
* @property combine
<li>Elliott Davis</li>
<li>Doug Dearden</li>
<li>Kip DeGraaf</li>
+ <li>Connor Dewar</li>
<li><a href="https://www.ohloh.net/p/koha/contributors/6620692210484">Frédéric Demians</a></li>
<li>Jonathan Druart</li>
<li>Serhij Dubyk</li>
<li>Gynn Lomax</li>
<li>Robert Lyon (Corporate Serials)</li>
<li>Francois Marier</li>
+ <li>Jesse Maseto</li>
<li>Frère Sébastien Marie</li>
<li>Ricardo Dias Marques</li>
<li>Julian Maurice</li>
<li>Mike Mylonas</li>
<li>Joy Nelson</li>
<li><a href="https://www.ohloh.net/accounts/cnighswonger">Chris Nighswonger</a></li>
+ <li>Albert Oller</li>
<li>Eric Olsen</li>
<li>H. Passini</li>
<li>Dobrica Pavlinusic</li>
<li>Marcel de Rooy</li>
<li>Salvador Zaragoza Rubio</li>
<li>Brice Sanchez</li>
+ <li>Sam Sanders</li>
<li><a href="https://www.ohloh.net/p/koha/contributors/6618544619438">Robin Sheat</a></li>
<li>John Seymour</li>
<li>Juan Romay Sieira</li>
<li>Andrei V. Toutoukine</li>
<li>Darrell Ulm</li>
<li>Universidad ORT Uruguay (Ernesto Silva, Andres Tarallo)</li>
+ <li>Aleksa Vujicic</li>
<li>Reed Wade</li>
<li>Ian Walls</li>
<li><a href="http://www.ohloh.net/accounts/janewagner">Jane Wagner</a></li>
<td align="center">[% loop_budge.budget_owner %]</td>
<td align="center">[% loop_budge.budget_branchname %]</td>
<td align="right" >[% loop_budge.budget_amount %]</td>
- <td align="right" >[% loop_budge.budget_ordered %]</td>
- <td align="right" >[% loop_budge.budget_spent %]</td>
+ <td align="right" ><a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered %]</a></td>
+ <td align="right" ><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent %]</a></td>
<td align="right" >[% loop_budge.budget_avail %]</td>
</tr>
[% ELSE %]
<td align="center">[% loop_budge.budget_owner %]</td>
<td align="center">[% loop_budge.budget_branchname %]</td>
<td align="right" >[% loop_budge.budget_amount %]</td>
- <td align="right" >[% loop_budge.budget_ordered %]</td>
- <td align="right" >[% loop_budge.budget_spent %]</td>
+ <td align="right" ><a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered %]</a></td>
+ <td align="right" ><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent %]</a></td>
<td align="right" >[% loop_budge.budget_avail %]</td>
[% END %]
[% END %]
10: { sorter: false }
}
});
+ $("#cancelledorderst").tablesorter();
});
function confirm_close() {
var is_confirmed = confirm(_('Are you sure you want to close this basket?'));
[% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
[% END %]
</div>
+ [% IF (cancelledorders_loop) %]
+ <div id="cancelledorders">
+ <h2>Cancelled orders</h2>
+ <table id="cancelledorderst">
+ <thead>
+ <tr>
+ <th>Order</th>
+ <th>RRP</th>
+ <th>Est.</th>
+ <th>Qty.</th>
+ <th>Total</th>
+ <th>Fund</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH order IN cancelledorders_loop %]
+ <tr style="color:grey">
+ <td>
+ <p>
+ [% IF ( order.order_received ) %] (rcvd)[% END %]
+ [% IF (order.title) %]
+ [% order.title |html %] by [% order.author %]<br />
+ [% ELSE %]
+ <em>Deleted bibliographic record, can't find title</em><br />
+ [% END %]
+ [% IF ( order.notes ) %] [% order.notes %][% END %]
+ [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
+ [% IF ( order.issn ) %] - [% order.issn %][% END %]
+ [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
+ [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
+ </p>
+ </td>
+ <td><p>[% order.rrp %]</p></td>
+ <td><p>[% order.ecost %]</p></td>
+ <td><p>[% order.quantity %]</p></td>
+ <td><p>[% order.line_total %]</p></td>
+ <td><p>[% order.budget_name %]</p></td>
+ </tr>
+ [% END %]
+ </tbody>
+ </table>
+ </div>
+ [% END %]
<br />
[% UNLESS ( closedate ) %]
[% INCLUDE 'acquisitions-add-to-basket.inc' %]
+[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Acquisitions › [% IF ( suggestions_loop ) %]Orders search › Search Results[% ELSE %]Order search[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestions_loo.biblionumber %]">[% suggestions_loo.title |html %]</a>
<br />[% suggestions_loo.author %] <br /> [% suggestions_loo.isbn %]</td>
<td><a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% suggestions_loo.id %]">[% suggestions_loo.name %]</a></td>
- <td>[% suggestions_loo.creationdate %]</td>
- <td>[% suggestions_loo.datereceived %]</td>
+ <td>[% suggestions_loo.creationdate | $KohaDates %]</td>
+ <td>[% suggestions_loo.datereceived | $KohaDates %]</td>
<td>[% suggestions_loo.quantity %]</td>
<td>[% suggestions_loo.ecost %]</td>
</tr>
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Acquisitions › Late orders</title>
[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
+<script type="text/javascript">
+//<![CDATA[
+$(document).ready(function() {
+ $("input:checkbox[name=claim_for]").click(function(){
+ var supplierid = $(this).attr('supplierid');
+ if ( $("input:checkbox[name=claim_for]:checked").length > 0) {
+ $("input:checkbox[name=claim_for][supplierid!="+supplierid+"]").attr('disabled', true);
+ } else {
+ $("input:checkbox[name=claim_for]").attr('disabled', false);
+ }
+ });
+ $('#CheckAll').click(function(){ $("#late_orders td").checkCheckboxes();});
+ $('#CheckNone').click(function(){ $("#late_orders td").unCheckCheckboxes();});
+});
+//]]>
+</script>
</head>
<body>
[% INCLUDE 'header.inc' %]
<h1>[% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders</h1>
<div id="acqui_lateorders">
+[% IF error_claim %]
+ [% IF ( error_claim == "no_email" ) %]
+ <div class="error">This vendor has no email</div>
+ [% ELSE %]
+ <div class="error">[% error_claim %]</div>
+ [% END %]
+[% END %]
+[% IF info_claim %]
+ <div class="dialog message">Email has been sent.</div>
+[% END %]
[% IF ( lateorders ) %]
<form action="lateorders.pl" name="claim" method="post">
<input type="hidden" name="op" value="send_alert" />
+ <input type="hidden" name="delay" value="[% delay %]" />
+ <input type="hidden" name="supplierid" value="[% SupplierId %]" />
[% IF ( letters ) %]
<p><label for="letter_code">Claim using notice: </label><select name="letter_code" id="letter_code">
[% FOREACH letter IN letters %]
</select>
</p>
[% END %]
- <table>
+ <table id="late_orders">
<tr>
<th>Order Date</th>
<th>Vendor</th>
<th>Information</th>
<th>Total cost</th>
<th>Basket</th>
- <th> </th>
+ <th>Claims count</th>
+ <th>Claimed date</th>
+ [% IF Supplier %]
+ <th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th>
+ [% ELSE %]
+ <th></th>
+ [% END %]
</tr>
[% FOREACH lateorder IN lateorders %]
[% UNLESS ( loop.odd ) %]<tr class="highlight">
[% ELSE %]<tr>[% END %]
<td>
+ ([% lateorder.supplierid %])
[% lateorder.orderdate %]
([% lateorder.latesince %] days)
</td>
</p>
<p title="branch">[% lateorder.branch %]</p>
</td>
+ <td>[% lateorder.claims_count %]</td>
+ <td>[% lateorder.claimed_date %]</td>
<td>
- <input type="checkbox" name="claim_for" value="[% lateorder.ordernumber %]" />
+ [% UNLESS lateorder.budget_lock %]
+ <input type="checkbox" class="checkbox" name="claim_for" value="[% lateorder.ordernumber %]" supplierid="[% lateorder.supplierid %]"/>
+ [% END %]
+ </td>
</td>
</tr>
[% END %]
<th colspan="2"> </th>
<th>[% total %]</th>
<th> </th>
+ <th> </th>
+ <th> </th>
<td>
<input type="submit" value="Claim Order" />
</td>
</li>
<li>
[% IF ( close ) %]
- <span class="label">Fund: </span>
+ <span class="label required">Fund: </span>
<input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
[% ELSE %]
- <label for="budget_id">Fund: </label>
+ <label class="required" for="budget_id">Fund: </label>
<select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
+ <option value="">Select a budget</option>
[% FOREACH budget_loo IN budget_loop %]
[% IF ( budget_loo.b_sel ) %]
<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
<select id="sort1" size="1" name="sort1">
[% FOREACH sort_opt IN CGIsort1 %]
[% IF sort_opt.default %]
- <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
+ <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
[% ELSE %]
- <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
+ <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
[% END %]
[% END %]
</select>
<label for="sort2">Statistic 2: </label>
[% IF CGIsort2 %]
- <select id="sort2" size="1" name="sort1">
+ <select id="sort2" size="1" name="sort2">
[% FOREACH sort_opt IN CGIsort2 %]
[% IF sort_opt.default %]
- <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
+ <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
[% ELSE %]
- <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
+ <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
[% END %]
[% END %]
</select>
--- /dev/null
+[% USE KohaDates %]
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha › Acquisitions › Ordered</title>
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body>
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'acquisitions-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Ordered - [% fund_code %]</div>
+
+<div id="doc3" class="yui-t2">
+
+<div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+
+<h1>Fund: [% fund_code %]</h1>
+<h2>Ordered</h2>
+
+<table cellspacing="0" cellpadding="0" border="0" id="spent" class="collapse">
+ <thead>
+ <tr>
+ <th> Title </th>
+ <th> Order </th>
+ <th> Vendor </th>
+ <th> Itemtype </th>
+ <th> Left on Order </th>
+ <th> Estimated cost per unit </th>
+ <th> Date Ordered </th>
+ <th> Subtotal </th>
+ </tr>
+ </thead>
+
+[% FOREACH order IN ordered %]
+ [% IF loop.odd %]
+ <tr class="highlight">
+ [% ELSE %]
+ <tr>
+ [% END %]
+ <td class="cell">
+ [% order.title %]
+ </td>
+ <td class="cell">
+ <a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% order.booksellerid %]&basketno=[% order.basketno %]">[% order.ordernumber %]</a>
+ </td>
+ <td class="cell">
+ <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% order.booksellerid %]">[% order.booksellerid %]</a>
+ </td>
+ <td class="cell">
+ [% order.itype %]
+ </td>
+ <td class="cell">
+ [% order.left %]
+ </td>
+ <td class="cell" align="right">
+ [% order.ecost %]
+ </td>
+ <td class="cell" align="right">
+ [% order.entrydate | $KohaDates %]
+ </td>
+ <td class="cell" align="right">
+ [% order.subtotal %]
+ </td>
+ </tr>
+[% END %]
+
+ <tfoot>
+ <tr>
+ <td> Total </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td align="right">
+ [% total %]
+ </td>
+ </tr>
+ </tfoot>
+
+</table>
+
+</div>
+</div>
+<div class="yui-b">
+[% INCLUDE 'acquisitions-menu.inc' %]
+</div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
<fieldset class="rows">
<legend>Accounting details</legend>
<ol>
- <li><label for="datereceived">Date received: </label><span class="label"> [% datereceived %] </span></li>
+ <li><label for="datereceived">Date received: </label><span> [% datereceived %] </span></li>
+ <li><label for="bookfund">Budget: </label><span> [% bookfund %] </span></li>
+ <li><label for="creator">Created by: </label><span> [% IF ( memberfirstname and membersurname ) %][% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %][% ELSE %]No name[% END %]</span></li>
<li><label for="quantityto">Quantity to receive: </label><span class="label">
[% IF ( edit ) %]
<input type="text" name="quantity" value="[% quantity %]" />
--- /dev/null
+[% USE KohaDates %]
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha › Acquisitions › Spent</title>
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body>
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'acquisitions-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Spent - [% fund_code %]</div>
+
+<div id="doc3" class="yui-t2">
+
+<div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+
+<h1>Fund: [% fund_code %]</h1>
+<h2>Spent</h2>
+
+
+<table cellspacing="0" cellpadding="0" border="0" id="spent" class="collapse">
+ <thead>
+ <tr>
+ <th> Title </th>
+ <th> Order </th>
+ <th> Vendor </th>
+ <th> Invoice </th>
+ <th> Itemtype </th>
+ <th> Received </th>
+ <th> Unit Price </th>
+ <th> Freight per Item </th>
+ <th> Date Ordered </th>
+ <th> Date Received </th>
+ <th> Subtotal </th>
+ </tr>
+ </thead>
+
+[% FOREACH order IN spent %]
+ [% IF loop.odd %]
+ <tr class="highlight">
+ [% ELSE %]
+ <tr>
+ [% END %]
+
+ <td class="cell">
+ [% order.title %]
+ </td>
+ <td class="cell">
+ <a href="/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=[% order.ordernumber %]&biblio=[% order.biblionumber %]&invoice=[% order.booksellerinvoicenumber %]&supplierid=[% order.booksellerid %]&catview=yes">[% order.ordernumber %]</a>
+ </td>
+ <td class="cell">
+ <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% order.booksellerid %]">[% order.booksellerid %]</a>
+ </td>
+ <td class="cell">
+ <a href="/cgi-bin/koha/acqui/parcel.pl?invoice=[% order.booksellerinvoicenumber %]&supplierid=[% order.booksellerid %]&datereceived=[% order.datereceived %]">[% order.booksellerinvoicenumber %]</a>
+ </td>
+ <td class="cell">
+ [% order.itype %]
+ </td>
+ <td class="cell">
+ [% order.quantityreceived %]
+ </td>
+ <td class="cell" align="right">
+ [% order.unitprice %]
+ </td>
+ <td class="cell" align="right">
+ [% order.freight %]
+ </td>
+ <td class="cell" align="right">
+ [% order.entrydate | $KohaDates %]
+ </td>
+ <td class="cell" align="right">
+ [% order.datereceived | $KohaDates %]
+ </td>
+ <td class="cell" align="right">
+ [% order.subtotal %]
+ </td>
+ </tr>
+[% END %]
+ <tfoot>
+ <tr valign="top">
+ <td> Total </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td align="right">
+ [% total %]
+ </td>
+ </tr>
+ </tfoot>
+
+</table>
+
+</div>
+</div>
+<div class="yui-b">
+[% INCLUDE 'acquisitions-menu.inc' %]
+</div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Acquisitions › Z39.50 Search Results</title>
+<title>Koha › Acquisitions › [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source › Search results[% END %]</title>
[% INCLUDE 'greybox.inc' %]
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> › Order from Z39.50 search</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> › [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Order from external source</a> › Search results[% END %]</div>
<div id="doc3" class="yui-t7">
<div id="bd">
[% IF ( opsearch ) %]
-<h2>Z39.50 Search Points</h2>
+<h2>Order from external source</h2>
<form method="post" action="z3950_search.pl" name="f" class="checkboxed">
<input type="hidden" name="op" id="op" value="do_search" />
<div class="yui-g">
</p>
[% END %]
- <fieldset class="action"><input type="submit" class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
+ <fieldset class="action"><input type="submit" class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a></fieldset>
</div>
</form>
[% ELSE %]
- <h2>Results</h2>
+ <h2>Search results</h2>
[% IF ( breeding_loop ) %]
<table id="resultst">
<thead> <tr>
[% END %]</tbody>
</table>
[% ELSE %]
- <p>Nothing found. <a href="javascript: history.back()">Try another search</a>.</p>
+ [% IF ( emptyserverlist ) %]
+ <div class="dialog alert">You didn't select any Z39.50 target.</div>
+ [% ELSE %]
+ [% IF ( errconn ) %]
+ <div class="dialog alert">
+ <ul>
+ [% FOREACH errcon IN errconn %]
+ <li>Connection failed to [% errcon.server %]</li>
+ [% END %]
+ </ul>
+ </div>
+ [% END %]
+ [% END %]
+ <div class="dialog message">Nothing found. <a href="javascript: history.back()">Try another search</a>.</div>
[% END %]
// #################################################################################
// Javascript
// #################################################################################
+ function CheckDuplicateForm(f){
+ var ok=1;
+ var _alertString="";
+ var alertString="";
+ if(!(isNotNull(f.budget_period_startdate,1))){
+ _alertString += "\n- " + _("Start date missing");
+ }
+ if (!(isNotNull(f.budget_period_enddate,1))){
+ _alertString += "\n- " + _("End date missing");
+ }
+ if( f.budget_period_startdate > f.budget_period_enddate ) {
+ _alertString += "\n- " + _("Start date must be before end date");
+ }
+
+ if(_alertString.length==0){
+ f.submit();
+ } else {
+ alertString += _("Form not submitted because of the following problem(s)");
+ alertString += "\n-----------------------------------------\n";
+ alertString += _alertString;
+ alert(alertString);
+ }
+ }
function Check(f) {
var ok=1;
var _alertString="";
[% INCLUDE 'budgets-admin-toolbar.inc' %]
+[% IF ( duplicate_form ) %]
+<form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
+ <fieldset class="rows">
+ <input type="hidden" name="op" value="duplicate_budget" />
+ <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
+
+ <ol>
+
+ <li>
+ <label class="required" for="budget_period_startdate">Start date</label>
+ <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate" value="[% budget_period_startdate %]" />
+ <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
+ <script type="text/javascript">
+ Calendar.setup({
+ inputField : "budget_period_startdate",
+ ifFormat : "[% DHTMLcalendar_dateformat %]",
+ button : "openCalendarFrom",
+ align : "Tl",
+ singleClick : false
+ });
+ </script>
+ <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
+ </li>
+ <li>
+
+ <label class="required" for="budget_period_enddate">End date</label>
+ <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
+ <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
+
+ <script type="text/javascript">
+ Calendar.setup({
+ inputField : "budget_period_enddate",
+ ifFormat : "[% DHTMLcalendar_dateformat %]",
+ button : "openCalendarTo",
+ align : "Tl"
+ });
+ </script>
+ <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
+ </li>
+
+ </ol>
+ </fieldset>
+
+ <fieldset class="action">
+ <input type="button" value="Save Changes" onclick="CheckDuplicateForm(this.form)" />
+ </fieldset>
+
+</form>
+
+[% END %]
+
[% IF ( add_form ) %]
<!-- add or modify a budget period -->
<div class="pages">[% pagination_bar %]</div>
[% END %]
+
</div>
</div>
<div class="yui-b">
<h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4>
<p><a id="CheckAll[% codes_loo.code %]table" class="checkall" href="#">Check All</a> | <a id="UncheckAll[% codes_loo.code %]table" class="uncheckall" href="#">Uncheck All</a></p>
- <div id="pager[% codes_loo.code %]table" class="pager">
+ <div id="pager[% codes_loo.code %]table">
[% INCLUDE 'table-pager.inc' perpage='20' %]
</div>
<table id="[% codes_loo.code %]table" class="sorted">
[% IF ( loop.last ) %]</tbody></table>[% END %]
[% END %]
[% END %]
- <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button> <a href="/cgi-bin/koha/admin/preferences.pl?tab=[% TAB.tab %]" class="cancel">Cancel</a></fieldset>
+ <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button> <a href="#" onclick="window.location.reload(true);" class="cancel">Cancel</a></fieldset>
</form>
</div>
[% END %]
choices:
yes: "Don't"
no: Do
- - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authorities.pl cronjob.
+ - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authority.pl cronjob.
-
- Use the following text for the contents of MARC authority control field 008 position 06-39 (fixed length data elements). Do NOT include the date (position 00-05).
- pref: MARCAuthorityControlField008
yes: Record
no: "Don't record"
- local use when an unissued item is checked in.
+ -
+ - When an empty barcode field is submitted in circulation
+ - pref: CircAutoPrintQuickSlip
+ choices:
+ yes: "open a print quick slip window"
+ no: "clear the screen"
+ - .
Checkout Policy:
-
- pref: AllowNotForLoanOverride
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
- pref: TagsExternalDictionary
class: file
- on the server to be approved without moderation.
+ Local Cover Images:
+ -
+ - pref: LocalCoverImages
+ choices:
+ yes: Display
+ no: "Don't display"
+ - local cover images on intranet search and details pages.
+ -
+ - pref: OPACLocalCoverImages
+ choices:
+ yes: Display
+ no: "Don't display"
+ - local cover images on OPAC search and details pages.
+ -
+ - pref: AllowMultipleCovers
+ choices:
+ yes: Allow
+ no: "Don't allow"
+ - multiple images to be attached to each bibliographic record.
choices:
us: mm/dd/yyyy
metric: dd/mm/yyyy
- iso: yyyy/mm/dd
+ iso: yyyy-mm-dd
- .
-
- "Enable the following languages on the staff interface:"
- Include the additional CSS stylesheet
- pref: opaccolorstylesheet
class: file
- - to override specified settings from the default stylesheet. Enter the filename (if the file is in the server's css directory) or a complete URL beginning with <code>http://</code> (if the file lives on a remote server). Leave blank to disable.
+ - to override specified settings from the default stylesheet (leave blank to disable). Enter a filename or a complete URL beginning with <code>http://</code> (if the file lives on a remote server). Please note that if you enter a filename, the file should be in the css subdirectory for each active theme and language within the Koha templates directory.
-
- - Use the CSS stylesheet <!-- TMPL_VAR NAME="opacthemelang" -->/css/
+ - Use the CSS stylesheet
- pref: opaclayoutstylesheet
class: file
- - on all pages in the OPAC, instead of the default (leave blank to disable).
+ - on all pages in the OPAC, instead of the default (leave blank to disable). Please enter filename only. The file should be in the css subdirectory for each active theme and language within the Koha templates directory.
-
- Use the remote CSS stylesheet
- pref: opacstylesheet
Results: "Results page only"
Both: "Both Details and Results pages"
- 'Note: The corresponding OPACXSLT option must be turned on.'
+ -
+ - 'List export options that should be available from OPAC detail page separated by |:'
+ - pref: OpacExportOptions
+ class: multi
+ - '<br />Note: Available options are: BIBTEX (<code>bibtex</code>), Dublin Core (<code>dc</code>),'
+ - 'MARCXML (<code>marcxml</code>), MARC-8 encoded MARC (<code>marc8</code>), Unicode/UTF-8 encoded MARC (<code>utf8</code>),'
+ - 'Unicode/UTF-8 encoded MARC without local use -9xx, x9x, xx9- fields and subfields (<code>marcstd</code>), MODS (<code>mods</code>), RIS (<code>ris</code>)'
Features:
-
- pref: opacuserlogin
choices:
yes: Send
no: "Don't send"
- - an email to newly created patrons with their account details at their
+ - an email to newly created patrons with their account details.
+ -
+ - "Use"
- pref: AutoEmailPrimaryAddress
default: "OFF"
choices:
emailpro: work
B_email: alternate
"OFF": first valid
- - email address.
+ - "patron email address for sending out emails."
-
- pref: autoMemberNum
choices:
no: "Don't"
- default the card number field on the patron addition screen to the next available card number (for example, if the largest currently used card number is 26345000012941, then this field will default to 26345000012942).
-
- - "The following database columns must be filled in on the patron entry screen:"
+ - "The following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:"
- pref: BorrowerMandatoryField
class: multi
- (separate columns with |)
-
+ - "The following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron entry screen:"
+ - pref: BorrowerUnwantedField
+ class: multi
+ - (separate columns with |)
+ -
- "Guarantors can be the following of those they guarantee:"
- pref: borrowerRelationship
class: multi
- - (input multiple choices separated by |)
+ - (input multiple choices separated by |). Leave empty to deactivate
-
- "Borrowers can have the following titles:"
- pref: BorrowersTitles
yes: Do
no: "Don't"
- store and display surnames in upper case.
+ -
+ - When renewing borrowers, base the new expiry date on
+ - pref: BorrowerRenewalPeriodBase
+ choices:
+ now: current date.
+ dateexpiry: current membership expiry date.
[% INCLUDE 'sysprefs-admin-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › Data Added[% END %]
-[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=[% searchfield %]">[% searchfield %]</a> › Confirm Deletion of Parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › Parameter Deleted[% END %][% IF ( else ) %]System Preferences[% END %]</div>
+[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=[% searchfield %]">[% searchfield %]</a> › Confirm Deletion of Parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › Parameter Deleted[% END %][% IF ( else ) %]System Preferences[% END %]</div>
<div id="doc3" class="yui-t2">
[% END %]
[% END %]
[% IF ( displaynext ) %]
- <a href="auth_finder.pl?startfrom=[% startfromnext %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranet&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
+ <a href="auth_finder.pl?startfrom=[% startfromnext %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranet&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
>></a>
[% END %]
</div>[% END %]
</li>
<li>
<span id="hide" class="yui-button yui-link-button"><span class="first-child">
- <a class="hide" href="basket.pl" onclick="quit(); return false;">Hide Window</a>
+ <a class="hide close" href="basket.pl">Hide Window</a>
</span></span>
</li>
</ul>
<div id="yui-main">
<div class="yui-b">
[% INCLUDE 'cat-toolbar.inc' %]
-
+ [% IF ( ocoins ) %]
+ <!-- COinS / OpenURL -->
+ <span class="Z3988" title="[% ocoins %]"></span>
+ [% END %]
<div id="catalogue_ISBDdetail">
[% ISBD %]
</div>
[% IF ( frameworkcodeloo.selected ) %]<option value="[% frameworkcodeloo.value %]" selected="selected">[% frameworkcodeloo.frameworktext %]</option>[% ELSE %]<option value="[% frameworkcodeloo.value %]">[% frameworkcodeloo.frameworktext %]</option>[% END %]
[% END %]
</select> </b></p>
+[% IF ( ocoins ) %]
+<!-- COinS / OpenURL -->
+<span class="Z3988" title="[% ocoins %]"></span>
+[% END %]
<div id="bibliotabs" class="toptabs numbered">
<ul>
<div class="yui-b">
[% INCLUDE 'cat-toolbar.inc' %]
+ [% IF ( ocoins ) %]
+ <!-- COinS / OpenURL -->
+ <span class="Z3988" title="[% ocoins %]"></span>
+ [% END %]
+
[% IF ( AmazonEnabled ) %]
[% IF ( XSLTDetailsDisplay ) %]
<div class="yui-gc">
[% END %]
</span>
[% END %]
+ [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %]
+ <span class="results_summary"><span class="label">Tags:</span>
+ [% FOREACH TagLoo IN TagLoop %]
+ [% IF ( CAN_user_tools_moderate_tags ) %]
+ <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
+ [% ELSE %]
+ [% TagLoo.term |html %]
+ [% END %]
+ <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
+ [% END %]
+ </span>
+ [% END %]
[% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %]
[% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]</div><div class="yui-u" id="bookcoverimg">
</ul>
</li>
[% END %]
+ [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %]
+ <li><strong>Tags:</strong>
+ <ul id="tagslist">
+ [% FOREACH TagLoo IN TagLoop %]
+ <li>
+ [% IF ( CAN_user_tools_moderate_tags ) %]
+ <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
+ [% ELSE %]
+ [% TagLoo.term |html %]
+ [% END %]
+ <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]</li>
+ [% END %]
+ </ul></li>
+ [% END %]
[% IF ( holdcount ) %]<li><strong>Holds:</strong> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></li>[% ELSE %][% END %]
</ul>
[% END %]
+
</div>
</div>
<div id="bibliodetails" class="toptabs">
[% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#subscriptions">Subscriptions</a></li>[% END %]
[% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#editions">Editions</a></li>[% END %][% END %]
[% IF ( AmazonSimilarItems ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#related">Related Titles</a></li>[% END %]
+[% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#images">Images</a></li>[% END %][% END %]
</ul>
<div id="holdings">
[% IF ( volinfo ) %]<th>Publication Details</th>[% END %]
[% IF ( itemdata_uri ) %]<th>url</th>[% END %]
[% IF ( itemdata_copynumber ) %]<th>Copy No.</th>[% END %]
+ [% IF materials %]<th>Materials Specified</th>[% END %]
[% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine Label</th>[% END %]
[% IF ( hostrecords ) %]<th>Host Records</th>[% END %]
- [% IF ( analyze ) %]<th>Used in</th>[% END %]
- [% IF ( analyze ) %]<th></th>[% END %]
+ [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
</tr>
[% FOREACH itemloo IN itemloop %]
<tr>
Item-level hold
[% END %]
[% IF ( canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedForBorrowernumber %]">
- [% IF ( hidepatronname ) %]
+ [% IF ( itemloo.hidepatronname ) %]
[% itemloo.Reservedcardnumber %]
[% ELSE %]
[% itemloo.ReservedForFirstname %] [% itemloo.ReservedForSurname %]
[% IF ( itemdata_copynumber ) %]
<td class="copynumber">[% itemloo.copynumber %]</td>
[% END %]
+ [% IF materials %]
+ <td class="materials"> [% itemloo.materials %] </td>
+ [% END %]
[% IF ( itemdata_itemnotes ) %]<td><div class="itemnotes">[% itemloo.itemnotes %]</div></td>[% END %]
[% IF ( SpineLabelShowPrintOnBibDetails ) %]
<td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% itemloo.barcode %]" >Print Label</a></td>
[% END %]
[% IF ( analyze ) %]<td>
[% IF ( itemloo.countanalytics ) %]
- <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% itemloo.itemnumber %]">[% itemloo.countanalytics %] analytics</a>
+ <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% itemloo.itemnumber %]">[% itemloo.countanalytics %] analytics</a>
[% END %]</td>
[% END %]
[% IF ( analyze ) %]
- <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% itemloo.biblionumber %]&hostitemnumber=[% itemloo.itemnumber %]">Create Analytics</a></td>
+ <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% itemloo.biblionumber %]&hostitemnumber=[% itemloo.itemnumber %]">Create Analytics</a></td>
[% END %]
</tr>
</table>
[% END %]
[% IF ( hiddencount ) %]
- <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&showallitems=1">Show all items ([% hiddencount %] hidden)</a>
+ <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&showallitems=1">Show all items ([% hiddencount %] hidden)</a>
[% END %]
[% IF ( debug_display ) %]
<br /><br />
<ul>
[% FOREACH AMAZON_SIMILAR_PRODUCT IN AMAZON_SIMILAR_PRODUCTS %]
[% FOREACH similar_biblionumber IN AMAZON_SIMILAR_PRODUCT.similar_biblionumbers %]
-<li><img alt="img" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li>
+<li><img alt="" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li>
[% END %]
[% END %]
</ul>
</div>
[% END %][% END %]
+[% IF ( LocalCoverImages ) %]
+<div id="images">
+[% IF ( localimages.0 ) %]
+<p>Click on an image to view it in the image viewer</p>
+[% FOREACH image IN localimages %]
+[% IF image %]
+<a class="localimage" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image %]" /></a>
+[% END %]
+[% END %]
+[% ELSE %]
+[% IF ( CAN_user_tools_upload_local_cover_images ) %]
+<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image'>upload</a> one.</p>
+[% END %]
+[% END %]
+</div>
+[% END %]
+
</div><!-- /bibliodetails -->
<div class="yui-g" id="export" style="margin-top: 1em;">
--- /dev/null
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha › Catalog › Details for [% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
+[% INCLUDE 'doc-head-close.inc' %]
+[% IF ( LocalCoverImages == 1 ) %]
+<script type="text/JavaScript">
+//<![CDATA[
+
+$(document).ready(function(){
+ showCover([% imagenumber %]);
+});
+
+function showCover(img) {
+ $('.thumbnail').attr('class', 'thumbnail');
+ $('#largeCoverImg').attr('src', '/cgi-bin/koha/catalogue/image.pl?imagenumber=' + img);
+ $('#' + img + '.thumbnail').attr('class', 'thumbnail selected');
+}
+//]]>
+</script>
+<style type="text/css">
+#largeCoverImg {
+ border : 1px solid #CCCCCC;
+ display : block;
+ margin : auto;
+ padding : 1em;
+}
+#thumbnails {
+ text-align : center;
+}
+#thumbnails a img {
+ border : 1px solid #0000CC;
+}
+img.thumbnail {
+ display : block;
+ float : none;
+ margin: 0 5px 5px 0;
+ padding : .5em;
+}
+
+#thumbnails a img.selected {
+ border-color: black;
+ cursor : default;
+ opacity:0.4;
+ filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+</style>[% END %]
+</head>
+
+<body>
+
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'cat-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Images for <i>[% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</i></div>
+
+<div id="doc3" class="yui-t1">
+
+<div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+ <div class="yui-ge">
+
+[% INCLUDE 'cat-toolbar.inc' %]
+
+<h3>Images for <i>[% biblio.title |html %]</i></h3>
+<h4>[% biblio.author %]</h4>
+
+[% IF ( LocalCoverImages == 1 ) %]
+ [% IF ( images.size > 0 ) %]
+ <div class="yui-u first">
+ <div id="largeCover">
+ <img id="largeCoverImg" alt="" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% imagenumber %]" />
+ </div></div>
+
+ <div class="yui-u"><div id="thumbnails">
+
+ [% FOREACH img IN images %]
+ [% IF img %]
+ <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% img %]" onclick="showCover([% img %]); return false;">
+ [% IF ( imagenumber == img ) %]
+ <img class="thumbnail selected" id="[% img %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&thumbnail=1" alt="Thumbnail" />
+ [% ELSE %]
+ <img class="thumbnail" id="[% img %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&thumbnail=1" alt="Thumbnail" />
+ [% END %]
+ </a>
+ [% END %]
+ [% END %]
+ </div></div>
+
+ [% ELSE %]
+ <div class="dialog message">There are no images for this record.</div>
+ [% END %]
+[% ELSE %]
+ <div class="dialog message">Local images have not been enabled by your system administrator.</div>
+[% END %]
+
+</div>
+</div>
+</div>
+<div class="yui-b">
+[% INCLUDE 'biblio-view-menu.inc' %]
+</div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
<tbody>
[% FOREACH issue IN issues %]
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
- <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.borrowernumber %]">[% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %]</a></td>
+ <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.borrowernumber %]">[% IF HidePatronName %][% issue.cardnumber %][% ELSE %][% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %][% END %]</a></td>
<td>[% IF ( issue.barcode ) %]
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% issue.biblionumber %]&itemnumber=[% issue.itemnumber %]">[% issue.barcode %]</a>
[% ELSE %]
<li><span class="label">Item Callnumber:</span> [% ITEM_DAT.itemcallnumber %] </li>
[% IF ( ITEM_DAT.copyvol ) %]<li><span class="label">Copy / Vol :</span> [% ITEM_DAT.copyvol %] </li> [% END %]
[% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement Price:</span> [% ITEM_DAT.replacementprice %] </li> [% END %]
+ [% IF ITEM_DAT.materials %]<li><span class="label">Materials Specified:</span> [% ITEM_DAT.materials %] </li> [% END %]
</ol></div>
<div class="listgroup"><h4>Statuses [% IF ( ITEM_DAT.status_advisory ) %](
[% IF ( ITEM_DAT.notforloantext ) %][% ITEM_DAT.notforloantext %] [% END %]
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",
[% INCLUDE 'biblio-default-view.inc' %]
<b>[% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %]</b>
</a>
- [% FOREACH subtitl IN SEARCH_RESULT.subtitle %] , [% subtitl.subfield %] [% END %]
+ [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield %][% END %]
[% IF ( SEARCH_RESULT.volume ) %],[% SEARCH_RESULT.volume %][% END %] [% IF ( SEARCH_RESULT.volumeddesc ) %], [% SEARCH_RESULT.volumeddesc %][% END %]
</p>
[% IF ( SEARCH_RESULT.summary ) %]
[% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %]</span>
[% IF ( SEARCH_RESULT.edition ) %]<span class="results_edition">Edition: [% SEARCH_RESULT.edition %]</span>[% END %]
<span class="results_physicaldesc">[% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages %][% END %]
- [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %]</span> [% IF ( SEARCH_RESULT.normalized_isbn ) %]<span class="results_isbn">ISBN: [% SEARCH_RESULT.normalized_isbn %]</span>[% END %]
+ [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %]</span> [% IF ( SEARCH_RESULT.isbn ) %]<span class="results_isbn">ISBN: [% SEARCH_RESULT.isbn | replace('\s\|', ', ')%]</span>[% END %]
<span class="results_itemtype">[% SEARCH_RESULT.description %]</span>
[% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %]
[% IF ( SEARCH_RESULT.cn_class ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% SEARCH_RESULT.cn_class |url %]">[% SEARCH_RESULT.cn_class %]</a>][% END %]
<span class="noholdstext">No holds allowed</span>
[% ELSE %]
<a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
- [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&findborrower=[% holdfor_cardnumber %]">Hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
+ [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
[% END %]
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
| <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit record</a>
[% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %]</strong>
[% IF ( SEARCH_RESULT.availablecount ) %]
- [% SEARCH_RESULT.availablecount %] available:
<ul>
[% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
[% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item is checked out.</div>[% END %]
[% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot Delete</strong>: item has a waiting hold.</div>[% END %]
[% IF ( not_same_branch ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: The items do not belong to your branch.</div>[% END %]
-[% IF ( linked_analytics ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item has linked <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&analyze=1">analytics.</a>.</div>[% END %]
+[% IF ( linked_analytics ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item has linked <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&analyze=1">analytics.</a>.</div>[% END %]
<div id="cataloguing_additem_itemlist">
[% IF ( item_loop ) %]
[% IF ( item_loo.nomod ) %] <td colspan="2"> </td>[% ELSE %][% IF ( item_loo.hostitemflag ) %]<td><a href="additem.pl?op=edititem&biblionumber=[% item_loo.hostbiblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit in Host</a></td>
<td><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=[% biblionumber %]&hostitemnumber=[% item_loo.itemnumber %]">Delink</a></td>
[% ELSE %]<td><a href="additem.pl?op=edititem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
- <td>[% IF ( item_loo.countanalytics ) %]<a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=% item_loo.itemnumber %]">view analytics</a>[% ELSE %]<a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]" onclick="confirm_deletion([% biblionumber %],[% item_loo.itemnumber %]); return false;">Delete</a>[% END %]</td>[% END %][% END %]
+ <td>[% IF ( item_loo.countanalytics ) %]<a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=% item_loo.itemnumber %]">view analytics</a>[% ELSE %]<a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]" onclick="confirm_deletion([% biblionumber %],[% item_loo.itemnumber %]); return false;">Delete</a>[% END %]</td>[% END %][% END %]
[% FOREACH item_valu IN item_loo.item_value %]
<td>[% item_valu.field |html %]</td>
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Cataloging › Merging records</title>
+[% INCLUDE 'greybox.inc' %]
[% INCLUDE 'doc-head-close.inc' %]
<style type="text/css">
div.record ul, div.record li { float:none; display:block; }
});
+function changeFramework(fw) {
+ $("#Frameworks").val(fw);
+}
+
//]]>
</script>
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cataloging-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › [% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record Number [% biblionumber %])[% ELSE %]Add MARC Record[% END %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › Merging records</div>
<div id="doc" class="yui-t7">
<fieldset class="rows">
<legend>Merge reference</legend>
<ol>
- <li class="radio"><input type="radio" value="[% biblio1 %]" checked="checked" id="mergereference1" name="mergereference" /><label style="float:none" for="mergereference1">[% title1 %] ([% biblio1 %])</label></li>
- <li class="radio"><input type="radio" value="[% biblio2 %]" id="mergereference2" name="mergereference" /><label style="float:none" for="mergereference2">[% title2 %] ([% biblio2 %])</label></li>
+ <li class="radio"><input type="radio" value="[% biblio1 %]" checked="checked" id="mergereference1" name="mergereference" onclick="changeFramework('[% frameworkcode1 %]')" /><label for="mergereference1">[% title1 %] [% FOREACH subtitl1 IN subtitle1 %] [% subtitl1.subfield %][% END %] (<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio1 %]" title="MARC" rel="gb_page_center[600,500]">[% biblio1 %]</a>)</label></li>
+ <li class="radio"><input type="radio" value="[% biblio2 %]" id="mergereference2" name="mergereference" onclick="changeFramework('[% frameworkcode2 %]')" /><label for="mergereference2">[% title2 %] [% FOREACH subtitl2 IN subtitle2 %] [% subtitl2.subfield %][% END %] (<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio2 %]" title="MARC" rel="gb_page_center[600,500]">[% biblio2 %]</a>)</label></li>
+
+ [% IF frameworkselect %]
+ <li><label for="frameworkcode">Using framework:</label>
+ <select name="frameworkcode" id="frameworkcode">
+ <option value="Default">Default</option>
+ [% FOREACH frameworkcodeloo IN frameworkselect %]
+ [% IF ( frameworkcodeloo.selected ) %]
+ <option value="[% frameworkcodeloo.value %]" selected="selected">
+ [% ELSE %]
+ <option value="[% frameworkcodeloo.value %]">
+ [% END %]
+ [% frameworkcodeloo.frameworktext %]
+ </option>
+ [% END %]
+ </select></li>
+ [% END %]
</ol>
+
<input type="hidden" name="biblionumber" value="[% biblio1 %]" />
<input type="hidden" name="biblionumber" value="[% biblio2 %]" />
<fieldset class="action"><input type="submit" value="Next" /></fieldset>
[% END %]
</ul>
+</div>
+</div> <!-- // #result -->
+</div> <!-- .yui-u -->
<input type="hidden" name="biblio1" value="[% biblio1 %]" />
<input type="hidden" name="biblio2" value="[% biblio2 %]" />
<input type="hidden" name="mergereference" value="[% mergereference %]" />
+<input type="hidden" name="frameworkcode" value="[% framework %]" />
-</div>
-</div> <!-- // #result -->
-</div> <!-- .yui-u -->
<fieldset class="action"><input type="submit" name="merge" value="Merge" /></fieldset>
</div>
</form>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloging/addbooks.pl">Cataloging</a> › Attach an item to <i>[% bibliotitle |html %]</i></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloging/addbooks.pl">Cataloging</a> › Attach an item to <i>[% bibliotitle |html %][% IF ( itemsloo.subtitle ) %][% itemsloo.subtitle %][% END %]</i></div>
<div id="doc" class="yui-t7">
+[% BLOCK actions %]
+ [% IF ( BiblioDefaultViewmarc ) %]
+ <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
+ [% ELSIF ( BiblioDefaultViewlabeled_marc ) %]
+ <form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post">
+ [% ELSIF ( BiblioDefaultViewisbd ) %]
+ <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="post">
+ [% ELSE %]
+ <form action="/cgi-bin/koha/catalogue/detail.pl" method="post">
+ [% END %]
+[% END %]
+
+[% BLOCK fail %]
+ <input type="submit" class="approve" value="OK" />
+ <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+ </form>
+ <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]">
+ <input type="submit" class="new" value="Try again with a different barcode"/>
+ <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+ </form>
+[% END %]
+
[% IF ( error ) %]
<div class="dialog alert">
- [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.[% END %]
- [% IF ( errornoitem ) %]ERROR: Unable to get the item.[% END %]
- [% IF ( errornoitemnumber ) %]ERROR: Unable to get the item number from this barcode.[% END %]
+
+ [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.<p>
+ [% INCLUDE actions %]
+ [% INCLUDE fail %]
+ [% END %]
+
+ [% IF ( errornoitem ) %]ERROR: Unable to get the item.<p>
+ [% INCLUDE actions %]
+ [% INCLUDE fail %]
+ [% END %]
+
+ [% IF ( errornoitemnumber ) %]ERROR: Unable to get the item number from this barcode.<p>
+ [% INCLUDE actions %]
+ [% INCLUDE fail %]
+ [% END %]
+ </p>
</div>
- <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
- <input type="submit" value="OK" />
- <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
- </form>
-[% ELSE %]
- [% IF ( success ) %]
- <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle |html %]</i></a>.[% IF ( BiblioDefaultViewmarc ) %]
- <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
-[% ELSIF ( BiblioDefaultViewlabeled_marc ) %]
- <form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post">
-[% ELSIF ( BiblioDefaultViewisbd ) %]
- <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="post">
-[% ELSE %]
- <form method="link" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]"/>
-[% END %]
- <input type="submit" class="attachanother" value="Attach Another Item"/>
- <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
- </form>
- <form action="/cgi-bin/koha/catalogue/detail.pl" method="post">
- <input type="submit" class="approve" value="OK" />
- <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
- </form>
-</div>
+ [% ELSE %]
+ [% IF ( success ) %]
+ <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle |html %]</i></a>.
+ <p>
+ [% INCLUDE actions %]
+ <input type="submit" class="approve" value="OK" />
+ <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+ </form>
+ <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]"/>
+ <input type="submit" class="new" value="Attach another item"/>
+ <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+ </form>
+ </p>
+ </div>
[% ELSE %]
[% IF ( missingparameter ) %]
<form method="post" action="/cgi-bin/koha/cataloguing/moveitem.pl">
[% IF ( missingbiblionumber ) %]
<fieldset id="biblionumber_fieldset">
<label for="biblionumber">Select the biblionumber to attach the item to</label>
- <div class="hint">Enter biblionumber:</div>
+ <div class="hint">Enter biblionumber:</div>
<input type="text" name="biblionumber" id="biblionumber" class="focus" size="14" />
<fieldset class="action"><input type="submit" value="Submit" /></fieldset>
</fieldset>
</table>
<p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_search.pl"><input type="hidden" name="biblionumber" value="[% biblionumber %]"/><input type="hidden" name="frameworkcode" value="[% frameworkcode %]"/><input type="submit" value="Try Another Search"/></form></p>
[% ELSE %]
- [% IF ( emptyserverlist ) %]
- You didn't select any Z39.50 target.
- [% ELSE %]
- [% FOREACH errcon IN errconn %]
- Connection failed to [% errcon.server %]
- [% END %]
- [% END %]
- <p>Nothing found.</p>
+ [% IF ( errconn ) %]
+ <div class="dialog alert">
+ <ul>
+ [% FOREACH errcon IN errconn %]
+ <li>Connection failed to [% errcon.server %]</li>
+ [% END %]
+ </ul>
+ </div>
+ [% END %]
+ <div class="dialog message">Nothing found.</div>
<p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_search.pl"><input type="hidden" name="biblionumber" value="[% biblionumber %]"/><input type="hidden" name="frameworkcode" value="[% frameworkcode %]"/><input type="submit" value="Try Another Search"/></form></p>
[% END %]
$( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
}
} ).attr( 'checked', false );
- [% END %]
- // listen submit to trigger qslip on empty checkout
- $('#mainform').bind('submit',function() {
- if ($('#barcode').val() == '') {
- return printx_window('qslip'); }
- });
+ [% END %][% IF ( CircAutoPrintQuickSlip ) %]
+ // listen submit to trigger qslip on empty checkout
+ $('#mainform').bind('submit',function() {
+ if ($('#barcode').val() == '') {
+ return printx_window('qslip'); }
+ });[% END %]
var allcheckboxes = $(".checkboxed");
</div>
[% IF ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
+
+[% IF additional_materials %]
+ <div id="materials" class="dialog message">Note about the accompanying materials: <br />
+ [% additional_materials %]
+ </div>
+[% END %]
+
[% IF ( NEEDSCONFIRMATION ) %]
<div class="yui-g">
[% IF ( userdebarred ) %]
<li class="blocker">
- <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %]
+ <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
<form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="destination" value="circ" />
<input type="hidden" name="cardnumber" value="[% cardnumber %]" />
- <input type="submit" value="Lift Debarment" />
+ <input type="submit" value="Lift restriction" />
</form>
</li>[% END %]
<div class="yui-g">
+[% IF additional_materials %]
+ <div class="dialog message" id="materials">Note about the accompanying materials: <br />
+ [% additional_materials %]
+ </div>
+[% END %]
+
[% IF ( collectionItemNeedsTransferred ) %]
- <div class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div>
+ <div id="rotating-collection" class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div>
[% END %]
<!-- Patron has fines -->
<!-- Patron has waiting holds -->
[% IF ( waiting_holds ) %]
- <div class="dialog message">
+ <div id="awaiting-pickup" class="dialog message">
<h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3>
<p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p>
</div>
</div>
[% END %]
<!-- case of a mistake in transfer loop -->
-[% IF ( WrongTransfer ) %]<div class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %] or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&canceltransfer=1">Cancel Transfer</a></h3>
+[% IF ( WrongTransfer ) %]<div id="return2" class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %] or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&canceltransfer=1">Cancel Transfer</a></h3>
[% IF ( wborcnum ) %]<h5>Hold for:</h5>
<ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
<audio src="/intranet-tmpl/prog/sound/ending.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
[% END %]
-<div class="dialog message">
+<div id="hold-found1" class="dialog message">
<h3>Hold Found (item is already waiting): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
[% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
<h4>Hold for:</h4>
[% IF ( soundon ) %]
<audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
[% END %]
- <div class="dialog message">
+ <div id="transfer-needed" class="dialog message">
<h3>Hold needing transfer found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
<h4>Hold for: </h4>
<ul>
[% IF ( transfer ) %]
<!-- transfer: item with no reservation, must be returned to its homebranch -->
- <div class="dialog message">
+ <div id="return1" class="dialog message">
<h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% title or "item" |html %]</a> to [% homebranchname %]</h3>
</div>
[% IF ( soundon ) %]
[% IF ( soundon ) %]
<audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
[% END %]
- <div class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
+ <div id="item-transfer" class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
Transfer Now?<br />
<form method="post" action="returns.pl" name="mainform" id="mainform">
<input type="submit" name="dotransfer" value="Yes" class="submit" />
<audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
[% END %]
- <div class="dialog message">
+ <div id="hold-found2" class="dialog message">
<h3>Hold Found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
[% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
<h5>Hold for:</h5>
<th class="hq-patron">Patron</th>
<th class="hq-sendto">Send To</th>
<th class="hq-date">Date</th>
+ <th class="hq-notes">Notes</th>
</tr>
</thead>
<tbody>[% FOREACH itemsloo IN itemsloop %]
<td class="hq-patron"><p><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% itemsloo.cardnumber %]#reserves">[% itemsloo.surname %], [% itemsloo.firstname %] ([% itemsloo.cardnumber %])</a></p> <p>[% itemsloo.phone %]</p></td>
<td class="hq-sendto">[% itemsloo.pickbranch %]</td>
<td class="hq-date">[% itemsloo.reservedate %]</td>
+ <td class="hq-notes">[% itemsloo.notes %]</td>
</tr>
[% END %]</tbody>
</table>
[% INCLUDE 'help-top.inc' %]
-<h1>Claims & Late Orders</h1>
+<h1>Claims & Late Orders</h1>
<p>If you have entered in an email address for the vendors in your system you can send them claim emails when an order is late. Before you can send claims you will need to set up an acquisitions claim notice.</p>
<li>To be able to order from a vendor you must make them 'Active'</li>
<li>For List Prices and Invoice Prices choose the currency
<ul>
- <li>Currencies are assigned in the Currencies & Exchange Rates admin area</li>
+ <li>Currencies are assigned in the Currencies & Exchange Rates admin area</li>
</ul>
</li>
<li>If the vendor offers a consistent blank discount, enter that in the 'Discount' field
[% INCLUDE 'help-top.inc' %]
-<h1>Libraries & Groups</h1>
+<h1>Libraries & Groups</h1>
<p>When setting up your Koha system you will want to add information for every library that will be sharing your system. This data is used in several areas of Koha.</p>
<p>Properties are then applied to libraries via the add or edit library form.</p>
-<p><strong>See the full documentation for Libraries & Groups in the <a href="http://manual.koha-community.org/3.6/en/basicparams.html#libsgroups">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for Libraries & Groups in the <a href="http://manual.koha-community.org/3.6/en/basicparams.html#libsgroups">manual</a> (online).</strong></p>
[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
<p>Most fees and fines will be charged automatically if the fines cron job is running:</p>
<ul>
- <li>Fines will be charged based on your Circulation & Fines Rules</li>
- <li>Hold fees will be charged based on the rules you set in the Patron Types & Categories administration area</li>
+ <li>Fines will be charged based on your Circulation & Fines Rules</li>
+ <li>Hold fees will be charged based on the rules you set in the Patron Types & Categories administration area</li>
<li>Rental fees will be charged based on the settings in your Item Types administration area</li>
<li>Marking an item 'Lost' via the cataloging module will automatically charge the patron the replacement cost for that item</li>
</ul>
<li>Enter the identifying information regarding your patron
<ul>
<li>Required fields are defined in the BorrowerMandatoryField system preference</li>
+ <li>Unwanted fields are defined in the BorrowerUnwantedField system preference</li>
<li>Salutation is populated by the BorrowersTitles system preference</li>
</ul>
</li>
</li>
</ul>
-<p><strong>See the full documentation for the the Managing Staged MARC Records in the <a href="http://manual.koha-community.org/3.6/en/managestaged.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Managing Staged MARC Records in the <a href="http://manual.koha-community.org/3.6/en/managestaged.html">manual</a> (online).</strong></p>
[% INCLUDE 'help-bottom.inc' %]
<p>Sincerely, Library Staff</p>
-<p><strong>See the full documentation for the the Overdue Notice/Status Triggers in the <a href="http://manual.koha-community.org/3.6/en/noticetriggers.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Overdue Notice/Status Triggers in the <a href="http://manual.koha-community.org/3.6/en/noticetriggers.html">manual</a> (online).</strong></p>
[% INCLUDE 'help-bottom.inc' %]
<p style="color:#990000;">Important: There is a limit of 520K on the size of the picture uploaded and it is recommended that the image be 200x300 pixels, but smaller images will work as well.</p>
-<p><strong>See the full documentation for the the Patron Image Uploader in the <a href="http://manual.koha-community.org/3.6/en/uploadpatronimages.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Patron Image Uploader in the <a href="http://manual.koha-community.org/3.6/en/uploadpatronimages.html">manual</a> (online).</strong></p>
-[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'help-bottom.inc' %]
<p>Task scheduler will not work if the user the web server runs as doesn't have the permission to use it. To find out if the right user has the permissions necessary, check /etc/at.allow to see what users are in it. If you don't have that file, check etc/at.deny. If at.deny exists but is blank, then every user can use it. Talk to your system admin about adding the user to the right place to make the task scheduler work.</p>
-<p><strong>See the full documentation for the the Task Scheduler in the <a href="http://manual.koha-community.org/3.6/en/taskscheduler.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Task Scheduler in the <a href="http://manual.koha-community.org/3.6/en/taskscheduler.html">manual</a> (online).</strong></p>
-[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'help-bottom.inc' %]
<p>I encountered some problems.</p>
<ul>
[% IF ( perlversion ) %]
- <li>Your perl version seems to be obsolete.
- Please upgrade to a newer version of Perl (at least Version 5.006001).</li>
+ <li>Your Perl version seems to be obsolete.
+ Please upgrade to a newer version of Perl (at least Version 5.10).</li>
[% END %]
</ul>
[% END %]
<td>[% resultsloo.cardnumber %]</td>
<td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resultsloo.borrowernumber %]">
[% INCLUDE 'patron-title.inc' category_type = resultsloo.category_type firstname = resultsloo.firstname surname = resultsloo.surname othernames = resultsloo.othernames cardnumber = resultsloo.cardnumber %]</a> <br />
- [% resultsloo.address %][% IF ( resultsloo.address2 ) %]<br />[% resultsloo.address2 %][% END %][% IF ( resultsloo.city ) %]<br />[% resultsloo.city %][% IF ( resultsloo.state ) %],[% END %][% END %][% IF ( resultsloo.state ) %] [% resultsloo.state %][% END %] [% IF ( resultsloo.zipcode ) %] [% resultsloo.zipcode %][% END %][% IF ( resultsloo.country ) %], [% resultsloo.country %][% END %]</td>
+ [% IF ( resultsloo.streetnumber ) %][% resultsloo.streetnumber %] [% END %][% resultsloo.address %][% IF ( resultsloo.address2 ) %]<br />[% resultsloo.address2 %][% END %][% IF ( resultsloo.city ) %]<br />[% resultsloo.city %][% IF ( resultsloo.state ) %],[% END %][% END %][% IF ( resultsloo.state ) %] [% resultsloo.state %][% END %] [% IF ( resultsloo.zipcode ) %] [% resultsloo.zipcode %][% END %][% IF ( resultsloo.country ) %], [% resultsloo.country %][% END %]</td>
<td>[% resultsloo.category_description %] ([% resultsloo.category_type %])</td>
<td>[% resultsloo.branchcode %]</td>
<td>[% resultsloo.dateexpiry %]</td>
</div>
</div>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/javascript">//<![CDATA[
-$(document).ready(function() {
- $("#memberresultst").tablesorter({
- sortList: [[1,0]],
- widgets: ['zebra']
- });
-});
-//]]>
-</script>
[% INCLUDE 'intranet-bottom.inc' %]
[% END %]
[% IF ( step_1 ) %]
+[%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
<fieldset class="rows" id="memberentry_identity">
<legend>[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
<ol>
[% UNLESS ( I ) %]
+ [% UNLESS notitle %]
[% IF ( title_cgipopup ) %]
<li>
[% IF ( mandatorytitle ) %]
</li>
[% END %]
[% END %]
+ [% END %]
+ [% UNLESS nosurname %]
<li>
[% IF ( mandatorysurname ) %]
<label for="surname" class="required">
[% END %]
[% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
[% UNLESS ( I ) %]
+ [% UNLESS nofirstname %]
<li>
[% IF ( mandatoryfirstname ) %]
<label for="firstname" class="required">
<input type="text" id="firstname" name="firstname" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% firstname %][% END %]" />
[% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS nodateofbirth %]
<li>
[% IF ( mandatorydateofbirth ) %]
<label for="dateofbirth" class="required">
[% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
+ [% END %]
+ [% UNLESS noinitials %]
<li>
[% IF ( mandatoryinitials ) %]
<label for="initials" class="required">
[% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
+ [% END %]
+ [% UNLESS noothernames %]
<li>
[% IF ( mandatoryothernames ) %]
<label for="othernames" class="required">
[% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
[% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
</li>
+ [% END %]
[% UNLESS ( I ) %]
+ [% UNLESS nosex %]
<li class="radio">
[% IF ( female ) %]
<label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
[% END %]
</li>
+ [% END %]
[% END %]
</ol>
</fieldset>
+[% END # hide fieldset %]
[% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" />
<fieldset class="rows">
[% END %]
<span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
</li>
+ [% UNLESS nocontactname %]
<li>
<label for="contactname">Surname: </label>
[% IF ( guarantorid ) %]
[% END %]
[% END %]
</li>
+ [% END %]
+ [% UNLESS nocontactfirstname %]
<li>
<label for="contactfirstname">First name: </label>
[% IF ( guarantorid ) %]
[% END %]
[% END %]
</li>
+ [% END %]
[% IF ( relshiploop ) %]
<li>
<label for="relationship">Relationship: </label>
</fieldset>
[% END %]
+[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
<fieldset class="rows">
<legend>Main address</legend><ol>
+ [% UNLESS nostreetnumber %]
<li>
[% IF ( mandatorystreetnumber ) %]
<label for="streetnumber" class="required">
[% END %]
[% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS nostreettype %]
[% IF ( road_cgipopup ) %]
<li>
[% IF ( mandatorystreettype ) %]
[% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
+ [% END %]
+ [% UNLESS noaddress %]
<li>
[% IF ( mandatoryaddress ) %]
<label for="address" class="required">
[% END %]
[% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaddress2 %]
<li>
[% IF ( mandatoryaddress2 ) %]
<label for="address2" class="required">
[% END %]
[% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS nocity %]
<li>
[% IF ( mandatorycity ) %]
<label for="city" class="required">
[% END %]
[% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS nostate %]
<li>
[% IF ( mandatorystate ) %]
<label for="state" class="required">
<input type="text" name="state" id="state" size="20" value="[% state %]" />
[% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS nozipcode %]
<li>
[% IF ( mandatoryzipcode ) %]
<label for="zipcode" class="required">
[% END %]
[% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
</li>
-
+ [% END %]
+ [% UNLESS nocountry %]
<li>
[% IF ( mandatorycountry ) %]
<label for="country" class="required">
[% END %]
[% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
</li>
-
+ [% END %]
</ol>
</fieldset>
+[% END # nostreet && nocity etc group%]
+
+[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
<fieldset class="rows" id="memberentry_contact">
<legend>Contact</legend><ol>
+ [% UNLESS nophone %]
<li>
[% IF ( mandatoryphone ) %]
<label for="phone" class="required">
[% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
</li>
+ [% END %]
+ [% UNLESS nophonepro %]
<li>
[% IF ( mandatoryphonepro ) %]
<label for="phonepro" class="required">
[% END %]
[% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS nomobile %]
<li>
[% IF ( mandatorymobile ) %]
<label for="mobile" class="required">
[% END %]
[% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noemail %]
<li>
[% IF ( mandatoryemail ) %]
<label for="email" class="required">
[% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
</li>
+ [% END %]
+ [% UNLESS noemailpro %]
<li>
[% IF ( mandatoryemailpro ) %]
<label for="emailpro" class="required">
[% END %]
[% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS nofax %]
<li>
[% IF ( mandatoryfax ) %]
<label for="fax" class="required">
[% END %]
[% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
</ol>
</fieldset>
-
+[%END # hide fieldset %]
<!-- ************************ STEP_1 *********************** -->
[% END %]
[% IF ( step_6 ) %]
+ [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
<fieldset class="rows" id="memberentry_address">
<legend>Alternate address</legend><ol>
+ [% UNLESS noB_address %]
<li>
[% IF ( mandatoryB_address ) %]
<label for="B_address" class="required">
[% END %]
[% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noB_address2 %]
<li>
[% IF ( mandatoryB_address2 ) %]
<label for="B_address2" class="required">
[% END %]
[% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noB_city %]
<li>
[% IF ( mandatoryB_city ) %]
<label for="B_city" class="required" >
<input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" />
[% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noB_state %]
<li>
[% IF ( mandatoryB_state ) %]
<label for="B_state" class="required" >
<input type="text" id="B_state" name="B_state" size="20" value="[% B_state %]" />
[% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noB_zipcode %]
<li>
[% IF ( mandatoryB_zipcode ) %]
<label for="B_zipcode" class="required">
[% END %]
[% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noB_country %]
<li>
[% IF ( mandatoryB_country ) %]
<label for="B_country" class="required">
[% END %]
[% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noB_phone %]
<li>
[% IF ( mandatoryB_phone ) %]
<label for="B_phone" class="required">
[% END %]
[% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noB_email %]
<li>
[% IF ( mandatoryB_email ) %]
<label for="B_email" class="required">
<input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" />
[% END %]
[% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
+ [% END %]
+ [% UNLESS nocontactnote %]
<li>
[% IF ( mandatorycontactnote ) %]
<label for="contactnote" class="required">
<textarea id="contactnote" name="contactnote" cols="40" rows="2">[% contactnote %]</textarea>
[% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
</ol>
</fieldset>
+ [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
[% END %]
[% IF ( step_2 ) %]
+ [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
<fieldset class="rows" id="memberentry_altaddress">
<legend>Alternate Contact</legend><ol>
+ [% UNLESS noaltcontactsurname %]
<li>
[% IF ( mandatoryaltcontactsurname ) %]
<label for="altcontactsurname" class="required">
[% END %]
[% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactfirstname %]
<li>
[% IF ( mandatoryaltcontactfirstname ) %]
<label for="altcontactfirstname" class="required">
[% END %]
[% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactaddress1 %]
<li>
[% IF ( mandatoryaltcontactaddress1 ) %]
<label for="altcontactaddress1" class="required">
[% END %]
[% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactaddress2 %]
<li>
[% IF ( mandatoryaltcontactaddress2 ) %]
<label for="altcontactaddress2" class="required">
[% END %]
[% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactaddress3 %]
<li>
[% IF ( mandatoryaltcontactaddress3 ) %]
<label for="altcontactaddress3" class="required">
<input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" />
[% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactstate %]
<li>
[% IF ( mandatoryaltcontactstate ) %]
<label for="altcontactstate" class="required">
<input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" />
[% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactzipcode %]
<li>
[% IF ( mandatoryaltcontactzipcode ) %]
<label for="altcontactzipcode" class="required">
[% END %]
[% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactcountry %]
<li>
[% IF ( mandatoryaltcontactcountry ) %]
<label for="altcontactcountry" class="required">
[% END %]
[% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noaltcontactphone %]
<li>
[% IF ( mandatoryaltcontactphone ) %]
<label for="altcontactphone" class="required">
[% END %]
[% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
</ol>
</fieldset>
+ [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
[% END %]
[% IF ( step_3 ) %]
<fieldset class="rows" id="memberentry_library_management">
<legend>Library Management</legend><ol>
+ [% UNLESS nocardnumber %]
<li> [% IF ( mandatorycardnumber ) %]
<label for="cardnumber" class="required">
[% ELSE %]
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
[% END %]
[% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]</li>
+ [% END %]
+ [% UNLESS nobranchcode %]
<li>
[% IF ( mandatorybranchcode ) %]
<label for="branchcode" class="required">
[% CGIbranch %]
[% IF ( mandatorybranchcode ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
<li>
<label for="categorycode">Category: </label>
<select id="categorycode" name="categorycode">
[% END %]
</select>
</li>
+ [% UNLESS nosort1 %]
<li>
[% IF ( mandatorysort1 ) %]
<label for="sort1" class="required">
[% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
[% END %]
</li>
+ [% END %]
+ [% UNLESS nosort2 %]
<li>
[% IF ( mandatorysort2 ) %]
<label for="sort2" class="required">
[% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
[% END %]
</li>
+ [% END %]
</ol>
</fieldset>
+ [% UNLESS nodateenrolled && nodateexpiry && noopacnote && noborrowernotes %]
<fieldset class="rows" id="memberentry_subscription">
<legend>Library set-up</legend><ol>
+ [% UNLESS nodateenrolled %]
<li>
[% IF ( mandatorydateenrolled ) %]
<label for="dateenrolled" class="required">
[% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
+ [% END %]
+ [% UNLESS nodateexpiry %]
<li>
[% IF ( mandatorydateexpiry ) %]
<label for="dateexpiry" class="required">
[% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
+ [% END %]
+ [% UNLESS noopacnote %]
<li>
[% IF ( mandatoryopacnote ) %]
<label for="opacnote" class="required">
<div class="hint">This message appears on this patron's user page in the OPAC</div>
[% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
+ [% UNLESS noborrowernotes %]
<li>
[% IF ( mandatoryborrowernotes ) %]
<label for="borrowernotes" class="required">
<div class="hint">This message displays when checking out to this patron</div>
[% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
</li>
+ [% END %]
</ol>
</fieldset>
+ [% END # hide fieldset %]
+
+ [% UNLESS nouserid && nopassword %]
<fieldset class="rows" id="memberentry_userid">
<legend>OPAC/Staff Login</legend><ol>
+ [% UNLESS nouserid %]
<li>
[% IF ( mandatoryuserid ) %]
<label for="userid" class="required">
[% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
</li>
+ [%END %]
+ [% UNLESS nopassword %]
<li>
[% IF ( mandatorypassword ) %]
<label for="password" class="required">
[% END %]
[% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
[% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
- </li></ol>
+ </li>
+ [% END %]
+ </ol>
</fieldset>
+ [% END # hide fieldset %]
<!--this zones are not necessary in modif mode -->
[% UNLESS ( opadd ) %]
<fieldset class="rows">
</li>
[% END %]
<li>
- <label for="yesdebarred" class="radio">Debarred: </label>
+ <label for="yesdebarred" class="radio">Restricted: </label>
[% IF ( debarred ) %]
<label for="yesdebarred">Yes </label>
<input type="radio" id="yesdebarred" name="debarred" value="1" checked="checked"/>
<li>Patron is restricted[% IF ( userdebarreddate ) %] until [% userdebarreddate%] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %][% END %]
<form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
- <input type="submit" value="Lift Debarment" />
+ <input type="submit" value="Lift Restriction" />
</form>
</li>
[% END %]
[% IF ( email ) %]<li><span class="label">Primary email:</span><a href="mailto:[% email %]">[% email %]</a></li>[% END %]
[% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %]
[% END %]
- <li><span class="label">Initials: </span>[% initials %]</li>
- <li><span class="label">Date of birth:</span>[% dateofbirth %]</li>
- <li><span class="label">Gender:</span>
+ [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %]
+ [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth %]</li>[% END %]
+ [% IF ( sex ) %]<li><span class="label">Gender:</span>
[% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
- </li>[% END %]
+ </li>[% END %][% END %]
[% IF ( printethnicityline ) %]
<li><span class="label">Ethnicity:</span>[% ethnicity %]</li>
<li><span class="label">Ethnicity notes: </span>[% ethnotes %]</li>
<li><span class="label">City: </span>[% B_city %]</li>
[% IF ( B_state ) %]<li><span class="label">State: </span>[% B_state %]</li>[% END %]
<li><span class="label">Zip/Postal Code: </span>[% B_zipcode %]</li>
- <li><span class="label">Country: </span>[% B_country %]</li>
+ [% IF ( B_country ) %]<li><span class="label">Country: </span>[% B_country %]</li>[% END %]
[% IF ( B_phone ) %]<li><span class="label">Phone: </span>[% B_phone %]</li>[% END %]
- [% IF ( B_email ) %]<li><span class="label">Email: </span>[% B_email %]</li>[% END %]</ol></div>
+ [% IF ( B_email ) %]<li><span class="label">Email: </span><a href="mailto:[% B_email %]">[% email %]</a></li>[% END %]</ol></div>
</div>
<div class="action"><a href="memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=6">Edit</a></div>
[% END %]
<li><span class="label">Address: </span>[% altcontactaddress1 %]</li>
<li><span class="label">Address 2: </span>[% altcontactaddress2 %]</li>
<li><span class="label">City: </span>[% altcontactaddress3 %]</li>
- [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate %]</li>[% END %]
+ [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate %]</li>[% END %]
<li><span class="label">Zip/Postal Code: </span>[% altcontactzipcode %]</li>
- <li><span class="label">Country: </span>[% altcontactcountry %]</li>
- <li><span class="label">Phone: </span>[% altcontactphone %]</li></ol></div>
+ [% IF ( altcontactcountry ) %]<li><span class="label">Country: </span>[% altcontactcountry %]</li>[% END %]
+ [% IF ( altcontactphone ) %]<li><span class="label">Phone: </span>[% altcontactphone %]</li>[% END %]
+ </ol></div>
</div>
<div class="action"><a href="memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=2">Edit</a></div>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
+<script type=text/javascript>
+
+function confirmWriteoffAll() {
+ return confirm(_("Are you sure you want to writeoff all fines?"));
+}
+
+</script>
+
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Pay Fines for [% borrower.firstname %] [% borrower.surname %]</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
-[% INCLUDE 'members-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
<!-- The manual invoice and credit buttons -->
<div class="toptabs">
</table>
<fieldset class="action">
<input type="submit" name="paycollect" value="Pay Amount" class="submit" />
-<input type="submit" name="woall" value="Writeoff All" class="submit" />
-<input type="submit" name="payselected" value="Pay Selected" class="submit" />
+<input type="submit" name="woall" value="Writeoff All" class="submit" onclick="return confirmWriteoffAll()" />
+<input type="submit" name="payselected" value="Pay Selected" class="submit"/>
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
</fieldset>
</form>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
-[% INCLUDE 'members-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
<!-- The manual invoice and credit buttons -->
<form name="payindivfine" onsubmit="return validatePayment(this);" method="post" action="/cgi-bin/koha/members/paycollect.pl">
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
<input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
+ <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
<input type="hidden" name="description" id="description" value="[% description %]" />
<input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
<input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
<form name="woindivfine" action="/cgi-bin/koha/members/pay.pl" method="post" >
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
<input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
+ <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
<input type="hidden" name="description" id="description" value="[% description %]" />
<input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
<input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
[% INCLUDE 'doc-head-open.inc' %]
<title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
+<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
+<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+[% INCLUDE 'datatables-strings.inc' %]
+<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
<script type="text/javascript" id="js">$(document).ready(function() {
- $.tablesorter.addParser({
- id: 'articles',
- is: function(s) {return false; },
- format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
- type: 'text'
- });
- $.tablesorter.defaults.widgets = ['zebra'];
- $("#table_readingrec").tablesorter({[% IF ( dateformat_metric ) %]
- dateFormat: 'uk',[% END %]
- sortList: [[8,1]],
- headers: { 1: { sorter: 'articles' }, 9: { sorter: 'shortDate'} }
- }).tablesorterPager({container: $("#pagertable_readingrec"),positionFixed: false,size: 20});
+ $(document).ready(function() {
+ $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sPaginationType": "four_button",
+ }));
+ });
}); </script>
</head>
<body>
[% IF ( loop_reading ) %]
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
-<div id="pagertable_readingrec">
-[% INCLUDE 'table-pager.inc' perpage='20' %]
-</div>
<table id="table_readingrec">
<thead>
<th>Date</th>
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Reports › Item Types</title>
+<title>Koha › Reports › Catalog by Item Types</title>
[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+//<![CDATA[
+$(document).ready(function() {
+ $("#itemtypest").tablesorter();
+});
+//]]>
+</script>
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( do_it ) %] › <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Item Types</a> › Results[% ELSE %] › Item Types[% END %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( do_it ) %] › <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalog by Item Type</a> › Results[% ELSE %] › Catalog by Item Type[% END %]</div>
<div id="doc3" class="yui-t2">
[% IF ( do_it ) %]
[% FOREACH mainloo IN mainloop %]
- <h1>Reports on item types [% IF ( mainloo.branch ) %] for branch = [% mainloo.branch %][% END %]</h1>
- <table>
+ <h1>Reports on item types [% IF ( mainloo.branchname ) %] held at [% mainloo.branchname %][% END %]</h1>
+ <table id="itemtypest">
+ <thead>
<tr>
<th>Item type</th>
- <th>count</th>
+ <th>Count</th>
</tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <th>TOTAL</th>
+ <th>[% mainloo.total %]</th>
+ </tr>
+ </tfoot>
+ <tbody>
[% FOREACH loopitemtyp IN mainloo.loopitemtype %]
<tr>
<td>[% loopitemtyp.itemtype %]</td>
<td>[% loopitemtyp.count %]</td>
</tr>
[% END %]
- <tr>
- <th>TOTAL</th>
- <th>[% mainloo.total %]</th>
- </tr>
+ </tbody>
</table>
[% END %]
[% ELSE %]
-
+ <h3>View a count of items held at your library grouped by item type</h3>
<form method="post" action="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">
- <fieldset class="rows"><legend>View catalog group by item types</legend><ol><li><label for="value">Select a branch</label> [% CGIbranch %]
- <span class="tip">Select none to see all branches</span></li></ol></fieldset>
+ <fieldset class="rows"><ol><li><label for="value">Select a library</label> [% CGIbranch %]
+ <span class="tip">Select none to see all libraries</span></li></ol></fieldset>
<fieldset class="action"><input type="submit" value="Submit" />
<input type="hidden" name="report_name" value="[% report_name %]" />
<input type="hidden" name="do_it" value="1" /></fieldset>
<td><input type="radio" name="Line" value="reservestatus" /></td>
<td><input type="radio" name="Column" value="reservestatus" checked="checked" /></td>
<td>
- <input type="checkbox" name="filter_reservestatus_or_1" value="1"> Asked</input>
- <input type="checkbox" name="filter_reservestatus_or_2" value="2"> Processing</input>
- <input type="checkbox" name="filter_reservestatus_or_3" value="3"> Waiting</input>
- <input type="checkbox" name="filter_reservestatus_or_4" value="4"> Satisfied</input>
- <input type="checkbox" name="filter_reservestatus_or_5" value="5"> Cancelled</input>
+ <input type="checkbox" name="filter_reservestatus_or_1" value="1" /> Asked
+ <input type="checkbox" name="filter_reservestatus_or_2" value="2" /> Processing
+ <input type="checkbox" name="filter_reservestatus_or_3" value="3" /> Waiting
+ <input type="checkbox" name="filter_reservestatus_or_4" value="4" /> Satisfied
+ <input type="checkbox" name="filter_reservestatus_or_5" value="5" /> Cancelled
</td>
</tr>
<tr class="highlight">
<td>Hold Date</td>
<td><input type="radio" name="Line" value="reservedate" /></td>
<td><input type="radio" name="Column" value="reservedate" /></td>
- <td><label for="reservedate_begin">From</label> <input type="text" size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
+ <td><label for="filter_reservedate_begin">From</label> <input type="text" size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openreservedateFrom" style="cursor: pointer;" />
<script type="text/javascript">
//<![CDATA[
<td><input type="radio" name="Column" value="items.itype" /></td>
<td><select name="filter_items.itype" id="itype">
<option value=""> </option>
- [% FOREACH itypeloo IN itypeloop %]
+ [% FOREACH itypeloo IN itemtypeloop %]
[% IF ( itypeloo.selected ) %]<option value="[% itypeloo.code %]" selected="selected">[% itypeloo.description %]</option>[% ELSE %]<option value="[% itypeloo.code %]">[% itypeloo.description %]</option>[% END %]
[% END %]
</select>
</tr>
<tr class="highlight">
<td>Holding Library</td>
- <td><input type="radio" name="Line" value="holdingbranch" /></td>
- <td><input type="radio" name="Column" value="holdingbranch" /></td>
- <td><select name="filter_holdingbranch" id="holdingbranch">
+ <td><input type="radio" name="Line" value="items.holdingbranch" /></td>
+ <td><input type="radio" name="Column" value="items.holdingbranch" /></td>
+ <td><select name="filter_items.holdingbranch" id="holdingbranch">
<option value=""> </option>
[% FOREACH branchloo IN branchloop %]
[% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
</tr>
<tr>
<td>Home Library</td>
- <td><input type="radio" name="Line" value="homebranch" /></td>
- <td><input type="radio" name="Column" value="homebranch" /></td>
- <td><select name="filter_homebranch" id="homebranch">
+ <td><input type="radio" name="Line" value="items.homebranch" /></td>
+ <td><input type="radio" name="Column" value="items.homebranch" /></td>
+ <td><select name="filter_items.homebranch" id="homebranch">
<option value=""> </option>
[% FOREACH branchloo IN branchloop %]
[% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
<td>Item Call Number</td>
<td></td>
<td></td>
- <td>From <input type="text" name="filter_itemcallnumber" size="10" /> (inclusive) to <input type="text" name="fiter_itemcallnumber" size="10" /> (exclusive) </td>
+ <td>From <input type="text" name="filter_items.itemcallnumber_begin" size="10" /> (inclusive) to <input type="text" name="filter_items.itemcallnumber_endex" size="10" /> (exclusive) </td>
</tr>
[% IF ( hassort1 ) %]
<tr><td>Patron sort1</td>
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Tools › Comments waiting for Approval</title>
+<title>Koha › Tools › Comments › [% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/javascript">//<![CDATA[
-$(document).ready(function() {
-$.tablesorter.addParser({
- id: 'articles',
- is: function(s) {return false; },
- format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
- type: 'text'
-});
- $("#commentst").tablesorter({
- sortList: [[0,0]],
- headers: { 1: {sorter: 'articles'},2: { sorter: false },3: { sorter: false }}
- });
-});
-//]]>
-</script>
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
-› Comments Awaiting Moderation</div>
+› <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a> ›[% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</div>
<div id="doc3" class="yui-t2">
<h1>Comments</h1>
+<!-- The manual invoice and credit buttons -->
+<div class="toptabs">
+<ul class="ui-tabs-nav">
+ [% IF ( status ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?status=1">Approved comments</a></li>
+ [% IF ( status ) %]<li>[% ELSE %]<li class="ui-tabs-selected">[% END %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl" >Comments awaiting moderation</a></li>
+</ul>
+<div class="tabs-container">
+
[% IF ( reviews ) %]
<table id="commentst">
<thead><tr>
[% review.review |html %]
</td>
<td>
- <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=[% review.reviewid %]">Approve</a> |
+ [% IF ( status ) %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=unapprove&reviewid=[% review.reviewid %]">Unapprove</a>[% ELSE %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=[% review.reviewid %]">Approve</a>[% END %] |
<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&reviewid=[% review.reviewid %]">Delete</a>
</td>
</tr>
[% END %]</tbody>
</table>
+ <div class="pages">[% pagination_bar %]</div>
[% ELSE %]
-<b>No comments to moderate</b>
+[% IF ( status ) %]<p><b>No comments have been approved.</b></p>[% ELSE %]<p><b>No comments to moderate.</b></p>[% END %]
[% END %]
+</div>
+</div>
</div>
</div>
<td>[% collectionsLoo.colTitle %]</td>
<td>[% collectionsLoo.colDesc %]</td>
<td>[% collectionsLoo.colBranchcode %]</td>
- <td><a href="editCollections.pl?action=edit&colId=[% collectionsLoo.colId %]">Edit</a></td>
- <td><a href="editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td>
+ <td><a href="editCollections.pl?action=edit&colId=[% collectionsLoo.colId %]">Edit</a></td>
+ <td><a href="editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td>
</tr>
[% END %]
</table>
[% END %]
</select> [% issue %]</li>
-[% IF ( memberloop ) %]
+[% IF memberloop %]
<li><span class="label">Recipients:</span><table style="clear:none;margin:0;">
<tr><th>Name</th>
<th>Rank</th>
- <th>Delete</th></tr>
-[% FOREACH memberloo IN memberloop %]
- <tr><td>[% memberloo.name %]</td>
- <td>[% memberloo.routingbox %]</td>
- <td><a href="/cgi-bin/koha/serials/routing.pl?routingid=[% memberloo.routingid %]&subscriptionid=[% subscriptionid %]&op=delete">Delete</a></td></tr>
-[% END %]
+ <th>Delete</th>
+ </tr>
+ [% USE m_loop = iterator(memberloop) %]
+ [% FOREACH member IN m_loop %]
+ <tr><td>[% member.name %]</td>
+ <td>
+ <select name="itemrank" onchange="reorder_item([%- subscriptionid -%], [%- member.routingid -%], this.option[this.selectedIndex].value)">
+ [% rankings = [1 .. m_loop.size] %]
+ [% FOREACH r IN rankings %]
+ [% IF r == member.ranking %]
+ <option selected="selected" value="[% r %]">[% r %]</option>
+ [% ELSE %]
+ <option value="[% r %]">[% r %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </td>
+ <td><a href="/cgi-bin/koha/serials/routing.pl?routingid=[% member.routingid %]&subscriptionid=[% subscriptionid %]&op=delete">Delete</a></td>
+ </tr>
+ [% END %]
</table><p style="margin-left:10em;"><a onclick="search_member([% subscriptionid %]); return false"
href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=[% subscriptionid %]" class="button">Add recipients</a> <a
href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid %]&op=delete" class="button">Delete All</a></p></li>
[% IF ( subscriptions ) %]
<table>
-[% IF ( onesubscription ) %]
+[% IF ( subscriptions.size == 1 ) %]
<caption> Subscription Summary</caption>
[% ELSE %]
<caption> Subscription Summaries</caption>
</tr>
[% END %]
[% IF ( subscr ) %]
-[% UNLESS ( onesubscription ) %]
-<tr ><td colspan="7"> <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
-</tr>[% END %]
+[% IF ( subscriptioncount > 1 ) %]
+<tr ><td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
+</tr>
+[% END %]
[% END %]
</table>
[% END %]
<div id="subscription-year-[% year.year %]">
<table>
<tr>
-[% UNLESS ( year.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
<th># Subs</th>
[% END %]
<th>Date published
</tr>
[% FOREACH serial IN year.serials %]
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
-[% UNLESS ( serial.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
<td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
[% END %]
<td>
[% IF ( subscription.issn ) %][% subscription.issn %]
[% END %]
</td>
- <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% IF ( subscription.title ) %][% subscription.title |html %][% ELSE %]
- ---
- [% END %]</a>
+ <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
</td>
<td>[% IF ( subscription.notes ) %][% subscription.notes %][% END %]
[% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
<li>
<label for="acqui_date"> First issue publication date:</label>
[% UNLESS ( modify ) %]<img src="[% themelang %]/lib/calendar/cal.gif" id="acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />[% END %]
- [% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" disabled="disabled" style="border-width: 0px;" />
- [% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" style="border-width: 0px;" />[% END %]
+ [% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" disabled="disabled" />
+ [% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" />[% END %]
</li>
[% IF ( modify ) %]<li><label for="next_acqui_date"> Next issue publication date:</label>
<img src="[% themelang %]/lib/calendar/cal.gif" id="next_acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
- <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" style="border-width: 0px;" />
+ <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" />
</li>[% END %]
<li><!-- both scripts for calendar must follow the input field -->
<label for="beginning_date" class="required"> Subscription start date:</label>
<img src="[% themelang %]/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
- <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" style="border-width: 0px;" />
+ <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" />
<!-- both scripts for calendar must follow the input field -->
<script type="text/javascript">
Calendar.setup({
<label for="ending_date"> Subscription end date:</label>
<img src="[% themelang %]/lib/calendar/cal.gif" id="buttonend1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
- <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" style="border-width: 0px;" />
+ <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" />
<!-- both scripts for calendar must follow the input field -->
<script type="text/javascript">
Calendar.setup({
--- /dev/null
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha › Tools › Tags › [% IF ( do_it ) %]Review › [% ELSE %]Review Tags[% END %]</title>
+[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+//<![CDATA[
+ $.tablesorter.addParser({
+ id: 'articles',
+ is: function(s) {return false; },
+ format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
+ type: 'text'
+ });
+ $(document).ready(function() {
+ $(".delete").click(function (event) {
+ $(this).parent().parent().parent().addClass("selected");
+ var answer = confirm(_("Are you sure you want to remove the tag from this title?"));
+ if (!answer){
+ $("tr").removeClass("selected");
+ event.preventDefault();
+ }
+ });
+ $("#itemst").tablesorter({
+ sortList: [[0,0]],
+ headers: { 0: { sorter: 'articles' },1: { sorter: false },2:{sorter:false}}
+ });
+ });
+//]]>
+</script>
+<style type="text/css">
+tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }</style>
+</head>
+<body>
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'cat-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="/cgi-bin/koha/tags/review.pl">Tags</a> › Results for tag <i>[% tag %]</i></div>
+
+<div id="doc3" class="yui-t2">
+ <div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+[% IF ( titles ) %]
+<h3>Titles tagged with the term <i>[% tag %]</i></h3>
+<table id="itemst">
+ <thead><tr>
+ <th>Title</th>
+ <th>Location</th>
+ <th> </th>
+ </tr></thead>
+
+ [% FOREACH title IN titles %]
+ [% IF ( title.even ) %]
+ <tr class="highlight">
+ [% ELSE %]
+ <tr>
+ [% END %]
+ <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title |html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield %][% END %]</a>
+ [% title.author %]
+ <p>[% 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 %]</p>
+ [% IF ( title.notes ) %]
+ <p>[% title.notes |html%]</p>[% END %]
+ [% IF ( title.TagLoop ) %]<p style="font-size:90%"><strong>Tagged with:</strong> [% FOREACH TagLoo IN title.TagLoop %]
+ <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term %]">[% TagLoo.term |html %]</a> <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
+ [% END %]</p>
+ [% END %]
+ </td>
+ <td>[% IF ( title.items ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %]
+ <li>
+ [% item.branchname %] [% item.location_description %]
+ [% IF ( item.itemcallnumber ) %]
+ ([% item.itemcallnumber %])
+ [% END %]
+ </li>
+ [% END %]</ul>[% ELSE %]This record has no items.[% END %]
+ </td>
+ <td><form method="post" action="/cgi-bin/koha/tags/list.pl"><input type="hidden" name="op" value="del" /><input type="hidden" name="tag" value="[% tag %]" /><input type="hidden" name="tag_id" value="[% title.tag_id %]" /><input type="submit" class="delete" value="Remove tag" /></form></td>
+ </tr>
+ [% END %]
+ </table>
+[% ELSE %]
+ <div class="dialog message">There are no titles tagged with the term <i>[% tag %]</i></div>
+[% END %]
+</form>
+ </div>
+ </div>
+ <div class="yui-b">
+ <ul>
+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved tags</a>
+ </li>
+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected tags</a>
+ </li>
+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending tags</a>
+ </li>
+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">All tags</a>
+ </li>
+ </ul>
+ </div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
\ No newline at end of file
[% ELSE %]<td class="pending">
[% END %]
</td>
- <td>[% tagloo.term %]
+ <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term %]">[% tagloo.term %]</a>
</td>
<td>[% tagloo.weight_total %]
</td>
newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
}
$(document).ready(function() {
+
+[% IF ( dateformat_metric ) %] $.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html
+ id: 'shortDates',
+ is: function(s){
+ return false;
+ },
+ format: function(s){
+ var datepattern = new RegExp("[0-9]\/[0-9]");
+ if( datepattern.test(s)){ // sorting a date without a year: "01/12"
+ var dateparts = s.split("/").reverse().join("-"); // build an ISO date to be sorted as text
+ s = "2000-" + dateparts; // use 2000 as the default year
+ }
+ return s;
+ },
+ type: 'text'
+ });
+[% END %]
$(".hint").hide();
$("#branch").change(function(){
changeBranch();
});
- $("#holidayexceptions").tablesorter({
+ $("#holidayexceptions").tablesorter({[% IF ( dateformat_metric ) %]
+ dateFormat: 'uk',[% END %]
sortList: [[0,0]], widgets: ['zebra']
});
- $("#holidayweeklyrepeatable").tablesorter({
+ $("#holidayweeklyrepeatable").tablesorter({[% IF ( dateformat_metric ) %]
+ dateFormat: 'uk',[% END %]
sortList: [[0,0]], widgets: ['zebra']
});
- $("#holidaysyearlyrepeatable").tablesorter({
- sortList: [[0,0]], widgets: ['zebra']
+ $("#holidaysyearlyrepeatable").tablesorter({[% IF ( dateformat_metric ) %]
+ headers : {
+ 0: {
+ sorter : 'shortDates'
+ }
+ },[% END %]
+ sortList: [[0,0]], widgets: ['zebra']
});
- $("#holidaysunique").tablesorter({
+ $("#holidaysunique").tablesorter({[% IF ( dateformat_metric ) %]
+ dateFormat: 'uk',[% END %]
sortList: [[0,0]], widgets: ['zebra']
});
$("a.helptext").click(function(){
<table id="holidaysyearlyrepeatable">
<thead>
<tr>
- [% IF ( dateformat == 'metric' ) %]
+ [% IF ( dateformat_metric ) %]
<th class="repeatableyearly">Day/Month</th>
[% ELSE %]
<th class="repeatableyearly">Month/Day</th>
</li>
<li>
<label for="encoding">Character encoding: </label>
- <select name="encoding" id="encoding"><option value="" selected="selected">Default</option><option value="utf8">UTF-8</option><option value="MARC-8">MARC 8</option><option value="ISO_5426">ISO 5426</option><option value="ISO_6937">ISO 6937</option><option value=ISO_8859-1">ISO 8859-1</option><option value="EUC-KR">EUC-KR</option></select>
+ <select name="encoding" id="encoding"><option value="utf8" selected="selected">UTF-8 (Default)</option><option value="MARC-8">MARC 8</option><option value="ISO_5426">ISO 5426</option><option value="ISO_6937">ISO 6937</option><option value=ISO_8859-1">ISO 8859-1</option><option value="EUC-KR">EUC-KR</option></select>
</li>
</ol></fieldset>
<fieldset class="rows">
<dd>Managed staged MARC records, including completing and reversing imports</dd>
[% END %]
+ [% IF ( CAN_user_tools_upload_local_cover_images ) %]
+ <dt><a href="/cgi-bin/koha/tools/upload-cover-image.pl">Upload Local Cover Image</a></dt>
+ <dd>Utility to upload scanned cover images for display in OPAC</dd>
+ [% END %]
+
</dl>
</div>
--- /dev/null
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha › Tools › Upload Images</title>
+[% INCLUDE 'doc-head-close.inc' %]
+[% INCLUDE 'file-upload.inc' %]
+[% INCLUDE 'background-job.inc' %]
+<style type="text/css">
+ #uploadpanel,#fileuploadstatus,#fileuploadfailed,#jobpanel,#jobstatus,#jobfailed { display : none; }
+ #fileuploadstatus,#jobstatus { margin:.4em; }
+ #fileuploadprogress,#jobprogress{ width:150px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; }</style>
+<script type="text/javascript">
+//<![CDATA[
+$(document).ready(function(){
+ $("#processfile").hide();
+ $("#zipfile").click(function(){
+ $("#bibnum").hide();
+ });
+ $("#image").click(function(){
+ $("#bibnum").show();
+ });
+});
+function CheckForm(f) {
+ if ($("#fileToUpload").value == '') {
+ alert(_('Please upload a file first.'));
+ } else {
+ return submitBackgroundJob(f);
+ }
+ return false;
+}
+
+//]]>
+</script>
+</head>
+<body>
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'cat-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( uploadimage ) %]<a href="/cgi-bin/koha/tools/upload-cover-image.pl">Upload Local Cover Image</a> › Upload Results[% ELSE %]Upload Local Cover Image[% END %]</div>
+
+<div id="doc3" class="yui-t2">
+
+ <div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+
+<h1>Upload Local Cover Image</h1>
+[% IF ( uploadimage ) %]
+<p>Image upload results :</p>
+<ul>
+ <li>[% total %] images found</li>
+ [% IF ( error ) %]
+ <div class="dialog alert">
+ [% IF ( error == 'UZIPFAIL' ) %]<p><b>Failed to unzip archive.<br />Please ensure you are uploading a valid zip file and try again.</b></p>
+ [% ELSIF ( error == 'OPNLINK' ) %]<p><b>Cannot open folder index (idlink.txt or datalink.txt) to read.<br />Please verify that it exists.</b></p>
+ [% ELSIF ( error == 'OPNIMG' ) %]<p><b>Cannot process file as an image.<br />Please ensure you only upload GIF, JPEG, PNG, or XPM images.</b></p>
+ [% ELSIF ( error == 'DELERR' ) %]<p><b>Unrecognized or missing field delimiter.<br />Please verify that you are using either a single quote or a tab.</b></p>
+ [% ELSIF ( error == 'DBERR' ) %]<p><b>Unable to save image to database.</b></p>
+ [% ELSE %]<p><b>An unknown error has occurred.<br />Please review the error log for more details.</b></p>[% END %]
+ </div>
+ </li>
+ [% END %]
+ <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]">View final record</a></li>
+ <li><a href="/cgi-bin/koha/tools/tools-home.pl">Back</a></li>
+</ul>
+<hr />
+[% END %]
+<ul>
+ <li>Select an image file or ZIP file to upload. The tool will accept images in GIF, JPEG, PNG, and XPM formats.</li>
+</ul>
+<form method="post" action="[% SCRIPT_NAME %]" id="uploadfile" enctype="multipart/form-data">
+<fieldset class="rows" id="uploadform">
+<legend>Upload images</legend>
+<ol>
+ <li>
+ <div id="fileuploadform">
+ <label for="fileToUpload">Select the file to upload: </label>
+ <input type="file" id="fileToUpload" name="fileToUpload" />
+ </div> </li>
+</ol>
+ <fieldset class="action"><button class="submit" onclick="return ajaxFileUpload();">Upload file</button></fieldset>
+</fieldset>
+
+ <div id="uploadpanel"><div id="fileuploadstatus">Upload progress: <div id="fileuploadprogress"></div> <span id="fileuploadpercent">0</span>%</div>
+ <div id="fileuploadfailed"></div></div>
+</form>
+
+ <form method="post" id="processfile" action="[% SCRIPT_NAME %]" enctype="multipart/form-data">
+<fieldset class="rows">
+ <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
+ <input type="hidden" name="runinbackground" id="runinbackground" value="" />
+ <input type="hidden" name="completedJobID" id="completedJobID" value="" />
+ </fieldset>
+ <fieldset class="rows">
+ <legend>File type</legend>
+ <ol>
+ <li class="radio">
+ [% IF (filetype != 'image' ) %]<input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" />[% ELSE %]<input type="radio" id="zipfile" name="filetype" value="zip" />[% END %]
+ <label for="zipfile">ZIP file</label>
+ </li>
+ <li class="radio">
+ [% IF (filetype == 'image' ) %]<input type="radio" id="image" name="filetype" value="image" checked="checked" />[% ELSE %]<input type="radio" id="image" name="filetype" value="image" />[% END %]
+ <label for="imagefile">Image file</label>
+ </li>
+ <li class="radio">
+ [% IF ( filetype == 'image' ) %]<span id="bibnum">[% ELSE %]<span id="bibnum" style="display: none">[% END %]<label for="biblionumber">Enter cover biblionumber: </label><input type="text" id="biblionumber" name="biblionumber" value="[% biblionumber %]" size="15" /></span>
+ </li>
+ </ol>
+ </fieldset>
+ <fieldset class="rows">
+ <legend>Options</legend>
+ <ol>
+ <li class="checkbox">
+ [% IF AllowMultipleCovers == 0 %]<input type="checkbox" id="replace" name="replace" checked="checked" disabled="disabled" value="1" />[% ELSE %]<input type="checkbox" id="replace" name="replace" value="1" />[% END %]
+ <label for="replace">Replace existing covers</label>
+ </li>
+ </ol>
+ </fieldset>
+ <fieldset class="action"><input type="submit" value="Process images" /></fieldset>
+
+ <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
+ <div id="jobfailed"></div></div>
+
+</form>
+
+</div>
+</div>
+<div class="yui-b">
+[% INCLUDE 'tools-menu.inc' %]
+</div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
var _alertString="";
var alertString2;
- if(f.addshelf.value.length ==0){
+ if($("#shelfname").val() == ""){
_alertString += _("- You must enter a List Name") + "\n";
}
<tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
[% FOREACH shelveslooppri IN shelveslooppriv %]
[% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
- <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
+ <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
<td>[% shelveslooppri.count %] item(s)</td>
<td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
<td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
[% IF ( shelvesloop ) %]
<div class="pages">[% pagination_bar %]</div>
<table>
- <tr><th>List Name</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
+ <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
[% FOREACH shelvesloo IN shelvesloop %]
[% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
<td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
+ <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
<td>[% shelvesloo.count %] item(s)</td>
<td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
<td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
<span class="results_summary series"><span class="label">Series: </span>
<!-- 440 -->
<xsl:for-each select="marc:datafield[@tag=440]">
- <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
<!-- 490 Series not traced, Ind1 = 0 -->
<xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
- <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
<xsl:if test="marc:datafield[@tag=490][@ind1=1]">
<xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
<xsl:choose>
- <xsl:when test="marc:subfield[@code='w']">
+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
<a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">at</xsl:with-param>
+ <xsl:with-param name="codes">a_t</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>
- <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">at</xsl:with-param>
+ <xsl:with-param name="codes">a_t</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</span>
</xsl:if>
+ <xsl:if test="marc:datafield[@tag=242]">
+ <span class="results_summary translated_title"><span class="label">Title translated: </span>
+ <xsl:for-each select="marc:datafield[@tag=242]">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abchnp</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+
<!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
<xsl:if test="$display880">
<xsl:call-template name="m880Select">
</xsl:for-each>
</xsl:if>
+ <!-- 866 textual holdings -->
+ <xsl:if test="marc:datafield[@tag=866]">
+ <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
+ <xsl:for-each select="marc:datafield[@tag=866]">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">axz</xsl:with-param>
+ </xsl:call-template>
+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+
<!-- 775 Other Edition -->
<xsl:if test="marc:datafield[@tag=775]">
<span class="results_summary other_editions"><span class="label">Other Editions: </span>
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
- <xsl:import href="MARC21slimUtils.xsl"/>
- <xsl:output method="xml" indent="yes"/>
- <xsl:template match="/">
- <xsl:if test="marc:collection">
- <oai_dc:dcCollection xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
- <xsl:for-each select="marc:collection">
- <xsl:for-each select="marc:record">
- <oai_dc:dc>
- <xsl:apply-templates select="."/>
- </oai_dc:dc>
- </xsl:for-each>
- </xsl:for-each>
- </oai_dc:dcCollection>
- </xsl:if>
- <xsl:if test="marc:record">
- <oai_dc:dc
- xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
- <xsl:apply-templates/>
- </oai_dc:dc>
- </xsl:if>
- </xsl:template>
- <xsl:template match="marc:record">
- <xsl:variable name="leader" select="marc:leader"/>
- <xsl:variable name="leader6" select="substring($leader,7,1)"/>
- <xsl:variable name="leader7" select="substring($leader,8,1)"/>
- <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
-
- <xsl:for-each select="marc:datafield[@tag=200]">
- <dc:title>
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">a</xsl:with-param>
- </xsl:call-template>
- </dc:title>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=700]|marc:datafield[@tag=701]|marc:datafield[@tag=702]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=712]">
- <dc:creator>
- <xsl:value-of select="marc:subfield[@code='a']"/>
- <xsl:if test="marc:subfield[@code='b']">,
- <xsl:value-of select="marc:subfield[@code='b']"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code='4']='010'">, adapter</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='020'">, annotator</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='075'">, author of afterword</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='080'">, prefacer</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='100'">, bibliographic antecedent</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='205'">, collaborator</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='212'">, commentator</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='220'">, compiler</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='230'">, composer</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='245'">, conceptor</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='295'">, degree-grantor</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='340'">, editor</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='370'">, film editor</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='395'">, founder</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='440'">, illustrator</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='520'">, lyricist</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='557'">, organiser of meeting</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='570'">, other</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='600'">, photographer</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='605'">, presenter</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='650'">, publisher</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='651'">, publishing director</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='673'">, research team head</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='675'">, reviewer</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='710'">, redactor</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='723'">, sponsor</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='727'">, thesis advisor</xsl:when>
- <xsl:when test="marc:subfield[@code='4']='730'">, translator</xsl:when>
- </xsl:choose>
- </dc:creator>
- </xsl:for-each>
- <dc:type>
- <xsl:value-of select="marc:datafield[@tag=200]/marc:subfield[@code='b']"/>
- </dc:type>
- <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='c']">
- <dc:publisher>
- <xsl:value-of select="."/>
- </dc:publisher>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='d']">
- <dc:date>
- <xsl:value-of select="."/>
- </dc:date>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=101]/marc:subfield[@code='a']">
- <dc:language>
- <xsl:value-of select="."/>
- </dc:language>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
- <dc:format>
- <xsl:value-of select="."/>
- </dc:format>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=520]">
- <dc:description>
- <xsl:value-of select="marc:subfield[@code='a']"/>
- </dc:description>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=521]">
- <dc:description>
- <xsl:value-of select="marc:subfield[@code='a']"/>
- </dc:description>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[300<@tag][@tag<=345]">
- <dc:description>
- <xsl:value-of select="marc:subfield[@code='a']"/>
- </dc:description>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=600]|marc:datafield[@tag=601]|marc:datafield[@tag=602]|marc:datafield[@tag=604]|marc:datafield[@tag=605]|marc:datafield[@tag=606]">
- <dc:subject>
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">abcdq</xsl:with-param>
- </xsl:call-template>
- </dc:subject>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=752]">
- <dc:coverage>
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">abcd</xsl:with-param>
- </xsl:call-template>
- </dc:coverage>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=530]">
- <dc:relation type="original">
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">abcdu</xsl:with-param>
- </xsl:call-template>
- </dc:relation>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=461]|marc:datafield[@tag=464]">
- <dc:relation>
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">t</xsl:with-param>
- </xsl:call-template>
- </dc:relation>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=856]">
- <dc:identifier>
- <xsl:value-of select="marc:subfield[@code='u']"/>
- </dc:identifier>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=010]">
- <dc:identifier>
- <xsl:text>URN:ISBN:</xsl:text>
- <xsl:value-of select="marc:subfield[@code='a']"/>
- </dc:identifier>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=011]">
- <dc:identifier>
- <xsl:text>URN:ISSN:</xsl:text>
- <xsl:value-of select="marc:subfield[@code='a']"/>
- </dc:identifier>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=090]">
- <dc:identifier>
- <xsl:text>http://opac.mylibrary.org/bib/</xsl:text>
- <xsl:value-of select="marc:subfield[@code='a']"/>
- </dc:identifier>
- </xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=995]">
- <dc:identifier>
- <xsl:text>LOC:</xsl:text>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code='c']='MAIN'">Main Branch</xsl:when>
- <xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when>
- </xsl:choose>
- <xsl:foreach select="marc:subfield[@code='k']">
- <xsl:text>:</xsl:text>
- <xsl:value-of select="."/>
- </xsl:foreach>
- </dc:identifier>
- </xsl:for-each>
- </xsl:template>
+ <xsl:import href="MARC21slimUtils.xsl"/>
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:template match="/">
+ <xsl:if test="marc:collection">
+ <oai_dc:dcCollection xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
+ <xsl:for-each select="marc:collection">
+ <xsl:for-each select="marc:record">
+ <oai_dc:dc>
+ <xsl:apply-templates select="."/>
+ </oai_dc:dc>
+ </xsl:for-each>
+ </xsl:for-each>
+ </oai_dc:dcCollection>
+ </xsl:if>
+ <xsl:if test="marc:record">
+ <oai_dc:dc
+ xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
+ <xsl:apply-templates/>
+ </oai_dc:dc>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template match="marc:record">
+ <xsl:for-each select="marc:datafield[@tag=200]">
+ <dc:title>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </dc:title>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=700]|marc:datafield[@tag=701]|marc:datafield[@tag=702]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=712]">
+ <dc:creator>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ <xsl:if test="marc:subfield[@code='b']">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='4']='010'">, adapter</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='020'">, annotator</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='075'">, author of afterword</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='080'">, prefacer</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='100'">, bibliographic antecedent</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='205'">, collaborator</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='212'">, commentator</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='220'">, compiler</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='230'">, composer</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='245'">, conceptor</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='295'">, degree-grantor</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='340'">, editor</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='370'">, film editor</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='395'">, founder</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='440'">, illustrator</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='520'">, lyricist</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='557'">, organiser of meeting</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='570'">, other</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='600'">, photographer</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='605'">, presenter</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='650'">, publisher</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='651'">, publishing director</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='673'">, research team head</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='675'">, reviewer</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='710'">, redactor</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='723'">, sponsor</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='727'">, thesis advisor</xsl:when>
+ <xsl:when test="marc:subfield[@code='4']='730'">, translator</xsl:when>
+ </xsl:choose>
+ </dc:creator>
+ </xsl:for-each>
+ <dc:type>
+ <xsl:value-of select="marc:datafield[@tag=200]/marc:subfield[@code='b']"/>
+ </dc:type>
+ <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='c']">
+ <dc:publisher>
+ <xsl:value-of select="."/>
+ </dc:publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='d']">
+ <dc:date>
+ <xsl:value-of select="."/>
+ </dc:date>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=101]/marc:subfield[@code='a']">
+ <dc:language>
+ <xsl:value-of select="."/>
+ </dc:language>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
+ <dc:format>
+ <xsl:value-of select="."/>
+ </dc:format>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=520]">
+ <dc:description>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </dc:description>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=521]">
+ <dc:description>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </dc:description>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[300<@tag][@tag<=345]">
+ <dc:description>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </dc:description>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=600]|marc:datafield[@tag=601]|marc:datafield[@tag=602]|marc:datafield[@tag=604]|marc:datafield[@tag=605]|marc:datafield[@tag=606]">
+ <dc:subject>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdq</xsl:with-param>
+ </xsl:call-template>
+ </dc:subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=752]">
+ <dc:coverage>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ </dc:coverage>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=530]">
+ <dc:relation type="original">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdu</xsl:with-param>
+ </xsl:call-template>
+ </dc:relation>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=461]|marc:datafield[@tag=464]">
+ <dc:relation>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">t</xsl:with-param>
+ </xsl:call-template>
+ </dc:relation>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=856]">
+ <dc:identifier>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </dc:identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=010]">
+ <dc:identifier>
+ <xsl:text>URN:ISBN:</xsl:text>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </dc:identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=011]">
+ <dc:identifier>
+ <xsl:text>URN:ISSN:</xsl:text>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </dc:identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=090]">
+ <dc:identifier>
+ <xsl:text>http://opac.mylibrary.org/bib/</xsl:text>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </dc:identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=995]">
+ <dc:identifier>
+ <xsl:text>LOC:</xsl:text>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='c']='MAIN'">Main Branch</xsl:when>
+ <xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when>
+ </xsl:choose>
+ <xsl:foreach select="marc:subfield[@code='k']">
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:foreach>
+ </dc:identifier>
+ </xsl:for-each>
+ </xsl:template>
</xsl:stylesheet>
--- /dev/null
+input.search_init {
+ color: #999999;
+}
+.sorting_asc {
+ padding-right: 19px;
+ background: url("../../img/asc.gif") no-repeat scroll right center #EEEEEE;
+}
+.sorting_desc {
+ padding-right: 19px;
+ background: url("../../img/desc.gif") no-repeat scroll right center #EEEEEE;
+}
+.sorting {
+ padding-right: 19px;
+ background: url("../../img/ascdesc.gif") 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;
+}
+
+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%;
+}
+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;
+}
.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
div.button a:active {
border : 1px inset #666;
}
+
+div.koha_url {
+ border-top: none !important;
+}
+span.koha_url {
+ position: absolute;
+ right: 0;
+}
+a.koha_url {
+ text-decoration: none;
+ color: #666666;
+}
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css"/>
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
-<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
+<script type="text/javascript">
+// full day names
+Calendar._DN = new Array(_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday"),_("Sunday"));
+// short day names
+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;
+// full month names
+Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
+// short month names
+Calendar._SMN = new Array(_("Jan"),_("Feb"),_("Mar"),_("Apr"),_("May"),_("Jun"),_("Jul"),_("Aug"),_("Sep"),_("Oct"),_("Nov"),_("Dec"));
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = _("About the calendar");
+
+Calendar._TT["ABOUT"] =
+_("Dhtml Date/Time Selector")+"\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+_("For latest version visit: http://dynarch.com/mishoo/calendar.epl")+"\n" +
+_("Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details.") +
+"\n\n" +
+_("Date selection:")+"\n" +
+_("- Use the \xab, \xbb buttons to select year")+"\n" +
+_("- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month")+"\n" +
+_("- Hold mouse button on any of the above buttons for faster selection.");
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+_("Time selection:")+"\n" +
+_("- Click on any of the time parts to increase it")+"\n" +
+_("- or Shift-click to decrease it")+"\n" +
+_("- or click and drag for faster selection.");
+
+Calendar._TT["PREV_YEAR"] = _("Prev. year (hold for menu)");
+Calendar._TT["PREV_MONTH"] = _("Prev. month (hold for menu)");
+Calendar._TT["GO_TODAY"] = _("Go to Today");
+Calendar._TT["NEXT_MONTH"] = _("Next month (hold for menu)");
+Calendar._TT["NEXT_YEAR"] = _("Next year (hold for menu)");
+Calendar._TT["SEL_DATE"] = _("Select date");
+Calendar._TT["DRAG_TO_MOVE"] = _("Drag to move");
+Calendar._TT["PART_TODAY"] = _(" (today)");
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = _("Display %s first");
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = _("Close");
+Calendar._TT["TODAY"] = _("Today");
+Calendar._TT["TIME_PART"] = _("(Shift-)Click or drag to change value");
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = _("wk");
+Calendar._TT["TIME"] = _("Time:");
+</script>
<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
<script type="text/javascript">
//<![CDATA[
--- /dev/null
+<script type="text/javascript">
+//<![CDATA[
+ var MSG_DT_FIRST = _("First");
+ var MSG_DT_LAST = _("Last");
+ var MSG_DT_NEXT = _("Next");
+ var MSG_DT_PREVIOUS = _("Previous");
+ var MSG_DT_EMPTY_TABLE = _("No data available in table");
+ var MSG_DT_INFO = _("Showing _START_ to _END_ of _TOTAL_");
+ var MSG_DT_INFO_EMPTY = _("No entries to show");
+ var MSG_DT_INFO_FILTERED = _("(filtered from _MAX_ total entries)");
+ var MSG_DT_LENGTH_MENU = _("Show _MENU_ entries");
+ var MSG_DT_LOADING_RECORDS = _("Loading...");
+ var MSG_DT_PROCESSING = _("Processing...");
+ var MSG_DT_SEARCH = _("Search:");
+ var MSG_DT_ZERO_RECORDS = _("No matching records found");
+//]]>
+</script>
</script>
[% END %]
+[% IF OPACLocalCoverImages %]
+<script type="text/javascript" language="javascript" src="[% themelang %]/js/localcovers.js"></script>
+<script type="text/javascript" language="javascript">
+//<![CDATA[
+var NO_LOCAL_JACKET = _("No cover image available");
+//]]>
+</script>
+[% END %]
+
[% IF ( BakerTaylorEnabled ) %]<script type="text/javascript" language="javascript" src="[% themelang %]/js/bakertaylorimages.js"></script>
<script type="text/javascript" language="javascript">
//<![CDATA[
<div id="changelanguage" class="ft">
[% IF ( languages_loop && opaclanguagesdisplay ) %]
[% UNLESS ( one_language_enabled ) %]
- <div class="lang"><strong>Languages: </strong></div>
+ <div class="lang"><strong>Languages: </strong></div>
[% FOREACH languages_loo IN languages_loop %]
<div class="lang">
[% IF ( languages_loo.group_enabled ) %]
--- /dev/null
+<ul id="action">
+ [% UNLESS ( norequests ) %]
+ [% IF ( opacuserlogin ) %]
+ [% IF ( RequestOnOpac ) %]
+ [% IF ( AllowOnShelfHolds ) %]
+ <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
+ [% ELSE %]
+ [% IF ( ItemsIssued ) %]
+ <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
+ [% END %]
+ [% END %]
+ [% END %]
+ [% END %]
+ [% END %]
+ <li><a class="print" href="#" onclick="window.print();">Print</a></li>
+ [% IF ( virtualshelves ) %]
+ [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %]
+ <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
+ Save to Your Lists
+ </a></li>
+ [% END %][% END %]
+ [% END %]
+ [% IF ( opacbookbag ) %]
+ <li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">Add to Your Cart</a></li>
+ [% END %]
+ <li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
+</ul>
+
+[% IF ( OPACSearchForTitleIn ) %]
+ <div id="furtherm" class="yuimenu">
+ <div class="bd">
+ <h4>Search for this title in:</h4>
+ <ul class="first-of-type">
+ [% OPACSearchForTitleIn %]
+ </ul>
+ </div>
+ </div>
+[% END %]
+
+[% IF ( export_options.size ) %]
+ <div id="export" class="detailtagcell">
+ <form method="get" action="/cgi-bin/koha/opac-export.pl">
+ <label for="format">Save Record:</label>
+ <select name="format" id="format">
+ [% FOREACH option IN export_options %]
+ [% SWITCH option %]
+ [% CASE 'bibtex' %]<option value="bibtex">BIBTEX</option>
+ [% CASE 'dc' %]<option value="dc">Dublin Core (XML)</option>
+ [% CASE 'marcxml' %]<option value="marcxml">MARCXML</option>
+ [% CASE 'marc8' %]<option value="marc8">MARC (non-Unicode/MARC-8)</option>
+ [% CASE 'utf8' %]<option value="utf8">MARC (Unicode/UTF-8)</option>
+ [% CASE 'marcstd' %]<option value="marcstd">MARC (Unicode/UTF-8, Standard)</option>
+ [% CASE 'mods' %]<option value="mods">MODS (XML)</option>
+ [% CASE 'ris' %]<option value="ris">RIS</option>
+ [% END %]
+ [% END %]
+ </select>
+ <input type="hidden" name="op" value="export" />
+ <input type="hidden" name="bib" value="[% biblionumber %]" />
+ <input type="submit" name="save" value="Go" /></form>
+ </div>
+[% END %]
[% IF ( PAGE_NUMBERS ) %]<div class="pages">
<!-- Row of numbers corresponding to search result pages -->
- [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&offset=[% previous_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]"><< Previous</a>[% END %]
- [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %] <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
+ [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% previous_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]"><< Previous</a>[% END %]
+ [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %] <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
[% END %]
- [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&offset=[% next_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Next >></a>[% END %]
+ [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% next_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Next >></a>[% END %]
</div>[% END %]
function showCart(){
var position = $("#cartmenulink").offset();
+ var scrolld = $(window).scrollTop();
var top = position.top + $("#cartmenulink").outerHeight();
+ if( scrolld > top ){
+ top = scrolld + 15;
+ }
var menuWidth = 200;
var buttonWidth = $("#cartmenulink").innerWidth();
var buttonOffset = menuWidth - buttonWidth;
--- /dev/null
+// 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"
+ },
+ "sDom": '<"top pager"ilpf>t<"bottom pager"ip>'
+};
+
+
+// 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<c; i++) {
+ iRow = aiRows[i];
+ var aData = this.fnGetData(iRow);
+ var sValue = aData[iColumn];
+ // ignore empty values?
+ if (bIgnoreEmpty == true && sValue.length == 0) continue;
+ // ignore unique values?
+ else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -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
+// <a href="foo.pl">bar</a> 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 = $('<span style="white-space:nowrap">' + _("From") + '<input type="text" id="' + id + 'from" readonly="readonly" placeholder=\'' + _("Pick date") + '\' size="7" /><a title="Delete this filter" style="cursor:pointer" onclick=\'$("#' + id + 'from").val("").change();\' >×</a></span><br/><span style="white-space:nowrap">' + _("To") + '<input type="text" id="' + id + 'to" readonly="readonly" placeholder=\'' + _("Pick date") + '\' size="7" /><a title="Delete this filter" style="cursor:pointer" onclick=\'$("#' + id + 'to").val("").change();\' >×</a></span>');
+ $(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 );
+}
+
+$.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<iLen ; i++ )
+ {
+ var buttons = an[i].getElementsByTagName('span');
+ if ( oSettings._iDisplayStart === 0 )
+ {
+ buttons[0].className = "paginate_disabled_first";
+ buttons[1].className = "paginate_disabled_previous";
+ }
+ else
+ {
+ buttons[0].className = "paginate_enabled_first";
+ buttons[1].className = "paginate_enabled_previous";
+ }
+
+ if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() )
+ {
+ buttons[2].className = "paginate_disabled_next";
+ buttons[3].className = "paginate_disabled_last";
+ }
+ else
+ {
+ buttons[2].className = "paginate_enabled_next";
+ buttons[3].className = "paginate_enabled_last";
+ }
+ }
+ }
+};
--- /dev/null
+if (typeof KOHA == "undefined" || !KOHA) {
+ var KOHA = {};
+}
+
+/**
+ * A namespace for local cover related functions.
+ */
+KOHA.LocalCover = {
+
+
+ /**
+ * Search all:
+ * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail"></div>
+ * or
+ * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail-preview"></div>
+ * and run a search with all collected isbns to Open Library Book Search.
+ * The result is asynchronously returned by OpenLibrary and catched by
+ * olCallBack().
+ */
+ GetCoverFromBibnumber: function(uselink) {
+ $("div[id^=local-thumbnail],span[id^=local-thumbnail]").each(function(i) {
+ var mydiv = this;
+ var message = document.createElement("span");
+ $(message).attr("class","no-image");
+ $(message).html(NO_LOCAL_JACKET);
+ $(mydiv).append(message);
+ var img = $("<img />").attr('src',
+ '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class"))
+ .load(function () {
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
+ } else {
+ if (uselink) {
+ var a = $("<a />").attr('href', '/cgi-bin/koha/opac-imageviewer.pl?biblionumber=' + $(mydiv).attr("class"));
+ $(a).append(img);
+ $(mydiv).append(a);
+ } else {
+ $(mydiv).append(img);
+ }
+ $(mydiv).children('.no-image').remove();
+ }
+ })
+ });
+ }
+};
--- /dev/null
+/*
+ * 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<s;r++)if(l[r].childNodes.length!==0){l[r].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[r].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:
+g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,r){var s=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),G=p.createElement("span"),x=p.createElement("span");s.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;G.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var v=g.oClasses;s.className=v.sPageButton+" "+v.sPageFirst;w.className=v.sPageButton+" "+v.sPagePrevious;G.className=
+v.sPageButton+" "+v.sPageNext;x.className=v.sPageButton+" "+v.sPageLast;l.appendChild(s);l.appendChild(w);l.appendChild(y);l.appendChild(G);l.appendChild(x);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(G).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&r(g)});i("span",l).bind("mousedown.DT",function(){return false}).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+"_first");w.setAttribute("id",g.sTableId+"_previous");G.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,l){if(g.aanFeatures.p){var r=o.oPagination.iFullNumbersShowPages,s=Math.floor(r/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,G=
+"",x,v=g.oClasses;if(w<r){s=1;x=w}else if(y<=s){s=1;x=r}else if(y>=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?'<span class="'+v.sPageButton+'">'+r+"</span>":'<span class="'+v.sPageButtonActive+'">'+r+"</span>";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;r<s;r++)if(x[r].childNodes.length!==0){z=i("span:eq(2)",x[r]);z.html(G);i("span",z).bind("click.DT",
+Y).bind("mousedown.DT",V).bind("selectstart.DT",V);z=x[r].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];i(z).removeClass(v.sPageButton+" "+v.sPageButtonActive+" "+v.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+v.sPageButtonStaticDisabled;z[1].className+=" "+v.sPageButtonStaticDisabled}else{z[0].className+=" "+v.sPageButton;z[1].className+=" "+v.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+v.sPageButtonStaticDisabled;z[3].className+=" "+
+v.sPageButtonStaticDisabled}else{z[2].className+=" "+v.sPageButton;z[3].className+=" "+v.sPageButton}}}}}};o.oSort={"string-asc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-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 g<l?1:g>l?-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<g.length;s++){l=g.charAt(s);if("0123456789.".indexOf(l)==-1)return null;if(l=="."){if(r)return null;r=true}}return"numeric"},function(g){var l=Date.parse(g);
+if(l!==null&&!isNaN(l)||typeof g=="string"&&g.length===0)return"date";return null},function(g){if(typeof g=="string"&&g.indexOf("<")!=-1&&g.indexOf(">")!=-1)return"html";return null}];o.fnVersionCheck=function(g){var l=function(x,v){for(;x.length<v;)x+="0";return x},r=o.sVersion.split(".");g=g.split(".");for(var s="",w="",y=0,G=g.length;y<G;y++){s+=l(r[y],3);w+=l(g[y],3)}return parseInt(s,10)>=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;d<b;d++){if(d%3===0&&d!==0)c=","+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=o.oStdClasses;this.bSortCellsTop=this.bSorted=this.bFiltered=false;this.oInit=null}function r(a){return function(){var b=
+[A(this[o.iApiIndex])].concat(Array.prototype.slice.call(arguments));return o.oApi[a].apply(this,b)}}function s(a){var b,c,d=a.iInitDisplayStart;if(a.bInitialised===false)setTimeout(function(){s(a)},200);else{xa(a);V(a);L(a,a.aoHeader);a.nTFoot&&L(a,a.aoFooter);K(a,true);a.oFeatures.bAutoWidth&&ea(a);b=0;for(c=a.aoColumns.length;b<c;b++)if(a.aoColumns[b].sWidth!==null)a.aoColumns[b].nTh.style.width=u(a.aoColumns[b].sWidth);if(a.oFeatures.bSort)R(a);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);
+else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide)a.fnServerData.call(a.oInstance,a.sAjaxSource,[],function(f){var e=f;if(a.sAjaxDataProp!=="")e=Z(a.sAjaxDataProp)(f);for(b=0;b<e.length;b++)v(a,e[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)R(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}K(a,false);w(a,f)},a);else if(!a.oFeatures.bServerSide){K(a,false);w(a)}}}function w(a,b){a._bInitComplete=true;if(typeof a.fnInitComplete=="function")typeof b!=
+"undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a)}function y(a,b,c){n(a.oLanguage,b,"sProcessing");n(a.oLanguage,b,"sLengthMenu");n(a.oLanguage,b,"sEmptyTable");n(a.oLanguage,b,"sLoadingRecords");n(a.oLanguage,b,"sZeroRecords");n(a.oLanguage,b,"sInfo");n(a.oLanguage,b,"sInfoEmpty");n(a.oLanguage,b,"sInfoFiltered");n(a.oLanguage,b,"sInfoPostFix");n(a.oLanguage,b,"sSearch");if(typeof b.oPaginate!="undefined"){n(a.oLanguage.oPaginate,b.oPaginate,"sFirst");n(a.oLanguage.oPaginate,
+b.oPaginate,"sPrevious");n(a.oLanguage.oPaginate,b.oPaginate,"sNext");n(a.oLanguage.oPaginate,b.oPaginate,"sLast")}typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&n(a.oLanguage,b,"sZeroRecords","sEmptyTable");typeof b.sLoadingRecords=="undefined"&&typeof b.sZeroRecords!="undefined"&&n(a.oLanguage,b,"sZeroRecords","sLoadingRecords");c&&s(a)}function G(a,b){var c=a.aoColumns.length;b={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],
+sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:c,mDataProp:c,fnGetData:null,fnSetData:null,sSortDataType:"std",sDefaultContent:null,sContentPadding:"",nTh:b?b:p.createElement("th"),nTf:null};a.aoColumns.push(b);if(typeof a.aoPreSearchCols[c]=="undefined"||a.aoPreSearchCols[c]===null)a.aoPreSearchCols[c]={sSearch:"",bRegex:false,bSmart:true};else{if(typeof a.aoPreSearchCols[c].bRegex==
+"undefined")a.aoPreSearchCols[c].bRegex=true;if(typeof a.aoPreSearchCols[c].bSmart=="undefined")a.aoPreSearchCols[c].bSmart=true}x(a,c,null)}function x(a,b,c){b=a.aoColumns[b];if(typeof c!="undefined"&&c!==null){if(typeof c.sType!="undefined"){b.sType=c.sType;b._bAutoType=false}n(b,c,"bVisible");n(b,c,"bSearchable");n(b,c,"bSortable");n(b,c,"sTitle");n(b,c,"sName");n(b,c,"sWidth");n(b,c,"sWidth","sWidthOrig");n(b,c,"sClass");n(b,c,"fnRender");n(b,c,"bUseRendered");n(b,c,"iDataSort");n(b,c,"mDataProp");
+n(b,c,"asSorting");n(b,c,"sSortDataType");n(b,c,"sDefaultContent");n(b,c,"sContentPadding")}b.fnGetData=Z(b.mDataProp);b.fnSetData=ya(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=false;if(!b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableNone;b.sSortingClassJUI=""}else if(b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortable;b.sSortingClassJUI=a.oClasses.sSortJUI}else if(i.inArray("asc",
+b.asSorting)!=-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableAsc;b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed}else if(i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)!=-1){b.sSortingClass=a.oClasses.sSortableDesc;b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed}}function v(a,b){var c;c=typeof b.length=="number"?b.slice():i.extend(true,{},b);b=a.aoData.length;var d={nTr:null,_iId:a.iNextId++,_aData:c,_anHidden:[],_sRowStripe:""};a.aoData.push(d);for(var f,
+e=0,h=a.aoColumns.length;e<h;e++){c=a.aoColumns[e];typeof c.fnRender=="function"&&c.bUseRendered&&c.mDataProp!==null&&N(a,b,e,c.fnRender({iDataRow:b,iDataColumn:e,aData:d._aData,oSettings:a}));if(c._bAutoType&&c.sType!="string"){f=H(a,b,e,"type");if(f!==null&&f!==""){f=fa(f);if(c.sType===null)c.sType=f;else if(c.sType!=f)c.sType="string"}}}a.aiDisplayMaster.push(b);a.oFeatures.bDeferRender||z(a,b);return b}function z(a,b){var c=a.aoData[b],d;if(c.nTr===null){c.nTr=p.createElement("tr");typeof c._aData.DT_RowId!=
+"undefined"&&c.nTr.setAttribute("id",c._aData.DT_RowId);typeof c._aData.DT_RowClass!="undefined"&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,e=a.aoColumns.length;f<e;f++){var h=a.aoColumns[f];d=p.createElement("td");d.innerHTML=typeof h.fnRender=="function"&&(!h.bUseRendered||h.mDataProp===null)?h.fnRender({iDataRow:b,iDataColumn:f,aData:c._aData,oSettings:a}):H(a,b,f,"display");if(h.sClass!==null)d.className=h.sClass;if(h.bVisible){c.nTr.appendChild(d);c._anHidden[f]=null}else c._anHidden[f]=
+d}}}function Y(a){var b,c,d,f,e,h,j,k,m;if(a.bDeferLoading||a.sAjaxSource===null){j=a.nTBody.childNodes;b=0;for(c=j.length;b<c;b++)if(j[b].nodeName.toUpperCase()=="TR"){k=a.aoData.length;a.aoData.push({nTr:j[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});a.aiDisplayMaster.push(k);h=j[b].childNodes;d=e=0;for(f=h.length;d<f;d++){m=h[d].nodeName.toUpperCase();if(m=="TD"||m=="TH"){N(a,k,e,i.trim(h[d].innerHTML));e++}}}}j=$(a);h=[];b=0;for(c=j.length;b<c;b++){d=0;for(f=j[b].childNodes.length;d<
+f;d++){e=j[b].childNodes[d];m=e.nodeName.toUpperCase();if(m=="TD"||m=="TH")h.push(e)}}h.length!=j.length*a.aoColumns.length&&J(a,1,"Unexpected number of TD elements. Expected "+j.length*a.aoColumns.length+" and got "+h.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.");d=0;for(f=a.aoColumns.length;d<f;d++){if(a.aoColumns[d].sTitle===null)a.aoColumns[d].sTitle=a.aoColumns[d].nTh.innerHTML;j=a.aoColumns[d]._bAutoType;
+m=typeof a.aoColumns[d].fnRender=="function";e=a.aoColumns[d].sClass!==null;k=a.aoColumns[d].bVisible;var t,q;if(j||m||e||!k){b=0;for(c=a.aoData.length;b<c;b++){t=h[b*f+d];if(j&&a.aoColumns[d].sType!="string"){q=H(a,b,d,"type");if(q!==""){q=fa(q);if(a.aoColumns[d].sType===null)a.aoColumns[d].sType=q;else if(a.aoColumns[d].sType!=q)a.aoColumns[d].sType="string"}}if(m){q=a.aoColumns[d].fnRender({iDataRow:b,iDataColumn:d,aData:a.aoData[b]._aData,oSettings:a});t.innerHTML=q;a.aoColumns[d].bUseRendered&&
+N(a,b,d,q)}if(e)t.className+=" "+a.aoColumns[d].sClass;if(k)a.aoData[b]._anHidden[d]=null;else{a.aoData[b]._anHidden[d]=t;t.parentNode.removeChild(t)}}}}}function V(a){var b,c,d;a.nTHead.getElementsByTagName("tr");if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);if(a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}}else{var f=p.createElement("tr");b=0;
+for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;c.innerHTML=a.aoColumns[b].sTitle;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);f.appendChild(c)}i(a.nTHead).html("")[0].appendChild(f);W(a.aoHeader,a.nTHead)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=p.createElement("div");f.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(f);var e=p.createElement("span");e.className=a.oClasses.sSortIcon;f.appendChild(e);c.appendChild(f)}}d=function(){this.onselectstart=
+function(){return false};return false};if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable!==false){ga(a,a.aoColumns[b].nTh,b);i(a.aoColumns[b].nTh).bind("mousedown.DT",d)}else i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);a.oClasses.sFooterTH!==""&&i(">tr>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<d;b++)if(typeof c[b]!="undefined")a.aoColumns[b].nTf=c[b]}}function L(a,b,c){var d,f,
+e,h=[],j=[],k=a.aoColumns.length;if(typeof c=="undefined")c=false;d=0;for(f=b.length;d<f;d++){h[d]=b[d].slice();h[d].nTr=b[d].nTr;for(e=k-1;e>=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d<f;d++){if(h[d].nTr){a=0;for(e=h[d].nTr.childNodes.length;a<e;a++)h[d].nTr.removeChild(h[d].nTr.childNodes[0])}e=0;for(b=h[d].length;e<b;e++){k=c=1;if(typeof j[d][e]=="undefined"){h[d].nTr.appendChild(h[d][e].cell);for(j[d][e]=1;typeof h[d+c]!="undefined"&&h[d][e].cell==h[d+
+c][e].cell;){j[d+c][e]=1;c++}for(;typeof h[d][e+k]!="undefined"&&h[d][e].cell==h[d][e+k].cell;){for(a=0;a<c;a++)j[d+a][e+k]=1;k++}h[d][e].cell.setAttribute("rowspan",c);h[d][e].cell.setAttribute("colspan",k)}}}}function C(a){var b,c,d=[],f=0,e=false;b=a.asStripClasses.length;c=a.aoOpenRows.length;if(!(a.fnPreDrawCallback!==null&&a.fnPreDrawCallback.call(a.oInstance,a)===false)){a.bDrawing=true;if(typeof a.iInitDisplayStart!="undefined"&&a.iInitDisplayStart!=-1){a._iDisplayStart=a.oFeatures.bServerSide?
+a.iInitDisplayStart:a.iInitDisplayStart>=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;h<j;h++){var k=a.aoData[a.aiDisplay[h]];k.nTr===null&&z(a,a.aiDisplay[h]);var m=k.nTr;if(b!==0){var t=a.asStripClasses[f%b];if(k._sRowStripe!=
+t){i(m).removeClass(k._sRowStripe).addClass(t);k._sRowStripe=t}}if(typeof a.fnRowCallback=="function"){m=a.fnRowCallback.call(a.oInstance,m,a.aoData[a.aiDisplay[h]]._aData,f,h);if(!m&&!e){J(a,0,"A node was not returned by fnRowCallback");e=true}}d.push(m);f++;if(c!==0)for(k=0;k<c;k++)m==a.aoOpenRows[k].nParent&&d.push(a.aoOpenRows[k].nTr)}}else{d[0]=p.createElement("tr");if(typeof a.asStripClasses[0]!="undefined")d[0].className=a.asStripClasses[0];e=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));
+if(a.iDraw==1&&a.sAjaxSource!==null&&!a.oFeatures.bServerSide)e=a.oLanguage.sLoadingRecords;else if(typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0)e=a.oLanguage.sEmptyTable;b=p.createElement("td");b.setAttribute("valign","top");b.colSpan=X(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=e;d[f].appendChild(b)}typeof a.fnHeaderCallback=="function"&&a.fnHeaderCallback.call(a.oInstance,i(">tr",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<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);e!==null&&e.appendChild(a.nTBody)}for(b=a.aoDrawCallback.length-
+1;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<b;f++){d=a.aoColumns[f].mDataProp;c.push({name:"mDataProp_"+f,value:typeof d=="function"?"function":d})}if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++){c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch});c.push({name:"bRegex_"+
+f,value:a.aoPreSearchCols[f].bRegex});c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}}if(a.oFeatures.bSort!==false){d=a.aaSortingFixed!==null?a.aaSortingFixed.length:0;var e=a.aaSorting.length;c.push({name:"iSortingCols",value:d+e});for(f=0;f<d;f++){c.push({name:"iSortCol_"+f,value:a.aaSortingFixed[f][0]});c.push({name:"sSortDir_"+f,value:a.aaSortingFixed[f][1]})}for(f=0;f<e;f++){c.push({name:"iSortCol_"+(f+d),value:a.aaSorting[f][0]});c.push({name:"sSortDir_"+(f+d),value:a.aaSorting[f][1]})}for(f=
+0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(h){Aa(a,h)},a);return false}else return true}function Aa(a,b){if(typeof b.sEcho!="undefined")if(b.sEcho*1<a.iDraw)return;else a.iDraw=b.sEcho*1;if(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))ia(a);a._iRecordsTotal=b.iTotalRecords;a._iRecordsDisplay=b.iTotalDisplayRecords;var c=ha(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=
+Ba(a,b.sColumns);b=Z(a.sAjaxDataProp)(b);for(var f=0,e=b.length;f<e;f++)if(c){for(var h=[],j=0,k=a.aoColumns.length;j<k;j++)h.push(b[f][d[j]]);v(a,h)}else v(a,b[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=false;C(a);a.bAjaxDataGet=true;K(a,false)}function xa(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=p.createElement("div");a.nTableWrapper.className=a.oClasses.sWrapper;a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper");
+a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,e,h,j,k,m,t,q=0;q<d.length;q++){e=0;h=d[q];if(h=="<"){j=p.createElement("div");k=d[q+1];if(k=="'"||k=='"'){m="";for(t=2;d[q+t]!=k;){m+=d[q+t];t++}if(m=="H")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";else if(m=="F")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";if(m.indexOf(".")!=-1){k=m.split(".");j.setAttribute("id",k[0].substr(1,
+k[0].length-1));j.className=k[1]}else if(m.charAt(0)=="#")j.setAttribute("id",m.substr(1,m.length-1));else j.className=m;q+=t}c.appendChild(j);c=j}else if(h==">")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;t<k;t++)if(h==j[t].cFeature){if(f=j[t].fnInit(a))e=1;break}}if(e==1&&f!==null){if(typeof a.aanFeatures[h]!="object")a.aanFeatures[h]=[];a.aanFeatures[h].push(f);c.appendChild(f)}}b.parentNode.replaceChild(a.nTableWrapper,b)}function Fa(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),f=p.createElement("div"),e=p.createElement("div"),h=p.createElement("div"),j=a.nTable.cloneNode(false),
+k=a.nTable.cloneNode(false),m=a.nTable.getElementsByTagName("thead")[0],t=a.nTable.getElementsByTagName("tfoot").length===0?null:a.nTable.getElementsByTagName("tfoot")[0],q=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?o.oJUIClasses:o.oStdClasses;c.appendChild(d);e.appendChild(h);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(j);j.appendChild(m);if(t!==null){b.appendChild(e);h.appendChild(k);k.appendChild(t)}b.className=q.sScrollWrapper;c.className=q.sScrollHead;d.className=
+q.sScrollHeadInner;f.className=q.sScrollBody;e.className=q.sScrollFoot;h.className=q.sScrollFootInner;if(a.oScroll.bAutoCss){c.style.overflow="hidden";c.style.position="relative";e.style.overflow="hidden";f.style.overflow="auto"}c.style.border="0";c.style.width="100%";e.style.border="0";d.style.width="150%";j.removeAttribute("id");j.style.marginLeft="0";a.nTable.style.marginLeft="0";if(t!==null){k.removeAttribute("id");k.style.marginLeft="0"}d=i(">caption",a.nTable);h=0;for(k=d.length;h<k;h++)j.appendChild(d[h]);
+if(a.oScroll.sX!==""){c.style.width=u(a.oScroll.sX);f.style.width=u(a.oScroll.sX);if(t!==null)e.style.width=u(a.oScroll.sX);i(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(t!==null)e.scrollLeft=this.scrollLeft})}if(a.oScroll.sY!=="")f.style.height=u(a.oScroll.sY);a.aoDrawCallback.push({fn:Ia,sName:"scrolling"});a.oScroll.bInfinite&&i(f).scroll(function(){if(!a.bDrawing)if(i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()<a.fnRecordsDisplay()){ja(a,
+"next");E(a);C(a)}});a.nScrollHead=c;a.nScrollFoot=e;return b}function Ia(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,e,h,j,k,m,t,q,I=[];h=a.nTable.getElementsByTagName("thead");h.length>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;f<e;f++){t=Ja(a,f);O[f].style.width=a.aoColumns[t].sWidth}a.nTFoot!==null&&P(function(B){B.style.width=""},k.getElementsByTagName("tr"));f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){a.nTable.style.width="100%";if(i.browser.msie&&i.browser.version<=7)a.nTable.style.width=u(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!==
+"")a.nTable.style.width=u(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()<i(a.nTable).height()){a.nTable.style.width=u(f-a.oScroll.iBarWidth);if(i(a.nTable).outerWidth()>f-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()<f)if(a.oScroll.sX==="")J(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you enable x-scrolling or increase the width the table has in which to be drawn");else a.oScroll.sXInner!==""&&J(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you increase the sScrollXInner property to allow it to draw in a larger area, or simply remove that parameter to allow automatic calculation");
+if(a.oScroll.sY==="")if(i.browser.msie&&i.browser.version<=7)d.style.height=u(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=u(a.oScroll.sY);j=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight<d.offsetHeight)d.style.height=u(i(a.nTable).height()+j)}j=i(a.nTable).outerWidth();c.style.width=u(j);b.style.width=u(j+a.oScroll.iBarWidth);if(a.nTFoot!==null){b=a.nScrollFoot.getElementsByTagName("div")[0];
+c=b.getElementsByTagName("table")[0];b.style.width=u(a.nTable.offsetWidth+a.oScroll.iBarWidth);c.style.width=u(a.nTable.offsetWidth)}if(a.bSorted||a.bFiltered)d.scrollTop=0}function ca(a){if(a.oFeatures.bAutoWidth===false)return false;ea(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function Da(a){var b=a.oLanguage.sSearch;b=b.indexOf("_INPUT_")!==-1?b.replace("_INPUT_",'<input type="text" />'):b===""?'<input type="text" />':b+' <input type="text" />';
+var c=p.createElement("div");c.className=a.oClasses.sFilter;c.innerHTML="<label>"+b+"</label>";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<e;f++)d[f]!=this.parentNode&&i("input",d[f]).val(this.value);this.value!=a.oPreviousSearch.sSearch&&M(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})});
+b.bind("keypress.DT",function(d){if(d.keyCode==13)return false});return c}function M(a,b,c){Ka(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)La(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,a.aoPreSearchCols[b].bSmart);o.afnFiltering.length!==0&&Ma(a);a.bFiltered=true;a._iDisplayStart=0;E(a);C(a);ka(a,0)}function Ma(a){for(var b=o.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,e=0,h=a.aiDisplay.length;e<h;e++){var j=a.aiDisplay[e-f];if(!b[c](a,da(a,j,"filter"),
+j)){a.aiDisplay.splice(e-f,1);f++}}}function La(a,b,c,d,f){if(b!==""){var e=0;b=la(b,d,f);for(d=a.aiDisplay.length-1;d>=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<a.aiDisplayMaster.length;c++)e.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var h=0;for(c=0;c<a.asDataSearch.length;c++)if(!e.test(a.asDataSearch[c])){a.aiDisplay.splice(c-h,1);h++}}a.oPreviousSearch.sSearch=b;a.oPreviousSearch.bRegex=d;a.oPreviousSearch.bSmart=f}function ka(a,b){a.asDataSearch.splice(0,a.asDataSearch.length);b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:
+a.aiDisplay;for(var c=0,d=b.length;c<d;c++)a.asDataSearch[c]=na(a,da(a,b[c],"filter"))}function na(a,b){var c="";if(typeof a.__nTmpFilter=="undefined")a.__nTmpFilter=p.createElement("div");for(var d=a.__nTmpFilter,f=0,e=a.aoColumns.length;f<e;f++)if(a.aoColumns[f].bSearchable)c+=ma(b[f],a.aoColumns[f].sType)+" ";if(c.indexOf("&")!==-1){d.innerHTML=c;c=d.textContent?d.textContent:d.innerText;c=c.replace(/\n/g," ").replace(/\r/g,"")}return c}function la(a,b,c){if(c){a=b?a.split(" "):oa(a).split(" ");
+a="^(?=.*?"+a.join(")(?=.*?")+").*$";return new RegExp(a,"i")}else{a=b?a:oa(a);return new RegExp(a,"i")}}function ma(a,b){if(typeof o.ofnSearch[b]=="function")return o.ofnSearch[b](a);else if(b=="html")return a.replace(/\n/g," ").replace(/<.*?>/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.length;c++){var t=h[c][0];f=pa(a,t);e=a.aoColumns[t].sSortDataType;if(typeof o.afnSortData[e]!="undefined"){var q=o.afnSortData[e](a,t,f);f=0;for(e=d.length;f<e;f++)N(a,f,t,q[f])}}c=0;for(d=a.aiDisplayMaster.length;c<d;c++)j[a.aiDisplayMaster[c]]=c;var I=h.length;a.aiDisplayMaster.sort(function(O,B){var F,qa;for(c=0;c<I;c++){F=m[h[c][0]].iDataSort;qa=m[F].sType;F=k[(qa?qa:"string")+"-"+h[c][1]](H(a,O,F,"sort"),H(a,B,F,"sort"));
+if(F!==0)return F}return k["numeric-asc"](j[O],j[B])})}if((typeof b=="undefined"||b)&&!a.oFeatures.bDeferRender)T(a);a.bSorted=true;if(a.oFeatures.bFilter)M(a,a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;E(a);C(a)}}function ga(a,b,c,d){i(b).bind("click.DT",function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var h,j;if(f.shiftKey){for(var k=false,m=0;m<a.aaSorting.length;m++)if(a.aaSorting[m][0]==c){k=true;h=a.aaSorting[m][0];j=a.aaSorting[m][2]+
+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")a.aaSorting.splice(m,1);else{a.aaSorting[m][1]=a.aoColumns[h].asSorting[j];a.aaSorting[m][2]=j}break}k===false&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else if(a.aaSorting.length==1&&a.aaSorting[0][0]==c){h=a.aaSorting[0][0];j=a.aaSorting[0][2]+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")j=0;a.aaSorting[0][1]=a.aoColumns[h].asSorting[j];a.aaSorting[0][2]=j}else{a.aaSorting.splice(0,a.aaSorting.length);a.aaSorting.push([c,a.aoColumns[c].asSorting[0],
+0])}R(a)};if(a.oFeatures.bProcessing){K(a,true);setTimeout(function(){e();a.oFeatures.bServerSide||K(a,false)},0)}else e();typeof d=="function"&&d(a)}})}function T(a){var b,c,d,f,e,h=a.aoColumns.length,j=a.oClasses;for(b=0;b<h;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){e=a.aoColumns[b].sSortingClass;
+d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){e=f[c][1]=="asc"?j.sSortAsc:j.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(e);if(a.bJUI){c=i("span",a.aoColumns[b].nTh);c.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed);c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:f[d][1]=="asc"?j.sSortJUIAsc:j.sSortJUIDesc)}}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);e=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=
+Q(a);if(a.oFeatures.bDeferRender)i(d).removeClass(e+"1 "+e+"2 "+e+"3");else if(d.length>=h)for(b=0;b<h;b++)if(d[b].className.indexOf(e+"1")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"1",""))}else if(d[b].className.indexOf(e+"2")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"2",""))}else if(d[b].className.indexOf(e+"3")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(" "+
+e+"3",""))}j=1;var k;for(b=0;b<f.length;b++){k=parseInt(f[b][0],10);c=0;for(a=d.length/h;c<a;c++)d[h*c+k].className+=" "+e+j;j<3&&j++}}}function Ha(a){if(a.oScroll.bInfinite)return null;var b=p.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;o.oPagination[a.sPaginationType].fnInit(a,b,function(c){E(c);C(c)});typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(c){o.oPagination[c.sPaginationType].fnUpdate(c,function(d){E(d);C(d)})},sName:"pagination"});return b}
+function ja(a,b){var c=a._iDisplayStart;if(b=="first")a._iDisplayStart=0;else if(b=="previous"){a._iDisplayStart=a._iDisplayLength>=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<a.fnRecordsDisplay())a._iDisplayStart+=a._iDisplayLength}else a._iDisplayStart=0;else if(b=="last")if(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;b++)i(a[b]).html(e)}}function Ca(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+(a.sTableId===""?"":'name="'+a.sTableId+'_length"')+">",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<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";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="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";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;c<d;c++)h[c]!=this.parentNode&&i("select",h[c]).val(e);a._iDisplayLength=parseInt(e,10);E(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;C(a)});return f}function Ea(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.r==
+"undefined"&&b.setAttribute("id",a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility=b?"visible":"hidden"}}function Ja(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(c==b)return d}return null}function pa(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===
+true&&c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function U(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c;return null}function X(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===true&&b++;return b}function E(a){a._iDisplayEnd=a.oFeatures.bPaginate===false?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.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;e<f;e++)if(a.aoColumns[e].bVisible){d++;if(a.aoColumns[e].sWidth!==null){c=Oa(a.aoColumns[e].sWidthOrig,a.nTable.parentNode);if(c!==
+null)a.aoColumns[e].sWidth=u(c);b++}}if(f==h.length&&b===0&&d==f&&a.oScroll.sX===""&&a.oScroll.sY==="")for(e=0;e<a.aoColumns.length;e++){c=i(h[e]).width();if(c!==null)a.aoColumns[e].sWidth=u(c)}else{b=a.nTable.cloneNode(false);e=a.nTHead.cloneNode(true);d=p.createElement("tbody");c=p.createElement("tr");b.removeAttribute("id");b.appendChild(e);if(a.nTFoot!==null){b.appendChild(a.nTFoot.cloneNode(true));P(function(k){k.style.width=""},b.getElementsByTagName("tr"))}b.appendChild(d);d.appendChild(c);
+d=i("thead th",b);if(d.length===0)d=i("tbody tr:eq(0)>td",b);h=S(a,e);for(e=d=0;e<f;e++){var j=a.aoColumns[e];if(j.bVisible&&j.sWidthOrig!==null&&j.sWidthOrig!=="")h[e-d].style.width=u(j.sWidthOrig);else if(j.bVisible)h[e-d].style.width="";else d++}for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d=Pa(a,e);if(d!==null){d=d.cloneNode(true);if(a.aoColumns[e].sContentPadding!=="")d.innerHTML+=a.aoColumns[e].sContentPadding;c.appendChild(d)}}f=a.nTable.parentNode;f.appendChild(b);if(a.oScroll.sX!==""&&a.oScroll.sXInner!==
+"")b.style.width=u(a.oScroll.sXInner);else if(a.oScroll.sX!==""){b.style.width="";if(i(b).width()<f.offsetWidth)b.style.width=u(f.offsetWidth)}else if(a.oScroll.sY!=="")b.style.width=u(f.offsetWidth);b.style.visibility="hidden";Qa(a,b);f=i("tbody tr:eq(0)",b).children();if(f.length===0)f=S(a,i("thead",b)[0]);if(a.oScroll.sX!==""){for(e=d=c=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c+=a.aoColumns[e].sWidthOrig===null?i(f[d]).outerWidth():parseInt(a.aoColumns[e].sWidth.replace("px",""),
+10)+(i(f[d]).outerWidth()-i(f[d]).width());d++}b.style.width=u(c);a.nTable.style.width=u(c)}for(e=d=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c=i(f[d]).width();if(c!==null&&c>0)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<a.aoData.length;f++){var e=H(a,f,b,"display")+"";e=e.replace(/<.*?>/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;c<a.length;c++)if(a[c]!=b[c])return 2;return 0}function fa(a){for(var b=o.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(f!==null)return f}return"string"}function A(a){for(var b=0;b<D.length;b++)if(D[b].nTable==a)return D[b];return null}function aa(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function $(a){for(var b=[],c=0,d=a.aoData.length;c<d;c++)a.aoData[c].nTr!==null&&b.push(a.aoData[c].nTr);return b}function Q(a,b){var c=[],d,f,e,h,j;f=0;var k=a.aoData.length;
+if(typeof b!="undefined"){f=b;k=b+1}for(f=f;f<k;f++){j=a.aoData[f];if(j.nTr!==null){b=[];e=0;for(h=j.nTr.childNodes.length;e<h;e++){d=j.nTr.childNodes[e].nodeName.toLowerCase();if(d=="td"||d=="th")b.push(j.nTr.childNodes[e])}e=d=0;for(h=a.aoColumns.length;e<h;e++)if(a.aoColumns[e].bVisible)c.push(b[e-d]);else{c.push(j._anHidden[e]);d++}}}return c}function oa(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function ra(a,b){for(var c=-1,d=
+0,f=a.length;d<f;d++)if(a[d]==b)c=d;else a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function Ba(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d<f;d++)for(var e=0;e<f;e++)if(a.aoColumns[d].sName==b[e]){c.push(e);break}return c}function ha(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";if(b.length==d)return"";return b.slice(0,-1)}function J(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(b===0)if(o.sErrMode==
+"alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function ia(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);E(a)}function sa(a){if(!(!a.oFeatures.bStateSave||typeof a.bDestroying!="undefined")){var b,c,d,f="{";f+='"iCreate":'+(new Date).getTime()+",";f+='"iStart":'+(a.oScroll.bInfinite?0:a._iDisplayStart)+",";f+='"iEnd":'+(a.oScroll.bInfinite?a._iDisplayLength:
+a._iDisplayEnd)+",";f+='"iLength":'+a._iDisplayLength+",";f+='"sFilter":"'+encodeURIComponent(a.oPreviousSearch.sSearch)+'",';f+='"sFilterEsc":'+!a.oPreviousSearch.bRegex+",";f+='"aaSorting":[ ';for(b=0;b<a.aaSorting.length;b++)f+="["+a.aaSorting[b][0]+',"'+a.aaSorting[b][1]+'"],';f=f.substring(0,f.length-1);f+="],";f+='"aaSearchCols":[ ';for(b=0;b<a.aoPreSearchCols.length;b++)f+='["'+encodeURIComponent(a.aoPreSearchCols[b].sSearch)+'",'+!a.aoPreSearchCols[b].bRegex+"],";f=f.substring(0,f.length-
+1);f+="],";f+='"abVisCols":[ ';for(b=0;b<a.aoColumns.length;b++)f+=a.aoColumns[b].bVisible+",";f=f.substring(0,f.length-1);f+="]";b=0;for(c=a.aoStateSave.length;b<c;b++){d=a.aoStateSave[b].fn(a,f);if(d!=="")f=d}f+="}";Sa(a.sCookiePrefix+a.sInstance,f,a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)}}function Ta(a,b){if(a.oFeatures.bStateSave){var c,d,f;d=ta(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=typeof i.parseJSON=="function"?i.parseJSON(d.replace(/'/g,'"')):eval("("+d+")")}catch(e){return}d=
+0;for(f=a.aoStateLoad.length;d<f;d++)if(!a.aoStateLoad[d].fn(a,c))return;a.oLoadedState=i.extend(true,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.oPreviousSearch.sSearch=decodeURIComponent(c.sFilter);a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();if(typeof c.sFilterEsc!="undefined")a.oPreviousSearch.bRegex=!c.sFilterEsc;if(typeof c.aaSearchCols!="undefined")for(d=0;d<c.aaSearchCols.length;d++)a.aoPreSearchCols[d]=
+{sSearch:decodeURIComponent(c.aaSearchCols[d][0]),bRegex:!c.aaSearchCols[d][1]};if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++){b.saved_aoColumns[d]={};b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}}function Sa(a,b,c,d,f){var e=new Date;e.setTime(e.getTime()+c*1E3);c=wa.location.pathname.split("/");a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();var h;if(f!==null){h=typeof i.parseJSON=="function"?i.parseJSON(b):eval("("+b+")");b=f(a,h,e.toGMTString(),
+c.join("/")+"/")}else b=a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString()+"; path="+c.join("/")+"/";f="";e=9999999999999;if((ta(a)!==null?p.cookie.length:b.length+p.cookie.length)+10>4096){a=p.cookie.split(";");for(var j=0,k=a.length;j<k;j++)if(a[j].indexOf(d)!=-1){var m=a[j].split("=");try{h=eval("("+decodeURIComponent(m[1])+")")}catch(t){continue}if(typeof h.iCreate!="undefined"&&h.iCreate<e){f=m[0];e=h.iCreate}}if(f!=="")p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+
+"/"}p.cookie=b}function ta(a){var b=wa.location.pathname.split("/");a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";b=p.cookie.split(";");for(var c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function W(a,b){b=b.getElementsByTagName("tr");var c,d,f,e,h,j,k,m,t=function(O,B,F){for(;typeof O[B][F]!="undefined";)F++;return F};a.splice(0,a.length);d=0;for(j=b.length;d<
+j;d++)a.push([]);d=0;for(j=b.length;d<j;d++){f=0;for(k=b[d].childNodes.length;f<k;f++){c=b[d].childNodes[f];if(c.nodeName.toUpperCase()=="TD"||c.nodeName.toUpperCase()=="TH"){var q=c.getAttribute("colspan")*1,I=c.getAttribute("rowspan")*1;q=!q||q===0||q===1?1:q;I=!I||I===0||I===1?1:I;m=t(a,d,0);for(h=0;h<q;h++)for(e=0;e<I;e++){a[d+e][m+h]={cell:c,unique:q==1?true:false};a[d+e].nTr=b[d]}}}}}function S(a,b,c){var d=[];if(typeof c=="undefined"){c=a.aoHeader;if(typeof b!="undefined"){c=[];W(c,b)}}b=0;
+for(var f=c.length;b<f;b++)for(var e=0,h=c[b].length;e<h;e++)if(c[b][e].unique&&(typeof d[e]=="undefined"||!a.bSortCellsTop))d[e]=c[b][e].cell;return d}function Ua(){var a=p.createElement("p"),b=a.style;b.width="100%";b.height="200px";var c=p.createElement("div");b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.overflow="hidden";c.appendChild(a);p.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=
+c.clientWidth;p.body.removeChild(c);return b-a}function P(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var e=0,h=b[d].childNodes.length;e<h;e++)if(b[d].childNodes[e].nodeType==1)typeof c!="undefined"?a(b[d].childNodes[e],c[d].childNodes[e]):a(b[d].childNodes[e])}function n(a,b,c,d){if(typeof d=="undefined")d=c;if(typeof b[c]!="undefined")a[d]=b[c]}function da(a,b,c){for(var d=[],f=0,e=a.aoColumns.length;f<e;f++)d.push(H(a,b,f,c));return d}function H(a,b,c,d){var f=a.aoColumns[c];if((c=f.fnGetData(a.aoData[b]._aData))===
+undefined){if(a.iDrawError!=a.iDraw&&f.sDefaultContent===null){J(a,0,"Requested unknown parameter '"+f.mDataProp+"' from the data source for row "+b);a.iDrawError=a.iDraw}return f.sDefaultContent}if(c===null&&f.sDefaultContent!==null)c=f.sDefaultContent;if(d=="display"&&c===null)return"";return c}function N(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function Z(a){if(a===null)return function(){return null};else if(typeof a=="function")return function(c){return a(c)};else if(typeof a==
+"string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c){return c[b[0]][b[1]]}:b.length==3?function(c){return c[b[0]][b[1]][b[2]]}:function(c){for(var d=0,f=b.length;d<f;d++)c=c[b[d]];return c}}else return function(c){return c[a]}}function ya(a){if(a===null)return function(){};else if(typeof a=="function")return function(c,d){return a(c,d)};else if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c,d){c[b[0]][b[1]]=d}:b.length==3?function(c,
+d){c[b[0]][b[1]][b[2]]=d}:function(c,d){for(var f=0,e=b.length-1;f<e;f++)c=c[b[f]];c[b[b.length-1]]=d}}else return function(c,d){c[a]=d}}this.oApi={};this.fnDraw=function(a){var b=A(this[o.iApiIndex]);if(typeof a!="undefined"&&a===false){E(b);C(b)}else ba(b)};this.fnFilter=function(a,b,c,d,f){var e=A(this[o.iApiIndex]);if(e.oFeatures.bFilter){if(typeof c=="undefined")c=false;if(typeof d=="undefined")d=true;if(typeof f=="undefined")f=true;if(typeof b=="undefined"||b===null){M(e,{sSearch:a,bRegex:c,
+bSmart:d},1);if(f&&typeof e.aanFeatures.f!="undefined"){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else{e.aoPreSearchCols[b].sSearch=a;e.aoPreSearchCols[b].bRegex=c;e.aoPreSearchCols[b].bSmart=d;M(e,e.oPreviousSearch,1)}}};this.fnSettings=function(){return A(this[o.iApiIndex])};this.fnVersionCheck=o.fnVersionCheck;this.fnSort=function(a){var b=A(this[o.iApiIndex]);b.aaSorting=a;R(b)};this.fnSortListener=function(a,b,c){ga(A(this[o.iApiIndex]),a,b,c)};this.fnAddData=function(a,
+b){if(a.length===0)return[];var c=[],d,f=A(this[o.iApiIndex]);if(typeof a[0]=="object")for(var e=0;e<a.length;e++){d=v(f,a[e]);if(d==-1)return c;c.push(d)}else{d=v(f,a);if(d==-1)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();if(typeof b=="undefined"||b)ba(f);return c};this.fnDeleteRow=function(a,b,c){var d=A(this[o.iApiIndex]);a=typeof a=="object"?U(d,a):a;var f=d.aoData.splice(a,1),e=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ra(d.aiDisplayMaster,a);ra(d.aiDisplay,a);typeof b==
+"function"&&b.call(this,d,f);if(d._iDisplayStart>=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<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a){(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr);b.aoOpenRows.splice(c,1);return 0}return 1};this.fnGetData=function(a,b){var c=A(this[o.iApiIndex]);if(typeof a!="undefined"){a=typeof a=="object"?U(c,a):a;if(typeof b!=
+"undefined")return H(c,a,b,"");return typeof c.aoData[a]!="undefined"?c.aoData[a]._aData:null}return aa(c)};this.fnGetNodes=function(a){var b=A(this[o.iApiIndex]);if(typeof a!="undefined")return typeof b.aoData[a]!="undefined"?b.aoData[a].nTr:null;return $(b)};this.fnGetPosition=function(a){var b=A(this[o.iApiIndex]),c=a.nodeName.toUpperCase();if(c=="TR")return U(b,a);else if(c=="TD"||c=="TH"){c=U(b,a.parentNode);for(var d=Q(b,c),f=0;f<b.aoColumns.length;f++)if(d[f]==a)return[c,pa(b,f),f]}return null};
+this.fnUpdate=function(a,b,c,d,f){var e=A(this[o.iApiIndex]);b=typeof b=="object"?U(e,b):b;if(i.isArray(a)&&typeof a=="object"){e.aoData[b]._aData=a.slice();for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(H(e,b,c),b,c,false,false)}else if(typeof a=="object"){e.aoData[b]._aData=i.extend(true,{},a);for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(H(e,b,c),b,c,false,false)}else{a=a;N(e,b,c,a);if(e.aoColumns[c].fnRender!==null){a=e.aoColumns[c].fnRender({iDataRow:b,iDataColumn:c,aData:e.aoData[b]._aData,
+oSettings:e});e.aoColumns[c].bUseRendered&&N(e,b,c,a)}if(e.aoData[b].nTr!==null)Q(e,b)[c].innerHTML=a}c=i.inArray(b,e.aiDisplay);e.asDataSearch[c]=na(e,da(e,b,"filter"));if(typeof f=="undefined"||f)ca(e);if(typeof d=="undefined"||d)ba(e);return 0};this.fnSetColumnVis=function(a,b,c){var d=A(this[o.iApiIndex]),f,e;e=d.aoColumns.length;var h,j;if(d.aoColumns[a].bVisible!=b){if(b){for(f=j=0;f<a;f++)d.aoColumns[f].bVisible&&j++;j=j>=X(d);if(!j)for(f=a;f<e;f++)if(d.aoColumns[f].bVisible){h=f;break}f=0;
+for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null)j?d.aoData[f].nTr.appendChild(d.aoData[f]._anHidden[a]):d.aoData[f].nTr.insertBefore(d.aoData[f]._anHidden[a],Q(d,f)[h])}else{f=0;for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null){h=Q(d,f)[a];d.aoData[f]._anHidden[a]=h;h.parentNode.removeChild(h)}}d.aoColumns[a].bVisible=b;L(d,d.aoHeader);d.nTFoot&&L(d,d.aoFooter);f=0;for(e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=X(d);if(typeof c=="undefined"||c){ca(d);C(d)}sa(d)}};this.fnPageChange=
+function(a,b){var c=A(this[o.iApiIndex]);ja(c,a);E(c);if(typeof b=="undefined"||b)C(c)};this.fnDestroy=function(){var a=A(this[o.iApiIndex]),b=a.nTableWrapper.parentNode,c=a.nTBody,d,f;a.bDestroying=true;d=0;for(f=a.aoColumns.length;d<f;d++)a.aoColumns[d].bVisible===false&&this.fnSetColumnVis(d,true);i(a.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>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;d<f;d++)a.aoData[d].nTr!==null&&c.appendChild(a.aoData[d].nTr);if(a.oFeatures.bAutoWidth===true)a.nTable.style.width=u(a.sDestroyWidth);
+i(">tr:even",c).addClass(a.asDestoryStrips[0]);i(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;d<f;d++)D[d]==a&&D.splice(d,1);a=null};this.fnAdjustColumnSizing=function(a){var b=A(this[o.iApiIndex]);ca(b);if(typeof a=="undefined"||a)this.fnDraw(false);else if(b.oScroll.sX!==""||b.oScroll.sY!=="")this.oApi._fnScrollDraw(b)};for(var ua in o.oApi)if(ua)this[ua]=r(ua);this.oApi._fnExternApiFunc=r;this.oApi._fnInitalise=s;this.oApi._fnInitComplete=w;this.oApi._fnLanguageProcess=y;this.oApi._fnAddColumn=
+G;this.oApi._fnColumnOptions=x;this.oApi._fnAddData=v;this.oApi._fnCreateTr=z;this.oApi._fnGatherData=Y;this.oApi._fnBuildHead=V;this.oApi._fnDrawHead=L;this.oApi._fnDraw=C;this.oApi._fnReDraw=ba;this.oApi._fnAjaxUpdate=za;this.oApi._fnAjaxUpdateDraw=Aa;this.oApi._fnAddOptionsHtml=xa;this.oApi._fnFeatureHtmlTable=Fa;this.oApi._fnScrollDraw=Ia;this.oApi._fnAjustColumnSizing=ca;this.oApi._fnFeatureHtmlFilter=Da;this.oApi._fnFilterComplete=M;this.oApi._fnFilterCustom=Ma;this.oApi._fnFilterColumn=La;
+this.oApi._fnFilter=Ka;this.oApi._fnBuildSearchArray=ka;this.oApi._fnBuildSearchRow=na;this.oApi._fnFilterCreateSearch=la;this.oApi._fnDataToSearch=ma;this.oApi._fnSort=R;this.oApi._fnSortAttachListener=ga;this.oApi._fnSortingClasses=T;this.oApi._fnFeatureHtmlPaginate=Ha;this.oApi._fnPageChange=ja;this.oApi._fnFeatureHtmlInfo=Ga;this.oApi._fnUpdateInfo=Na;this.oApi._fnFeatureHtmlLength=Ca;this.oApi._fnFeatureHtmlProcessing=Ea;this.oApi._fnProcessingDisplay=K;this.oApi._fnVisibleToColumnIndex=Ja;this.oApi._fnColumnIndexToVisible=
+pa;this.oApi._fnNodeToDataIndex=U;this.oApi._fnVisbleColumns=X;this.oApi._fnCalculateEnd=E;this.oApi._fnConvertToWidth=Oa;this.oApi._fnCalculateColumnWidths=ea;this.oApi._fnScrollingWidthAdjust=Qa;this.oApi._fnGetWidestNode=Pa;this.oApi._fnGetMaxLenString=Ra;this.oApi._fnStringToCss=u;this.oApi._fnArrayCmp=Va;this.oApi._fnDetectType=fa;this.oApi._fnSettingsFromNode=A;this.oApi._fnGetDataMaster=aa;this.oApi._fnGetTrNodes=$;this.oApi._fnGetTdNodes=Q;this.oApi._fnEscapeRegex=oa;this.oApi._fnDeleteIndex=
+ra;this.oApi._fnReOrderIndex=Ba;this.oApi._fnColumnOrdering=ha;this.oApi._fnLog=J;this.oApi._fnClearTable=ia;this.oApi._fnSaveState=sa;this.oApi._fnLoadState=Ta;this.oApi._fnCreateCookie=Sa;this.oApi._fnReadCookie=ta;this.oApi._fnDetectHeader=W;this.oApi._fnGetUniqueThs=S;this.oApi._fnScrollBarWidth=Ua;this.oApi._fnApplyToChildren=P;this.oApi._fnMap=n;this.oApi._fnGetRowData=da;this.oApi._fnGetCellData=H;this.oApi._fnSetCellData=N;this.oApi._fnGetObjectDataFn=Z;this.oApi._fnSetObjectDataFn=ya;var va=
+this;return this.each(function(){var a=0,b,c,d,f;a=0;for(b=D.length;a<b;a++){if(D[a].nTable==this)if(typeof g=="undefined"||typeof g.bRetrieve!="undefined"&&g.bRetrieve===true)return D[a].oInstance;else if(typeof g.bDestroy!="undefined"&&g.bDestroy===true){D[a].oInstance.fnDestroy();break}else{J(D[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).");
+return}if(D[a].sTableId!==""&&D[a].sTableId==this.getAttribute("id")){D.splice(a,1);break}}var e=new l;D.push(e);var h=false,j=false;a=this.getAttribute("id");if(a!==null){e.sTableId=a;e.sInstance=a}else e.sInstance=o._oExternConfig.iNextUnique++;if(this.nodeName.toLowerCase()!="table")J(e,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{e.nTable=this;e.oInstance=va.length==1?va:i(this).dataTable();e.oApi=va.oApi;e.sDestroyWidth=i(this).width();if(typeof g!=
+"undefined"&&g!==null){e.oInit=g;n(e.oFeatures,g,"bPaginate");n(e.oFeatures,g,"bLengthChange");n(e.oFeatures,g,"bFilter");n(e.oFeatures,g,"bSort");n(e.oFeatures,g,"bInfo");n(e.oFeatures,g,"bProcessing");n(e.oFeatures,g,"bAutoWidth");n(e.oFeatures,g,"bSortClasses");n(e.oFeatures,g,"bServerSide");n(e.oFeatures,g,"bDeferRender");n(e.oScroll,g,"sScrollX","sX");n(e.oScroll,g,"sScrollXInner","sXInner");n(e.oScroll,g,"sScrollY","sY");n(e.oScroll,g,"bScrollCollapse","bCollapse");n(e.oScroll,g,"bScrollInfinite",
+"bInfinite");n(e.oScroll,g,"iScrollLoadGap","iLoadGap");n(e.oScroll,g,"bScrollAutoCss","bAutoCss");n(e,g,"asStripClasses");n(e,g,"fnPreDrawCallback");n(e,g,"fnRowCallback");n(e,g,"fnHeaderCallback");n(e,g,"fnFooterCallback");n(e,g,"fnCookieCallback");n(e,g,"fnInitComplete");n(e,g,"fnServerData");n(e,g,"fnFormatNumber");n(e,g,"aaSorting");n(e,g,"aaSortingFixed");n(e,g,"aLengthMenu");n(e,g,"sPaginationType");n(e,g,"sAjaxSource");n(e,g,"sAjaxDataProp");n(e,g,"iCookieDuration");n(e,g,"sCookiePrefix");
+n(e,g,"sDom");n(e,g,"bSortCellsTop");n(e,g,"oSearch","oPreviousSearch");n(e,g,"aoSearchCols","aoPreSearchCols");n(e,g,"iDisplayLength","_iDisplayLength");n(e,g,"bJQueryUI","bJUI");n(e.oLanguage,g,"fnInfoCallback");typeof g.fnDrawCallback=="function"&&e.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"});typeof g.fnStateSaveCallback=="function"&&e.aoStateSave.push({fn:g.fnStateSaveCallback,sName:"user"});typeof g.fnStateLoadCallback=="function"&&e.aoStateLoad.push({fn:g.fnStateLoadCallback,sName:"user"});
+if(e.oFeatures.bServerSide&&e.oFeatures.bSort&&e.oFeatures.bSortClasses)e.aoDrawCallback.push({fn:T,sName:"server_side_sort_classes"});else e.oFeatures.bDeferRender&&e.aoDrawCallback.push({fn:T,sName:"defer_sort_classes"});if(typeof g.bJQueryUI!="undefined"&&g.bJQueryUI){e.oClasses=o.oJUIClasses;if(typeof g.sDom=="undefined")e.sDom='<"H"lfr>t<"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<b;a++)if(d.filter(":lt(2)").hasClass(e.asStripClasses[a])){c=true;break}if(c){e.asDestoryStrips=["",""];if(i(d[0]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[0]+=
+e.oClasses.sStripOdd+" ";if(i(d[0]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[0]+=e.oClasses.sStripEven;if(i(d[1]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[1]+=e.oClasses.sStripOdd+" ";if(i(d[1]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[1]+=e.oClasses.sStripEven;d.removeClass(e.asStripClasses.join(" "))}c=[];var k;a=this.getElementsByTagName("thead");if(a.length!==0){W(e.aoHeader,a[0]);c=S(e)}if(typeof g.aoColumns=="undefined"){k=[];a=0;for(b=c.length;a<b;a++)k.push(null)}else k=
+g.aoColumns;a=0;for(b=k.length;a<b;a++){if(typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b){if(k[a]===null)k[a]={};k[a].bVisible=g.saved_aoColumns[a].bVisible}G(e,c?c[a]:null)}if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;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<d;c++)if(typeof m[c]=="number"&&m[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<f;b++)if(m[c]=="_all"||i(e.aoColumns[b].nTh).hasClass(m[c]))x(e,b,g.aoColumnDefs[a])}}if(typeof k!="undefined"){a=0;for(b=k.length;a<b;a++)x(e,a,k[a])}a=0;for(b=e.aaSorting.length;a<b;a++){if(e.aaSorting[a][0]>=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;c<d;c++)if(e.aaSorting[a][1]==k.asSorting[c]){e.aaSorting[a][2]=c;break}}T(e);a=i(">thead",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;a<g.aaData.length;a++)v(e,g.aaData[a]);
+else Y(e);e.aiDisplay=e.aiDisplayMaster.slice();e.bInitialised=true;h===false&&s(e)}})}})(jQuery,window,document);
<dd>requests a particular format or set of formats in reporting availability</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item">
- ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item
+ <a href="ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item">
+ ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=GetRecords&id=1+2+99999">
- ilsdi.pl?service=GetRecords&id=1+2+99999
+ <a href="ilsdi.pl?service=GetRecords&id=1+2+99999">
+ ilsdi.pl?service=GetRecords&id=1+2+99999
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=GetAuthorityRecords&id=1+2+99999">
- ilsdi.pl?service=GetAuthorityRecords&id=1+2+99999
+ <a href="ilsdi.pl?service=GetAuthorityRecords&id=1+2+99999">
+ ilsdi.pl?service=GetAuthorityRecords&id=1+2+99999
</a>
<h4>Example Response</h4>
<pre><xml version="1.0" encoding="UTF-8">;
</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=LookupPatron&id=815&id_type=cardnumber">
- ilsdi.pl?service=LookupPatron&id=815&id_type=cardnumber
+ <a href="ilsdi.pl?service=LookupPatron&id=815&id_type=cardnumber">
+ ilsdi.pl?service=LookupPatron&id=815&id_type=cardnumber
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>user's password</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=AuthenticatePatron&username=john9&password=soul">
- ilsdi.pl?service=AuthenticatePatron&username=john9&password=soul
+ <a href="ilsdi.pl?service=AuthenticatePatron&username=john9&password=soul">
+ ilsdi.pl?service=AuthenticatePatron&username=john9&password=soul
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>whether or not to return loan information in the response</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=GetPatronInfo&patron_id=1&show_contact=0&show_loans=1">
- ilsdi.pl?service=GetPatronInfo&patron_id=1&show_contact=0&show_loans=1
+ <a href="ilsdi.pl?service=GetPatronInfo&patron_id=1&show_contact=0&show_loans=1">
+ ilsdi.pl?service=GetPatronInfo&patron_id=1&show_contact=0&show_loans=1
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>the unique patron identifier in the ILS; the same identifier returned by LookupPatron or AuthenticatePatron</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=GetPatronStatus&patron_id=1">
- ilsdi.pl?service=GetPatronStatus&patron_id=1
+ <a href="ilsdi.pl?service=GetPatronStatus&patron_id=1">
+ ilsdi.pl?service=GetPatronStatus&patron_id=1
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>system item identifier</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=GetServices&patron_id=1&item_id=1">
- ilsdi.pl?service=GetServices&patron_id=1&item_id=1
+ <a href="ilsdi.pl?service=GetServices&patron_id=1&item_id=1">
+ ilsdi.pl?service=GetServices&patron_id=1&item_id=1
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>the date the patron would like the item returned by</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=RenewLoan&patron_id=1&item_id=1">
- ilsdi.pl?service=RenewLoan&patron_id=1&item_id=1
+ <a href="ilsdi.pl?service=RenewLoan&patron_id=1&item_id=1">
+ ilsdi.pl?service=RenewLoan&patron_id=1&item_id=1
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>date after which item returned to shelf if item is not picked up</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=127.0.0.1">
- ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=127.0.0.1
+ <a href="ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=127.0.0.1">
+ ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=127.0.0.1
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>date after which item returned to shelf if item is not picked up</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1">
- ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1
+ <a href="ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1">
+ ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<dd>system item identifier</dd>
</dl>
<h4>Example Call</h4>
- <a href="ilsdi.pl?service=CancelHold&patron_id=1&item_id=1">
- ilsdi.pl?service=CancelHold&patron_id=1&item_id=1
+ <a href="ilsdi.pl?service=CancelHold&patron_id=1&item_id=1">
+ ilsdi.pl?service=CancelHold&patron_id=1&item_id=1
</a>
<h4>Example Response</h4>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<ul>
<li>HarvestBibliographicRecords <em>(Use OAI-PMH instead)</em></li>
<li>HarvestExpandedRecords <em>(Use OAI-PMH instead)</em></li>
- <li><a href="ilsdi.pl?service=Describe&verb=GetAvailability">GetAvailability</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=GetAvailability">GetAvailability</a></li>
<li>GoToBibliographicRequestPage <em>(Use OPAC instead)</em></li>
</ul>
<h2>Level 2: Elementary OPAC supplement</h2>
<ul>
<li>HarvestAuthorityRecords <em>(Use OAI-PMH instead)</em></li>
<li>HarvestHoldingsRecords <em>(Use OAI-PMH instead)</em></li>
- <li><a href="ilsdi.pl?service=Describe&verb=GetRecords">GetRecords</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=GetRecords">GetRecords</a></li>
<li>Search <em>(Use SRU instead)</em></li>
<li>Scan <em>(Use SRU instead)</em></li>
- <li><a href="ilsdi.pl?service=Describe&verb=GetAuthorityRecords">GetAuthorityRecords</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=GetAuthorityRecords">GetAuthorityRecords</a></li>
<li>OutputRewritablePage <em>(Not supported yet)</em></li>
<li>OutputIntermediateFormat <em>(Not supported yet)</em></li>
</ul>
<h2>Level 3: Elementary OPAC alternative</h2>
<ul>
- <li><a href="ilsdi.pl?service=Describe&verb=LookupPatron">LookupPatron</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=AuthenticatePatron">AuthenticatePatron</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=GetPatronInfo">GetPatronInfo</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=GetPatronStatus">GetPatronStatus</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=GetServices">GetServices</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=RenewLoan">RenewLoan</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=HoldTitle">HoldTitle</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=HoldItem">HoldItem</a></li>
- <li><a href="ilsdi.pl?service=Describe&verb=CancelHold">CancelHold</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=LookupPatron">LookupPatron</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=AuthenticatePatron">AuthenticatePatron</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=GetPatronInfo">GetPatronInfo</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=GetPatronStatus">GetPatronStatus</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=GetServices">GetServices</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=RenewLoan">RenewLoan</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=HoldTitle">HoldTitle</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=HoldItem">HoldItem</a></li>
+ <li><a href="ilsdi.pl?service=Describe&verb=CancelHold">CancelHold</a></li>
<li>RecallItem <em>(Not supported by Koha)</em></li>
<li>CancelRecall <em>(Not supported by Koha)</em></li>
</ul>
</div>
<div class="yui-u">
<div id="ulactioncontainer" class="container">
-<ul id="action">
-[% UNLESS ( norequests ) %]
- [% IF ( opacuserlogin ) %]
- [% IF ( RequestOnOpac ) %]
- [% IF ( AllowOnShelfHolds ) %]
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
- [% ELSE %]
- [% IF ( ItemsIssued ) %]
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
- [% END %]
- [% END %]
+[% INCLUDE 'opac-detail-sidebar.inc' %]
- [% END %]
- [% END %]
-[% END %]
- <li><a class="print" href="#" onclick="window.print();">Print</a></li>
-[% IF ( virtualshelves ) %]
- [% IF ( opacuserlogin ) %] [% IF ( loggedinusername ) %]
- <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
- Save to Your Lists
- </a></li>
- [% END %][% END %]
-[% END %]
- [% IF ( opacbookbag ) %]<li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">
- Add to Your Cart
- </a></li>[% END %]
- <li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
-</ul>
-
-[% IF ( OPACSearchForTitleIn ) %]
-<div id="furtherm" class="yuimenu">
-<div class="bd">
-<h4>Search for this title in:</h4>
-<ul class="first-of-type">
-
-[% OPACSearchForTitleIn %]
-
-</ul>
-</div>
-</div>
-[% END %]
-
- <div id="export">
- <form method="get" action="/cgi-bin/koha/opac-export.pl">
- <label for="format">Save Record:</label>
- <select name="format" id="format">
- <option value="">-- Choose Format --</option>
- <option value="bibtex">BibTex</option>
- <option value="dc">Dublin Core (XML)</option>
- <option value="marcxml">MARCXML</option>
- <option value="marc8">MARC (non-Unicode/MARC-8)</option>
- <option value="utf8">MARC (Unicode/UTF-8)</option>
- <option value="mods">MODS (XML)</option>
- <option value="ris">RIS</option>
- </select><input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
-<input type="submit" name="save" value="Go" /></form></div>
</div>
</div>
</div>
</div>
<div class="yui-u">
<div id="ulactioncontainer" class="container">
-<ul id="action">
-[% UNLESS ( norequests ) %]
- [% IF ( opacuserlogin ) %]
- [% IF ( RequestOnOpac ) %]
- [% IF ( AllowOnShelfHolds ) %]
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
- [% ELSE %]
- [% IF ( ItemsIssued ) %]
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
- [% END %]
- [% END %]
-
- [% END %]
- [% END %]
-[% END %]
- <li><a class="print" href="#" onclick="window.print();">
- Print
- </a></li>
-[% IF ( virtualshelves ) %]
- [% IF ( opacuserlogin ) %] [% IF ( loggedinusername ) %]
- <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
- Save to Your Lists
- </a></li>
- [% END %][% END %]
-[% END %]
- [% IF ( opacbookbag ) %]<li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">
- Add to Your Cart
- </a></li>[% END %]
- <li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
-</ul>
-
-[% IF ( OPACSearchForTitleIn ) %]
-<div id="furtherm" class="yuimenu">
-<div class="bd">
-<h4>Search for this title in:</h4>
-<ul class="first-of-type">
-
-[% OPACSearchForTitleIn %]
-
-</ul>
-</div>
-</div>
-[% END %]
+[% INCLUDE 'opac-detail-sidebar.inc' %]
- <div id="export">
- <form method="get" action="/cgi-bin/koha/opac-export.pl">
- <label for="format">Save Record:</label>
- <select name="format" id="format">
- <option value="">-- Choose Format --</option>
- <option value="mods">MODS (XML)</option>
- <option value="dc">Dublin Core (XML)</option>
- <option value="marcxml">MARCXML</option>
- <option value="marc8">MARC (non-Unicode/MARC-8)</option>
- <option value="utf8">MARC (Unicode/UTF-8)</option> </select><input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
-<input type="submit" name="save" value="Go" /></form></div>
</div>
</div>
</div>
<th>Full Heading</th>
</tr>
[% FOREACH resul IN result %]
- <tr>
+ [% UNLESS ( loop.odd ) %]
+ <tr class="highlight">
+ [% ELSE %]
+ <tr>
+ [% END %]
<td>[% resul.summary %]</td>
<td>
<li><a class="download" href="opac-basket.pl" onclick="downloadBasket(); return false;">Download</a></li>
<li><a class="print" href="opac-basket.pl" onclick="printBasket(); return false;">Print</a></li>
<li><a class="empty" href="opac-basket.pl" onclick="delBasket(); return false;">Empty and Close</a></li>
- <li><a class="hide" href="opac-basket.pl" onclick="quit(); return false;">Hide Window</a></li>
+ <li><a class="hide close" href="opac-basket.pl">Hide Window</a></li>
</ul>
</div>
[% END %]
-[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield %][% END %]
+[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/JavaScript" language="JavaScript">
[% IF OpenLibraryCovers %]
KOHA.OpenLibrary.GetCoverFromIsbn();
[% END %]
+ [% IF OPACLocalCoverImages %]
+ KOHA.LocalCover.GetCoverFromBibnumber(true);
+ [% END %]
[% IF ( NovelistSelectProfile ) %]
novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){});
[% END %]
<div id="catalogue_detail_biblio">
<div id="bookcover">
+ [% IF ( OPACLocalCoverImages ) %]<div style="block" title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>[% END %]
[% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( OPACurlOpenInNewWindow ) %]<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"><img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="Cover Image" /></a>[% ELSE %]<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="Cover Image" /></a>[% END %][% END %][% END %]
[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( content_identifier_exists ) %][% IF ( using_https ) %]
[% IF ( OPACXSLTDetailsDisplay ) %]
[% XSLTBloc %]
[% ELSE %]
- <h1 class="title">[% title |html %][% IF ( subtitle ) %] <span class="subtitle">[% FOREACH subtitl IN subtitle %][% subtitl.subfield %] [% END %]</span>[% END %]</h1>
+ <h1 class="title">[% title |html %][% IF ( subtitle ) %] <span class="subtitle">[% FOREACH subtitl IN subtitle %][% subtitl.subfield |html %] [% END %]</span>[% END %]</h1>
[% IF ( author ) %]<h5 class="author">by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% author |url %]">[% author |html %]</a></h5>[% END %]
<span class="results_summary">[% UNLESS ( item_level_itypes ) %]
[% ELSE %]<li>[% END %]
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]#serialcollection">Serial Collection</a></li>
[% END %]
+
+ [% IF ( OPACLocalCoverImages ) %][% IF ( localimages ) %]<li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]#images">Images</a></li>[% END %][% END %]
</ul>
[% IF ( serialcollection ) %]
[% IF ( MARCNOTES ) %]
[% FOREACH MARCNOTE IN MARCNOTES %]
- <p>[% MARCNOTE.marcnote %]</p>
+ <p>[% MARCNOTE.marcnote FILTER html_line_break %]</p>
[% END %]
[% ELSE %]
[% IF ( notes ) %]
[% IF ( review.your_comment ) %]
<div class="commentline yours" id="c[% review.reviewid %]">
[% IF ( review.avatarurl ) %]
- <img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
+ <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
[% END %]
<h5>
Your Comment
</h5>
<small>[% review.datereviewed %]</small>
<p>
- [% review.review %]
+ [% FILTER html_break %]
+ [% review.review |html %]
+ [% END %]
<a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=[% review.biblionumber %]&reviewid=[% review.reviewid %]');">Edit</a>
</p></div>
[% ELSE %]
<div class="commentline">
[% IF ( ShowReviewer ) %]
[% IF ( review.avatarurl ) %]
- <img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
+ <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
[% END %]
<h5>
Comment by
[% END %]
<small>[% review.datereviewed %]</small>
<p>
- [% review.review %]
+ [% FILTER html_break %]
+ [% review.review |html %]
+ [% END %]
</p></div>
[% END %]
[% END %]
[% END %]
+[% IF ( OPACLocalCoverImages ) %]
+<div id="images">
+<p>Click on an image to view it in the image viewer</p>
+[% FOREACH image IN localimages %]
+[% IF image %]
+<a class="localimage" href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image %]" /></a>
+[% END %]
+[% END %]
+</div>
+[% END %]
+
+
</div>
[% IF ( NovelistSelectProfile ) %][% IF ( NovelistSelectView == 'below' ) %]
<div id="NovelistSelect">
[% END %]
</div>
[% END %]
-<ul id="action">
-
-[% UNLESS ( norequests ) %]
- [% IF ( opacuserlogin ) %]
- [% IF ( RequestOnOpac ) %]
- [% IF ( AllowOnShelfHolds ) %]
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
- [% ELSE %]
- [% IF ( ItemsIssued ) %]
- <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
- [% END %]
- [% END %]
- [% END %]
- [% END %]
-[% END %]
- <li><a class="print" href="#" onclick="window.print();">Print</a></li>
-[% IF ( virtualshelves ) %]
- [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %]
- <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
- Save to Your Lists
- </a></li>
- [% END %][% END %]
-[% END %]
- [% IF ( opacbookbag ) %]<li><a class="addtocart" href="#" onclick="addRecord('[% biblionumber %]'); return false;">Add to Your Cart</a></li>[% END %]
- <li style="display:none;"><a href="#" id="furthersearches">More searches</a></li>
-</ul>
-[% IF ( OPACSearchForTitleIn ) %]
-<div id="furtherm" class="yuimenu">
-<div class="bd">
-<h4>Search for this title in:</h4>
-<ul class="first-of-type">
-
-[% OPACSearchForTitleIn %]
-
-</ul>
-</div>
-</div>
-[% END %]
-
- <div id="export" class="detailtagcell">
- <form method="get" action="/cgi-bin/koha/opac-export.pl">
- <label for="format">Save Record:</label>
- <select name="format" id="format">
- <option value="">-- Choose Format --</option>
- <option value="bibtex">BIBTEX</option>
- <option value="dc">Dublin Core (XML)</option>
- <option value="marcxml">MARCXML</option>
- <option value="marc8">MARC (non-Unicode/MARC-8)</option>
- <option value="utf8">MARC (Unicode/UTF-8)</option>
- <option value="mods">MODS (XML)</option>
- <option value="ris">RIS</option>
- </select><input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
-<input type="submit" name="save" value="Go" /></form>
- </div>
+[% INCLUDE 'opac-detail-sidebar.inc' %]
[% IF ( NovelistSelectProfile ) %] [% IF ( NovelistSelectView == 'right') %]
<div id="NovelistSelect">
--- /dev/null
+[% INCLUDE 'doc-head-open.inc' %]
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Images for: [% biblio.title |html %]
+[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript">
+//<![CDATA[
+
+$(document).ready(function(){
+ $("#largeCoverImg").attr("src","/opac-tmpl/prog/images/loading.gif");
+ showCover([% imagenumber %]);
+});
+
+function showCover(img) {
+ $('.thumbnail').attr('class', 'thumbnail');
+ $('#largeCoverImg').attr('src', '/cgi-bin/koha/opac-image.pl?imagenumber=' + img);
+ $('#' + img + '.thumbnail').attr('class', 'thumbnail selected');
+}
+//]]>
+</script>
+<style type="text/css">
+#largeCoverImg {
+ border : 1px solid #CCCCCC;
+ display : block;
+ margin : auto;
+ padding : 1em;
+}
+#thumbnails {
+ text-align : center;
+}
+#thumbnails a img {
+ border : 2px solid #8EB3E7;
+}
+img.thumbnail {
+ display : block;
+ float : none;
+ padding : .5em;
+}
+
+#thumbnails a img.selected {
+ border-color: black;
+ cursor : default;
+ opacity:0.4;
+ filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+</style>
+</head>
+<body id="opac-imageviewer">
+[% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
+ <div id="bd">
+[% INCLUDE 'masthead.inc' %]
+ <div id="yui-main">
+ <div class="yui-b">
+ <div class="yui-ge">
+ <div class="container">
+ <h1 class="title">Images for [% IF ( BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
+ [% ELSE %]
+ [% IF ( BiblioDefaultViewisbd ) %]<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
+ [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
+ [% END %]
+ [% END %][% biblio.title %]</a> [% biblio.author %]</h1>
+ <div class="yui-u first">
+
+ <div id="largeCover"><img id="largeCoverImg" alt="" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% imagenumber %]" /></div></div>
+
+ [% IF OPACLocalCoverImages == 1 %]
+ <div class="yui-u"><div id="thumbnails">
+ [% FOREACH img IN images %]
+ [% IF img %]
+ <a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% img %]" onclick="showCover([% img %]); return false;">
+ [% IF ( imagenumber == img ) %]<img class="thumbnail selected" id="[% img %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% img %]&thumbnail=1" alt="Thumbnail"/>
+ [% ELSE %]
+ <img class="thumbnail" id="[% img %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% img %]&thumbnail=1" alt="Thumbnail"/>
+ [% END %]
+ </a>
+ [% END %]
+ [% END %]
+ </div></div>
+ </div>
+[% ELSE %]
+Unfortunately, images are not enabled for this catalog at this time.
+[% END %]
+
+</div>
+</div>
+</div>
+[% IF ( OpacNav ) %]
+<div class="yui-b"><div id="leftmenus" class="container">
+[% INCLUDE 'navigation.inc' %]
+</div></div>
+[% END %]
+</div>
+[% INCLUDE 'opac-bottom.inc' %]
[% IF ( rss2 ) %]
<rss version="2.0"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><![CDATA[[% LibraryName |html %] Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc |html %]'[% END %]]]></title>
<link>[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&format=rss2</link>
- <atom:link rel="self" type="application/rss+xml" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&format=rss2" />
+ <atom:link rel="self" type="application/rss+xml" href="[% OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&sort_by=[% sort_by |html %]&format=rss2"/>
<description><![CDATA[ Search results [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc |html %]'[% END %] at [% LibraryName |html %]]]></description>
<opensearch:totalResults>[% total %]</opensearch:totalResults>
<opensearch:startIndex>[% offset %]</opensearch:startIndex>
[% ELSE %]
<opensearch:itemsPerPage>20</opensearch:itemsPerPage>
[% END %]
- <atom:link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?format=opensearchdescription"/>
- <opensearch:Query role="request" searchTerms="[% query_desc |html %] [% limit_desc |html %]" startPage="[% page %]" />
[% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
+ <atom:link rel="search" type="application/opensearchdescription+xml" href="[% SEARCH_RESULT.OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi |html %][% SEARCH_RESULT.limit_cgi |html %]&sort_by=[% SEARCH_RESULT.sort_by |html %]&format=opensearchdescription"/>
+ <opensearch:Query role="request" searchTerms="[% SEARCH_RESULT.query_desc |url %][% SEARCH_RESULT.limit_desc |url %]" startPage="[% SEARCH_RESULT.page %]" />
<item>
<title>[% SEARCH_RESULT.title |html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield |html %][% END %]</title>
- <isbn>[% SEARCH_RESULT.isbn |html %]</isbn>
+ <dc:identifier>ISBN [% SEARCH_RESULT.isbn |html %]</dc:identifier>
<link>[% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %][% OPACBaseURL %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% ELSE %][% IF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %][% OPACBaseURL %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% ELSE %][% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% END %][% END %]</link>
<description><![CDATA[
[% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="http://images.amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" />[% END %][% END %][% END %]
-
-[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %][% IF ( using_https ) %]<img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&client=[% SyndeticsClientCode %]&type=xw10&upc=[% SEARCH_RESULT.normalized_upc %]&oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" />
+[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %]<img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&client=[% SEARCH_RESULT.SyndeticsClientCode %]&type=xw10[% IF ( SEARCH_RESULT.normalized_upc ) %]&upc=[% SEARCH_RESULT.normalized_upc %][% END %][% IF ( SEARCH_RESULT.normalized_oclc ) %]&oclc=[% SEARCH_RESULT.normalized_oclc %][% END %]" alt="" />
[% ELSE %]
<img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&client=[% SyndeticsClientCode %]&type=xw10&upc=[% SEARCH_RESULT.normalized_upc %]&oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" />
-[% END %][% END %][% END %][% END %]
+[% END %][% END %][% END %]
[% IF ( BakerTaylorEnabled ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<a href="https://[% BakerTaylorBookstoreURL |html %][% SEARCH_RESULT.normalized_isbn %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% SEARCH_RESULT.normalized_isbn %]" /></a>[% END %][% END %]
<p>[% IF ( SEARCH_RESULT.author ) %]By [% SEARCH_RESULT.author |html %]. [% END %]
[% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size |html %]. [% END %]
[% IF ( SEARCH_RESULT.isbn ) %] [% SEARCH_RESULT.isbn |html %][% END %] </p><p>
[% IF ( RequestOnOpac ) %]
-<a href="[% OPACBaseURL %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Place Hold on <i>[% SEARCH_RESULT.title |html %]</i></a></p>
+<a href="[% SEARCH_RESULT.OPACBaseurl %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Place Hold on <i>[% SEARCH_RESULT.title %]</i></a></p>
[% END %]
]]></description>
<guid>[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]</guid>
<opensearch:itemsPerPage>20</opensearch:itemsPerPage>
[% END %]
<opensearch:Query role="request" searchTerms="[% query_desc |html %] [% limit_desc |html %]" startPage="[% page |html %]" />
- <link rel="alternate" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]pw=[% page %]" type="text/html"/>
+ <link rel="alternate" href="[% OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=[% page %]&format=atom" type="application/atom+xml"/>
<link rel="self" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]&format=atom" type="application/atom+xml"/>
<link rel="first" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=1&format=atom" type="application/atom+xml"/>
<link rel="previous" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=2&format=atom" type="application/atom+xml"/>
<link rel="next" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=4&format=atom" type="application/atom+xml"/>
- <link rel="last" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]pw=42299&format=atom" type="application/atom+xml"/>
+ <link rel="last" href="[% OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=42299&format=atom" type="application/atom+xml"/>
<link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?format=opensearchdescription"/>
[% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
<td>[% itemLoo.enumchron %]</td>
[% END %]
<td>
- [% IF ( itemLoo.date_due ) %]
- <span class="checkedout">Due [% itemLoo.date_due %]</span>
+ [% IF ( itemLoo.dateDue ) %]
+ <span class="checkedout">Due [% itemLoo.dateDue %]</span>
[% ELSIF ( itemLoo.transfertwhen ) %]
<span class="intransit">In transit from [% itemLoo.transfertfrom %],
to [% itemLoo.transfertto %], since [% itemLoo.transfertwhen %]</span>
param1 += "<option id=\"s[% addbarshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addbarshelvesloo.shelfname |html %]<\/option>";[% END %]
[% IF ( bartotal ) %]param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";[% END %]
param1 += "<\/optgroup>";[% END %]
- [% IF ( addpubshelves ) %]param1 += "<optgroup label=\""+_("Public Lists:")+"\">"[% FOREACH addpubshelvesloo IN addpubshelvesloop %]+"<option id=\"s[% addpubshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addpubshelvesloo.shelfname |html %]<\/option>";[% END %][% END %]
+ [% IF ( addpubshelves ) %]param1 += "<optgroup label=\""+_("Public Lists:")+"\">"[% FOREACH addpubshelvesloo IN addpubshelvesloop %]+"<option id=\"s[% addpubshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addpubshelvesloo.shelfname |html %]<\/option>"[% END %];[% END %]
param1 += "<\/optgroup>";
param1 += "<option value=\"newlist\">[ "+_("New List")+" ]<\/option>";
[% END %]
[% END %]
[% END %][% END %]
[% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
+ [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
});
//]]>
<td class="select selectcol">[% IF ( opacbookbag ) %]<input type="checkbox" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" /> <label for="bib[% SEARCH_RESULT.biblionumber %]"></label>[% ELSE %]
[% IF ( virtualshelves ) %]<input type="checkbox" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" /> <label for="bib[% SEARCH_RESULT.biblionumber %]"></label>[% ELSE %]
[% IF ( RequestOnOpac ) %][% UNLESS ( SEARCH_RESULT.norequests ) %][% IF ( opacuserlogin ) %]<input type="checkbox" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" /> <label for="bib[% SEARCH_RESULT.biblionumber %]"></label>[% END %][% END %][% END %][% END %][% END %]</td>
- <td class="select selectcol">[% SEARCH_RESULT.result_number %].</td>
[% UNLESS ( item_level_itypes ) %]
[% UNLESS ( noItemTypeImages ) %]
[% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber |url %]" title="View details for this title">
[% END %]
[% END %]
- [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %][% subtitl.subfield %][% END %]</a>
+ [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield|html %][% END %]</a>
[% IF ( SEARCH_RESULT.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author |url %]" title="Search for works by this author" class="author">[% SEARCH_RESULT.author %]</a>
[% ELSE %]
[% END %]
<span class="results_summary"><span class="label">Publication:</span>
- [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %]
+ [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode|html %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %]
[% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %][% END %]
[% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages %][% END %]
- [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes %][% END %]
+ [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes|html %][% END %]
[% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size %][% END %]
[% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %]
</span>
[% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %]
[% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %]
[% IF ( TagsShowOnList ) %]
- <div class="results_summary">
[% IF ( SEARCH_RESULT.TagLoop.size ) %]
- <span class="label">Tags:</span>
+ <div class="results_summary"><span class="label">Tags:</span>
<ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
[% END %]
</ul>
[% END %]
[% IF ( TagsInputOnList ) %]
[% IF ( loggedinusername ) %]
- <form name="tagform[% SEARCH_RESULT.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl">
<span class="label">New tag:</span>
<input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" />
<input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" />
- </form>
<span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;">
Tag status here.
</span>
</span>
</td><td>
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">
+ [% IF ( OPACLocalCoverImages ) %]<span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>[% END %]
[% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="http://images.amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %][% END %]
[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %]
$("#addtags").html("<a id=\"tagsel_tag\" href=\"#\">"+_("Tag")+"<\/a> |");
$(".tagbutton").click(KOHA.Tags.add_tag_button);
- [% IF ( TagsInputOnList ) %]
[% IF ( loggedinusername ) %]
$("#tagsel_tag").click(function(){
tagSelected();
return false;
});
[% END %]
- [% END %]
[% END %][% END %][% END %]
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
});
[% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
[% END %]
[% END %]
- [% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield %][% END %]</a>
+ [% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield|html %][% END %]</a>
[% IF ( itemsloo.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author %]</a>
[% ELSE %]
[% END %]
<span class="results_summary"><span class="label">Publication:</span>
- [% IF ( itemsloo.place ) %][% itemsloo.place %] [% END %][% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %][% IF ( itemsloo.publicationyear ) %] [% itemsloo.publicationyear %]
+ [% IF ( itemsloo.place ) %][% itemsloo.place %] [% END %][% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode|html %][% END %][% IF ( itemsloo.publicationyear ) %] [% itemsloo.publicationyear %]
[% ELSE %][% IF ( itemsloo.copyrightdate ) %] [% itemsloo.copyrightdate %][% END %][% END %]
[% IF ( itemsloo.pages ) %]. [% itemsloo.pages %][% END %]
- [% IF ( itemsloo.notes ) %], [% itemsloo.notes %][% END %]
+ [% IF ( itemsloo.notes ) %], [% itemsloo.notes|html %][% END %]
[% IF ( itemsloo.size ) %] [% itemsloo.size %][% END %]
</span>
<span class="results_summary"><span class="label">Holdings:</span>[% IF ( itemsloo.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
[% END %][% ELSE %]This record has no items.[% END %]</span>
[% END %]
[% IF ( TagsEnabled ) %]
- [% IF ( TagsShowOnList ) %]
- [% IF ( itemsloo.TagLoop ) %]
- <div class="results_summary">
- <span class="label">Tags:</span>
- <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN itemsloo.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
- [% END %]
- </ul>
- [% END %]
+ [% IF ( TagsShowOnList ) %]
+ [% IF ( itemsloo.TagLoop.size ) %]
+ <div class="results_summary">
+ <span class="label">Tags:</span>
+ <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN itemsloo.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
+ [% END %]
+ </ul>
+ </div>
+ [% END %]
+ [% END %]
[% IF ( TagsInputOnList ) %]
[% IF ( loggedinusername ) %]
- <form name="tagform[% itemsloo.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl">
<label for="newtag[% itemsloo.biblionumber %]">New tag:</label>
<input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
<input name="tagbutton" class="tagbutton" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
- </form>
<span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
Tag status here.
</span>
[% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span>
[% END %]
+ [% ELSE %]
+ [% IF ( loggedinusername ) %]
+ <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none;">Tag status here.</span>
+ [% END %]
[% END %]
- [% IF ( itemsloo.TagLoop ) %]
- </div>[% END %]
[% END %]
- [% END %]
<span class="results_summary actions"><span class="label">Actions:</span>
[% IF ( RequestOnOpac ) %]
[% IF ( opacbookbag ) %]<a class="addtocart" href="#" onclick="addRecord('[% itemsloo.biblionumber %]'); return false;">Add to Cart</a>[% ELSE %]nocart[% END %]
</span>
-
-
- <!-- COinS / Openurl -->
<!-- COinS / Openurl --><span class="Z3988" title="[% itemsloo.coins %]"></span>
- [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<br/>
- <div id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</div>[% END %][% END %][% END %]
</td>
<td>
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber %]">
<div id="bd">
[% INCLUDE 'masthead.inc' %]
<div id="yui-main">
- <div class="yui-b"><div id="usershowreviews" class="container">
+ <div id="usershowreviews" class="container">
<div id="recentcomments" class="searchresults">
<h3>Recent comments</h3>
<table>
[% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
[% END %]
[% END %]
- [% IF ( review.title ) %][% review.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield %][% END %]</a>
+ [% IF ( review.title ) %][% review.title %][% ELSE %]No title[% END %] [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield |html %][% END %]</a>
[% IF ( review.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author %]</a></p>
[% END %]
<p>
<p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
[% IF ( review.avatarurl ) %]
- <img class="avatar" src="[% review.avatarurl %]" height="40" width="40"/>
+ <img class="avatar" src="[% review.avatarurl %]" height="40" width="40" alt="" />
[% END %]
+ [% FILTER html_break %]
[% review.review |html %]
+ [% END %]
<span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
[% IF ( ShowReviewer ) %] by
[% review.firstname %] [% review.surname %][% END %][% END %]</span></p>
</td>
<td>
- <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber %]">
-
[% IF ( review.BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
[% ELSE %]
[% IF ( review.BiblioDefaultViewisbd ) %]<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
</div>
</div>
</div>
-</div>
[% IF ( OpacNav ) %]
<div class="yui-b"><div id="leftmenus" class="container">
[% INCLUDE 'navigation.inc' %]
});
$("#overduest").tablesorter();
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
- [% IF ( OpacRenewalAllowed ) %][% IF ( canrenew ) %]$("#renewselected").submit(function(){
+ [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]$("#renewselected").submit(function(){
valid = false;
$("input[type=checkbox]").each(function(){
if($(this).is(':checked')){
$("#renewall_link").live('click',function(){
$("#renewall").submit();
});
- $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %][% END %]
+ $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
});
//]]>
</script>
[% IF ( BORROWER_INF.flagged ) %]
<div class="dialog alert">
<ul>
- [% IF ( BORROWER_INF.debarred ) %]
- <li><strong>Please note:</strong> 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 <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
+ [% IF ( userdebarred ) %]
+ <li><strong>Please note:</strong> 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 <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
[% END %]
[% IF ( BORROWER_INF.gonenoaddress ) %]
<li><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
</tr>
[% END %]</tbody>
</table>
- [% IF ( canrenew ) %]
- [% IF ( OpacRenewalAllowed ) %]
+ [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
<input type="submit" value="Renew Selected" />
[% END %]
- [% END %]
</form>
- [% IF ( OpacRenewalAllowed ) %]
- [% IF ( canrenew ) %]
+ [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
<form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
<input type="hidden" name="from" value="opac_user" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
[% UNLESS patron_flagged %]<input type="submit" value="Renew All" />[% END %]
</form>
[% END %]
- [% END %]
[% ELSE %]
<table>
<tr><td>You have nothing checked out</td></tr>
<span class="results_summary series"><span class="label">Series: </span>
<!-- 440 -->
<xsl:for-each select="marc:datafield[@tag=440]">
- <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
<!-- 490 Series not traced, Ind1 = 0 -->
<xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
- <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
<xsl:if test="marc:datafield[@tag=490][@ind1=1]">
<xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
<xsl:choose>
- <xsl:when test="marc:subfield[@code='w']">
+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
<a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
</a>
</xsl:when>
<xsl:otherwise>
- <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
</span>
</xsl:if>
+
+ <xsl:if test="marc:datafield[@tag=242]">
+ <span class="results_summary translated_title"><span class="label">Title translated: </span>
+ <xsl:for-each select="marc:datafield[@tag=242]">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abchnp</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+
<!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
<xsl:if test="$display880">
<xsl:call-template name="m880Select">
</span>
</xsl:for-each>
- <!-- 866 holdings public note -->
+ <!-- 866 textual holdings -->
<xsl:if test="marc:datafield[@tag=866]">
- <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
- <xsl:for-each select="marc:datafield[@tag=866]">
- <xsl:value-of select="marc:subfield[@code='z']"/>
- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
- </xsl:for-each>
- </span>
+ <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
+ <xsl:for-each select="marc:datafield[@tag=866]">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">az</xsl:with-param>
+ </xsl:call-template>
+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+ </xsl:for-each>
+ </span>
</xsl:if>
<!-- 775 Other Edition -->
</xsl:for-each>
</span>
</xsl:if>
+ <xsl:if test="marc:datafield[@tag=242]">
+ <span class="results_summary">
+ <span class="label">Title translated: </span>
+ <xsl:for-each select="marc:datafield[@tag=242]">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abh</xsl:with-param>
+ </xsl:call-template>
+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
<xsl:if test="marc:datafield[@tag=856]">
<span class="results_summary">
<span class="label">Online Access: </span>
</xsl:template>
<xsl:template match="marc:record">
- <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="biblionumber" select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/>
-
+ <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']" />
+ <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindo w']"/>
+ <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
+ <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
<xsl:if test="marc:datafield[@tag=200]">
<xsl:for-each select="marc:datafield[@tag=200]">
<h1>
<xsl:call-template name="addClassRtl" />
- <xsl:variable name="title" select="marc:subfield[@code='a']"/>
- <xsl:variable name="ntitle"
- select="translate($title, '˜œ','')"/>
- <xsl:value-of select="$ntitle" />
- <xsl:if test="marc:subfield[@code='e']">
- <xsl:text> : </xsl:text>
- <xsl:for-each select="marc:subfield[@code='e']">
- <xsl:value-of select="."/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='b']">
- <xsl:text> [</xsl:text>
- <xsl:value-of select="marc:subfield[@code='b']"/>
- <xsl:text>]</xsl:text>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='f']">
- <xsl:text> / </xsl:text>
- <xsl:value-of select="marc:subfield[@code='f']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='g']">
- <xsl:text> ; </xsl:text>
- <xsl:value-of select="marc:subfield[@code='g']"/>
- </xsl:if>
+ <xsl:for-each select="marc:subfield">
+ <xsl:choose>
+ <xsl:when test="@code='a'">
+ <xsl:variable name="title" select="."/>
+ <xsl:variable name="ntitle"
+ select="translate($title, 'ˆ‰˜œ','')"/>
+ <xsl:value-of select="$ntitle" />
+ </xsl:when>
+ <xsl:when test="@code='b'">
+ <xsl:text> [</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>]</xsl:text>
+ </xsl:when>
+ <xsl:when test="@code='d'">
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='e'">
+ <xsl:text> : </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='f'">
+ <xsl:text> / </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='g'">
+ <xsl:text> ; </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</h1>
</xsl:for-each>
</xsl:if>
- <xsl:call-template name="tag_4xx" />
+ <div id="views">
+ <span class="view">
+ <span id="Normalview">Normal View</span>
+ </span>
+ <span class="view">
+ <a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id={marc:datafield[@tag=090]/marc:subfield[@code='a']}" title="MARC" rel="gb_page_center[600,500]">MARC View</a>
+ </span>
+ <span class="view">
+ <a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber={marc:datafield[@tag=090]/marc:subfield[@code='a']}" title="MARC">Expanded MARC View</a>
+ </span>
+ <xsl:if test="$ShowISBD!='0'">
+ <span class="view">
+ <a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=090]/marc:subfield[@code='a']}">Card View (ISBD)</a>
+ </span>
+ </xsl:if>
+ </div>
+
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">454</xsl:with-param>
+ <xsl:with-param name="label">Translation of</xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">461</xsl:with-param>
+ <xsl:with-param name="label">Set Level</xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">464</xsl:with-param>
+ <xsl:with-param name="label">Piece-Analytic Level</xsl:with-param>
+ </xsl:call-template>
<xsl:call-template name="tag_7xx">
<xsl:with-param name="tag">700</xsl:with-param>
<xsl:with-param name="label">Corporate Author (Secondary)</xsl:with-param>
</xsl:call-template>
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">500</xsl:with-param>
+ <xsl:with-param name="label">Uniform Title</xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">503</xsl:with-param>
+ <xsl:with-param name="label">Uniform Conventional Heading</xsl:with-param>
+ </xsl:call-template>
+
<xsl:if test="marc:datafield[@tag=101]">
- <span class="results_summary">
- <span class="label">Language: </span>
+ <span class="results_summary">
+ <span class="label">Language:</span>
<xsl:for-each select="marc:datafield[@tag=101]">
<xsl:for-each select="marc:subfield">
<xsl:choose>
</span>
</xsl:if>
+ <xsl:call-template name="tag_comma">
+ <xsl:with-param name="tag">205</xsl:with-param>
+ <xsl:with-param name="label">Edition Statement</xsl:with-param>
+ </xsl:call-template>
+
<xsl:call-template name="tag_210" />
<xsl:call-template name="tag_215" />
<xsl:if test="marc:datafield[@tag=856]">
<span class="results_summary">
- <span class="label">Online Resources: </span>
+ <span class="label">Online Resources:</span>
<xsl:for-each select="marc:datafield[@tag=856]">
- <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
<a>
<xsl:attribute name="href">
<xsl:value-of select="marc:subfield[@code='u']"/>
</xsl:attribute>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">_blank</xsl:attribute>
+ </xsl:if>
<xsl:choose>
- <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
- <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
- </xsl:when>
<xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">y3z</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
- Click here to access online
+ <xsl:choose>
+ <xsl:when test="$URLLinkText!=''">
+ <xsl:value-of select="$URLLinkText"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Click here to access online</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
</xsl:choose>
</a>
</xsl:template>
<xsl:template match="marc:record">
- <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:if test="marc:datafield[@tag=200]">
<xsl:for-each select="marc:datafield[@tag=200]">
- <xsl:variable name="title" select="marc:subfield[@code='a']"/>
- <xsl:variable name="ntitle"
- select="translate($title, '˜œ','')"/>
- <div>
<xsl:call-template name="addClassRtl" />
- <span class="results_summary">
- <span class="label"/>
- <a>
- <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
- <xsl:value-of select="$ntitle" />
- </a>
- <xsl:if test="marc:subfield[@code='e']">
- <xsl:text> : </xsl:text>
- <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:for-each select="marc:subfield">
+ <xsl:choose>
+ <xsl:when test="@code='a'">
+ <xsl:variable name="title" select="."/>
+ <xsl:variable name="ntitle"
+ select="translate($title, 'ˆ‰˜œ','')"/>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>/cgi-bin/koha/opac-detail.pl?biblionumber=</xsl:text>
+ <xsl:value-of select="$biblionumber"/>
+ </xsl:attribute>
+ <xsl:value-of select="$ntitle" />
+ </a>
+ </xsl:when>
+ <xsl:when test="@code='b'">
+ <xsl:text> [</xsl:text>
<xsl:value-of select="."/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='b']">
- <xsl:text> [</xsl:text>
- <xsl:value-of select="marc:subfield[@code='b']"/>
- <xsl:text>]</xsl:text>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='f']">
- <xsl:text> / </xsl:text>
- <xsl:value-of select="marc:subfield[@code='f']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='g']">
- <xsl:text> ; </xsl:text>
- <xsl:value-of select="marc:subfield[@code='g']"/>
- </xsl:if>
- </span>
- </div>
+ <xsl:text>]</xsl:text>
+ </xsl:when>
+ <xsl:when test="@code='d'">
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='e'">
+ <xsl:text> : </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='f'">
+ <xsl:text> / </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='g'">
+ <xsl:text> ; </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</xsl:for-each>
</xsl:if>
- <xsl:call-template name="tag_4xx" />
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">454</xsl:with-param>
+ <xsl:with-param name="label">Translation of</xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">461</xsl:with-param>
+ <xsl:with-param name="label">Set Level</xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:call-template name="tag_title">
+ <xsl:with-param name="tag">464</xsl:with-param>
+ <xsl:with-param name="label">Piece-Analytic Level</xsl:with-param>
+ </xsl:call-template>
<xsl:call-template name="tag_210" />
<xsl:choose>
<xsl:when test="marc:datafield[@tag=856]">
<xsl:for-each select="marc:datafield[@tag=856]">
- <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
<xsl:choose>
<xsl:when test="@ind2=0">
<a>
<xsl:value-of select="marc:subfield[@code='u']"/>
</xsl:attribute>
<xsl:choose>
- <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
- <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
- </xsl:when>
<xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">y3z</xsl:with-param>
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
-<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0"
+ xmlns:marc="http://www.loc.gov/MARC21/slim"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ exclude-result-prefixes="marc items">
<xsl:template name="datafield">
<xsl:param name="tag"/>
</xsl:element>
</xsl:template>
+ <xsl:template name="subfieldSelect">
+ <xsl:param name="codes"/>
+ <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
+ <xsl:param name="subdivCodes"/>
+ <xsl:param name="subdivDelimiter"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($codes, @code)">
+ <xsl:if test="contains($subdivCodes, @code)">
+ <xsl:value-of select="$subdivDelimiter"/>
+ </xsl:if>
+ <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
+ </xsl:template>
+
+ <xsl:template name="buildSpaces">
+ <xsl:param name="spaces"/>
+ <xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
+ <xsl:if test="$spaces>0">
+ <xsl:value-of select="$char"/>
+ <xsl:call-template name="buildSpaces">
+ <xsl:with-param name="spaces" select="$spaces - 1"/>
+ <xsl:with-param name="char" select="$char"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="chopPunctuation">
+ <xsl:param name="chopString"/>
+ <xsl:variable name="length" select="string-length($chopString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="contains('.:,;/ ', substring($chopString,$length,1))">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not($chopString)"/>
+ <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template name="addClassRtl">
+ <xsl:variable name="lang" select="marc:subfield[@code='7']" />
+ <xsl:if test="$lang = 'ha' or $lang = 'Hebrew' or $lang = 'fa' or $lang = 'Arabe'">
+ <xsl:attribute name="class">rtl</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="tag_title">
+ <xsl:param name="tag" />
+ <xsl:param name="label" />
+ <xsl:if test="marc:datafield[@tag=$tag]">
+ <span class="results_summary">
+ <span class="label">
+ <xsl:value-of select="$label"/>: </span>
+ <xsl:for-each select="marc:datafield[@tag=$tag]">
+ <xsl:call-template name="addClassRtl" />
+ <xsl:for-each select="marc:subfield">
+ <xsl:choose>
+ <xsl:when test="@code='a'">
+ <xsl:variable name="title" select="."/>
+ <xsl:variable name="ntitle"
+ select="translate($title, 'ˆ‰˜œ','')"/>
+ <xsl:value-of select="$ntitle" />
+ </xsl:when>
+ <xsl:when test="@code='b'">
+ <xsl:text>[</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>]</xsl:text>
+ </xsl:when>
+ <xsl:when test="@code='d'">
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='e'">
+ <xsl:text> : </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='f'">
+ <xsl:text> / </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:when test="@code='g'">
+ <xsl:text> ; </xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="position()>1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:if test="not (position() = last())">
+ <xsl:text> • </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="tag_comma">
+ <xsl:param name="tag" />
+ <xsl:param name="label" />
+ <xsl:if test="marc:datafield[@tag=$tag]">
+ <span class="results_summary">
+ <span class="label">
+ <xsl:value-of select="$label"/>: </span>
+ <xsl:for-each select="marc:datafield[@tag=$tag]">
+ <xsl:call-template name="addClassRtl" />
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="position()>1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:if test="not (position() = last())">
+ <xsl:text> • </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template name="tag_210">
<span class="results_summary">
- <span class="label">Publication: </span>
+ <span class="label">Publication:</span>
<xsl:for-each select="marc:datafield[@tag=210]">
<span>
<xsl:call-template name="addClassRtl" />
- <xsl:value-of select="marc:subfield[@code='a']"/>
- <xsl:if test="marc:subfield[@code='b']">
- <xsl:if test="marc:subfield[@code='a']">, </xsl:if>
- <xsl:value-of select="marc:subfield[@code='b']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='a' or @code='b']">
- <xsl:if test="marc:subfield[@code='a']"> : </xsl:if>
- <xsl:value-of select="marc:subfield[@code='c']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='d']">
- <xsl:if test="marc:subfield[@code='a' or @code='c']">, </xsl:if>
- <xsl:value-of select="marc:subfield[@code='d']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='e']">
- <xsl:if test="marc:subfield[@code='a' or @code='c' or @code='d']"> — </xsl:if>
- <xsl:value-of select="marc:subfield[@code='e']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='g']">
- <xsl:if test="marc:subfield[@code='e']"> : </xsl:if>
- <xsl:value-of select="marc:subfield[@code='g']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='h']">
- <xsl:if test="marc:subfield[@code='e' or @code='g']">, </xsl:if>
- <xsl:value-of select="marc:subfield[@code='h']"/>
- </xsl:if>
+ <xsl:for-each select="marc:subfield">
+ <xsl:choose>
+ <xsl:when test="@code='c' or @code='g'">
+ <xsl:if test="position()>1">
+ <xsl:text> : </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="position()>1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
<xsl:if test="not (position() = last())">
<xsl:text> • </xsl:text>
</xsl:if>
</span>
</xsl:template>
- <xsl:template name="tag_215">
+ <xsl:template name="tag_215">
<xsl:for-each select="marc:datafield[@tag=215]">
<span class="results_summary">
<span class="label">Description: </span>
</xsl:for-each>
</xsl:template>
- <xsl:template name="tag_4xx">
- <xsl:for-each select="marc:datafield[@tag=464 or @tag=461]">
- <span class="results_summary">
- <span class="label">Linked with: </span>
- <span>
- <xsl:call-template name="addClassRtl" />
- <xsl:if test="marc:subfield[@code='t']">
- <xsl:value-of select="marc:subfield[@code='t']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='e']"> :
- <xsl:value-of select="marc:subfield[@code='e']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='f']"> /
- <xsl:value-of select="marc:subfield[@code='f']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='v']">,
- <xsl:value-of select="marc:subfield[@code='v']"/>
- </xsl:if>
- </span>
- </span>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name="subfieldSelect">
- <xsl:param name="codes"/>
- <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
- <xsl:param name="subdivCodes"/>
- <xsl:param name="subdivDelimiter"/>
- <xsl:variable name="str">
- <xsl:for-each select="marc:subfield">
- <xsl:if test="contains($codes, @code)">
- <xsl:if test="contains($subdivCodes, @code)">
- <xsl:value-of select="$subdivDelimiter"/>
- </xsl:if>
- <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
- </xsl:template>
-
- <xsl:template name="buildSpaces">
- <xsl:param name="spaces"/>
- <xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
- <xsl:if test="$spaces>0">
- <xsl:value-of select="$char"/>
- <xsl:call-template name="buildSpaces">
- <xsl:with-param name="spaces" select="$spaces - 1"/>
- <xsl:with-param name="char" select="$char"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="chopPunctuation">
- <xsl:param name="chopString"/>
- <xsl:variable name="length" select="string-length($chopString)"/>
- <xsl:choose>
- <xsl:when test="$length=0"/>
- <xsl:when test="contains('.:,;/ ', substring($chopString,$length,1))">
- <xsl:call-template name="chopPunctuation">
- <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="not($chopString)"/>
- <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
- </xsl:template>
-
- <xsl:template name="addClassRtl">
- <xsl:variable name="lang" select="marc:subfield[@code='7']" />
- <xsl:if test="$lang = 'ha' or $lang = 'Hebrew' or $lang = 'fa' or $lang = 'Arabe'">
- <xsl:attribute name="class">rtl</xsl:attribute>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="tag_title">
- <xsl:param name="tag" />
- <xsl:param name="label" />
- <xsl:if test="marc:datafield[@tag=$tag]">
- <span class="results_summary">
- <span class="label"><xsl:value-of select="$label"/>: </span>
- <xsl:for-each select="marc:datafield[@tag=$tag]">
- <xsl:value-of select="marc:subfield[@code='a']" />
- <xsl:if test="marc:subfield[@code='d']">
- <xsl:text> : </xsl:text>
- <xsl:value-of select="marc:subfield[@code='e']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='e']">
- <xsl:for-each select="marc:subfield[@code='e']">
- <xsl:text> </xsl:text>
- <xsl:value-of select="."/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='f']">
- <xsl:text> / </xsl:text>
- <xsl:value-of select="marc:subfield[@code='f']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='h']">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="marc:subfield[@code='h']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='i']">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="marc:subfield[@code='i']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='v']">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="marc:subfield[@code='v']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='x']">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="marc:subfield[@code='x']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='z']">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="marc:subfield[@code='z']"/>
+ <xsl:template name="tag_onesubject">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code=9]">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="@code='9'">
+ <xsl:variable name="start" select="position()"/>
+ <xsl:variable name="ends">
+ <xsl:for-each select="../marc:subfield[position() > $start]">
+ <xsl:if test="@code=3 or @code=9 or @code=2">
+ <xsl:variable name="end" select="position() + $start"/>
+ <xsl:value-of select="$end"/>
+ <xsl:text>,</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="end">
+ <xsl:choose>
+ <xsl:when test="string-length($ends) > 0">
+ <xsl:value-of select="substring-before($ends,',')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>1000</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="display">
+ <xsl:for-each select="../marc:subfield[position() > $start and position() < $end]">
+ <xsl:value-of select="."/>
+ <xsl:if test="not(position()=last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>/cgi-bin/koha/opac-search.pl?q=an:</xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ <xsl:value-of select="$display"/>
+ </a>
+ <xsl:variable name="ncommas"
+ select="string-length($ends) - string-length(translate($ends, ',', ''))" />
+ <xsl:if test="$ncommas > 1">
+ <xsl:text> -- </xsl:text>
+ </xsl:if>
</xsl:if>
</xsl:for-each>
- </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>/cgi-bin/koha/opac-search.pl?q=su:</xsl:text>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:attribute>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdfijkmnpvxyz</xsl:with-param>
+ <xsl:with-param name="subdivCodes">ijknpxyz</xsl:with-param>
+ <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="not(position()=last())">
+ <xsl:text> | </xsl:text>
</xsl:if>
</xsl:template>
-
<xsl:template name="tag_subject">
<xsl:param name="tag" />
<xsl:param name="label" />
<xsl:if test="marc:datafield[@tag=$tag]">
<span class="results_summary">
- <span class="label"><xsl:value-of select="$label"/>: </span>
- <xsl:for-each select="marc:datafield[@tag=$tag]">
- <a>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code=9]">
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="chopPunctuation">
- <xsl:with-param name="chopString">
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
- <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
- <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
- </xsl:call-template>
- </xsl:with-param>
+ <span class="label">
+ <xsl:value-of select="$label"/>
+ <xsl:text>: </xsl:text>
+ </span>
+ <span class="value">
+ <xsl:for-each select="marc:datafield[@tag=$tag]">
+ <xsl:call-template name="tag_onesubject">
</xsl:call-template>
- </a>
- <xsl:if test="not (position()=last())">
- <xsl:text> | </xsl:text>
- </xsl:if>
- </xsl:for-each>
+ </xsl:for-each>
+ </span>
</span>
</xsl:if>
</xsl:template>
-
<xsl:template name="tag_7xx">
<xsl:param name="tag" />
<xsl:param name="label" />
<xsl:if test="marc:datafield[@tag=$tag]">
<span class="results_summary">
- <span class="label"><xsl:value-of select="$label" />: </span>
- <xsl:for-each select="marc:datafield[@tag=$tag]">
- <span>
- <xsl:call-template name="addClassRtl" />
+ <span class="label">
+ <xsl:value-of select="$label" />
+ <xsl:text>: </xsl:text>
+ </span>
+ <span class="value">
+ <xsl:for-each select="marc:datafield[@tag=$tag]">
<a>
<xsl:choose>
<xsl:when test="marc:subfield[@code=9]">
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:text>/cgi-bin/koha/opac-search.pl?q=an:</xsl:text>
+ <xsl:value-of select="marc:subfield[@code=9]"/>
+ </xsl:attribute>
</xsl:when>
<xsl:otherwise>
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='b']"/></xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:text>/cgi-bin/koha/opac-search.pl?q=au:</xsl:text>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+ </xsl:attribute>
</xsl:otherwise>
</xsl:choose>
- <xsl:if test="marc:subfield[@code='a']">
- <xsl:value-of select="marc:subfield[@code='a']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='b']">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="marc:subfield[@code='b']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='c']">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="marc:subfield[@code='c']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='d']">
- <xsl:text> </xsl:text>
- <xsl:value-of select="marc:subfield[@code='d']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='f']">
- <span dir="ltr">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="marc:subfield[@code='f']"/>
- <xsl:text>)</xsl:text>
- </span>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='g']">
- <xsl:text> </xsl:text>
- <xsl:value-of select="marc:subfield[@code='g']"/>
- </xsl:if>
- <xsl:if test="marc:subfield[@code='p']">
- <xsl:text> </xsl:text>
- <xsl:value-of select="marc:subfield[@code='p']"/>
- </xsl:if>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='4' or @code='c' or @code='d' or @code='f' or @code='g' or @code='p']">
+ <xsl:choose>
+ <xsl:when test="@code='9'">
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="not(position() = last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
</a>
- </span>
- <xsl:if test="not (position() = last())">
- <xsl:text> ; </xsl:text>
- </xsl:if>
- </xsl:for-each>
+ <xsl:if test="not(position() = last())">
+ <span style="padding: 3px;">
+ <xsl:text>;</xsl:text>
+ </span>
+ </xsl:if>
+ </xsl:for-each>
+ </span>
</span>
</xsl:if>
</xsl:template>
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
use strict;
sub kohaversion {
- our $VERSION = '3.06.02.001';
+ our $VERSION = '3.07.00.013';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
is_child => ($data->{'category_type'} eq 'C'),
reverse_col => $reverse_col,
accounts => $accts,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
email => $bor->{'email'},
branchcode => $bor->{'branchcode'},
branchname => GetBranchName($bor->{'branchcode'}),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
if ($countissues >0) {
$template->param(ItemsOnIssues => $countissues);
branchcode => $data->{'branchcode'},
branchname => GetBranchName($data->{'branchcode'}),
is_child => ($data->{'category_type'} eq 'C'),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
}
branchcode => $data->{'branchcode'},
branchname => GetBranchName($data->{'branchcode'}),
is_child => ($data->{'category_type'} eq 'C'),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
}
branchname => GetBranchName($bor->{'branchcode'}),
loop => \@loop,
is_child => ($bor->{'category_type'} eq 'C'),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
destination => $destination,
is_child => ($bor->{'category_type'} eq 'C'),
defaultnewpassword => $defaultnewpassword,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
foreach (@field_check) {
$template->param( "mandatory$_" => 1);
}
+# function to designate unwanted fields
+my $check_BorrowerUnwantedField=C4::Context->preference("BorrowerUnwantedField");
+@field_check=split(/\|/,$check_BorrowerUnwantedField);
+foreach (@field_check) {
+ next unless m/\w/o;
+ $template->param( "no$_" => 1);
+}
$template->param( "add" => 1 ) if ( $op eq 'add' );
$template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' );
$template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 );
"dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
samebranch => $samebranch,
quickslip => $quickslip,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
#Get the slip news items
sentnotices => 1,
branchname => GetBranchName($borrower->{'branchcode'}),
categoryname => $borrower->{'description'},
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
}
}
+$template->param( activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne '') );
+
add_accounts_to_template();
output_html_with_http_headers $input, $cookie, $template->output;
my $amount = $input->param('amount');
my $amountoutstanding = $input->param('amountoutstanding');
$accountno = $input->param('accountno');
+ my $itemnumber = $input->param('itemnumber');
my $description = $input->param('description');
my $title = $input->param('title');
my $notify_id = $input->param('notify_id');
amount => $amount,
amountoutstanding => $amountoutstanding,
title => $title,
+ itemnumber => $itemnumber,
description => $description,
notify_id => $notify_id,
notify_level => $notify_level,
borrower_add_additional_fields($borrower);
$template->param(
-
- #borrowenumber => $borrower->{borrowernumber}, # some templates require global
- borrowenumber => $borrowernumber, # some templates require global
+ borrowernumber => $borrowernumber, # some templates require global
borrower => $borrower,
- total => $total_due
+ total => $total_due,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
branchname => GetBranchName($data->{'branchcode'}),
showfulllink => (scalar @loop_reading > 50),
loop_reading => \@loop_reading,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;
--- /dev/null
+#!/bin/bash
+#
+# A sample script for starting SIP.
+# You probably want to specify new log destinations.
+#
+# Takes 3 optional arguments:
+# ~ SIPconfig.xml file to use
+# ~ file for STDOUT, default ~/sip.out
+# ~ file for STDERR, default ~/sip.err
+#
+# The STDOUT and STDERR files are only for the SIPServer process itself.
+# Actual SIP communication and transaction logs are handled by Syslog.
+#
+# Examples:
+# sip_run.sh /path/to/SIPconfig.xml
+# sip_run.sh ~/my_sip/SIPconfig.xml sip_out.log sip_err.log
+
+
+for x in HOME PERL5LIB KOHA_CONF ; do
+ echo $x=${!x}
+ if [ -z ${!x} ] ; then
+ echo ERROR: $x not defined;
+ exit 1;
+ fi;
+done;
+unset x;
+cd $PERL5LIB/C4/SIP;
+echo;
+
+sipconfig=${1};
+outfile=${2:-$HOME/sip.out};
+errfile=${3:-$HOME/sip.err};
+
+if [ $sipconfig ]; then
+ echo "Running with config file located in $sipconfig" ;
+ echo "Calling (backgrounded):";
+ echo "perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile";
+ perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile &
+
+else
+ echo "Please specify a config file and try again."
+fi
--- /dev/null
+#!/bin/bash
+
+. $HOME/.bash_profile
+
+# this is brittle: the primary server must have the lowest PPID
+# this is brittle: ps behavior is very platform-specific, only tested on Debian Etch
+
+target="SIPServer";
+PROCPID=$(ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep | head -1 | awk '{print $1}');
+
+if [ ! $PROCPID ] ; then
+ echo "No processes found for $target";
+ exit;
+fi
+
+echo "SIP Processes for this user ($USER):";
+ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep ;
+echo "Killing process #$PROCPID";
+kill $PROCPID;
use MARC::File::XML;
use MARC::File::USMARC;
-use open OUT => ':utf8';
+use open OUT => ':encoding(UTF-8)';
use Getopt::Long qw(:config auto_help auto_version);
use Pod::Usage;
use strict;
use warnings;
-BEGIN {
+use constant DEFAULT_ZEBRAQ_PURGEDAYS => 30;
+use constant DEFAULT_IMPORT_PURGEDAYS => 60;
+use constant DEFAULT_LOGS_PURGEDAYS => 180;
+BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin;
use C4::Context;
use C4::Dates;
-#use C4::Debug;
-#use C4::Letters;
-#use File::Spec;
use Getopt::Long;
sub usage {
print STDERR <<USAGE;
-Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] [-m|--mail] [--merged]
+Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] [-m|--mail] [--merged] [--import DAYS] [--logs DAYS]
-h --help prints this help message, and exits, ignoring all
other options
--sessdays DAYS purge only sessions older than DAYS days.
-v --verbose will cause the script to give you a bit more information
about the run.
- --zebraqueue DAYS purge completed entries from the zebraqueue from
- more than DAYS days ago.
+ --zebraqueue DAYS purge completed zebraqueue entries older than DAYS days.
+ Defaults to 30 days if no days specified.
-m --mail purge the mail queue.
--merged purged completed entries from need_merge_authorities.
+ --import DAYS purge records from import tables older than DAYS days.
+ Defaults to 60 days if no days specified.
+ --logs DAYS purge entries from action_logs older than DAYS days.
+ Defaults to 180 days if no days specified.
USAGE
exit $_[0];
}
-my ( $help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail, $purge_merged);
+my ( $help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail, $purge_merged, $pImport, $pLogs);
GetOptions(
'h|help' => \$help,
'm|mail' => \$mail,
'zebraqueue:i' => \$zebraqueue_days,
'merged' => \$purge_merged,
+ 'import:i' => \$pImport,
+ 'logs:i' => \$pLogs,
) || usage(1);
+
$sessions=1 if $sess_days && $sess_days>0;
+# if --import, --logs or --zebraqueue were passed without number of days,
+# use defaults
+$pImport= DEFAULT_IMPORT_PURGEDAYS if defined($pImport) && $pImport==0;
+$pLogs= DEFAULT_LOGS_PURGEDAYS if defined($pLogs) && $pLogs==0;
+$zebraqueue_days= DEFAULT_ZEBRAQ_PURGEDAYS if defined($zebraqueue_days) && $zebraqueue_days==0;
if ($help) {
usage(0);
}
-if ( !( $sessions || $zebraqueue_days || $mail || $purge_merged) ) {
+if ( !( $sessions || $zebraqueue_days || $mail || $purge_merged || $pImport || $pLogs) ) {
print "You did not specify any cleanup work for the script to do.\n\n";
usage(1);
}
print "Done with purging need_merge_authorities.\n" if $verbose;
}
+if($pImport) {
+ print "Purging records from import tables.\n" if $verbose;
+ PurgeImportTables();
+ print "Done with purging import tables.\n" if $verbose;
+}
+
+if($pLogs) {
+ print "Purging records from action_logs.\n" if $verbose;
+ $sth = $dbh->prepare("DELETE FROM action_logs WHERE timestamp < date_sub(curdate(), interval ? DAY)");
+ $sth->execute($pLogs) or die $dbh->errstr;
+ print "Done with purging action_logs.\n" if $verbose;
+}
+
exit(0);
sub RemoveOldSessions {
print "$count sessions were deleted.\n";
}
}
+
+sub PurgeImportTables {
+ #First purge import_records
+ #Delete cascades to import_biblios, import_items and import_record_matches
+ $sth = $dbh->prepare("DELETE FROM import_records WHERE upload_timestamp < date_sub(curdate(), interval ? DAY)");
+ $sth->execute($pImport) or die $dbh->errstr;
+
+ # Now purge import_batches
+ # Timestamp cannot be used here without care, because records are added
+ # continuously to batches without updating timestamp (z3950 search).
+ # So we only delete older empty batches.
+ # This delete will therefore not have a cascading effect.
+ $sth = $dbh->prepare("DELETE ba
+ FROM import_batches ba
+ LEFT JOIN import_records re ON re.import_batch_id=ba.import_batch_id
+ WHERE re.import_record_id IS NULL AND
+ ba.upload_timestamp < date_sub(curdate(), interval ? DAY)");
+ $sth->execute($pImport) or die $dbh->errstr;
+}
#!/usr/bin/perl
-#run nightly -- changes J to A on someone's 18th birthday
+
+# 2011 Liz Rea - Northeast Kansas Library System <lrea@nekls.org>
+
+# 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; FIXME - Bug 2505
+use warnings;
+
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
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 [ -b=<branchcode> -f=<categorycode> -t=<categorycode> ]
+
+ Options:
+ --help brief help message
+ --man full documentation
+ -v verbose mode
+ -n take no action, display only
+ -b <branchname> only deal with patrons from this library/branch
+ -f <categorycode> change patron category from this category
+ -t <categorycode> 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<-b>
+
+changes patrons for one specific branch. Use the value in the
+branches.branchcode table.
+
+=item B<-f>
+
+*required* defines the juvenile category to update. Expects the code from categories.categorycode.
+
+=item B<-t>
+
+*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<juv2adult.pl> - Suggests that you read this help. :)
+
+C<juv2adult.pl> -b=<branchcode> -f=<categorycode> -t=<categorycode> - Processes a single branch, and updates the patron categories from fromcat to tocat.
+
+C<juv2adult.pl> -f=<categorycode> -t=<categorycode> -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,
+ 'f=s' => \$fromcat,
+ 't=s' => \$tocat,
+ 'b=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 $fromcat. Please try again. \n";
+}
+$query=qq|SELECT categorycode from categories where categorycode=?|;
+$sth=$dbh->prepare( $query );
+$sth->execute( $tocat )
+ or die "Couldn't execute statement: " . $sth->errstr;
+my $tocatage = $sth->fetchrow_array();
+if ( not $tocatage ){
+ die "No patron category $tocat. 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 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 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();
}
use C4::Context;
use C4::Items;
+use C4::Circulation qw/LostItem/;
use Getopt::Long;
my $lost; # key=lost value, value=num days.
my ($charge, $verbose, $confirm, $quiet);
-my $endrange = 366; # FIXME hardcoded - don't deal with anything overdue by more than this num days.
+my $endrange = 366;
GetOptions(
'lost=s%' => \$lost,
'confirm' => \$confirm,
'verbose' => \$verbose,
'quiet' => \$quiet,
+ 'maxdays=s' => \$endrange
);
my $usage = << 'ENDUSAGE';
--confirm confirm. without this option, the script will report the number of affected items and
return without modifying any records.
+ --quiet suppress summary output.
+
+ --maxdays Specifies the end of the range of overdue days to deal with (defaults to 366). This
+ value is universal to all lost num days overdue passed.
+
examples :
$PERL5LIB/misc/cronjobs/longoverdue.pl --lost 30=1
Would set LOST=1 after 30 days (up to one year), but not charge the account.
# these are the fields that will be substituted into <<item.content>>
my @item_content_fields = split( /,/, $itemscontent );
-binmode( STDOUT, ":utf8" );
+binmode STDOUT, ':encoding(UTF-8)';
our $csv; # the Text::CSV_XS object
my $mindays = $overdue_rules->{"delay$i"}; # the notice will be sent after mindays days (grace period)
my $maxdays = (
$overdue_rules->{ "delay" . ( $i + 1 ) }
- ? $overdue_rules->{ "delay" . ( $i + 1 ) }
+ ? $overdue_rules->{ "delay" . ( $i + 1 ) } - 1
: ($MAX)
); # issues being more than maxdays late are managed somewhere else. (borrower probably suspended)
# <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3> <city> <postcode>
my $borrower_sql = <<'END_SQL';
-SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2, city, zipcode, country, email, MIN(date_due) as longest_issue
+SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email
FROM issues,borrowers,categories
WHERE issues.borrowernumber=borrowers.borrowernumber
AND borrowers.categorycode=categories.categorycode
$borrower_sql .= ' AND borrowers.categorycode=? ';
push @borrower_parameters, $overdue_rules->{categorycode};
}
- $borrower_sql .= ' AND categories.overduenoticerequired=1
- GROUP BY issues.borrowernumber ';
+ $borrower_sql .= ' AND categories.overduenoticerequired=1 ';
if($triggered) {
- $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) = ?';
+ $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) = ?';
push @borrower_parameters, $mindays;
} else {
- $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) BETWEEN ? and ? ' ;
+ $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ;
push @borrower_parameters, $mindays, $maxdays;
}
$sth->execute(@borrower_parameters);
$verbose and warn $borrower_sql . "\n $branchcode | " . $overdue_rules->{'categorycode'} . "\n ($mindays, $maxdays)\nreturns " . $sth->rows . " rows";
- while ( my ($itemcount, $borrowernumber, $firstname, $lastname,
- $address1, $address2, $city, $postcode, $country, $email,
- $longest_issue ) = $sth->fetchrow )
+ while ( my ( $borrowernumber, $firstname, $lastname,
+ $address1, $address2, $city, $postcode, $country, $email
+ ) = $sth->fetchrow )
{
- $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i.";
+ $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i.";
my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} );
$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>.*<\/item>)/$1\n$item_format/ if scalar(@{$params->{'items'}} > 0);
}
#ATTENTION : Mettre la base en utf8 auparavant.
#BEWARE : Set database into utf8 before.
while (my ($authid)=$rq->fetchrow){
-open FILEOUTPUT,">:utf8", "./$filename/$authid.xml" or die "unable to open $filename";
+open my $fileoutput, '>:encoding(UTF-8)', "./$filename/$authid.xml" or die "unable to open $filename";
my $record=AUTHgetauthority($dbh,$authid);
if (! utf8::is_utf8($record)) {
utf8::decode($record);
# } else {
# $record->encoding( 'UTF-8' );
# }
- print FILEOUTPUT $record->as_xml();
-close FILEOUPUT;
+ print {$fileoutput} $record->as_xml();
+close $fileoutput;
}
}
}
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';
}
}
use IO::File;
use Pod::Usage;
-binmode(STDOUT, ":utf8");
+binmode STDOUT, ':encoding(UTF-8)';
my ( $input_marc_file, $number, $offset) = ('',0,0);
my ($version, $delete, $test_parameter, $skip_marc8_conversion, $char_encoding, $verbose, $commit, $fk_off,$format,$biblios,$authorities,$keepids,$match, $isbn_check, $logfile);
my ($sourcetag,$sourcesubfield,$idmapfl);
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,
'x' => \$as_xml,
'y' => \$do_not_clear_zebraqueue,
'z' => \$process_zebraqueue,
- 'v' => \$verbose_logging,
+ 'v+' => \$verbose_logging,
);
# -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;
my ($record_type, $sth, $directory, $as_xml, $noxml, $nosanitize) = @_;
my $num_exported = 0;
- open (OUT, ">:utf8 ", "$directory/exported_records") or die $!;
+ open my $fh, '>:encoding(UTF-8) ', "$directory/exported_records" or die $!;
my $i = 0;
my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField("items.itemnumber",'');
while (my ($record_number) = $sth->fetchrow_array) {
}
}
if ( $marcxml ) {
- print OUT $marcxml if $marcxml;
+ print {$fh} $marcxml if $marcxml;
$num_exported++;
}
next;
# to care, though, at least if you're using the GRS-1 filter. It does
# care if you're using the DOM filter, which requires valid XML file(s).
eval {
- print OUT ($as_xml) ? $marc->as_xml_record(C4::Context->preference('marcflavour')) : $marc->as_usmarc();
+ print {$fh} ($as_xml) ? $marc->as_xml_record(C4::Context->preference('marcflavour')) : $marc->as_usmarc();
$num_exported++;
};
if ($@) {
}
}
print "\nRecords exported: $num_exported\n" if ( $verbose_logging );
- close OUT;
+ close $fh;
return $num_exported;
}
my ($record_type, $entries, $directory, $as_xml, $noxml, $records_deleted) = @_;
my $num_exported = 0;
- open (OUT, ">:utf8 ", "$directory/exported_records") or die $!;
+ open my $fh, '>:encoding(UTF-8)', "$directory/exported_records" or die $!;
my $i = 0;
# Skip any deleted records. We check for this anyway, but this reduces error spam
# strung together with no single root element. zebraidx doesn't seem
# to care, though, at least if you're using the GRS-1 filter. It does
# care if you're using the DOM filter, which requires valid XML file(s).
- print OUT ($as_xml) ? $marc->as_xml_record(C4::Context->preference('marcflavour')) : $marc->as_usmarc();
+ print {$fh} ($as_xml) ? $marc->as_xml_record(C4::Context->preference('marcflavour')) : $marc->as_usmarc();
$num_exported++;
}
}
print "\nRecords exported: $num_exported\n" if ( $verbose_logging );
- close OUT;
+ close $fh;
return $num_exported;
}
my ($record_type, $entries, $directory, $as_xml) = @_;
my $records_deleted = {};
- open (OUT, ">:utf8 ", "$directory/exported_records") or die $!;
+ open my $fh, '>:encoding(UTF-8)', "$directory/exported_records" or die $!;
my $i = 0;
foreach my $record_number (map { $_->{biblio_auth_number} } @$entries ) {
print "\r$i" unless ($i++ %100 or !$verbose_logging);
fix_unimarc_100($marc);
}
- print OUT ($as_xml) ? $marc->as_xml_record(C4::Context->preference("marcflavour")) : $marc->as_usmarc();
+ print {$fh} ($as_xml) ? $marc->as_xml_record(C4::Context->preference("marcflavour")) : $marc->as_usmarc();
$records_deleted->{$record_number} = 1;
}
print "\nRecords exported: $i\n" if ( $verbose_logging );
- close OUT;
+ close $fh;
return $records_deleted;
-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.
# AUTHORITIES : copying mandatory files
#
unless (-f C4::Context->zebraconfig('authorityserver')->{config}) {
- open ZD,">:utf8 ",C4::Context->zebraconfig('authorityserver')->{config};
- print ZD "
+ open my $zd, '>:encoding(UTF-8)' ,C4::Context->zebraconfig('authorityserver')->{config};
+ print {$zd} "
# generated by KOHA/misc/migration_tools/rebuild_zebra.pl
profilePath:\${srcdir:-.}:$authorityserverdir/tab/:$tabdir/tab/:\${srcdir:-.}/tab/
# BIBLIOS : copying mandatory files
#
unless (-f C4::Context->zebraconfig('biblioserver')->{config}) {
- open ZD,">:utf8 ",C4::Context->zebraconfig('biblioserver')->{config};
- print ZD "
+ open my $zd, '>:encoding(UTF-8)', C4::Context->zebraconfig('biblioserver')->{config};
+ print {$zd} "
# generated by KOHA/misc/migrtion_tools/rebuild_zebra.pl
profilePath:\${srcdir:-.}:$biblioserverdir/tab/:$tabdir/tab/:\${srcdir:-.}/tab/
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
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
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
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.
==============
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.
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)
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.
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).
* (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.
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).
* (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.
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).
* (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.
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).
* (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.
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).
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).
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).
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).
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).
Documentation Manager: Nicole C Engard <nengard@gmail.com>
Translation Manager: Frédéric Demians <frederic@tamil.fr>
QA Manager: Ian Walls <ian.walls@bywatersolutions.com>
-Bug Wranglers: MJ Ray, Marcel Roy, Paul Poulain, Mason James
+Bug Wranglers: MJ Ray, Marcel de Rooy, Paul Poulain, Mason James
Release Maintainer (3.4.x):
Chris Nighswonger <cnighswonger@foundations.edu>
my $parser = XML::SAX::ParserFactory->parser(
Handler => MySAXHandler->new
);
-binmode STDOUT, ":utf8";
+binmode STDOUT, ':encoding(UTF-8)';
print "\x{65}\x{301}\n";
$parser->parse_string(encode_utf8("<xml>\x{65}\x{301}</xml>"));
$parser->parse_string("<xml>\xEF\xBB\xBF\x{65}\x{301}</xml>");
$cmd = lc $cmd;
if ( $cmd =~ /create|install|update/ ) {
my $installer = LangInstaller->new( $lang, $pref );
+ if ( $cmd !~ /create/ && $lang && not $lang ~~ $installer->{langs} ) {
+ print "Unsupported language: $lang\n";
+ exit;
+ }
if ( $all ) {
usage() if $cmd eq 'create';
for my $lang ( @{$installer->{langs}} ) {
print STDERR "$0: Outputting to STDOUT...\n" if $verbose_p;
open(OUTPUT, ">&STDOUT");
}
-#binmode( OUTPUT, ":utf8" );
+binmode OUTPUT, ':encoding(UTF-8)';
if (defined $files_from) {
print STDERR "$0: Opening input file list \"$files_from\"\n" if $verbose_p;
}
# Output XML by passing the hashref to XMLOut
-binmode(STDOUT, ":utf8");
+binmode STDOUT, ':encoding(UTF-8)';
print CGI::header('-type'=>'text/xml', '-charset'=>'utf-8');
print XMLout(
$out,
);
}
-binmode( STDOUT, ":utf8" );
+binmode STDOUT, ':encoding(UTF-8)';
my $repository = C4::OAI::Repository->new();
# __END__ Main Prog
reviews => $reviews,
);
+#Export options
+my $OpacExportOptions=C4::Context->preference("OpacExportOptions");
+my @export_options = split(/\|/,$OpacExportOptions);
+$template->{VARS}->{'export_options'} = \@export_options;
+
#Search for title in links
+my $marccontrolnumber = GetMarcControlnumber ($record, $marcflavour);
+
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
$dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
$dat->{title} =~ s/\/+$//; # remove trailing slash
$dat->{title} =~ s/\s+$//; # remove trailing space
$dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
$isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
+ $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g;
+ $search_for_title =~ s/{BIBLIONUMBER}/$biblionumber/g;
$template->param('OPACSearchForTitleIn' => $search_for_title);
}
my $tag;
# loop through each tab 0 through 9
-for ( my $tabloop = 0 ; $tabloop <= 10 ; $tabloop++ ) {
+for ( my $tabloop = 0 ; $tabloop <= 9 ; $tabloop++ ) {
# loop through each tag
my @loop_data = ();
my $previous = '';
# loop through each subfield
for my $i ( 0 .. $#subf ) {
- $subf[$i][0] = "@" unless $subf[$i][0];
+ $subf[$i][0] = "@" unless defined($subf[$i][0]);
my $sf_def = $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] };
- next if ( ($sf_def->{tab}||'') ne $tabloop );
+ next if ( ($sf_def->{tab}||0) != $tabloop );
next if ( ($sf_def->{hidden}||0) > 0 );
my %subfield_data;
$subfield_data{marc_lib} = ($sf_def->{lib} eq $previous) ? '--' : $sf_def->{lib};
# loop through each subfield
for my $i ( 0 .. $#subf ) {
my $sf_def = $tagslib->{ $field->tag() }->{ $subf[$i][0] };
- next if ( ($sf_def->{tab}||'') ne 10 );
+ next if ( ($sf_def->{tab}||0) != 10 );
next if ( ($sf_def->{hidden}||0) > 0 );
$witness{ $subf[$i][0] } = $sf_def->{lib};
$template->param(ISBD => 1);
}
+#Export options
+my $OpacExportOptions=C4::Context->preference("OpacExportOptions");
+my @export_options = split(/\|/,$OpacExportOptions);
+$template->{VARS}->{'export_options'} = \@export_options;
+
#Search for title in links
+my $marcflavour = C4::Context->preference("marcflavour");
+my $dat = TransformMarcToKoha( $dbh, $record );
+my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+my $marccontrolnumber = GetMarcControlnumber ($record, $marcflavour);
+
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
- $biblio->{author} ? $search_for_title =~ s/{AUTHOR}/$biblio->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
- $biblio->{title} =~ s/\/+$//; # remove trailing slash
- $biblio->{title} =~ s/\s+$//; # remove trailing space
- $biblio->{title} ? $search_for_title =~ s/{TITLE}/$biblio->{title}/g : $search_for_title =~ s/{TITLE}//g;
- $biblio->{isbn} ? $search_for_title =~ s/{ISBN}/$biblio->{isbn}/g : $search_for_title =~ s/{ISBN}//g;
+ $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
+ $dat->{title} =~ s/\/+$//; # remove trailing slash
+ $dat->{title} =~ s/\s+$//; # remove trailing space
+ $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
+ $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
+ $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g;
+ $search_for_title =~ s/{BIBLIONUMBER}/$biblionumber/g;
$template->param('OPACSearchForTitleIn' => $search_for_title);
}
template_name => "opac-addbybiblionumber.tmpl",
query => $query,
type => "opac",
- authnotrequired =>( C4::Context->preference("OpacPublic") ? 1 : 0 ),
+ authnotrequired => 0,
}
);
use MARC::Record;
use MARC::Field;
use List::MoreUtils qw/any none/;
+use C4::Images;
BEGIN {
if (C4::Context->preference('BakerTaylorEnabled')) {
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
+my $record = GetMarcBiblio($biblionumber);
+if ( ! $record ) {
+ print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
+ exit;
+}
+$template->param( biblionumber => $biblionumber );
+
+
+SetUTF8Flag($record);
+
+# XSLT processing of some stuff
+if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
+ $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') );
+}
+
+
# We look for the busc param to build the simple paging from the search
my $session = get_session($query->cookie("CGISESSID"));
my %paging = (previous => {}, next => {});
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
-my $record = GetMarcBiblio($biblionumber);
-if ( ! $record ) {
- print $query->redirect("/cgi-bin/koha/errors/404.pl");
- exit;
-}
-$template->param( biblionumber => $biblionumber );
-SetUTF8Flag($record);
-
-# XSLT processing of some stuff
-if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
- $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') );
-}
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") );
# change back when ive fixed request.pl
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() );
$template->param(covernewwindow => 'false');
}
+#Export options
+my $OpacExportOptions=C4::Context->preference("OpacExportOptions");
+my @export_options = split(/\|/,$OpacExportOptions);
+$template->{VARS}->{'export_options'} = \@export_options;
+
#Search for title in links
my $marccontrolnumber = GetMarcControlnumber ($record, $marcflavour);
? '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;
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.";
}
--- /dev/null
+#!/usr/bin/perl
+#
+# Copyright (C) 2011 C & P Bibliography Services
+# Jared Camins-Esakov <jcamins@cpbibliograpy.com>
+#
+# 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;
+use C4::Context;
+use C4::Images;
+
+$| = 1;
+
+my $DEBUG = 0;
+my $data = new CGI;
+my $imagenumber;
+
+=head1 NAME
+
+opac-image.pl - Script for retrieving and formatting local cover images for display
+
+=head1 SYNOPSIS
+
+<img src="opac-image.pl?imagenumber=X" />
+<img src="opac-image.pl?biblionumber=X" />
+<img src="opac-image.pl?imagenumber=X&thumbnail=1" />
+<img src="opac-image.pl?biblionumber=X&thumbnail=1" />
+
+=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
+
+error() unless C4::Context->preference("OPACLocalCoverImages");
+
+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 = RetrieveImage($imagenumber);
+
+ error() unless $imagedata;
+
+ 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 <at> foundations <dot> edu
+
+modified for local cover images by Koustubha Kale kmkale <at> anantcorp <dot> com
+
+=cut
--- /dev/null
+#!/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 C4::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 $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 || $images[0] || '';
+}
+
+$template->{VARS}->{'biblio'} = $biblio;
+
+output_html_with_http_headers $query, $cookie, $template->output;
my $cgi = new CGI;
BEGIN {
- if (C4::Context->preference('BakerTaylorEnabled')) {
- require C4::External::BakerTaylor;
- import C4::External::BakerTaylor qw(&image_url &link_url);
- }
+ if (C4::Context->preference('BakerTaylorEnabled')) {
+ require C4::External::BakerTaylor;
+ import C4::External::BakerTaylor qw(&image_url &link_url);
+ }
}
my ($template,$borrowernumber,$cookie);
my $format = $cgi->param("format") || '';
my $build_grouped_results = C4::Context->preference('OPACGroupResults');
if ($format =~ /(rss|atom|opensearchdescription)/) {
- $template_name = 'opac-opensearch.tmpl';
+ $template_name = 'opac-opensearch.tmpl';
}
elsif (@params && $build_grouped_results) {
$template_name = 'opac-results-grouped.tmpl';
}
elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
- $template_name = 'opac-results.tmpl';
+ $template_name = 'opac-results.tmpl';
}
else {
$template_name = 'opac-advsearch.tmpl';
}
if ($format eq 'rss2' or $format eq 'opensearchdescription' or $format eq 'atom') {
- $template->param($format => 1);
+ $template->param($format => 1);
$template->param(timestamp => strftime("%Y-%m-%dT%H:%M:%S-00:00", gmtime)) if ($format eq 'atom');
# FIXME - the timestamp is a hack - the biblio update timestamp should be used for each
# entry, but not sure if that's worth an extra database query for each bib
$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
if (C4::Context->preference('BakerTaylorEnabled')) {
- $template->param(
- BakerTaylorEnabled => 1,
- BakerTaylorImageURL => &image_url(),
- BakerTaylorLinkURL => &link_url(),
- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
- );
+ $template->param(
+ BakerTaylorEnabled => 1,
+ BakerTaylorImageURL => &image_url(),
+ BakerTaylorLinkURL => &link_url(),
+ BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
+ );
}
if (C4::Context->preference('TagsEnabled')) {
- $template->param(TagsEnabled => 1);
- foreach (qw(TagsShowOnList TagsInputOnList)) {
- C4::Context->preference($_) and $template->param($_ => 1);
- }
+ $template->param(TagsEnabled => 1);
+ foreach (qw(TagsShowOnList TagsInputOnList)) {
+ C4::Context->preference($_) and $template->param($_ => 1);
+ }
}
## URI Re-Writing
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
- foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
- my %row =( number=>$cnt++,
- ccl => "$itype_or_itemtype,phr",
+ foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
+ my %row =( number=>$cnt++,
+ ccl => "$itype_or_itemtype,phr",
code => $thisitemtype,
selected => $selected,
description => $itemtypes->{$thisitemtype}->{'description'},
count5 => $cnt % 4,
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
);
- $selected = 0; # set to zero after first pass through
- push @itemtypesloop, \%row;
- }
+ $selected = 0; # set to zero after first pass through
+ push @itemtypesloop, \%row;
+ }
} else {
my $advsearchtypes = GetAuthorisedValues($advanced_search_types, '', 'opac');
- for my $thisitemtype (@$advsearchtypes) {
- my %row =(
- number=>$cnt++,
- ccl => $advanced_search_types,
+ for my $thisitemtype (@$advsearchtypes) {
+ my %row =(
+ number=>$cnt++,
+ ccl => $advanced_search_types,
code => $thisitemtype->{authorised_value},
selected => $selected,
description => $thisitemtype->{'lib'},
count5 => $cnt % 4,
imageurl=> getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
);
- push @itemtypesloop, \%row;
- }
+ push @itemtypesloop, \%row;
+ }
}
$template->param(itemtypeloop => \@itemtypesloop);
}
}
- $template->param(uc(C4::Context->preference("marcflavour")) => 1, # we already did this for UNIMARC
- advsearch => 1,
- search_boxes_loop => \@search_boxes_array);
-
-# use the global setting by default
- if ( C4::Context->preference("expandedSearchOption") == 1 ) {
- $template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
- }
- # but let the user override it
- if (defined $cgi->param('expanded_options')) {
- if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
- $template->param( expanded_options => $cgi->param('expanded_options'));
- }
+ $template->param(uc( C4::Context->preference("marcflavour")) => 1, # we already did this for UNIMARC
+ advsearch => 1,
+ search_boxes_loop => \@search_boxes_array);
+
+ # use the global setting by default
+ if ( C4::Context->preference("expandedSearchOption") == 1 ) {
+ $template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
+ }
+ # but let the user override it
+ if (defined $cgi->param('expanded_options')) {
+ if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
+ $template->param( expanded_options => $cgi->param('expanded_options'));
}
+ }
output_html_with_http_headers $cgi, $cookie, $template->output;
exit;
}
$j++;
}
}
-#
-
# Params that can have more than one value
# sort by is used to sort the query
my @results;
## I. BUILD THE QUERY
-my $lang = C4::Templates::getlanguagecookie($cgi);
+my $lang = C4::Templates::getlanguage($cgi, 'opac');
( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by, 0, $lang);
sub _input_cgi_parse ($) {
my @coins;
if ($tag) {
- $query_cgi = "tag=" .$tag . "&" . $query_cgi;
- my $taglist = get_tags({term=>$tag, approved=>1});
- $results_hashref->{biblioserver}->{hits} = scalar (@$taglist);
- my @biblist = (map {GetBiblioData($_->{biblionumber})} @$taglist);
- my @marclist = (map {$_->{marc}} @biblist );
- $DEBUG and printf STDERR "taglist (%s biblionumber)\nmarclist (%s records)\n", scalar(@$taglist), scalar(@marclist);
- $results_hashref->{biblioserver}->{RECORDS} = \@marclist;
- # FIXME: tag search and standard search should work together, not exclusively
- # FIXME: No facets for tags search.
+ $query_cgi = "tag=" .$tag . "&" . $query_cgi;
+ my $taglist = get_tags({term=>$tag, approved=>1});
+ $results_hashref->{biblioserver}->{hits} = scalar (@$taglist);
+ my @biblist = (map {GetBiblioData($_->{biblionumber})} @$taglist);
+ my @marclist = (map {$_->{marc}} @biblist );
+ $DEBUG and printf STDERR "taglist (%s biblionumber)\nmarclist (%s records)\n", scalar(@$taglist), scalar(@marclist);
+ $results_hashref->{biblioserver}->{RECORDS} = \@marclist;
+ # FIXME: tag search and standard search should work together, not exclusively
+ # FIXME: No facets for tags search.
}
elsif (C4::Context->preference('NoZebra')) {
eval {
# 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"});
+ }
+
+ # 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'} = "" }
+ }
+
+ my $tag_quantity;
+ if (C4::Context->preference('TagsEnabled') and
+ $tag_quantity = C4::Context->preference('TagsShowOnList')) {
+ foreach (@newresults) {
+ my $bibnum = $_->{biblionumber} or next;
+ $_->{itemsissued} = CountItemsIssued( $bibnum );
+ $_ ->{'TagLoop'} = get_tags({biblionumber=>$bibnum, approved=>1, 'sort'=>'-weight',
+ limit=>$tag_quantity });
+ }
+ }
+ if (C4::Context->preference('COinSinOPACResults')) {
+ foreach (@newresults) {
+ my $record = GetMarcBiblio($_->{'biblionumber'});
+ $_->{coins} = GetCOinSBiblio($record);
+ }
}
- my $tag_quantity;
- if (C4::Context->preference('TagsEnabled') and
- $tag_quantity = C4::Context->preference('TagsShowOnList')) {
- foreach (@newresults) {
- my $bibnum = $_->{biblionumber} or next;
- $_->{itemsissued} = CountItemsIssued( $bibnum );
- $_ ->{'TagLoop'} = get_tags({biblionumber=>$bibnum, approved=>1, 'sort'=>'-weight',
- limit=>$tag_quantity });
- }
- }
- if (C4::Context->preference('COinSinOPACResults')) {
- foreach (@newresults) {
- my $record = GetMarcBiblio($_->{'biblionumber'});
- $_->{coins} = GetCOinSBiblio($record);
- }
- }
- if ($results_hashref->{$server}->{"hits"}){
- $total = $total + $results_hashref->{$server}->{"hits"};
- }
- # Opac search history
- my $newsearchcookie;
- if (C4::Context->preference('EnableOpacSearchHistory')) {
- my @recentSearches;
-
- # Getting the (maybe) already sent cookie
- my $searchcookie = $cgi->cookie('KohaOpacRecentSearches');
- if ($searchcookie){
- $searchcookie = uri_unescape($searchcookie);
- if (thaw($searchcookie)) {
- @recentSearches = @{thaw($searchcookie)};
- }
- }
-
- # Adding the new search if needed
- if (!$borrowernumber || $borrowernumber eq '') {
- # To a cookie (the user is not logged in)
-
- if (($params->{'offset'}||'') eq '') {
-
- push @recentSearches, {
- "query_desc" => $query_desc || "unknown",
- "query_cgi" => $query_cgi || "unknown",
- "time" => time(),
- "total" => $total
- };
- $template->param(ShowOpacRecentSearchLink => 1);
- }
-
- shift @recentSearches if (@recentSearches > 15);
- # Pushing the cookie back
- $newsearchcookie = $cgi->cookie(
- -name => 'KohaOpacRecentSearches',
- # We uri_escape the whole freezed structure so we're sure we won't have any encoding problems
- -value => uri_escape(freeze(\@recentSearches)),
- -expires => ''
- );
- $cookie = [$cookie, $newsearchcookie];
- }
- else {
- # To the session (the user is logged in)
- if (($params->{'offset'}||'') eq '') {
- AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc, $query_cgi, $total);
- $template->param(ShowOpacRecentSearchLink => 1);
- }
- }
- }
- ## If there's just one result, redirect to the detail page
+ if ($results_hashref->{$server}->{"hits"}){
+ $total = $total + $results_hashref->{$server}->{"hits"};
+ }
+
+ # Opac search history
+ my $newsearchcookie;
+ if (C4::Context->preference('EnableOpacSearchHistory')) {
+ my @recentSearches;
+
+ # Getting the (maybe) already sent cookie
+ my $searchcookie = $cgi->cookie('KohaOpacRecentSearches');
+ if ($searchcookie){
+ $searchcookie = uri_unescape($searchcookie);
+ if (thaw($searchcookie)) {
+ @recentSearches = @{thaw($searchcookie)};
+ }
+ }
+
+ # Adding the new search if needed
+ if (!$borrowernumber || $borrowernumber eq '') {
+ # To a cookie (the user is not logged in)
+ if (($params->{'offset'}||'') eq '') {
+ push @recentSearches, {
+ "query_desc" => $query_desc || "unknown",
+ "query_cgi" => $query_cgi || "unknown",
+ "time" => time(),
+ "total" => $total
+ };
+ $template->param(ShowOpacRecentSearchLink => 1);
+ }
+
+ shift @recentSearches if (@recentSearches > 15);
+ # Pushing the cookie back
+ $newsearchcookie = $cgi->cookie(
+ -name => 'KohaOpacRecentSearches',
+ # We uri_escape the whole freezed structure so we're sure we won't have any encoding problems
+ -value => uri_escape(freeze(\@recentSearches)),
+ -expires => ''
+ );
+ $cookie = [$cookie, $newsearchcookie];
+ }
+ else {
+ # To the session (the user is logged in)
+ if (($params->{'offset'}||'') eq '') {
+ AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc, $query_cgi, $total);
+ $template->param(ShowOpacRecentSearchLink => 1);
+ }
+ }
+ }
+ ## If there's just one result, redirect to the detail page
if ($total == 1 && $format ne 'rss2'
- && $format ne 'opensearchdescription' && $format ne 'atom') {
+ && $format ne 'opensearchdescription' && $format ne 'atom') {
my $biblionumber=$newresults[0]->{biblionumber};
if (C4::Context->preference('BiblioDefaultView') eq 'isbd') {
print $cgi->redirect("/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=$biblionumber");
$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
$template->param( PAGE_NUMBERS => \@page_numbers,
previous_page_offset => $previous_page_offset) unless $pages < 2;
$template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
- }
+ }
# no hits
else {
$template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc);
total => $total,
opacfacets => 1,
facets_loop => $facets,
- displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
+ displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
scan => $scan,
search_error => $error,
);
my $pubshelves = $session->param('pubshelves');
my $barshelves = $session->param('barshelves');
foreach my $shelf (@$pubshelves) {
- next if ( ($shelf->{'owner'} != ($borrowernumber ? $borrowernumber : -1)) && ($shelf->{'category'} < 3) );
- push (@addpubshelves, $shelf);
+ next if ( ($shelf->{'owner'} != ($borrowernumber ? $borrowernumber : -1)) && ($shelf->{'category'} < 3) );
+ push (@addpubshelves, $shelf);
}
if (@addpubshelves) {
- $template->param( addpubshelves => scalar (@addpubshelves));
- $template->param( addpubshelvesloop => \@addpubshelves);
+ $template->param( addpubshelves => scalar (@addpubshelves));
+ $template->param( addpubshelvesloop => \@addpubshelves);
}
if (defined $barshelves) {
- $template->param( addbarshelves => scalar (@$barshelves));
- $template->param( addbarshelvesloop => $barshelves);
+ $template->param( addbarshelves => scalar (@$barshelves));
+ $template->param( addbarshelvesloop => $barshelves);
}
my $content_type = ($format eq 'rss' or $format eq 'atom') ? $format : 'html';
template_name => "opac-sendbasketform.tmpl",
query => $query,
type => "opac",
- authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
+ authnotrequired => 0,
flagsrequired => { borrow => 1 },
}
);
template_name => "opac-sendshelfform.tmpl",
query => $query,
type => "opac",
- authnotrequired => 1,
+ authnotrequired => 0,
flagsrequired => { borrow => 1 },
}
);
# Copyright 2000-2002 Katipo Communications
+# Parts Copyright Catalyst IT 2011
#
# This file is part of Koha.
#
";
$template->param(ccodesearch => 1);
}else{
- $whereclause .= ' AND biblioitems.itemtype='.$dbh->quote($itemtype) if $itemtype;
+ if ($itemtype){
+ if (C4::Context->preference('item-level_itypes')){
+ $whereclause .= ' AND items.itype = ' . $dbh->quote($itemtype);
+ }
+ else {
+ $whereclause .= ' AND biblioitems.itemtype='.$dbh->quote($itemtype);
+ }
+ }
$query = "SELECT datecreated, biblio.biblionumber, title,
author, sum( items.issues ) AS tot, biblioitems.itemtype,
biblioitems.publishercode,biblioitems.publicationyear,
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/;
}
$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;
}
}
$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
-$borr->{'debarred'} = C4::Dates->new($borr->{'debarred'},'iso')->output;
my @bordat;
$bordat[0] = $borr;
OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
surname => $borr->{surname},
showname => $borr->{showname},
+
);
#get issued items ....
if ($issues){
foreach my $issue ( sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues ) {
# check for reserves
- my ( $restype, $res ) = CheckReserves( $issue->{'itemnumber'} );
+ my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} );
if ( $restype ) {
$issue->{'reserved'} = 1;
}
template_name => "opac-userupdate.tmpl",
query => $query,
type => "opac",
- authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
+ authnotrequired => 0,
flagsrequired => { borrow => 1 },
debug => 1,
}
# get all the fields:
my $message = <<"EOF";
-Patron $borr->{'cardnumber'}
+Patron $borr->{'cardnumber'} has requested to change her/his personal details.
+Please check these new details and make the changes to these fields:
-has requested to change her/his personal details.
-Please check these new details and make the changes:
EOF
my $streetnumber = $borr->{'streetnumber'} || '';
$borrowerfield = format_date( $borr->{'dateofbirth'} ) || '';
}
- if($borrowerfield eq $newfield) {
- $message .= "$field : $borrowerfield --> $newfield\n";
- } else {
- $message .= uc($field) . " : $borrowerfield --> $newfield\n";
+ if($borrowerfield ne $newfield) {
+ $message .= $field . " : $borrowerfield --> $newfield\n";
}
}
+
+ $message .= "\nEdit this patron's record: http://".C4::Context->preference('staffClientBaseURL ')."/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=".$borr->{'borrowernumber'}."&categorycode=".$borr->{'categorycode'} if C4::Context->preference('staffClientBaseURL ');
+
$message .= "\n\nThanks,\nKoha\n\n";
my %mail = (
To => $updateemailaddress,
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;
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;
}
my $line = $input->param("Line");
my $column = $input->param("Column");
my @filters = $input->param("Filter");
-$filters[0]= format_date_in_iso($filters[0]);
-$filters[1]= format_date_in_iso($filters[1]);
-$filters[2]= format_date_in_iso($filters[2]);
-$filters[3]= format_date_in_iso($filters[3]);
+$filters[0] = format_date_in_iso( $filters[0] );
+$filters[1] = format_date_in_iso( $filters[1] );
+$filters[2] = format_date_in_iso( $filters[2] );
+$filters[3] = format_date_in_iso( $filters[3] );
my $podsp = $input->param("PlacedOnDisplay");
my $rodsp = $input->param("ReceivedOnDisplay");
my $aodsp = $input->param("AcquiredOnDisplay"); ##added by mason.
my $output = $input->param("output");
my $basename = $input->param("basename");
-#warn "calcul : ".$calc;
my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => $fullreportname,
query => $input,
my @linefilter;
- # warn "filtres ".@filters[0];
- # warn "filtres ".@filters[1];
- # warn "filtres ".@filters[2];
- # warn "filtres ".@filters[3];
-
$linefilter[0] = @$filters[0] if ( $line =~ /closedate/ );
$linefilter[1] = @$filters[1] if ( $line =~ /closedate/ );
$linefilter[0] = @$filters[2] if ( $line =~ /received/ );
$linefilter[1] = @$filters[3] if ( $line =~ /received/ );
-# $linefilter[0] = @$filters[4] if ( $line =~ /acquired/ );
-# $linefilter[1] = @$filters[5] if ( $line =~ /acquired/ );
-
$linefilter[0] = @$filters[4] if ( $line =~ /bookseller/ );
$linefilter[0] = @$filters[5] if ( $line =~ /itemtype/ );
$linefilter[0] = @$filters[6] if ( $line =~ /budget/ );
$linefilter[0] = @$filters[7] if ( $line =~ /sort1/ );
$linefilter[0] = @$filters[8] if ( $line =~ /sort2/ );
- #warn "filtre lignes".$linefilter[0]." ".$linefilter[1];
- #
my @colfilter;
$colfilter[0] = @$filters[0] if ( $column =~ /closedate/ );
$colfilter[1] = @$filters[1] if ( $column =~ /closedate/ );
$colfilter[0] = @$filters[2] if ( $column =~ /received/ );
$colfilter[1] = @$filters[3] if ( $column =~ /received/ );
-# $colfilter[0] = @$filters[4] if ( $column =~ /acquired/ );
-# $colfilter[1] = @$filters[5] if ( $column =~ /acquired/ );
$colfilter[0] = @$filters[4] if ( $column =~ /bookseller/ );
$colfilter[0] = @$filters[5] if ( $column =~ /itemtype/ );
$colfilter[0] = @$filters[6] if ( $column =~ /budget/ );
$colfilter[0] = @$filters[7] if ( $column =~ /sort1/ );
$colfilter[0] = @$filters[8] if ( $column =~ /sort2/ );
- #warn "filtre col ".$colfilter[0]." ".$colfilter[1];
-
-# warn "line=$line, podsp=$podsp, rodsp=$rodsp, aodsp=$aodsp\n";
-
# 1st, loop rows.
my $linefield;
if ( ( $line =~ /closedate/ ) and ( $podsp == 1 ) ) {
#Display by day
- $linefield .= "dayname($line)";
+ $linefield .= "concat(hex(weekday($line)+1),'-',dayname($line))";
}
elsif ( ( $line =~ /closedate/ ) and ( $podsp == 2 ) ) {
#Display by Month
- $linefield .= "monthname($line)";
+ $linefield .= "concat(hex(month($line)),'-',monthname($line))";
}
elsif ( ( $line =~ /closedate/ ) and ( $podsp == 3 ) ) {
elsif ( ( $line =~ /received/ ) and ( $rodsp == 1 ) ) {
#Display by day
- $linefield .= "dayname($line)";
+ $linefield .= "concat(hex(weekday($line)+1),'-',dayname($line))";
}
elsif ( ( $line =~ /received/ ) and ( $rodsp == 2 ) ) {
#Display by Month
- $linefield .= "monthname($line)";
+ $linefield .= "concat(hex(month($line)),'-',monthname($line))";
}
elsif ( ( $line =~ /received/ ) and ( $rodsp == 3 ) ) {
$linefield .= "Year($line)";
}
-# elsif ( ( $line =~ /acquired/ ) and ( $aodsp == 1 ) ) {
-#
-# #Display by day
-# $linefield .= "dayname($line)";
-# }
-# elsif ( ( $line =~ /acquired/ ) and ( $aodsp == 2 ) ) {
-#
-# #Display by Month
-# $linefield .= "monthname($line)";
-# }
-# elsif ( ( $line =~ /acquired/ ) and ( $aodsp == 3 ) ) {
-#
-# #Display by Year
-# $linefield .= "Year($line)";
-#
-# }
else {
$linefield .= $line;
}
LEFT JOIN aqbooksellers ON (aqbasket.booksellerid=aqbooksellers.id) WHERE (aqorders.basketno=aqbasket.basketno)
AND $line IS NOT NULL AND $line <> '' ";
-
-# LEFT JOIN aqorderdelivery ON (aqorders.ordernumber =aqorderdelivery.ordernumber )
if (@linefilter) {
if ( $linefilter[1] ) {
( $linefilter[0] )
and ( ( $line =~ /closedate/ )
or ( $line =~ /received/ ))
-# or ( $line =~ /acquired/ ) )
)
{
$strsth .= " AND $line >= ? ";
$strsth .= " GROUP BY $linefield";
$strsth .= " ORDER BY $line";
- #warn "377:strsth= $strsth";
-
my $sth = $dbh->prepare($strsth);
if ( (@linefilter) and ( $linefilter[1] ) ) {
$sth->execute( $linefilter[0], $linefilter[1] );
}
$cell{totalrow} = 0;
}
-# warn "column=$column, podsp=$podsp, rodsp=$rodsp, aodsp=$aodsp\n";
-
# 2nd, loop cols.
my $colfield;
if ( ( $column =~ /closedate/ ) and ( $podsp == 1 ) ) {
#Display by day
- $colfield .= "dayname($column)";
+ $colfield .= "concat(hex(weekday($column)+1),'-',dayname($column))";
}
elsif ( ( $column =~ /closedate/ ) and ( $podsp == 2 ) ) {
#Display by Month
- $colfield .= "monthname($column)";
+ $colfield .= "concat(hex(month($column)),'-',monthname($column))";
}
elsif ( ( $column =~ /closedate/ ) and ( $podsp == 3 ) ) {
elsif ( ( $column =~ /received/ ) and ( $rodsp == 1 ) ) {
#Display by day
- $colfield .= "dayname($column)";
+ $colfield .= "concat(hex(weekday($column)+1),'-',dayname($column))";
}
elsif ( ( $column =~ /received/ ) and ( $rodsp == 2 ) ) {
#Display by Month
- $colfield .= "monthname($column)";
+ $colfield .= "concat(hex(month($column)),'-',monthname($column))";
}
elsif ( ( $column =~ /received/ ) and ( $rodsp == 3 ) ) {
$colfield .= "Year($column)";
}
-# elsif ( ( $column =~ /dateaccessioned/ ) and ( $aodsp == 1 ) ) {
-#
-# #Display by day
-# $colfield .= "dayname($column)";
-# }
-# elsif ( ( $column =~ /dateaccessioned/ ) and ( $aodsp == 2 ) ) {
-#
-# #Display by Month
-# $colfield .= "monthname($column)";
-# }
-# elsif ( ( $column =~ /dateaccessioned/ ) and ( $aodsp == 3 ) ) {
-#
-# #Display by Year
-# $colfield .= "Year($column)";
-#
-# }
else {
$colfield .= $column;
}
WHERE (aqorders.basketno=aqbasket.basketno) AND
$column IS NOT NULL AND $column <> '' ";
-# LEFT JOIN aqorderdelivery ON (aqorders.ordernumber =aqorderdelivery.ordernumber )
-
if (@colfilter) {
if ( $colfilter[1] ) {
if ( $colfilter[0] ) {
( $colfilter[0] )
and ( ( $column =~ /closedate/ )
or ( $line =~ /received/ ))
-# or ( $line =~ /acquired/ ) )
)
{
$strsth2 .= " AND $column >= ? ";
$strsth2 .= " GROUP BY $colfield";
- $strsth2 .= " ORDER BY $column";
+ $strsth2 .= " ORDER BY $colfield";
my $sth2 = $dbh->prepare($strsth2);
}
}
- # warn "fin des titres colonnes";
-
my $i = 0;
my @totalcol;
my $hilighted = -1;
#Initialization of cell values.....
my %table;
-# warn "init table...\n";
foreach my $row (@loopline) {
foreach my $col (@loopcol) {
$table{ $row->{rowtitle} }->{ $col->{coltitle} } = 0;
LEFT JOIN aqbooksellers ON (aqbasket.booksellerid=aqbooksellers.id)
WHERE (aqorders.basketno=aqbasket.basketno) ";
-
-# LEFT JOIN aqorderdelivery ON (aqorders.ordernumber =aqorderdelivery.ordernumber )
@$filters[0] =~ s/\*/%/g if ( @$filters[0] );
$strcalc .= " AND aqbasket.closedate >= '" . @$filters[0] . "'"
@$filters[3] =~ s/\*/%/g if ( @$filters[3] );
$strcalc .= " AND aqorders.datereceived <= '" . @$filters[3] . "'"
if ( @$filters[3] );
-# @$filters[4] =~ s/\*/%/g if ( @$filters[4] );
-# $strcalc .= " AND aqbasket.closedate >= '" . @$filters[4] . "'"
-# if ( @$filters[4] );
-# @$filters[5] =~ s/\*/%/g if ( @$filters[5] );
-# $strcalc .= " AND aqbasket.closedate <= '" . @$filters[5] . "'"
-# if ( @$filters[5] );
@$filters[4] =~ s/\*/%/g if ( @$filters[4] );
$strcalc .= " AND aqbooksellers.name LIKE '" . @$filters[4] . "'"
if ( @$filters[4] );
$strcalc .= " AND aqorders.datecancellationprinted is NULL ";
$strcalc .= " GROUP BY $linefield, $colfield ORDER BY $linefield,$colfield";
-
-# warn $strcalc . "\n";
-
my $dbcalc = $dbh->prepare($strcalc);
$dbcalc->execute;
- # warn "filling table";
my $emptycol;
while ( my ( $row, $col, $value ) = $dbcalc->fetchrow ) {
next if ($row eq undef || $col eq undef);
-# warn "filling table $row / $col / $value ";
-
$emptycol = 1 if ( !defined($col) );
$col = "zzEMPTY" if ( !defined($col) );
$row = "zzEMPTY" if ( !defined($row) );
$hilighted = -$hilighted;
}
- # warn "footer processing";
foreach my $col (@loopcol) {
my $total = 0;
foreach my $row (@looprow) {
( $col->{coltitle} eq "NULL" ) ? "zzEMPTY"
: $col->{coltitle}
};
-
-# warn "value added ".$table{$row->{rowtitle}}->{$col->{coltitle}}. "for line ".$row->{rowtitle};
}
- # warn "summ for column ".$col->{coltitle}." = ".$total;
push @loopfooter, { 'totalcol' => $total };
}
}
elsif ($phase eq 'Export'){
- binmode STDOUT, ':utf8';
+ binmode STDOUT, ':encoding(UTF-8)';
# export results to tab separated text or CSV
my $sql = $input->param('sql'); # FIXME: use sql from saved report ID#, not new user-supplied SQL!
my $dbh = C4::Context->dbh;
my $branches=GetBranches();
my @branches;
+ my $default;
my @select_branch;
my %select_branches;
push @select_branch,"";
$select_branches{""} = "";
- foreach my $branch (keys %$branches) {
+ for my $branch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
push @select_branch, $branch;
$select_branches{$branch} = $branches->{$branch}->{'branchname'};
+ $default = C4::Context->userenv->{'branch'} if (C4::Context->userenv && C4::Context->userenv->{'branch'});
}
my $CGIbranch=CGI::scrolling_list( -name => 'value',
-id => 'value',
-values => \@select_branch,
-labels => \%select_branches,
-size => 1,
- -multiple => 0 );
+ -multiple => 0,
+ -default => $default, );
$template->param(CGIbranch => $CGIbranch);
return $template;
}
FROM itemtypes,items
WHERE items.itype=itemtypes.itemtype
AND items.holdingbranch=?
- GROUP BY items.itype");
+ GROUP BY items.itype
+ ORDER BY itemtypes.description");
}
else {
WHERE biblioitems.itemtype=itemtypes.itemtype
AND items.biblioitemnumber=biblioitems.biblioitemnumber
AND items.holdingbranch=?
- GROUP BY biblioitems.itemtype");
+ GROUP BY biblioitems.itemtype
+ ORDER BY itemtypes.description");
}
$sth->execute($branch);
} else {
SELECT description,items.itype AS itemtype, COUNT(*) AS total
FROM itemtypes,items
WHERE items.itype=itemtypes.itemtype
- GROUP BY items.itype");
+ GROUP BY items.itype
+ ORDER BY itemtypes.description");
}
else {
$sth = $dbh->prepare("SELECT description, biblioitems.itemtype, COUNT(*) AS total
FROM itemtypes, biblioitems,items
WHERE biblioitems.itemtype=itemtypes.itemtype
AND biblioitems.biblioitemnumber = items.biblioitemnumber
- GROUP BY biblioitems.itemtype");
+ GROUP BY biblioitems.itemtype
+ ORDER BY itemtypes.description");
}
$sth->execute;
}
$globalline{loopitemtype} = \@results;
$globalline{total} = $grantotal;
$globalline{branch} = $branch;
+ $globalline{branchname} = GetBranchName($branch);
push @mainloop,\%globalline;
return \@mainloop;
}
use strict;
+use warnings;
use CGI;
flagsrequired => {reports => '*'},
debug => 0,
});
-our $sep = $input->param("sep");
+our $sep = $input->param("sep") || '';
$sep = "\t" if ($sep eq 'tabulation');
$template->param(do_it => $do_it,
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
$template->param(
categoryloop => $categoryloop,
itemtypeloop => \@itemtypeloop,
+ locationloop => \@locations,
ccodeloop => \@ccodes,
branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'}),
hassort1=> $hassort1,
# Filters
# Checking filters
#
- my @loopfilter;
- foreach my $filter (keys %$filters_hashref){
- $$filters_hashref{$filter} =~s/\*/%/;
- $$filters_hashref{$filter} = format_date_in_iso($$filters_hashref{$_}) if ($_=~/date/);
- }
- #display
- @loopfilter= map{{ crit=>$_ ,filter=>($_=~/date/?
- format_date($$filters_hashref{$_})
- :$$filters_hashref{$_}
- )
- }
- } sort keys %$filters_hashref;
+ my @loopfilter;
+ foreach my $filter ( keys %$filters_hashref ) {
+ $filters_hashref->{$filter} =~ s/\*/%/;
+ $filters_hashref->{$filter} =
+ format_date_in_iso( $filters_hashref->{$filter} )
+ if ( $filter =~ /date/ );
+ }
+
+ #display
+ @loopfilter = map {
+ {
+ crit => $_,
+ filter => (
+ $_ =~ /date/
+ ? format_date( $filters_hashref->{$_} )
+ : $filters_hashref->{$_}
+ )
+ }
+ } sort keys %$filters_hashref;
if ($linefield =~ /^biblio\./ or $colfield =~ /^biblio\./ or any {$_=~/biblio/}keys %$filters_hashref);
$strcalc .= "LEFT JOIN items ON reserves.itemnumber=items.itemnumber "
if ($linefield =~ /^items\./ or $colfield =~ /^items\./ or any {$_=~/items/}keys %$filters_hashref);
-
+
my @sqlparams;
my @sqlorparams;
my @sqlor;
my $string;
my $stringfield=$filter;
$stringfield=~s/\_[a-z_]+$//;
- warn $stringfield;
if ($filter=~/ /){
$string=$stringfield;
}
push @sqlor, qq{( }.changeifreservestatus($filter)." = ? ) ";
push @sqlorparams, $$filters_hashref{$filter};
}
+ elsif ($filter=~/_endex$/){
+ $string = " $stringfield < ? ";
+ }
elsif ($filter=~/_end$/){
$string = " $stringfield <= ? ";
}
$dbcalc->execute(@sqlparams,@sqlparams);
my ($emptycol,$emptyrow);
my $data = $dbcalc->fetchall_hashref([qw(line col)]);
- my @loopline;
my %cols_hash;
foreach my $row (keys %$data){
push @loopline, $row;
for my $col ( sort keys %cols_hash ) {
my $total = 0;
foreach my $row (@loopline) {
- $total += $$data{$row}{$col}{calculation};
+ $total += $data->{$row}{$col}{calculation} if $data->{$row}{$col}{calculation};
$debug and warn "value added ".$$data{$row}{$col}{calculation}. "for line ".$row;
}
push @loopfooter, {'totalcol' => $total};
push @loopcol, {'coltitle' => $col,
coltitle_display=>display_value($colfield,$col)};
}
-
# the header of the table
$globalline{loopfilter}=\@loopfilter;
# the core of the table
($string eq "NULL") and return 'zzEMPTY';
return $string; # else return the valid value
}
-sub display_value{
- my ($crit,$value)=@_;
- my $display_value =
- ($crit =~ /ccode/ ) ? $ccodes->{$value} :
- ($crit =~ /location/) ? $locations->{$value} :
- ($crit =~ /itemtype/) ? $itemtypes->{$value}->{description} :
- ($crit =~ /branch/) ? GetBranchName($value):
- ($crit =~ /reservestatus/) ? reservestatushuman($value):
- $value; # default fallback
- if ($crit =~ /(sort1|sort2)/) {
- $display_value=GetAuthorisedValues("B$_",$value);
- } elsif ($crit =~ /category/) {
- my $element=any{$value eq $_->{categorycode}} @$categoryloop;
- $display_value=$$element{description};
- }
- return $display_value;
+sub display_value {
+ my ( $crit, $value ) = @_;
+ my $display_value =
+ ( $crit =~ /ccode/ ) ? $ccodes->{$value}
+ : ( $crit =~ /location/ ) ? $locations->{$value}
+ : ( $crit =~ /itemtype/ ) ? $itemtypes->{$value}->{description}
+ : ( $crit =~ /branch/ ) ? GetBranchName($value)
+ : ( $crit =~ /reservestatus/ ) ? reservestatushuman($value)
+ : $value; # default fallback
+ if ($crit =~ /sort1/) {
+ foreach (@$Bsort1) {
+ ($value eq $_->{authorised_value}) or next;
+ $display_value = $_->{lib} and last;
+ }
+ }
+ elsif ($crit =~ /sort2/) {
+ foreach (@$Bsort2) {
+ ($value eq $_->{authorised_value}) or next;
+ $display_value = $_->{lib} and last;
+ }
+ }
+ elsif ( $crit =~ /category/ ) {
+ foreach (@$categoryloop) {
+ ( $value eq $_->{categorycode} ) or next;
+ $display_value = $_->{description} and last;
+ }
+ }
+ return $display_value;
}
sub reservestatushuman{
my ($val)=@_;
$template->param(datas => \@datas,
do_it => 1);
}else{
- binmode STDOUT, ':utf8';
+ binmode STDOUT, ':encoding(UTF-8)';
print $input->header(-type => 'application/vnd.sun.xml.calc',
-encoding => 'utf-8',
-name => "$basename.csv",
foreach my $borrower (
sort {
- $a->{surname}
- . $a->{firstname} cmp $b->{surname}
- . $b->{firstname}
+ uc($a->{surname}
+ . $a->{firstname}) cmp uc($b->{surname}
+ . $b->{firstname})
} @{$borrowerslist}
)
{
);
my $op = $query->param('op') || '';
+my $status = $query->param('status') || 0;
my $reviewid = $query->param('reviewid');
+my $offset = $query->param('offset') || 0;
+my $count = C4::Context->preference('numSearchResults') || 20;
+my $total = numberofreviews($status);
if ( $op eq 'approve' ) {
approvereview($reviewid);
}
+elsif ( $op eq 'unapprove' ) {
+ unapprovereview($reviewid);
+}
elsif ( $op eq 'delete' ) {
deletereview($reviewid);
}
-my $reviews = getallreviews(0);
+my $reviews = getallreviews($status,$offset,$count);
foreach ( @$reviews ) {
my $borrowernumber = $_->{borrowernumber};
$_->{firstname} = $borrowerData->{'firstname'};
}
-$template->param( reviews => $reviews );
+my $url = "/cgi-bin/koha/reviews/reviewswaiting.pl?status=$status";
+
+$template->param(
+ status => $status,
+ reviews => $reviews,
+ pagination_bar => pagination_bar( $url, ( int( $total / $count ) ) + ( ( $total % $count ) > 0 ? 1 : 0 ), $offset, "offset" )
+);
output_html_with_http_headers $query, $cookie, $template->output;
print $query->redirect("routing.pl?subscriptionid=$subscriptionid");
}
-my ($routing, @routinglist) = getroutinglist($subscriptionid);
+my @routinglist = getroutinglist($subscriptionid);
my $subs = GetSubscription($subscriptionid);
my ($tmp ,@serials) = GetSerials($subscriptionid);
my ($template, $loggedinuser, $cookie);
my $const = 'o';
my $notes;
my $title = $subs->{'bibliotitle'};
- for(my $i=0;$i<$routing;$i++){
- my $sth = $dbh->prepare("SELECT * FROM reserves WHERE biblionumber = ? AND borrowernumber = ?");
- $sth->execute($biblio,$routinglist[$i]->{'borrowernumber'});
- my $data = $sth->fetchrow_hashref;
+ for my $routing ( @routinglist ) {
+ my $sth = $dbh->prepare('SELECT * FROM reserves WHERE biblionumber = ? AND borrowernumber = ? LIMIT 1');
+ $sth->execute($biblio,$routing->{borrowernumber});
+ my $reserve = $sth->fetchrow_hashref;
- # warn "$routinglist[$i]->{'borrowernumber'} is the same as $data->{'borrowernumber'}";
- if($routinglist[$i]->{'borrowernumber'} == $data->{'borrowernumber'}){
- ModReserve($routinglist[$i]->{'ranking'},$biblio,$routinglist[$i]->{'borrowernumber'},$branch);
- } else {
- AddReserve($branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},'',$notes,$title);
- }
- }
+ if($routing->{borrowernumber} == $reserve->{borrowernumber}){
+ ModReserve($routing->{ranking},$biblio,$routing->{borrowernumber},$branch);
+ } else {
+ AddReserve($branch,$routing->{borrowernumber},$biblio,$const,\@bibitems,$routing->{ranking}, undef, undef, $notes,$title);
+ }
+ }
}
($template, $loggedinuser, $cookie)
});
}
-my @results;
-my $data;
-for(my $i=0;$i<$routing;$i++){
- $data=GetMember('borrowernumber' => $routinglist[$i]->{'borrowernumber'});
- $data->{'location'}=$data->{'branchcode'};
- $data->{'name'}="$data->{'firstname'} $data->{'surname'}";
- $data->{'routingid'}=$routinglist[$i]->{'routingid'};
- $data->{'subscriptionid'}=$subscriptionid;
- push(@results, $data);
+my $memberloop = [];
+for my $routing (@routinglist) {
+ my $member = GetMember( borrowernumber => $routing->{borrowernumber} );
+ $member->{name} = "$member->{firstname} $member->{surname}";
+ push @{$memberloop}, $member;
}
my $routingnotes = $serials[0]->{'routingnotes'};
issue => $issue,
issue_escaped => URI::Escape::uri_escape($issue),
subscriptionid => $subscriptionid,
- memberloop => \@results,
+ memberloop => $memberloop,
routingnotes => $routingnotes,
hasRouting => check_routing($subscriptionid),
);
addroutingmember($borrowernumber,$subscriptionid);
}
if($op eq 'save'){
- my $sth = $dbh->prepare("UPDATE serial SET routingnotes = ? WHERE subscriptionid = ?");
+ my $sth = $dbh->prepare('UPDATE serial SET routingnotes = ? WHERE subscriptionid = ?');
$sth->execute($notes,$subscriptionid);
my $urldate = URI::Escape::uri_escape($date_selected);
print $query->redirect("routing-preview.pl?subscriptionid=$subscriptionid&issue=$urldate");
}
-my ($routing, @routinglist) = getroutinglist($subscriptionid);
+my @routinglist = getroutinglist($subscriptionid);
my $subs = GetSubscription($subscriptionid);
my ($count,@serials) = GetSerials($subscriptionid);
my $serialdates = GetLatestSerials($subscriptionid,$count);
}
my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "serials/routing.tmpl",
+= get_template_and_user({template_name => 'serials/routing.tmpl',
query => $query,
- type => "intranet",
+ type => 'intranet',
authnotrequired => 0,
flagsrequired => {serials => 'routing'},
debug => 1,
});
-my @results;
-my $data;
-for(my $i=0;$i<$routing;$i++){
- $data=GetMember('borrowernumber' => $routinglist[$i]->{'borrowernumber'});
- $data->{'location'}=$data->{'branchcode'};
- if ($data->{firstname} ) {
- $data->{name} = $data->{firstname} . q| |;
+my $member_loop = [];
+for my $routing ( @routinglist ) {
+ my $member=GetMember('borrowernumber' => $routing->{borrowernumber});
+ $member->{location} = $member->{branchcode};
+ if ($member->{firstname} ) {
+ $member->{name} = $member->{firstname} . q| |;
}
else {
- $data->{name} = q{};
+ $member->{name} = q{};
}
- if ($data->{surname} ) {
- $data->{name} .= $data->{surname};
+ if ($member->{surname} ) {
+ $member->{name} .= $member->{surname};
}
- $data->{'routingid'}=$routinglist[$i]->{'routingid'};
- $data->{'subscriptionid'}=$subscriptionid;
- if (! $routinglist[$i]->{routingid} ) {
- $routinglist[$i]->{routingid} = q||;
- }
- my $rankingbox = '<select name="itemrank" onchange="reorder_item('
- . $subscriptionid . ',' .$routinglist[$i]->{'routingid'} . ',this.options[this.selectedIndex].value)">';
- for(my $j=1; $j <= $routing; $j++) {
- $rankingbox .= "<option ";
- if($routinglist[$i]->{ranking} && $routinglist[$i]->{ranking} == $j){
- $rankingbox .= " selected=\"selected\"";
- }
- $rankingbox .= " value=\"$j\">$j</option>";
- }
- $rankingbox .= "</select>";
- $data->{'routingbox'} = $rankingbox;
-
- push(@results, $data);
-}
+ $member->{routingid}=$routing->{routingid} || q{};
+ $member->{ranking} = $routing->{ranking} || q{};
-# for adding routing list
-my $new;
-if ($op eq 'new') {
- $new = 1;
-} else {
-# for modify routing list default
- $new = 0;
+ push(@{$member_loop}, $member);
}
$template->param(
- title => $subs->{'bibliotitle'},
+ title => $subs->{bibliotitle},
subscriptionid => $subscriptionid,
- memberloop => \@results,
- op => $new,
+ memberloop => $member_loop,
+ op => $op eq 'new',
dates => $dates,
routingnotes => $serials[0]->{'routingnotes'},
hasRouting => check_routing($subscriptionid),
);
- output_html_with_http_headers $query, $cookie, $template->output;
+output_html_with_http_headers $query, $cookie, $template->output;
print $query->redirect('/cgi-bin/koha/serials/serials-collection.pl?subscriptionid='.$subscriptionid);
}
+my $subscriptioncount;
my ($location, $callnumber);
if (@subscriptionid){
my @subscriptioninformation=();
@subscriptioninformation=(@$tmpsubscription,@subscriptioninformation);
}
$subscriptions=PrepareSerialsData(\@subscriptioninformation);
+ $subscriptioncount = CountSubscriptionFromBiblionumber($subscriptiondescs->[0]{'biblionumber'});
} else {
$subscriptiondescs = GetSubscriptionsFromBiblionumber($biblionumber) ;
my $subscriptioninformation = GetFullSubscriptionsFromBiblionumber($biblionumber);
chop $subscriptionidlist;
$template->param(
- onesubscription => (scalar(@$subscriptiondescs)==1),
subscriptionidlist => $subscriptionidlist,
biblionumber => $biblionumber,
subscriptions => $subscriptiondescs,
suggestion => C4::Context->preference("suggestion"),
virtualshelves => C4::Context->preference("virtualshelves"),
subscr=>$query->param('subscriptionid'),
+ subscriptioncount => $subscriptioncount,
location => $locationlib,
callnumber => $callnumber,
);
print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=serials-home.pl\"></html>";
exit;
}
-my ($routing, @routinglist) = getroutinglist($subscriptionid);
+
my ($totalissues,@serialslist) = GetSerials($subscriptionid);
$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
# the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...)
use XML::Simple;
my $query = new CGI;
-binmode STDOUT, ":utf8";
+binmode STDOUT, ':encoding(UTF-8)';
my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
unless ($status eq "ok") {
use C4::Charset;
my $query = new CGI;
-binmode STDOUT, ":utf8";
+binmode STDOUT, ':encoding(UTF-8)';
my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
unless ($status eq "ok") {
--- /dev/null
+# Copyright 2010 Chris Cormack
+#
+# 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 Test::More;
+use File::Spec;
+use File::Find;
+use IO::File;
+
+my @files =('kohaversion.pl','installer/data/mysql/updatedatabase.pl');
+
+foreach my $file (@files){
+ next unless -f $file;
+ my @name_parts = File::Spec->splitpath($file);
+ my %dirs = map { $_ => 1 } File::Spec->splitdir($name_parts[1]);
+ next if exists $dirs{'.git'};
+
+ my $fh = IO::File->new($file, 'r');
+ my $xxx_found = 0;
+ my $line = 0;
+ while (<$fh>) {
+ $line++;
+ if (/XXX/i) {
+ #two lines are an exception for updatedatabase (routine SetVersion and TransferToNum)
+ next if $file=~ /updatedatabase/ && ( /s\/XXX\$\/999\/;/ || /\$_\[0\]=~ \/XXX\$\/;/ );
+ $xxx_found = 1;
+ last;
+ }
+ }
+ close $fh;
+ if ($xxx_found) {
+ fail("$file has no XXX in it");
+ diag("XXX found in line $line");
+ } else {
+ pass("$file has no XXX in it");
+ }
+}
+
+done_testing();
use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
},
}, $lib);
+
+$lib = File::Spec->rel2abs('Koha');
+find(
+ {
+ bydepth => 1,
+ no_chdir => 1,
+ wanted => sub {
+ my $m = $_;
+ return unless $m =~ s/[.]pm$//;
+ $m =~ s{^.*/Koha/}{Koha/};
+ $m =~ s{/}{::}g;
+ use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
+ },
+ },
+ $lib
+);
+
+
done_testing();
use strict;
use warnings;
use Data::Dumper;
+use POSIX qw(strftime);
use C4::Bookseller qw( GetBookSellerFromId );
-use Test::More tests => 37;
+use Test::More tests => 38;
BEGIN {
use_ok('C4::Acquisition');
my $grouped = 0;
my $orders = GetPendingOrders( $supplierid, $grouped );
isa_ok( $orders, 'ARRAY' );
+
+my @lateorders = GetLateOrders(0);
+my $order = $lateorders[0];
+AddClaim( $order->{ordernumber} );
+my $neworder = GetOrder( $order->{ordernumber} );
+is( $neworder->{claimed_date}, strftime( "%Y-%m-%d", localtime(time) ), "AddClaim : Check claimed_date" );
+
SKIP: {
skip 'No relevant orders in database, cannot test baskets', 33 unless( scalar @$orders );
# diag( Data::Dumper->Dump( [ $orders ], [ 'orders' ] ) );
--- /dev/null
+#!/usr/bin/perl
+#
+
+use strict;
+use warnings;
+use C4::Context;
+use C4::Dates;
+use Test::More tests => 5;
+
+BEGIN {
+ use_ok('Koha::Template::Plugin::KohaDates');
+}
+
+my $date = "1973-05-21";
+my $context = C4::Context->new();
+my $dateobj = C4::Dates->new();
+
+my $filter = Koha::Template::Plugin::KohaDates->new();
+ok ($filter, "new()");
+
+
+$context->set_preference( "dateformat", 'iso' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+my $filtered_date = $filter->filter($date);
+is ($filtered_date,$date, "iso conversion") or diag ("iso conversion fails");
+
+#$filter = Koha::Template::Plugin::KohaDates->new();
+$context->set_preference( "dateformat", 'us' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+$filtered_date = $filter->filter($date);
+is ($filtered_date,'05/21/1973', "us conversion") or diag ("us conversion fails $filtered_date");
+
+$context->set_preference( "dateformat", 'metric' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+$filtered_date = $filter->filter($date);
+is ($filtered_date,'21/05/1973', "metric conversion") or diag ("metric conversion fails $filtered_date");
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";
$constraint, $bibitems, $priority, $notes,
$title, $checkitem, $found);
-my ($status, $reserve) = CheckReserves($itemnumber, $barcode);
+my ($status, $reserve, $all_reserves) = CheckReserves($itemnumber, $barcode);
ok($status eq "Reserved", "CheckReserves Test 1");
-($status, $reserve) = CheckReserves($itemnumber);
+($status, $reserve, $all_reserves) = CheckReserves($itemnumber);
ok($status eq "Reserved", "CheckReserves Test 2");
-($status, $reserve) = CheckReserves(undef, $barcode);
+($status, $reserve, $all_reserves) = CheckReserves(undef, $barcode);
ok($status eq "Reserved", "CheckReserves Test 3");
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");
mkdir "$directory/$record_type";
my $sth = $dbh->prepare($record_type eq "biblio" ? "SELECT marc FROM biblioitems" : "SELECT marc FROM auth_header");
$sth->execute();
- open OUT, ">:utf8", "$directory/$record_type/records";
+ open my $out, '>:encoding(UTF-8)', "$directory/$record_type/records";
while (my ($blob) = $sth->fetchrow_array) {
- print OUT $blob;
+ print {$out} $blob;
}
- close OUT;
+ close $out;
my $zebra_server = "${record_type}server";
my $zebra_config = C4::Context->zebraconfig($zebra_server)->{'config'};
my $zebra_db_dir = C4::Context->zebraconfig($zebra_server)->{'directory'};
GetFrameworkCode
GetPublisherNameFromIsbn
TransformKohaToMarc
- TransformKohaToMarcOneField
TransformHtmlToXml
TransformHtmlToMarc
TransformMarcToKoha
ModReserveAffect
ModReserveCancelAll
ModReserveMinusPriority
+ MoveReserve
GetReserveInfo
_FixPriority
_Findgroupreserve
--- /dev/null
+#!/usr/bin/perl
+
+use Modern::Perl;
+use Test::More tests => 2;
+use C4::Context;
+
+my $opacheader = C4::Context->preference('opacheader');
+my $newopacheader = "newopacheader";
+
+C4::Context->set_preference('OPACHEADER', $newopacheader);
+ok(C4::Context->preference('opacheader') eq $newopacheader);
+
+C4::Context->set_preference('opacheader', $opacheader);
+ok(C4::Context->preference('OPACHEADER') eq $opacheader);
[Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval]
-allow_includes =1
\ No newline at end of file
+allow_includes =1
+
+[TestingAndDebugging::RequireUseStrict]
+equivalent_modules = Modern::Perl
+
+[TestingAndDebugging::RequireUseWarnings]
+equivalent_modules = Modern::Perl
\ No newline at end of file
--- /dev/null
+#!/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;
my $limit_ind_branch=(C4::Context->preference('IndependantBranches') &&
C4::Context->userenv &&
- C4::Context->userenv->{flags} % 2 !=1 &&
+ !(C4::Context->userenv->{flags} & 1) &&
C4::Context->userenv->{branch}?1:0);
my $branches = GetBranches($limit_ind_branch);
my $branch = $query->param("branch") || '';
- if ( C4::Context->preference("IndependantBranches") ) {
+ if ( C4::Context->preference("IndependantBranches") &&
+ !(C4::Context->userenv->{flags} & 1) ) {
$branch = C4::Context->userenv->{'branch'};
}
if ($op eq "export") {
- binmode(STDOUT,":utf8");
+ binmode STDOUT, ':encoding(UTF-8)';
print $query->header( -type => 'application/octet-stream',
-charset => 'utf-8',
-attachment=>$filename);
push @{$field_selection}, add_fields('borrowers', 'reserves', 'biblio', 'items');
}
elsif ($module eq 'claimacquisition') {
- push @{$field_selection}, add_fields('aqbooksellers', 'aqorders');
+ push @{$field_selection}, add_fields('aqbooksellers', 'aqorders', 'biblio', 'biblioitems');
}
elsif ($module eq 'claimissues') {
push @{$field_selection}, add_fields('aqbooksellers', 'serial', 'subscription');
--- /dev/null
+#!/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.
+#
+#
+#
+
+=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.
+Images will be resized into thumbnails of 140x200 pixels and larger images of
+800x600 pixels. If the images that are uploaded are larger, they will be
+resized, maintaining aspect ratio.
+
+=cut
+
+use strict;
+use warnings;
+
+use File::Temp;
+use CGI;
+use GD;
+use C4::Context;
+use C4::Auth;
+use C4::Output;
+use C4::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 = !C4::Context->preference("AllowMultipleCovers")
+ || $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 = <FILE> ) {
+ 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
sub create_template_test {
my $includes = shift;
return sub {
- my $tt = Template->new({ABSOLUTE => 1,
- INCLUDE_PATH => $includes });
- my $vars;
- my $output;
- if ( ! ok($tt->process($_,$vars,\$output), $_) ){
- diag($tt->error);
- }
+ my $tt = Template->new(
+ {
+ ABSOLUTE => 1,
+ INCLUDE_PATH => $includes,
+ PLUGIN_BASE => 'Koha::Template::Plugin',
+ }
+ );
+ my $vars;
+ my $output;
+ if ( !ok( $tt->process( $_, $vars, \$output ), $_ ) ) {
+ diag( $tt->error );
+ }
}
}
--- /dev/null
+#!/bin/sh
+#
+# Script to find files that probably should not be executed.
+#
+# Copyright 2010 Catalyst IT Ltd
+#
+# 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.
+
+set -e
+
+find . \
+ -name misc -prune \
+ -o -name svc -prune \
+ -o -name xt -prune \
+ -o -name t -prune \
+ -o -name .git -prune \
+ -o -name blib -prune \
+ -o -name scripts -prune \
+ -o -name debian -prune \
+ -o -executable -type f \
+ '!' -name '*.pl' \
+ '!' -name '*.sh' \
+ '!' -name '*.plugin' \
+ '!' -name unapi \
+ -print