#check to see what accounttype
if ( $data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L' ) {
- ReturnLostItem( $borrowernumber, $data->{'itemnumber'} );
+ C4::Circulation::ReturnLostItem( $borrowernumber, $data->{'itemnumber'} );
}
}
( substr($borrower{'firstname'},0,1)
. substr($borrower{ 'surname' },0,1)
. " ");
+
+ # check if categorycode exists, if not, fallback to default from koha-conf.xml
+ my $dbh = C4::Context->dbh;
+ my $sth = $dbh->prepare("SELECT categorycode FROM categories WHERE categorycode = ?");
+ $sth->execute( uc($borrower{'categorycode'}) );
+ unless ( my $row = $sth->fetchrow_hashref ) {
+ my $default = $mapping{'categorycode'}->{content};
+ $debug && warn "Can't find ", $borrower{'categorycode'}, " default to: $default for ", $borrower{userid};
+ $borrower{'categorycode'} = $default
+ }
+
return %borrower;
}
}
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(
}
$prevtag = @$tags[$i];
}
- $xml .= "</datafield>\n" if @$tags > 0;
+ $xml .= "</datafield>\n" if $xml =~ m/<datafield/;
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' and !$unimarc_and_100_exist ) {
# warn "SETTING 100 for $auth_type";
# 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;
}
# See if the item is on reserve.
- my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
+ my ( $restype, $res, undef ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
if ($restype) {
my $resbor = $res->{'borrowernumber'};
my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor );
);
}
- # 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'});
# 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;
$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"
sub LostItem{
- my ($itemnumber, $mark_returned) = @_;
+ my ($itemnumber, $mark_returned, $charge_fee) = @_;
my $dbh = C4::Context->dbh();
my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title
# if a borrower lost the item, add a replacement cost to the their record
if ( my $borrowernumber = $issues->{borrowernumber} ){
- C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}");
+ C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}")
+ if $charge_fee;
#FIXME : Should probably have a way to distinguish this from an item that really was returned.
#warn " $issues->{'borrowernumber'} / $itemnumber ";
MarkIssueReturned($borrowernumber,$itemnumber) if $mark_returned;
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 preference {
my $self = shift;
- my $var = shift; # The system preference to return
+ my $var = lc(shift); # The system preference to return
if (exists $sysprefs{$var}) {
return $sysprefs{$var};
return $exit_code;
}
-use constant PRESET_FIELDS => [qw(title author isbn issn itemtype barcode callnumber)];
+use constant PRESET_FIELDS => [qw(title author isbn issn itemtype barcode itemcallnumber)];
sub new {
my $invocant = shift;
my $self = '';
$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 ) ];
- $debug and 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;
}
my ($cgi) = @_;
# Check if borrower exists, using a C4::Auth function...
- unless( checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) {
+ unless( C4::Auth::checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) {
return { code => 'PatronNotFound' };
}
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.
# report the import a failure although it really succeded -fbcit
}
# errors thrown while loading installer data should be logged
- warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
- warn $error;
+ if($error) {
+ warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
+ warn "$error";
+ }
return $error;
}
$data->{cardnumber} = $idata->{cardnumber};
$data->{surname} = $idata->{surname};
$data->{firstname} = $idata->{firstname};
+ $data->{lastreneweddate} = $idata->{lastreneweddate};
$datedue = $idata->{'date_due'};
if (C4::Context->preference("IndependantBranches")){
my $userenv = C4::Context->userenv;
$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 @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;
($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" :
($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" :
($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" :
- ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" :
($table eq 'reserves' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" :
($table eq 'borrowers' ) ? "SELECT * FROM $table WHERE borrowernumber = ?" :
($table eq 'branches' ) ? "SELECT * FROM $table WHERE branchcode = ?" :
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 $query = "INSERT INTO messages ( borrowernumber, branchcode, message_type, message ) VALUES ( ?, ?, ?, ? )";
my $sth = $dbh->prepare($query);
$sth->execute( $borrowernumber, $branchcode, $message_type, $message );
-
+ logaction("MEMBERS", "ADDCIRCMESSAGE", $borrowernumber, $message) if C4::Context->preference("BorrowersLog");
return 1;
}
my ( $message_id ) = @_;
my $dbh = C4::Context->dbh;
-
- my $query = "DELETE FROM messages WHERE message_id = ?";
+ my $query = "SELECT * FROM messages WHERE message_id = ?";
my $sth = $dbh->prepare($query);
$sth->execute( $message_id );
+ my $message = $sth->fetchrow_hashref();
+ $query = "DELETE FROM messages WHERE message_id = ?";
+ $sth = $dbh->prepare($query);
+ $sth->execute( $message_id );
+ logaction("MEMBERS", "DELCIRCMESSAGE", $message->{'borrowernumber'}, $message->{'message'}) if C4::Context->preference("BorrowersLog");
}
END { } # module clean-up code here (global destructor)
use C4::Budgets qw(GetCurrency);
use C4::Templates;
-#use HTML::Template::Pro;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
BEGIN {
# subs to move to Members.pm
push @EXPORT, qw(
&CheckBorrowerDebarred
- &UpdateBorrowerDebarred
);
# subs to move to Biblio.pm
push @EXPORT, qw(
sub GetFine {
my ( $itemnum, $borrowernumber ) = @_;
my $dbh = C4::Context->dbh();
- my $query = "SELECT sum(amountoutstanding) FROM accountlines
- where accounttype like 'F%'
- AND amountoutstanding > 0 AND itemnumber = ? AND borrowernumber=?";
+ my $query = q|SELECT sum(amountoutstanding) as fineamount FROM accountlines
+ where accounttype like 'F%'
+ AND amountoutstanding > 0 AND itemnumber = ? AND borrowernumber=?|;
my $sth = $dbh->prepare($query);
$sth->execute( $itemnum, $borrowernumber );
- my $data = $sth->fetchrow_hashref();
- return ( $data->{'sum(amountoutstanding)'} );
+ my $fine = $sth->fetchrow_hashref();
+ if ($fine->{fineamount}) {
+ return $fine->{fineamount};
+ }
+ return 0;
}
return $debarredstatus;
}
-=head2 UpdateBorrowerDebarred
-
-($borrowerstatut) = &UpdateBorrowerDebarred($borrowernumber, $todate);
-
-update status of borrowers in borrowers table (field debarred)
-
-C<$borrowernumber> borrower number
-
-=cut
-
-sub UpdateBorrowerDebarred{
- my ( $borrowernumber, $todate ) = @_;
- my $dbh = C4::Context->dbh;
- my $query = qq|UPDATE borrowers
- SET debarred=?
- WHERE borrowernumber=?
- |;
- my $sth = $dbh->prepare($query);
- $sth->execute( $todate, $borrowernumber );
- $sth->finish;
- return 1;
-}
=head2 CheckExistantNotifyid
&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);
}
sub numberofreviews {
+ my ($param) = @_;
+ my $status = (defined($param) ? $param : 1);
my $dbh = C4::Context->dbh;
my $query =
"SELECT count(*) FROM reviews WHERE approved=?";
my $sth = $dbh->prepare($query);
- $sth->execute( 1 );
+ $sth->execute( $status );
return $sth->fetchrow;
}
$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);
my $cclq = 0;
my $cclindexes = getIndexes();
if ( $query !~ /\s*ccl=/ ) {
- while ( !$cclq && $query =~ /(?:^|\W)(\w+)(,\w+)*[:=]/g ) {
+ while ( !$cclq && $query =~ /(?:^|\W)([\w-]+)(,[\w-]+)*[:=]/g ) {
my $dx = lc($1);
$cclq = grep { lc($_) eq $dx } @$cclindexes;
}
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
$tmpstring =~ s/^AND //;
push @sqlstrings, $tmpstring;
}
- $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
+ $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
}
if ($issn) {
my @sqlstrings;
$tmpstring =~ s/^OR //;
push @sqlstrings, $tmpstring;
}
- $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
+ $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
}
$sql .= "$sqlwhere ORDER BY title";
$debug and warn "GetSubscriptions query: $sql params : ", join( " ", @bind_params );
LEFT JOIN borrowers AS U2 ON managedby=U2.borrowernumber
LEFT JOIN branches AS B2 ON B2.branchcode=U2.branchcode
LEFT JOIN categories AS C2 ON C2.categorycode = U2.categorycode
- WHERE STATUS NOT IN ('CLAIMED')
+ WHERE 1=1
} , map {
if ( my $s = $suggestion->{$_} ) {
push @sql_params,'%'.$s.'%';
&whitelist
&is_approved
&approval_counts
+ &get_count_by_tag_status
&get_filters
);
# %EXPORT_TAGS = ();
return $result;
}
+=head2 get_count_by_tag_status
+
+ get_count_by_tag_status($status);
+
+Takes a status and gets a count of tags with that status
+
+=cut
+
+sub get_count_by_tag_status {
+ my ($status) = @_;
+ my $dbh = C4::Context->dbh;
+ my $query =
+ "SELECT count(*) FROM tags_approval WHERE approved=?";
+ my $sth = $dbh->prepare($query);
+ $sth->execute( $status );
+ return $sth->fetchrow;
+}
+
sub remove_tag ($;$) {
my $tag_id = shift or return undef;
my $user_id = (@_) ? shift : undef;
($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;
}
$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" ) );
}
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") ){
use C4::Context;
use C4::Installer;
+#use Smart::Comments '####';
+
my $query = new CGI;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
$row = [];
}
}
+## ## $table
$template->param( table => $table );
+
+## ------------------------------------------
+## Koha time line code
+
+#get file location
+my $dir = C4::Context->config('intranetdir');
+open( my $file, "<", "$dir" . "/docs/history.txt" );
+my $i = 0;
+
+my @rows2 = ();
+my $row2 = [];
+
+my @lines = <$file>;
+close($file);
+
+shift @lines; #remove header row
+
+foreach (@lines) {
+ my ( $date, $desc, $tag ) = split(/\t/);
+ push(
+ @rows2,
+ {
+ date => $date,
+ desc => $desc,
+ }
+ );
+}
+
+my $table2 = [];
+#foreach my $row2 (@rows2) {
+foreach (@rows2) {
+ push (@$row2, $_);
+ push( @$table2, { row2 => $row2 } );
+ $row2 = [];
+}
+
+$template->param( table2 => $table2 );
+
output_html_with_http_headers $query, $cookie, $template->output;
my ($biblionumber,$bibitemnum) = AddBiblio($record,'');
# change suggestion status if applicable
if ($$orderinfo{suggestionid}) {
- ModSuggestion( {suggestionid=>$$orderinfo{suggestionid}, status=>'ORDERED', biblionumber=>$biblionumber} );
+ ModSuggestion( {suggestionid=>$$orderinfo{suggestionid}, STATUS=>'ORDERED', biblionumber=>$biblionumber} );
}
$orderinfo->{biblioitemnumber}=$bibitemnum;
$orderinfo->{biblionumber}=$biblionumber;
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;
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
}
$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
#!/usr/bin/perl
-use HTML::Template::Pro;
use strict;
#use warnings; FIXME - Bug 2505
my $bi=$query->param('bi');
$bi = $biblionumber unless $bi;
my $itemnumber = $query->param('itemnumber');
-my $data=GetBiblioData($biblionumber);
+my $data = &GetBiblioData($biblionumber);
my $dewey = $data->{'dewey'};
my $showallitems = $query->param('showallitems');
# $dewey=~ s/\.$//;
# $data->{'dewey'}=$dewey;
-my @results;
my $fw = GetFrameworkCode($biblionumber);
my @all_items= GetItemsInfo($biblionumber);
my @items;
push (@items,@hostitems);
}
-
+my $subtitle = GetRecordValue('subtitle', $record, $fw);
my $totalcount=@all_items;
my $showncount=@items;
my $itemtypes = GetItemTypes;
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
-$results[0]=$data;
+
+foreach ( keys %{$data} ) {
+ $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' );
+}
+
($itemnumber) and @items = (grep {$_->{'itemnumber'} == $itemnumber} @items);
foreach my $item (@items){
$item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw);
$item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes);
$item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'description'};
$item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} );
- $item->{'datelastborrowed'} = format_date( $item->{'datelastborrowed'} );
- $item->{'dateaccessioned'} = format_date( $item->{'dateaccessioned'} );
- $item->{'datelastseen'} = format_date( $item->{'datelastseen'} );
+ $item->{$_} = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/;
$item->{'copyvol'} = $item->{'copynumber'};
subscriptiontitle => $data->{title},
C4::Search::enabled_staff_search_views,
);
-$template->param(BIBITEM_DATA => \@results);
-$template->param(ITEM_DATA => \@items);
-$template->param(moredetailview => 1);
-$template->param(loggedinuser => $loggedinuser);
-$template->param(biblionumber => $biblionumber);
-$template->param(biblioitemnumber => $bi);
-$template->param(itemnumber => $itemnumber);
+
+$template->param(
+ ITEM_DATA => \@items,
+ moredetailview => 1,
+ loggedinuser => $loggedinuser,
+ biblionumber => $biblionumber,
+ biblioitemnumber => $bi,
+ itemnumber => $itemnumber,
+ z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
+ subtitle => $subtitle,
+);
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
-$template->param(z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)));
output_html_with_http_headers $query, $cookie, $template->output;
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"));
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
use strict;
#use warnings; FIXME - Bug 2505
-use open OUT=>':utf8', ':std';
+use open OUT=>":encoding(UTF-8)", ':std';
# standard or CPAN modules used
use CGI qw(:standard);
ModItem($item_changes, $biblionumber, $itemnumber);
-LostItem($itemnumber, 'MARK RETURNED') if $itemlost;
+LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $itemlost;
print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber");
=cut
-sub build_authorized_values_list ($$$$$$$) {
+sub build_authorized_values_list {
my ( $tag, $subfield, $value, $dbh, $authorised_values_sth,$index_tag,$index_subfield ) = @_;
my @authorised_values;
=cut
-sub CreateKey(){
+sub CreateKey {
return int(rand(1000000));
}
=cut
-sub GetMandatoryFieldZ3950($){
+sub GetMandatoryFieldZ3950 {
my $frameworkcode = shift;
my @isbn = GetMarcFromKohaField('biblioitems.isbn',$frameworkcode);
my @title = GetMarcFromKohaField('biblio.title',$frameworkcode);
return $ind_value;
}
-sub build_tabs ($$$$$) {
+sub build_tabs {
my ( $template, $record, $dbh, $encoding,$input ) = @_;
# fill arrays
my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
# If there is a barcode and we can't find him new values, we can't add multiple copies
- my $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj;
+ my $testbarcode;
+ $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj;
if ($oldbarcode && !$testbarcode) {
push @errors, "no_next_barcode";
$nextop="additem";
}
else {
- print $input->redirect("/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=$biblionumber");
+ my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
+ my $views = { C4::Search::enabled_staff_search_views };
+ if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) {
+ print $input->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber");
+ } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) {
+ print $input->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber");
+ } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) {
+ print $input->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber");
+ } else {
+ print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber");
+ }
exit;
}
}
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) {
=cut
-sub createKey(){
+sub createKey {
return int(rand(1000000));
}
# 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 strict;
+use warnings;
use C4::Context;
=head1 plugin_parameters
my $branchcode = C4::Context->userenv->{'branch'};
- $query = "SELECT MAX(CAST(SUBSTRING_INDEX(stocknumber,'_',-1) AS SIGNED))+1 FROM items WHERE homebranch = ? AND stocknumber LIKE ?";
+ my $query = "SELECT MAX(CAST(SUBSTRING_INDEX(stocknumber,'_',-1) AS SIGNED))+1 FROM items WHERE homebranch = ? AND stocknumber LIKE ?";
my $sth=$dbh->prepare($query);
$sth->execute($branchcode,$branchcode."_%");
my ($nextnum) = $sth->fetchrow;
- my $nextnum = $branchcode.'_'.$nextnum;
+ $nextnum = $branchcode.'_'.$nextnum;
my $scr = <<END_OF_JS;
if (\$('#' + id).val() == '' || force) {
# 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 strict;
+use warnings;
use C4::AuthoritiesMarc;
use C4::Auth;
my $authtypes = getauthtypes;
my @authtypesloop;
foreach my $thisauthtype (keys %$authtypes) {
- my $selected = 1 if $thisauthtype eq $authtypecode;
+ my $selected;
+ if ($thisauthtype eq $authtypecode) {
+ $selected=1;
+ }
my %row =(value => $thisauthtype,
selected => $selected,
authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
} else {
$to = (($startfrom+1)*$resultsperpage);
}
- my $link="../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&authtypecode=EDITORS&and_or=$and_or&marclist=$marclist&operator=$operator&orderby=$orderby&excluding=$excluding&".join("&",map {"value=".$_} @value)."&op=do_search&type=intranet&index=$index";
+ my $link="../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&authtypecode=EDITORS&".join("&",map {"value=".$_} @value)."&op=do_search&type=intranet&index=$index";
$template->param(result => $results) if $results;
$template->param('index' => $query->param('index'));
$subfield_value_t = $marcrecord->field('500')->subfield("a");
}
- my $subfield_value_u = $marcrecord->field('856')->subfield("u")
- if ( $marcrecord->field('856') );
+ my $subfield_value_u;
+ if ( $marcrecord->field('856') ) {
+ $subfield_value_u = $marcrecord->field('856')->subfield("u");
+ }
my $subfield_value_v;
if ( ( $marcrecord->field('225') )
{
$subfield_value_v = $marcrecord->field('200')->subfield("h");
}
- my $subfield_value_x = $marcrecord->field('011')->subfield("a")
- if (
+ my $subfield_value_x;
+ if (
$marcrecord->field('011')
and not( ( $marcrecord->field('011')->subfield("y") )
- or ( $marcrecord->field('011')->subfield("z") ) )
- );
- my $subfield_value_y = $marcrecord->field('013')->subfield("a")
- if ( $marcrecord->field('013') );
+ or ( $marcrecord->field('011')->subfield("z") ) ) ) {
+ $subfield_value_x = $marcrecord->field('011')->subfield("a");
+ }
+ my $subfield_value_y;
+ if ( $marcrecord->field('013') ) {
+ $subfield_value_y = $marcrecord->field('013')->subfield("a");
+ }
if ( $marcrecord->field('010') ) {
$subfield_value_y = $marcrecord->field('010')->subfield("a");
}
my $record = MARC::Record::new_from_usmarc( $results->[$i] );
my $rechash = TransformMarcToKoha( $dbh, $record );
my $pos;
- my $countitems = 1 if ( $rechash->{itemnumber} );
+ my $countitems;
+ if ( $rechash->{itemnumber} ) {
+ $countitems=1;
+ }
while ( index( $rechash->{itemnumber}, '|', $pos ) > 0 ) {
$countitems += 1;
$pos = index( $rechash->{itemnumber}, '|', $pos ) + 1;
# Prevent from disclosing data
die() unless ($table eq "biblioitems");
-binmode STDOUT, ":utf8";
+binmode STDOUT, ":encoding(UTF-8)";
print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { cataloguing => '*' } );
my %item;
my $frbranchcd = C4::Context->userenv->{'branch'};
# if ( not($found) ) {
- $item{'biblionumber'} = $iteminformation->{'biblionumber'};
- $item{'title'} = $iteminformation->{'title'};
- $item{'author'} = $iteminformation->{'author'};
- $item{'itemtype'} = $iteminformation->{'itemtype'};
- $item{'ccode'} = $iteminformation->{'ccode'};
- $item{'frbrname'} = $branches->{$frbranchcd}->{'branchname'};
- $item{'tobrname'} = $branches->{$tobranchcd}->{'branchname'};
+ $item{'biblionumber'} = $iteminformation->{'biblionumber'};
+ $item{'itemnumber'} = $iteminformation->{'itemnumber'};
+ $item{'title'} = $iteminformation->{'title'};
+ $item{'author'} = $iteminformation->{'author'};
+ $item{'itemtype'} = $iteminformation->{'itemtype'};
+ $item{'ccode'} = $iteminformation->{'ccode'};
+ $item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'};
+ $item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
+ $item{'frbrname'} = $branches->{$frbranchcd}->{'branchname'};
+ $item{'tobrname'} = $branches->{$tobranchcd}->{'branchname'};
# }
$item{counter} = 0;
$item{barcode} = $barcode;
$item{frombrcd} = $frbcd;
$item{tobrcd} = $tobcd;
my ($iteminformation) = GetBiblioFromItemNumber( GetItemnumberFromBarcode($bc) );
- $item{'biblionumber'} = $iteminformation->{'biblionumber'};
- $item{'title'} = $iteminformation->{'title'};
- $item{'author'} = $iteminformation->{'author'};
- $item{'itemtype'} = $iteminformation->{'itemtype'};
- $item{'ccode'} = $iteminformation->{'ccode'};
- $item{'frbrname'} = $branches->{$frbcd}->{'branchname'};
- $item{'tobrname'} = $branches->{$tobcd}->{'branchname'};
+ $item{'biblionumber'} = $iteminformation->{'biblionumber'};
+ $item{'itemnumber'} = $iteminformation->{'itemnumber'};
+ $item{'title'} = $iteminformation->{'title'};
+ $item{'author'} = $iteminformation->{'author'};
+ $item{'itemtype'} = $iteminformation->{'itemtype'};
+ $item{'ccode'} = $iteminformation->{'ccode'};
+ $item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'};
+ $item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
+ $item{'frbrname'} = $branches->{$frbcd}->{'branchname'};
+ $item{'tobrname'} = $branches->{$tobcd}->{'branchname'};
push( @trsfitemloop, \%item );
}
my @errmsgloop;
foreach my $code ( keys %$messages ) {
- my %err;
- if ( $code eq 'BadBarcode' ) {
- $err{msg} = $messages->{'BadBarcode'};
- $err{errbadcode} = 1;
+ if ( $code ne 'WasTransfered' ) {
+ my %err;
+ if ( $code eq 'BadBarcode' ) {
+ $err{msg} = $messages->{'BadBarcode'};
+ $err{errbadcode} = 1;
+ }
+ elsif ( $code eq "NotAllowed" ) {
+ warn "NotAllowed: $messages->{'NotAllowed'} to " . $branches->{ $messages->{'NotAllowed'} }->{'branchname'};
+ # Do we really want a error log message here? --atz
+ $err{errnotallowed} = 1;
+ my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} );
+ $err{tbr} = $branches->{ $tbr }->{'branchname'};
+ $err{code} = $typecode;
+ $err{codeType} = $codeTypeDescription;
+ }
+ elsif ( $code eq 'IsPermanent' ) {
+ $err{errispermanent} = 1;
+ $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
+ }
+ elsif ( $code eq 'WasReturned' ) {
+ $err{errwasreturned} = 1;
+ $err{borrowernumber} = $messages->{'WasReturned'};
+ my $borrower = GetMember('borrowernumber'=>$messages->{'WasReturned'});
+ $err{title} = $borrower->{'title'};
+ $err{firstname} = $borrower->{'firstname'};
+ $err{surname} = $borrower->{'surname'};
+ $err{cardnumber} = $borrower->{'cardnumber'};
+ }
+ $err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' );
+ push( @errmsgloop, \%err );
}
- elsif ( $code eq "NotAllowed" ) {
- warn "NotAllowed: $messages->{'NotAllowed'} to " . $branches->{ $messages->{'NotAllowed'} }->{'branchname'};
- # Do we really want a error log message here? --atz
- $err{errnotallowed} = 1;
- my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} );
- $err{tbr} = $branches->{ $tbr }->{'branchname'};
- $err{code} = $typecode;
- $err{codeType} = $codeTypeDescription;
- }
- elsif ( $code eq 'IsPermanent' ) {
- $err{errispermanent} = 1;
- $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
- }
- elsif ( $code eq 'WasReturned' ) {
- $err{errwasreturned} = 1;
- $err{borrowernumber} = $messages->{'WasReturned'};
- my $borrower = GetMember('borrowernumber'=>$messages->{'WasReturned'});
- $err{title} = $borrower->{'title'};
- $err{firstname} = $borrower->{'firstname'};
- $err{surname} = $borrower->{'surname'};
- $err{cardnumber} = $borrower->{'cardnumber'};
- }
- $err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' );
- push( @errmsgloop, \%err );
}
# use Data::Dumper;
$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;
{
push @values, $_->{'borrowernumber'};
$labels{ $_->{'borrowernumber'} } =
-"$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ... $_->{'address'} ";
+"$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'} - $_->{'branchcode'}) ... $_->{'address'} ";
}
$CGIselectborrower = CGI::scrolling_list(
-name => 'borrowernumber',
my $strsth="SELECT date_due,
borrowers.title as borrowertitle,
- concat(surname,' ', firstname) as borrower,
+ borrowers.surname,
+ borrowers.firstname,
borrowers.streetnumber,
borrowers.streettype,
borrowers.address,
borrowers.phone,
borrowers.email,
issues.itemnumber,
+ issues.issuedate,
items.barcode,
biblio.title,
biblio.author,
$strsth =~ s/WHERE 1=1/WHERE 1=1 AND borrowers.borrowernumber IN ($bnlist)/ if $bnlist;
$strsth =~ s/WHERE 1=1/WHERE 0=1/ if $have_pattr_filter_data && !$bnlist; # no match if no borrowers matched patron attrs
$strsth.=" ORDER BY " . (
- ($order eq "borrower" or $order eq "borrower desc") ? "$order, date_due" :
- ($order eq "title" or $order eq "title desc") ? "$order, date_due, borrower" :
- ($order eq "barcode" or $order eq "barcode desc") ? "items.$order, date_due, borrower" :
- ($order eq "date_due desc") ? "date_due DESC, borrower" :
- "date_due, borrower" # default sort order
+ ($order eq "borrower") ? "surname, firstname, date_due" :
+ ($order eq "borrower desc") ? "surname desc, firstname desc, date_due" :
+ ($order eq "title" or $order eq "title desc") ? "$order, date_due, surname, firstname" :
+ ($order eq "barcode" or $order eq "barcode desc") ? "items.$order, date_due, surname, firstname" :
+ ($order eq "date_due desc") ? "date_due DESC, surname, firstname" :
+ "date_due, surname, firstname" # default sort order
);
$template->param(sql=>$strsth);
my $sth=$dbh->prepare($strsth);
borrowernumber => $data->{borrowernumber},
barcode => $data->{barcode},
itemnum => $data->{itemnumber},
+ issuedate => format_date($data->{issuedate}),
borrowertitle => $data->{borrowertitle},
- name => $data->{borrower},
+ surname => $data->{surname},
+ firstname => $data->{firstname},
streetnumber => $data->{streetnumber},
streettype => $data->{streettype},
address => $data->{address},
# build header ...
my @keys = qw /duedate title author borrowertitle name phone barcode email address address2 zipcode city country
- branchcode itemcallnumber biblionumber borrowernumber itemnum replacementprice streetnumber streettype/;
+ branchcode itemcallnumber biblionumber borrowernumber itemnum issuedate replacementprice streetnumber streettype/;
my $csv = Text::CSV_XS->new();
$csv->combine(@keys);
push @lines, $csv->string();
--- /dev/null
+Configuracion de Post Instalacion
+==================================
+
+Usted deberia considerar hacer lo siguiente despues de instalar este paquete:
+
+* Instalar mysql-server, para una base de datos local.
+
+* Alternativamente, puede configurar una conexion remota a un servidor MySQL:
+ - rm /etc/mysql/koha-common.cnf
+ - $SUEDITOR /etc/mysql/koha-common.cnf
+
+ [client]
+ host = algun.otro.host
+ user = mysqlusername
+ password = mysqlpassword
+
+* Habilitar la re-escritura del modulo: a2enmod rewrite
+
+* Escuchar en el puerto 8080: $SUEDITOR /etc/apache2/ports.conf
+
+* Alternativamente, puede configurar koha-create, usando /etc/koha/koha-sites.conf
+ (ver /usr/sbin/koha-create para establecer las variables ).
+
+* Despues de esto, usted puede crear una nueva instancia de Koha:
+ - koha-create --create-db name
+
+
+Diseño del sistema de archivo de Koha en Debian
+================================================
+
+El paquete Debian de Koha pone archivos en los siguientes lugares:
+
+* /etc/koha -- archivos de configuración del sistema
+* /etc/cron.hourly/koha-common -- cron job
+* /etc/cron.daily/koha-common -- cron job
+* /etc/cron.d/koha-common -- cron job
+* /usr/share/koha -- archivos compartidos (plantillas HTML, codigo Perl, etc)
+
+Cada instancia de Koha tiene archivos en los siguientes lugares:
+
+* /etc/koha/sites/$name -- archivos de configuración
+* /etc/apache2/sites-available/$name -- Archivo configuración Apache
+* /var/lib/koha/$name -- Bases de datos Zebra
+* /var/log/koha/$name -- archivos log (Apache, Zebra)
+* /var/lock/koha/$name -- run-time lock files
+* /var/run/koha/$name -- run-time sockets etc
+* /var/spool/koha/$name -- dumps bases de datos
+
+
+Koha y MySQL
+==============
+
+El script de post instalacion de Koha-common crea el archivo /etc/mysql/koha-common.cnf,
+y todos los scripts usan esté para acceder a las bases de datos MySQL. Por defecto,
+es un enlace simbólico que apunta a debian.cnf, y sólo trabaja en el servidor local.
+Si usted lo desea, puede crear un archivo /etc/mysql/koha-common.cnf en lugar
+del enlace simbólico, y que apunte a un servidor remoto. En la actualidad no existe
+ninguna herramienta para ayudarle a hacer eso, pero debería ser bastante sencillo.
+
+
--- /dev/null
+debian/docs/LEEME.Debian
userdir "$name" "/etc/koha/sites/$name"
userdir "$name" "/var/lib/koha/$name"
userdir "$name" "/var/lib/koha/$name/authorities"
+ userdir "$name" "/var/lib/koha/$name/authorities/key"
+ userdir "$name" "/var/lib/koha/$name/authorities/register"
+ userdir "$name" "/var/lib/koha/$name/authorities/shadow"
+ userdir "$name" "/var/lib/koha/$name/authorities/tmp"
userdir "$name" "/var/lib/koha/$name/biblios"
userdir "$name" "/var/lib/koha/$name/biblios/key"
userdir "$name" "/var/lib/koha/$name/biblios/register"
userdir "$name" "/var/lib/koha/$name/biblios/shadow"
+ userdir "$name" "/var/lib/koha/$name/biblios/tmp"
userdir "$name" "/var/lock/koha/$name"
userdir "$name" "/var/lock/koha/$name/authorities"
userdir "$name" "/var/lock/koha/$name/biblios"
eof
koha-stop-zebra $name
- rm "/etc/apache2/sites-available/$name"
- rm "/etc/koha/sites/$name/koha-conf.xml"
- rm "/etc/koha/sites/$name/zebra-biblios.cfg"
- rm "/etc/koha/sites/$name/zebra-authorities.cfg"
- rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
- rm "/etc/koha/sites/$name/zebra.passwd"
- rmdir "/etc/koha/sites/$name"
- rm -r "/var/lock/koha/$name"
- rm -r "/var/log/koha/$name"
- rm -r "/var/run/koha/$name"
- deluser --quiet "$name-koha"
+ [ -f "/etc/apache2/sites-available/$name" ] && \
+ rm "/etc/apache2/sites-available/$name"
+ [ -f "/etc/koha/sites/$name/koha-conf.xml" ] && \
+ rm "/etc/koha/sites/$name/koha-conf.xml"
+ [ -f "/etc/koha/sites/$name/zebra-biblios.cfg" ] && \
+ rm "/etc/koha/sites/$name/zebra-biblios.cfg"
+ [ -f "/etc/koha/sites/$name/zebra-authorities.cfg" ] && \
+ rm "/etc/koha/sites/$name/zebra-authorities.cfg"
+ [ -f "/etc/koha/sites/$name/zebra-authorities-dom.cfg" ] && \
+ rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
+ [ -f "/etc/koha/sites/$name/zebra.passwd" ] && \
+ rm "/etc/koha/sites/$name/zebra.passwd"
+ [ -d "/etc/koha/sites/$name" ] && \
+ rmdir "/etc/koha/sites/$name"
+ [ -d "/var/lock/koha/$name" ] && \
+ rm -r "/var/lock/koha/$name"
+ [ -d "/var/log/koha/$name" ] && \
+ rm -r "/var/log/koha/$name"
+ [ -d "/var/run/koha/$name" ] && \
+ rm -r "/var/run/koha/$name"
+ getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha"
a2dissite "$name"
done
sed -n '/^etc\/koha\/sites\/\([^/]*\)\/$/s//\1/p')
username="$name-koha"
adduser --no-create-home --disabled-login --gecos "Koha instance $username" \
- --quiet "$username"
+ --home "/var/lib/koha/$name" --quiet "$username"
# Create dirs. Some of them will be in the tarball, but not all, e.g.,
<listen id="biblioserver" >unix:/var/run/koha/__KOHASITE__/bibliosocket</listen>
<listen id="authorityserver" >unix:/var/run/koha/__KOHASITE__/authoritysocket</listen>
+<!-- Uncomment the following entry if you want to run the public Z39.50 server.
+ Also uncomment the <server> and <serverinfo> sections for id 'publicserver'
+ under PUBLICSERVER'S BIBLIOGRAPHIC RECORDS title-->
+<!--
+<listen id="publicserver" >tcp:@:__ZEBRA_SRU_BIBLIOS_PORT__</listen>
+-->
+
+<!-- Settings for special biblio server instance for PazPar2.
+ Because PazPar2 only connects to a Z39.50 server using TCP/IP,
+ it cannot use the Unix-domain socket that biblioserver uses.
+ Therefore, a custom server is defined. -->
+<!--
+<listen id="mergeserver">tcp:@:__MERGE_SERVER_PORT__</listen>
+<server id="mergeserver" listenref="mergeserver">
+ <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
+ <config>/var/lib/koha/__KOHASITE__/zebra-biblios.cfg</config>
+ <cql2rpn>/var/lib/koha/__KOHASITE__/pqf.properties</cql2rpn>
+</server>
+-->
+
<!-- BIBLIOGRAPHIC RECORDS -->
-<server id="biblioserver" listenref="biblioserver">
+<server id="biblioserver" listenref="biblioserver">
<directory>/var/lib/koha/__KOHASITE__/biblios</directory>
<config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
<cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
</backend>
</retrieval>
</retrievalinfo>
+ <!-- The stuff below is used to enable SRU. It's currently disabled
+ until we come up with a good way to make it get magically set up by
+ the packaging system. If you need it, uncomment and set it up
+ manually.
+ <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:fallback>
+ <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+ <serverInfo>
+ <host>__ZEBRA_SRU_HOST__</host>
+ <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
+ <database>biblios</database>
+ </serverInfo>
+ </explain>
+ </xi:fallback>
+ </xi:include> -->
</server>
<serverinfo id="biblioserver">
<ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
- <user>kohauser</user>
+ <user>kohauser</user>
<password>__ZEBRA_PASS__</password>
</serverinfo>
</retrievalinfo>
</xi:fallback>
</xi:include>
+ <!-- The stuff below is used to enable SRU. It's currently disabled
+ until we come up with a good way to make it get magically set up by
+ the packaging system. If you need it, uncomment and set it up
+ manually.
+ <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-authorities.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:fallback>
+ <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+ <serverInfo>
+ <host>__ZEBRA_SRU_HOST__</host>
+ <port>__ZEBRA_SRU_AUTHORITIES_PORT__</port>
+ <database>authorities</database>
+ </serverInfo>
+ </explain>
+ </xi:fallback>
+ </xi:include> -->
</server>
<serverinfo id="authorityserver">
<ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
<password>__ZEBRA_PASS__</password>
</serverinfo>
+<!-- PUBLICSERVER'S BIBLIOGRAPHIC RECORDS -->
+<!-- This can be used to set up a public Z39.50/SRU server.
+
+<server id="publicserver" listenref="publicserver">
+ <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
+ <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
+ <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
+ <retrievalinfo>
+ <retrieval syntax="usmarc" name="F"/>
+ <retrieval syntax="usmarc" name="B"/>
+ <retrieval syntax="xml" name="F"/>
+ <retrieval syntax="xml" name="B"/>
+ <retrieval syntax="xml" name="marcxml"
+ identifier="info:srw/schema/1/marcxml-v1.1">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="dc">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="mods">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="rdfdc">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="rss2">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2RSS2.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="utils">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl"/>
+ </backend>
+ </retrieval>
+ </retrievalinfo>
+ <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:fallback>
+ <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+ <serverInfo>
+ <host>__ZEBRA_SRU_HOST__</host>
+ <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
+ <database>biblios</database>
+ </serverInfo>
+ </explain>
+ </xi:fallback>
+ </xi:include>
+</server>
+<serverinfo id="publicserver">
+ <ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
+ <user>kohauser</user>
+ <password>__ZEBRA_PASS__</password>
+</serverinfo>
+-->
+
<config>
<db_scheme>mysql</db_scheme>
<database>__DB_NAME__</database>
<intrahtdocs>/usr/share/koha/intranet/htdocs/intranet-tmpl</intrahtdocs>
<includes>/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/includes/</includes>
<logdir>/var/log/koha/__KOHASITE__</logdir>
+ <!-- <pazpar2url>http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2</pazpar2url> -->
<install_log>/usr/share/koha/misc/koha-install-log</install_log>
<useldapserver>0</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
<memcached_servers></memcached_servers>
June 25 2010 Koha 3.2 Beta released http://koha-community.org/koha-3-2-beta-released/
July 13 2010 License meeting http://wiki.koha-community.org/wiki/License_Upgrade_Vote_IRC_Meeting,_13_July_2010
August 11 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_August_2010
+August 31 2010 Stéphane Delaune becomes the 116th committer to have a patch accepted
September 1 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_September_2010
-September 29 2010 Eric Olsen becomes the 116th committer to have a patch accepted
+September 29 2010 Eric Olsen becomes the 117th committer to have a patch accepted
October 6 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_6_October_2010
October 22 2010 Koha 3.2.0 released
October 25-31 2010 Kohacon10 in Wellington
-October 30 2010 Brian Engard becomes the 117th committer to have a patch accepted
-October 30 2010 Daniel Grobani becomes the 118th committer to have a patch accepted
-October 31 2010 Nate Curulla becomes the 119th committer to have a patch accepted
+October 30 2010 Brian Engard becomes the 118th committer to have a patch accepted
+October 30 2010 Daniel Grobani becomes the 119th committer to have a patch accepted
+October 31 2010 Nate Curulla becomes the 120th committer to have a patch accepted
November 10 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_10_November_2010
-November 17 2010 Tomás Cohen Arazi becomes the 120th committer to have a patch accepted
+November 17 2010 Tomás Cohen Arazi becomes the 121th committer to have a patch accepted
November 20 2010 Koha 3.2.1 released
December 8 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_8_December_2010
-December 15 2010 Serhij Dubyk becomes the 121st developer to have a patch pushed
-December 16 2010 Christophe Croullebois becomes the 122nd developer to have a patch pushed
-December 19 2010 Edward Allen becomes the 123rd developer to have a patch pushed
-December 20 2010 Dobrica Pavlinusic becomes the 124th developer to have a patch pushed
+December 15 2010 Serhij Dubyk becomes the 122st developer to have a patch pushed
+December 16 2010 Christophe Croullebois becomes the 123nd developer to have a patch pushed
+December 19 2010 Edward Allen becomes the 124rd developer to have a patch pushed
+December 20 2010 Dobrica Pavlinusic becomes the 125th developer to have a patch pushed
December 22 2010 Koha 3.2.2 released
January 5 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_January_2011
-January 12 2011 Brice Sanchez becomes the 125th developer to have a patch pushed
-January 17 2011 Zach Sim becomes the 126th developer to have a patch pushed
-January 17 2011 Claudia Forsman becomes the 127th developer to have a patch pushed
-January 17 2011 John Copeland becomes the 128th developer to have a patch pushed
-January 17 2011 Stephanie Hogan becomes the 129th developer to have a patch pushed
+January 12 2011 Brice Sanchez becomes the 126th developer to have a patch pushed
+January 17 2011 Zach Sim becomes the 127th developer to have a patch pushed
+January 17 2011 Claudia Forsman becomes the 128th developer to have a patch pushed
+January 17 2011 John Copeland becomes the 129th developer to have a patch pushed
+January 17 2011 Stephanie Hogan becomes the 130th developer to have a patch pushed
January 22 2011 Koha 3.2.3 released
-January 26 2011 Jerome Charaoui becomes the 130th developer to have a patch pushed
-January 31 2011 Reed Wade becomes the 131sth developer to have a patch pushed
+January 26 2011 Jerome Charaoui becomes the 131th developer to have a patch pushed
+January 31 2011 Reed Wade becomes the 132sth developer to have a patch pushed
February 1 2011 #koha moves from irc.katipo.co.nz to irc.oftc.net
February 2 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_February_2011
-February 3 2011 Frédérick Capovilla becomes the 132nd developer to have a patch pushed
-February 4 2011 Christopher Hall becomes the 133rd developer to have a patch pushed
+February 3 2011 Frédérick Capovilla becomes the 133nd developer to have a patch pushed
+February 4 2011 Christopher Hall becomes the 134rd developer to have a patch pushed
February 22 2011 Koha 3.2.4 released
February 24 2011 Koha 3.2.5 released
March 2 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_March_2011
-March 13 2011 Janusz Kaczmarek becomes the 134th developer to have a patch pushed
-March 13 2011 Salvador Zaragoza Rubio becomes the 135th developer to have a patch pushed
-March 17 2011 Julian Maurice becomes the 136th developer to have a patch pushed
-March 17 2011 Sophie Meynieux becomes the 137th developer to have a patch pushed
+March 13 2011 Janusz Kaczmarek becomes the 135th developer to have a patch pushed
+March 13 2011 Salvador Zaragoza Rubio becomes the 136th developer to have a patch pushed
+March 17 2011 Julian Maurice becomes the 137th developer to have a patch pushed
+March 17 2011 Sophie Meynieux becomes the 138th developer to have a patch pushed
March 22 2011 Koha 3.2.6 released
-March 31 2011 Doug Dearden becomes the 138th developer to have a patch pushed
+March 31 2011 Doug Dearden becomes the 139th developer to have a patch pushed
April 6 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_6_April_2011
-April 8 2011 Mark Gavillet becomes the 139th developer to have a patch pushed
-April 9 2011 Frederic Durand becomes the 140th developer to have a patch pushed
-April 9 2011 Jonathan Druart becomes the 141st developer to have a patch pushed
+April 8 2011 Mark Gavillet becomes the 140th developer to have a patch pushed
+April 9 2011 Frederic Durand becomes the 141th developer to have a patch pushed
+April 9 2011 Jonathan Druart becomes the 142st developer to have a patch pushed
April 16 2011 Koha 3.2.7 released releases
-April 20 2011 Fernando Canizo becomes the 142nd developer to have a patch pushed
+April 20 2011 Fernando Canizo becomes the 143nd developer to have a patch pushed
April 22 2011 Koha 3.4.0 released releases
May 11 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_May_2011
May 15 2011 Koha 3.2.8 released releases
May 15 2011 Koha 3.2.9 released releases
May 22 2011 Koha 3.4.1 released releases
-June 1 2011 Fridolyn Somers becomes the 143rd developer to have a patch pushed
-June 3 2011 Elliott Davis becomes the 144th developer to have a patch pushed
+June 1 2011 Fridolyn Somers becomes the 144rd developer to have a patch pushed
+June 3 2011 Elliott Davis becomes the 145th developer to have a patch pushed
June 14 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_14_June_2011
June 15 2011 First ever global sign off day
-June 17 2011 Jeremy Crabtree becomes the 145th developer to have a patch pushed
+June 17 2011 Jeremy Crabtree becomes the 146th developer to have a patch pushed
June 19 2011 Koha 3.2.10 released releases
June 28 2011 Koha 3.4.2 released releases
June 28 2011 Spanish speaking community meeting http://wiki.koha-community.org/wiki/Spanish_speaking_community_creation_IRC_Meeting,_28_June_2011
June 29 2011 Kohacon11 volunteers meeting http://wiki.koha-community.org/wiki/KohaCon11_Volunteers#Next_Meeting_:_Wednesday_June_29_6.00_UTC
-July 5 2011 Francois Marier becomes the 146th developer to have a patch pushed
+July 5 2011 Francois Marier becomes the 147th developer to have a patch pushed
July 6 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_6_July_2011
July 25 2011 Koha 3.4.3 released releases
-July 28 2011 John Seymour becomes the 147th developer to have a patch pushed
+July 28 2011 John Seymour becomes the 148th developer to have a patch pushed
August 2 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_August_2011
August 3 2011 Spanish speaking community meeting http://wiki.koha-community.org/wiki/Spanish_speaking_community_Mail_List_IRC_Meeting,_3_August_2011
-August 11 2011 Juan Romay Sieira becomes the 148th developer to have a patch pushed
-August 11 2011 Nuño López Ansótegui becomes the 149th developer to have a patch pushed
-August 22 2011 Koha 3.4.4 released
-August 26 2011 Ward van Wanrooij becomes the 150th developer to have a patch pushed
-August 27 2011 Ulrich Kleiber becomes the 151st developer to have a patch pushed
-September 1 2011 Maxime Pelletier becomes the 152nd developer to have a patch pushed
-September 2 2011 Steven Callender becomes the 153rd developer to have a patch pushed
-September 6 2011 Brett Wilkins becomes the 154th developer to have a patch pushed
-September 11 2011 Meenakshi.R becomes the 155th developer to have a patch pushed
-September 23 2011 Joy Nelson becomes the 156th developer to have a patch pushed
-September 24 2011 Larry Baerveldt becomes the 157th developer to have a patch pushed
-September 27 2011 Koha 3.4.5 released
-September 28 2011 Thatcher Rea becomes the 158th developer to have a patch pushed
+August 11 2011 Juan Romay Sieira becomes the 149th developer to have a patch pushed
+August 11 2011 Nuño López Ansótegui becomes the 150th developer to have a patch pushed
+August 22 2011 Koha 3.4.4 released releases
+August 26 2011 Ward van Wanrooij becomes the 151th developer to have a patch pushed
+August 27 2011 Ulrich Kleiber becomes the 152st developer to have a patch pushed
+September 1 2011 Maxime Pelletier becomes the 153nd developer to have a patch pushed
+September 2 2011 Steven Callender becomes the 154rd developer to have a patch pushed
+September 6 2011 Brett Wilkins becomes the 155th developer to have a patch pushed
+September 11 2011 Meenakshi.R becomes the 156th developer to have a patch pushed
+September 23 2011 Joy Nelson becomes the 157th developer to have a patch pushed
+September 24 2011 Larry Baerveldt becomes the 158th developer to have a patch pushed
+September 27 2011 Koha 3.4.5 released releases
+September 28 2011 Thatcher Rea becomes the 159th developer to have a patch pushed
October 5 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_October_2011
-October 15 2011 Greg Barniskis becomes the 159th developer to have a patch pushed
-October 22 2011 Koha 3.6.0 released
-October 31 2011 4th KohaCon in Mumbaï, India
-November 9 2011 Koha 3.4.6 released
+October 15 2011 Greg Barniskis becomes the 160th developer to have a patch pushed
+October 22 2011 Koha 3.6.0 released releases
+October 31 2011 4th KohaCon in Mumbaï, India
+November 9 2011 Koha 3.4.6 released releases
+November 21 2011 Plea for help from Horowhenua Library Trust (Koha TM in NZ)
+November 29 2011 Koha 3.6.1 released releases
+December 6 2011 Martin Renvoize becomes the 161th developer to have a patch pushed
+December 6 2011 Adrien Saurat becomes the 162th developer to have a patch pushed
+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
# 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
memMax: 50M
rank:rank-1
truncmax: 1000000000
+
+# Specifies the maximum number of records that will be sorted in a result set.
+# If the result set contains more than that limit, the records after the limit
+# will not be sorted. If omitted, the default value is 1,000.
+sortmax: 1000
$refer = $query->referer() if !$refer || $refer eq 'undefined';
$refer =~ /koha\/(.*)\.pl/;
-my $from = "help/$1.tt";
+my $file = $1;
+$file =~ s/[^a-zA-Z0-9_\-\/]*//g;
+my $from = "help/$file.tt";
my $template = C4::Templates::gettemplate($from, 'intranet', $query);
$template->param( referer => $refer );
$tmplbase=~ s/\.tmpl$/.tt/;
my $filename = "$path/modules/" . $tmplbase;
my $interface = 'intranet';
- my $template = C4::Templates->new( $interface, $filename, $tmplbase);
+ my $template = C4::Templates->new( $interface, $filename, $tmplbase, $query);
my ( $user, $cookie, $sessionID, $flags ) = checkauth(
$in->{'query'},
}
sub _get_template_language {
- #verify if opac language exists in staff (bug 5660)
- #conditions are 1) dir exists and 2) enabled in prefs
- my ($opaclang)= @_;
- return 'en' unless $opaclang;
- my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang";
- -d $path ? $opaclang : 'en';
+
+ #verify if opac language exists in staff (bug 5660)
+ #conditions are 1) dir exists and 2) enabled in prefs
+ my ($opaclang) = @_;
+ return 'en' unless $opaclang;
+ $opaclang =~ s/[^a-zA-Z_-]*//g;
+ my $path = C4::Context->config('intrahtdocs') . "/prog/$opaclang";
+ -d $path ? $opaclang : 'en';
}
=item checkauth
my $filename = "$path/modules/$template_name";
$filename =~ s/\.tmpl$/.tt/;
my $interface = 'intranet';
- my $template = C4::Templates->new( $interface, $filename);
+ my $template = C4::Templates->new( $interface, $filename, '', $query);
$template->param(
INPUTS => \@inputs,
insert into `message_attributes`
(`message_attribute_id`, message_name, `takes_days`)
values
-(1, 'Item_DUE', 0),
+(1, 'Item_Due', 0),
(2, 'Advance_Notice', 1),
(4, 'Hold_Filled', 0),
(5, 'Item_Check_in', 0),
insert into `message_attributes`
(`message_attribute_id`, message_name, `takes_days`)
values
-(1, 'Item_DUE', 0),
+(1, 'Item_Due', 0),
(2, 'Advance_Notice', 1),
(4, 'Hold_Filled', 0),
(5, 'Item_Check_in', 0),
/*Fields and subfield of standard Unimarc */
/*Data for the table `marc_tag_structure` [Fields] */
---Inizia il framework Default
+-- Inizia il framework Default
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('000','Guida (Record label)','',0,1,'','');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('001','Identificatore del record','Identificatore del record',0,0,'','');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('005','Identificatore di versione','',0,0,'','');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('802','Centro ISSN','',1,0,'','');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('830','Nota generale del catalogatore','',1,0,'','');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('856','Localizzazione e accessi elettronici','',1,0,'','');
----
---- Inizia il framework 'MN'
+--
+-- Inizia il framework 'MN'
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('000','Guida (Record label)','',0,1,'','MN');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('001','Identificatore del record','',0,1,'','MN');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('005','Identificatore di versione','',0,0,'','MN');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('802','Centro ISSN','',1,0,'','MN');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('830','Nota generale del catalogatore','',1,0,'','MN');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('856','Localizzazione e accessi elettronici','',1,0,'','MN');
----
---- Inizia il framework 'PR'
+--
+-- Inizia il framework 'PR'
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('000','Guida (Record label)','',0,1,'','PR');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('001','Identificatore del record','',0,1,'','PR');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('005','Identificatore di versione','',0,0,'','PR');
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 ('856','x','Nota non pubblica','',1,0,'',8,'','','',0,-5,'','','',NULL);
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 ('856','y','Metodo di accesso','',0,0,'',8,'','','',0,-5,'','','',NULL);
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 ('856','z','Nota pubblica','',1,0,'',8,'','','',0,-5,'','','',NULL);
----
---- Iizia la struttura di 'MN'
+--
+-- Iizia la struttura di 'MN'
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','@','Guida (Record label)','',0,1,'',0,'','','unimarc_leader.pl',NULL,0,'MN','',NULL,NULL);
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','@','Identificatore del record','',0,0,'biblio.biblionumber',-1,'','','',0,0,'MN',NULL,'','');
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 ('005','@','Identificatore di versione','',0,0,'',0,'','','marc21_field_005.pl',NULL,0,'MN','',NULL,NULL);
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 ('856','x','Nota non pubblica','',1,0,'',8,'','','',NULL,-5,'MN','',NULL,NULL);
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 ('856','y','Metodo di accesso','',0,0,'',8,'','','',NULL,-5,'MN','',NULL,NULL);
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 ('856','z','Nota pubblica','',1,0,'',8,'','','',NULL,-5,'MN','',NULL,NULL);
----
+--
-- Inizia il framework 'PR'
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','@','Guida (Record label)','',0,1,'',0,'','','unimarc_leader.pl',NULL,0,'PR','',NULL,NULL);
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','@','Identificatore del record','',0,0,'biblio.biblionumber',-1,'','','',0,0,'PR',NULL,'','');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
('995','Collocazione e informazioni sulla copia (Koha)','',1,0,'','');
---- MN
+-- MN
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
('090','id koha','',0,0,'','MN');
insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
('995','Collocazione e informazioni sulla copia (Koha)','',1,0,'','PR');
---- Sottcampi di Default
+-- Sottcampi di Default
-- 090
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 ('090','a','valore id','valore id',0,0,'biblioitems.biblioitemnumber',9,'','','',0,-5,'',NULL,'','');
-- 099
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','Suppress in OPAC','Suppress in OPAC',0,0,'',9,'','','',0,-5,'',NULL,'','');
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','Serial record flag','Serial record',0,0,'biblio.serial',9,'','','',0,0,'',NULL,'','');
---995
+-- 995
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 ('995','0','Ritiro della copia','Ritiro della copia',0,0,'items.wthdrawn',10,'WITHDRAWN','','',0,0,'',NULL,'','0');
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 ('995','1','Codice di sistema (classificazione specifica o altro schema e edizione)','Codice di sistema (classificazione specifica o altro schema e edizione)',0,0,'',10,'','','',0,-5,'',NULL,'','');
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 ('995','2','Copia smarrita','Copia smarrita',0,0,'items.itemlost',10,'LOST','','',0,0,'',NULL,'','0');
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 ('995','y','Codice dell\'ente destinatario superiore','',0,0,'',10,'','','',0,-5,'',NULL,'','');
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 ('995','z','Ente destinatario superiore, testo libero','',0,0,'',10,'','','',0,-5,'',NULL,'','');
---- Sottocampi di MN
+-- Sottocampi di MN
-- 090
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 ('090','a','valore id','valore id',0,0,'biblioitems.biblioitemnumber',9,'','','',0,-5,'MN',NULL,'','');
-- 099
SET FOREIGN_KEY_CHECKS=0;
-INSERT INTO `itemtypes` VALUES ('BK', 'Libro',5,0,0,'bridge/book.gif','');
-INSERT INTO `itemtypes` VALUES ('MX', 'Materiale misto',5,0,0,'bridge/kit.gif','');
-INSERT INTO `itemtypes` VALUES ('CF', 'Computer Files',5,0,0,'bridge/computer_file.gif','');
-INSERT INTO `itemtypes` VALUES ('MP', 'Mappe',5,0,0,'bridge/map.gif','');
-INSERT INTO `itemtypes` VALUES ('VM', 'Audiovisivi',5,0,1,'bridge/dvd.gif','');
-INSERT INTO `itemtypes` VALUES ('MU', 'Musica',5,0,0,'bridge/sound.gif','');
-INSERT INTO `itemtypes` VALUES ('CR', 'Periodici',5,0,0,'bridge/periodical.gif','');
-INSERT INTO `itemtypes` VALUES ('REF', 'Reference',0,0,1,'','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('BK', 'Libro',5,0,'bridge/book.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('MX', 'Materiale misto',5,0,'bridge/kit.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('CF', 'Computer Files',5,0,'bridge/computer_file.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('MP', 'Mappe',5,0,'bridge/map.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('VM', 'Audiovisivi',5,1,'bridge/dvd.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('MU', 'Musica',5,0,'bridge/sound.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('CR', 'Periodici',5,0,'bridge/periodical.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('REF', 'Reference',0,1,'','');
-SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
+SET FOREIGN_KEY_CHECKS=1;
CREATE TABLE `biblio` ( -- table that stores bibliographic information
`biblionumber` int(11) NOT NULL auto_increment, -- unique identifier assigned to each bibliographic record
`frameworkcode` varchar(4) NOT NULL default '', -- foriegn key from the biblio_framework table to identify which framework was used in cataloging this record
- `author` mediumtext, -- statement of responsibility from MARC record (100 in MARC21)
- `title` mediumtext, -- title (without the subtitle) from the MARC record (245 in MARC21)
- `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240 in MARC21)
- `notes` mediumtext, -- values from the general notes field in the MARC record (500 in MARC21) split by bar (|)
+ `author` mediumtext, -- statement of responsibility from MARC record (100$a in MARC21)
+ `title` mediumtext, -- title (without the subtitle) from the MARC record (245$a in MARC21)
+ `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240$a in MARC21)
+ `notes` mediumtext, -- values from the general notes field in the MARC record (500$a in MARC21) split by bar (|)
`serial` tinyint(1) default NULL, -- foreign key, linking to the subscriptionid in the serial table
`seriestitle` mediumtext,
`copyrightdate` smallint(6) default NULL, -- publication or copyright date from the MARC record
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched
`datecreated` DATE NOT NULL, -- the date this record was added to Koha
- `abstract` mediumtext, -- summary from the MARC record (520 in MARC21)
+ `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
PRIMARY KEY (`biblionumber`),
KEY `blbnoidx` (`biblionumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
DROP TABLE IF EXISTS `biblioitems`;
-CREATE TABLE `biblioitems` (
- `biblioitemnumber` int(11) NOT NULL auto_increment,
- `biblionumber` int(11) NOT NULL default 0,
+CREATE TABLE `biblioitems` ( -- information related to bibliographic records in Koha
+ `biblioitemnumber` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
+ `biblionumber` int(11) NOT NULL default 0, -- foreign key linking this table to the biblio table
`volume` mediumtext,
`number` mediumtext,
- `itemtype` varchar(10) default NULL,
- `isbn` varchar(30) default NULL,
- `issn` varchar(9) default NULL,
+ `itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c)
+ `isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a)
+ `issn` varchar(9) default NULL, -- ISSN (MARC21 022$a)
`publicationyear` text,
- `publishercode` varchar(255) default NULL,
+ `publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b)
`volumedate` date default NULL,
- `volumedesc` text,
+ `volumedesc` text, -- volume information (MARC21 362$a)
`collectiontitle` mediumtext default NULL,
`collectionissn` text default NULL,
`collectionvolume` mediumtext default NULL,
`editionstatement` text default NULL,
`editionresponsibility` text default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `illus` varchar(255) default NULL,
- `pages` varchar(255) default NULL,
+ `illus` varchar(255) default NULL, -- illustrations (MARC21 300$b)
+ `pages` varchar(255) default NULL, -- number of pages (MARC21 300$c)
`notes` mediumtext,
- `size` varchar(255) default NULL,
- `place` varchar(255) default NULL,
- `lccn` varchar(25) default NULL,
- `marc` longblob,
- `url` varchar(255) default NULL,
- `cn_source` varchar(10) default NULL,
+ `size` varchar(255) default NULL, -- material size (MARC21 300$c)
+ `place` varchar(255) default NULL, -- publication place (MARC21 260$a)
+ `lccn` varchar(25) default NULL, -- library of congress control number (MARC21 010$a)
+ `marc` longblob, -- full bibliographic MARC record
+ `url` varchar(255) default NULL, -- url (MARC21 856$u)
+ `cn_source` varchar(10) default NULL, -- classification source (MARC21 942$2)
`cn_class` varchar(30) default NULL,
`cn_item` varchar(10) default NULL,
`cn_suffix` varchar(10) default NULL,
`cn_sort` varchar(30) default NULL,
`totalissues` int(10),
- `marcxml` longtext NOT NULL,
+ `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
PRIMARY KEY (`biblioitemnumber`),
KEY `bibinoidx` (`biblioitemnumber`),
KEY `bibnoidx` (`biblionumber`),
--
DROP TABLE IF EXISTS `categories`;
-CREATE TABLE `categories` (
- `categorycode` varchar(10) NOT NULL default '',
- `description` mediumtext,
- `enrolmentperiod` smallint(6) default NULL,
- `enrolmentperioddate` DATE NULL DEFAULT NULL,
- `upperagelimit` smallint(6) default NULL,
+CREATE TABLE `categories` ( -- this table shows information related to Koha patron categories
+ `categorycode` varchar(10) NOT NULL default '', -- unique primary key used to idenfity the patron category
+ `description` mediumtext, -- description of the patron category
+ `enrolmentperiod` smallint(6) default NULL, -- number of months the patron is enrolled for (will be NULL if enrolmentperioddate is set)
+ `enrolmentperioddate` DATE NULL DEFAULT NULL, -- date the patron is enrolled until (will be NULL if enrolmentperiod is set)
+ `upperagelimit` smallint(6) default NULL, -- age limit for the patron
`dateofbirthrequired` tinyint(1) default NULL,
- `finetype` varchar(30) default NULL,
+ `finetype` varchar(30) default NULL, -- unused in Koha
`bulk` tinyint(1) default NULL,
- `enrolmentfee` decimal(28,6) default NULL,
- `overduenoticerequired` tinyint(1) default NULL,
- `issuelimit` smallint(6) default NULL,
- `reservefee` decimal(28,6) default NULL,
- `hidelostitems` tinyint(1) NOT NULL default '0',
- `category_type` varchar(1) NOT NULL default 'A',
+ `enrolmentfee` decimal(28,6) default NULL, -- enrollment fee for the patron
+ `overduenoticerequired` tinyint(1) default NULL, -- are overdue notices sent to this patron category (1 for yes, 0 for no)
+ `issuelimit` smallint(6) default NULL, -- unused in Koha
+ `reservefee` decimal(28,6) default NULL, -- cost to place holds
+ `hidelostitems` tinyint(1) NOT NULL default '0', -- are lost items shown to this category (1 for yes, 0 for no)
+ `category_type` varchar(1) NOT NULL default 'A', -- type of Koha patron (Adult, Child, Professional, Organizational, Statistical, Staff)
PRIMARY KEY (`categorycode`),
UNIQUE KEY `categorycode` (`categorycode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `deletedbiblio` ( -- stores information about bibliographic records that have been deleted
`biblionumber` int(11) NOT NULL auto_increment, -- unique identifier assigned to each bibliographic record
`frameworkcode` varchar(4) NOT NULL default '', -- foriegn key from the biblio_framework table to identify which framework was used in cataloging this record
- `author` mediumtext, -- statement of responsibility from MARC record (100 in MARC21)
- `title` mediumtext, -- title (without the subtitle) from the MARC record (245 in MARC21)
- `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240 in MARC21)
- `notes` mediumtext, -- values from the general notes field in the MARC record (500 in MARC21) split by bar (|)
+ `author` mediumtext, -- statement of responsibility from MARC record (100$a in MARC21)
+ `title` mediumtext, -- title (without the subtitle) from the MARC record (245$a in MARC21)
+ `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240$a in MARC21)
+ `notes` mediumtext, -- values from the general notes field in the MARC record (500$a in MARC21) split by bar (|)
`serial` tinyint(1) default NULL, -- foreign key, linking to the subscriptionid in the serial table
`seriestitle` mediumtext,
`copyrightdate` smallint(6) default NULL, -- publication or copyright date from the MARC record
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched
`datecreated` DATE NOT NULL, -- the date this record was added to Koha
- `abstract` mediumtext, -- summary from the MARC record (520 in MARC21)
+ `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
PRIMARY KEY (`biblionumber`),
KEY `blbnoidx` (`biblionumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
DROP TABLE IF EXISTS `deletedbiblioitems`;
-CREATE TABLE `deletedbiblioitems` (
- `biblioitemnumber` int(11) NOT NULL default 0,
- `biblionumber` int(11) NOT NULL default 0,
+CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records that have been deleted
+ `biblioitemnumber` int(11) NOT NULL default 0, -- primary key, unique identifier assigned by Koha
+ `biblionumber` int(11) NOT NULL default 0, -- foreign key linking this table to the biblio table
`volume` mediumtext,
`number` mediumtext,
- `itemtype` varchar(10) default NULL,
- `isbn` varchar(30) default NULL,
- `issn` varchar(9) default NULL,
+ `itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c)
+ `isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a)
+ `issn` varchar(9) default NULL, -- ISSN (MARC21 022$a)
`publicationyear` text,
- `publishercode` varchar(255) default NULL,
+ `publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b)
`volumedate` date default NULL,
- `volumedesc` text,
+ `volumedesc` text, -- volume information (MARC21 362$a)
`collectiontitle` mediumtext default NULL,
`collectionissn` text default NULL,
`collectionvolume` mediumtext default NULL,
`editionstatement` text default NULL,
`editionresponsibility` text default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `illus` varchar(255) default NULL,
- `pages` varchar(255) default NULL,
+ `illus` varchar(255) default NULL, -- illustrations (MARC21 300$b)
+ `pages` varchar(255) default NULL, -- number of pages (MARC21 300$c)
`notes` mediumtext,
- `size` varchar(255) default NULL,
- `place` varchar(255) default NULL,
- `lccn` varchar(25) default NULL,
- `marc` longblob,
- `url` varchar(255) default NULL,
- `cn_source` varchar(10) default NULL,
+ `size` varchar(255) default NULL, -- material size (MARC21 300$c)
+ `place` varchar(255) default NULL, -- publication place (MARC21 260$a)
+ `lccn` varchar(25) default NULL, -- library of congress control number (MARC21 010$a)
+ `marc` longblob, -- full bibliographic MARC record
+ `url` varchar(255) default NULL, -- url (MARC21 856$u)
+ `cn_source` varchar(10) default NULL, -- classification source (MARC21 942$2)
`cn_class` varchar(30) default NULL,
`cn_item` varchar(10) default NULL,
`cn_suffix` varchar(10) default NULL,
`cn_sort` varchar(30) default NULL,
`totalissues` int(10),
- `marcxml` longtext NOT NULL,
+ `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
PRIMARY KEY (`biblioitemnumber`),
KEY `bibinoidx` (`biblioitemnumber`),
KEY `bibnoidx` (`biblionumber`),
DROP TABLE IF EXISTS `deleteditems`;
CREATE TABLE `deleteditems` (
- `itemnumber` int(11) NOT NULL default 0,
- `biblionumber` int(11) NOT NULL default 0,
- `biblioitemnumber` int(11) NOT NULL default 0,
- `barcode` varchar(20) default NULL,
- `dateaccessioned` date default NULL,
- `booksellerid` mediumtext default NULL,
- `homebranch` varchar(10) default NULL,
- `price` decimal(8,2) default NULL,
- `replacementprice` decimal(8,2) default NULL,
- `replacementpricedate` date default NULL,
- `datelastborrowed` date default NULL,
- `datelastseen` date default NULL,
+ `itemnumber` int(11) NOT NULL default 0, -- primary key and unique identifier added by Koha
+ `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record
+ `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information
+ `barcode` varchar(20) default NULL, -- item barcode (MARC21 952$p)
+ `dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (MARC21 952$d)
+ `booksellerid` mediumtext default NULL, -- where the item was purchased (MARC21 952$e)
+ `homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (MARC21 952$a)
+ `price` decimal(8,2) default NULL, -- purchase price (MARC21 952$g)
+ `replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (MARC21 952$v)
+ `replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w)
+ `datelastborrowed` date default NULL, -- the date the item was last checked out
+ `datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done)
`stack` tinyint(1) default NULL,
- `notforloan` tinyint(1) NOT NULL default 0,
- `damaged` tinyint(1) NOT NULL default 0,
- `itemlost` tinyint(1) NOT NULL default 0,
- `wthdrawn` tinyint(1) NOT NULL default 0,
- `itemcallnumber` varchar(255) default NULL,
- `issues` smallint(6) default NULL,
- `renewals` smallint(6) default NULL,
- `reserves` smallint(6) default NULL,
- `restricted` tinyint(1) default NULL,
- `itemnotes` mediumtext,
- `holdingbranch` varchar(10) default NULL,
+ `notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7)
+ `damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4)
+ `itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (MARC21 952$1)
+ `wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (MARC21 952$0)
+ `itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o)
+ `issues` smallint(6) default NULL, -- number of times this item has been checked out
+ `renewals` smallint(6) default NULL, -- number of times this item has been renewed
+ `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
+ `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
+ `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x)
+ `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)
`paidfor` mediumtext,
- `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `location` varchar(80) default NULL,
- `permanent_location` varchar(80) default NULL,
- `onloan` date default NULL,
- `cn_source` varchar(10) default NULL,
- `cn_sort` varchar(30) default NULL,
- `ccode` varchar(10) default NULL,
- `materials` varchar(10) default NULL,
- `uri` varchar(255) default NULL,
- `itype` varchar(10) default NULL,
- `more_subfields_xml` longtext default NULL,
- `enumchron` text default NULL,
- `copynumber` varchar(32) default NULL,
- `stocknumber` varchar(32) default NULL,
- `marc` longblob,
+ `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered
+ `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c)
+ `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
+ `onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no)
+ `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)
+ `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
+ `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
+ `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
+ `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
+ `marc` longblob, -- unused in Koha
PRIMARY KEY (`itemnumber`),
KEY `delitembarcodeidx` (`barcode`),
KEY `delitemstocknumberidx` (`stocknumber`),
--
DROP TABLE IF EXISTS `items`;
-CREATE TABLE `items` (
- `itemnumber` int(11) NOT NULL auto_increment,
- `biblionumber` int(11) NOT NULL default 0,
- `biblioitemnumber` int(11) NOT NULL default 0,
- `barcode` varchar(20) default NULL,
- `dateaccessioned` date default NULL,
- `booksellerid` mediumtext default NULL,
- `homebranch` varchar(10) default NULL,
- `price` decimal(8,2) default NULL,
- `replacementprice` decimal(8,2) default NULL,
- `replacementpricedate` date default NULL,
- `datelastborrowed` date default NULL,
- `datelastseen` date default NULL,
+CREATE TABLE `items` ( -- holdings/item information
+ `itemnumber` int(11) NOT NULL auto_increment, -- primary key and unique identifier added by Koha
+ `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record
+ `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information
+ `barcode` varchar(20) default NULL, -- item barcode (MARC21 952$p)
+ `dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (MARC21 952$d)
+ `booksellerid` mediumtext default NULL, -- where the item was purchased (MARC21 952$e)
+ `homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (MARC21 952$a)
+ `price` decimal(8,2) default NULL, -- purchase price (MARC21 952$g)
+ `replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (MARC21 952$v)
+ `replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w)
+ `datelastborrowed` date default NULL, -- the date the item was last checked out/issued
+ `datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done)
`stack` tinyint(1) default NULL,
- `notforloan` tinyint(1) NOT NULL default 0,
- `damaged` tinyint(1) NOT NULL default 0,
- `itemlost` tinyint(1) NOT NULL default 0,
- `wthdrawn` tinyint(1) NOT NULL default 0,
- `itemcallnumber` varchar(255) default NULL,
- `issues` smallint(6) default NULL,
- `renewals` smallint(6) default NULL,
- `reserves` smallint(6) default NULL,
- `restricted` tinyint(1) default NULL,
- `itemnotes` mediumtext,
- `holdingbranch` varchar(10) default NULL,
+ `notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7)
+ `damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4)
+ `itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (MARC21 952$1)
+ `wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (MARC21 952$0)
+ `itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o)
+ `issues` smallint(6) default NULL, -- number of times this item has been checked out/issued
+ `renewals` smallint(6) default NULL, -- number of times this item has been renewed
+ `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
+ `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
+ `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x)
+ `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)
`paidfor` mediumtext,
- `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `location` varchar(80) default NULL,
- `permanent_location` varchar(80) default NULL,
- `onloan` date default NULL,
- `cn_source` varchar(10) default NULL,
- `cn_sort` varchar(30) default NULL,
- `ccode` varchar(10) default NULL,
- `materials` varchar(10) default NULL,
- `uri` varchar(255) default NULL,
- `itype` varchar(10) default NULL,
- `more_subfields_xml` longtext default NULL,
- `enumchron` text default NULL,
- `copynumber` varchar(32) default NULL,
- `stocknumber` varchar(32) default NULL,
+ `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered
+ `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c)
+ `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
+ `onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no)
+ `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)
+ `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
+ `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
+ `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
+ `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
PRIMARY KEY (`itemnumber`),
UNIQUE KEY `itembarcodeidx` (`barcode`),
KEY `itemstocknumberidx` (`stocknumber`),
-- Table structure for table `old_reserves`
--
DROP TABLE IF EXISTS `old_reserves`;
-CREATE TABLE `old_reserves` (
- `borrowernumber` int(11) default NULL,
- `reservedate` date default NULL,
- `biblionumber` int(11) default NULL,
+CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have been completed (either filled or cancelled)
+ `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table defining which patron this hold is for
+ `reservedate` date default NULL, -- the date the hold was places
+ `biblionumber` int(11) default NULL, -- foreign key from the biblio table defining which bib record this hold is on
`constrainttype` varchar(1) default NULL,
- `branchcode` varchar(10) default NULL,
- `notificationdate` date default NULL,
- `reminderdate` date default NULL,
- `cancellationdate` date default NULL,
- `reservenotes` mediumtext,
- `priority` smallint(6) default NULL,
- `found` varchar(1) default NULL,
- `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `itemnumber` int(11) default NULL,
- `waitingdate` date default NULL,
- `expirationdate` DATE DEFAULT NULL,
+ `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at
+ `notificationdate` date default NULL, -- currently unused
+ `reminderdate` date default NULL, -- currently unused
+ `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
+ `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
+ `expirationdate` DATE DEFAULT NULL, -- the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date)
`lowestPriority` tinyint(1) NOT NULL,
KEY `old_reserves_borrowernumber` (`borrowernumber`),
KEY `old_reserves_biblionumber` (`biblionumber`),
--
DROP TABLE IF EXISTS `reserves`;
-CREATE TABLE `reserves` (
- `borrowernumber` int(11) NOT NULL default 0,
- `reservedate` date default NULL,
- `biblionumber` int(11) NOT NULL default 0,
+CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha
+ `borrowernumber` int(11) NOT NULL default 0, -- foreign key from the borrowers table defining which patron this hold is for
+ `reservedate` date default NULL, -- the date the hold was places
+ `biblionumber` int(11) NOT NULL default 0, -- foreign key from the biblio table defining which bib record this hold is on
`constrainttype` varchar(1) default NULL,
- `branchcode` varchar(10) default NULL,
- `notificationdate` date default NULL,
- `reminderdate` date default NULL,
- `cancellationdate` date default NULL,
- `reservenotes` mediumtext,
- `priority` smallint(6) default NULL,
- `found` varchar(1) default NULL,
- `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `itemnumber` int(11) default NULL,
- `waitingdate` date default NULL,
- `expirationdate` DATE DEFAULT NULL,
+ `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at
+ `notificationdate` date default NULL, -- currently unused
+ `reminderdate` date default NULL, -- currently unused
+ `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
+ `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
+ `expirationdate` DATE DEFAULT NULL, -- the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date)
`lowestPriority` tinyint(1) NOT NULL,
KEY priorityfoundidx (priority,found),
KEY `borrowernumber` (`borrowernumber`),
`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
insert into `message_attributes`
(`message_attribute_id`, message_name, `takes_days`)
values
-(1, 'Item_DUE', 0),
+(1, 'Item_Due', 0),
(2, 'Advance_Notice', 1),
(4, 'Hold_Filled', 0),
(5, 'Item_Check_in', 0),
insert into `message_attributes`
(`message_attribute_id`, message_name, `takes_days`)
values
-(1, 'Item_DUE', 0),
+(1, 'Item_Due', 0),
(2, 'Advance_Notice', 1),
(4, 'Hold_Filled', 0),
(5, 'Item_Check_in', 0),
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFRBRizeEditions',0,'If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('XISBN',0,'Use with FRBRizeEditions. If ON, Koha will use the OCLC xISBN web service in the Editions tab on the detail pages. See: http://www.worldcat.org/affiliate/webservices/xisbn/app.jsp','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OCLCAffiliateID','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','','free');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('XISBNDailyLimit',499,'The xISBN Web service is free for non-commercial use when usage does not exceed 500 requests per day','','Integer');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('XISBNDailyLimit',999,'The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','','Integer');
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 `message_attributes`
(`message_attribute_id`, `message_name`, `takes_days`)
values
-(1, 'Item_DUE' , 0),
+(1, 'Item_Due' , 0),
(2, 'Advance_Notice' , 1),
(4, 'Hold_Filled' , 0),
(5, 'Item_Check_in' , 0),
$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)";
+ print "Setting NULL to debarred where 0000-00-00 is stored (bug 7272)\n";
SetVersion($DBversion);
}
+$DBversion = "3.06.02.001";
+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.06.03.001";
+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);
+}
=head1 FUNCTIONS
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);
# Framework Selection is achieved through checking boxes.
my $langchoice = $query->param('fwklanguage');
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
+ $langchoice =~ s/[^a-zA-Z_-]*//g;
my $marcflavour = $query->param('marcflavour');
if ($marcflavour){
$installer->set_marcflavour_syspref($marcflavour);
# Marcflavour Selection is achieved through radiobuttons.
my $langchoice = $query->param('fwklanguage');
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
+ $langchoice =~ s/[^a-zA-Z_-]*//g;
my $dir =
C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/$langchoice/marcflavour";
unless (opendir( MYDIR, $dir )) {
.yui-gf .yui-u {
width: 79.2%;
+}
+/* Class to be added to toolbar when it starts being fixed at the top of the screen*/
+.floating {
+ -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
+ box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
}
\ No newline at end of file
background-color : #FFF;
color : #333333;
font-family : arial, geneva, sans-serif;
- font-size : 12px;
+ font-size : 14px;
margin : 0px 0px 0px 0px;
}
border-left : 1px solid #CCCCCC;
margin : 3px 0px 5px 0px;
padding : 0px;
- width : 100%;
- height : 100%;
+ width : 99%;
}
table.list {
border-left : 0;
font-size : 12px;
padding : 5px 5px 5px 5px;
- width : 100%;
- height : 100%;
}
td:last-child {
border-left : 0;
font-size : 12px;
padding : 5px 5px 5px 5px;
- width : 100%;
- height : 100%;
}
table.list th {
padding : .7em 0;
}
div.yui-b fieldset.brief li.radio label,
+div.yui-b fieldset.brief li.dateinsert label,
+div.yui-b fieldset.brief li.dateinsert span.label,
div.yui-b fieldset.brief li.radio span.label {
display : inline;
}
}
.dialog {
- border: 1px solid #bcbcbc;
+ -moz-border-radius : 2px;
+ border-radius : 2px;
padding : .5em;
margin : 1em auto;
- width: 65%;
- }
-
+ text-align : center;
+ width: 65%;
+}
+
.dialog table {
margin : .5em auto;
}
background-color : #ffc;
}
+div.dialog {
+ border: 1px solid #bcbcbc;
+}
+
div.alert {
- background : #FFC url(../../img/alert-bg.gif) repeat-x left 0;
- text-align : center;
+ background: #fef8d3; /* Old browsers */
+ background: -moz-linear-gradient(top, #fef8d3 0%, #ffec91 9%, #ffed87 89%, #f9dc00 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fef8d3), color-stop(9%,#ffec91), color-stop(89%,#ffed87), color-stop(100%,#f9dc00)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fef8d3', endColorstr='#f9dc00',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* W3C */
+ text-align : center;
+ border: 1px solid #E0C726;
}
div.alert strong {
color : #900;
}
-div.dialog {
- background : #FFC url(../../img/dialog-bg.gif) repeat-x left 0;
- text-align : center;
-}
-
a.document {
background-position : left middle;
background-repeat : no-repeat;
}
div.message {
- background : white url("../../img/message-bg.gif") repeat-x left 0;
+ background: #ffffff; /* Old browsers */
+ background: -moz-linear-gradient(top, #ffffff 0%, #f4f6fa 2%, #eaeef5 23%, #e8edf6 94%, #cddbf2 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(2%,#f4f6fa), color-stop(23%,#eaeef5), color-stop(94%,#e8edf6), color-stop(100%,#cddbf2)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */
border : 1px solid #bcbcbc;
text-align: center;
width : 55%;
div#menu li a {
text-decoration: none;
display: block;
- background : #EEE url(../../img/side-tab-gradient.gif) repeat-y top right;
+ background: #eeeeee; /* Old browsers */
+ background: -moz-linear-gradient(left, #eeeeee 0%, #eeeeee 96%, #e6e6e6 97%, #cccccc 99%, #c1c1c1 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eeeeee), color-stop(96%,#eeeeee), color-stop(97%,#e6e6e6), color-stop(99%,#cccccc), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */
+ background: linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* W3C */
border: 1px solid #000;
font-size: 111%;
margin: .5em 0;
}
div#menu li a:hover {
- background : #E8F0F6 url(../../img/side-tab-gradient-hover.gif) repeat-y top right;
+ background: #e8f0f6; /* Old browsers */
+ background: -moz-linear-gradient(left, #e8f0f6 0%, #e8f0f6 96%, #c1c1c1 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#e8f0f6), color-stop(96%,#e8f0f6), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8f0f6', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */
+ background: linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* W3C */
}
div#menu li.active a:hover {
border: 1px outset #999999;
border-top-color: #666;
border-left-color: #666;
+ -moz-border-radius : 2px;
padding: 0.25em;
- background : #E8E8E8 url(../../img/button-bg.gif) top left repeat-x;
+ background: #ffffff; /* Old browsers */
+ background: -moz-linear-gradient(top, #ffffff 0%, #f7f7f7 35%, #e0e0e0 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(35%,#f7f7f7), color-stop(100%,#e0e0e0)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* W3C */
color: #333333;
}
background-image : none;
padding-right : 20px;
}
+
+div.lang {
+ float:left;
+}
div#changelanguage{
background-color: #fff;
content: "";
}
.holdcount { font-size : 105%; line-height : 200%; }
-.holdcount a { border : 1px solid #a4bedd; background-color : #e4ecf5; font-weight : bold; -moz-border-radius: 4px; padding : .1em .4em; text-decoration : none; }
+.holdcount a {
+ border : 1px solid #a4bedd;
+ background-color : #e4ecf5;
+ font-weight : bold;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ padding : .1em .4em;
+ text-decoration : none;
+}
.holdcount a:hover { background-color : #ebeff7; }
.container {
border : 1px solid #EEE;
background-color : transparent;
font-weight: bold;
text-align : center;
-}
\ No newline at end of file
+}
}else{
return false;
}
+ } else {
+ alert(_("This record has no items."));
+ return false;
}
}
[% 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 %]
- [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } }[% END %]
+ [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion }[% UNLESS ( count ) %],id:'disabled'[% END %] }[% END %]
];
if(editmenu.length){
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>
new YAHOO.widget.Button("editpatron");
new YAHOO.widget.Button("addnote");
[% IF CAN_user_staffaccess %] new YAHOO.widget.Button("changepassword"); [% END %]
+ new YAHOO.widget.Button("duplicate");
new YAHOO.widget.Button("printslip");
new YAHOO.widget.Button("printpage");
}
[% 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 %]
- [% 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>
+ [% 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 ( 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>
<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=page">Print Page</a></li>
<li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=slip">Print Slip</a></li>
<li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
[% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %]
<ul>
[% FOREACH facet IN facets_loo.facets %]<li><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=[% facet.type_link_value %]:[% facet.facet_link_value %]" title="[% facet.facet_title_value %]">[% facet.facet_label_value %]</a> [% IF ( displayFacetCount ) %]([% facet.facet_count %])[% END %]</li>[% END %][% IF ( facets_loo.expandable ) %]
- <li class="showmore"><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
+ <li class="showmore"><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %][% IF ( offset ) %]&offset=[% offset %][% END %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
[% END %]
</ul></li>
[% END %]
<div id="changelanguage" class="ft">
<ul id="i18nMenu" class="footermenu">
[% FOREACH languages_loo IN languages_loop %]
+ <div class="lang">
[% IF ( languages_loo.group_enabled ) %]
[% IF ( languages_loo.plural ) %]
<li class="more"><a class="sublangs" id="show[% languages_loo.rfc4646_subtag %]" href="#">[% languages_loo.native_description %] ([% languages_loo.rfc4646_subtag %])</a><div id="sub[% languages_loo.rfc4646_subtag %]">
[% END %]
[% END %]
[% END %]
+ </div>
[% END %]
</ul>
</div>
var CloneButtonPlus;
var CloneButtonMinus;
// try{
- CloneButtonPlus = clone.getElementsByTagName('a')[0];
+ var jclone = $(clone);
+ CloneButtonPlus = $("a.addItem", jclone).get(0);
CloneButtonPlus.setAttribute('onclick',"cloneItemBlock('" + index + random + "')");
- CloneButtonMinus = clone.getElementsByTagName('a')[1];
+ CloneButtonMinus = $("a.delItem", jclone).get(0);
CloneButtonMinus.setAttribute('onclick',"deleteItemBlock('" + index + random + "')");
CloneButtonMinus.setAttribute('style',"display:inline");
// change itemids of the clone
--- /dev/null
+/* Source: http://www.webspeaks.in/2011/07/new-gmail-like-floating-toolbar-jquery.html
+ Revision: http://jsfiddle.net/pasmalin/AyjeZ/
+*/
+(function($){
+ $.fn.fixFloat = function(options){
+
+ var defaults = {
+ enabled: true
+ };
+ var options = $.extend(defaults, options);
+
+ var offsetTop; /**Distance of the element from the top of window**/
+ var s; /**Scrolled distance from the top of window through which we have moved**/
+ var fixMe = true;
+ var repositionMe = true;
+
+ var tbh = $(this);
+ var originalOffset = tbh.position().top; /**Get the actual distance of the element from the top mychange:change to position better work**/
+
+ if (tbh.css('position')!='absolute') {
+ var tbhBis = $("<div></div>");
+ tbhBis.css({"display":tbh.css("display"),"visibility":"hidden"});
+ tbhBis.width(tbh.outerWidth(true));
+ tbhBis.height(tbh.outerHeight(true));
+ tbh.after(tbhBis);
+ tbh.width(tbh.width());
+ tbh.css({'position':'absolute'});
+ }
+
+ if(options.enabled){
+ $(window).scroll(function(){
+ var offsetTop = tbh.offset().top; /**Get the current distance of the element from the top **/
+ var s = parseInt($(window).scrollTop(), 10); /**Get the from the top of wondow through which we have scrolled**/
+ var fixMe = true;
+ if(s > offsetTop){
+ fixMe = true;
+ }else{
+ fixMe = false;
+ }
+
+ if(s < originalOffset){
+ repositionMe = true;
+ }else{
+ repositionMe = false;
+ }
+
+ if(fixMe){
+ var cssObj = {
+ 'position' : 'fixed',
+ 'top' : '0px',
+ 'z-index' : '1000'
+ }
+ tbh.css(cssObj);
+ tbh.addClass("floating");
+ }
+ if(repositionMe){
+ var cssObj = {
+ 'position' : 'absolute',
+ 'top' : originalOffset,
+ 'z-index' : '1'
+ }
+ tbh.css(cssObj);
+ tbh.removeClass("floating");
+ }
+ });
+ }
+ };
+})(jQuery);
\ No newline at end of file
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › About Koha</div>
<div id="doc3" class="yui-t7">
-
+
<div id="bd">
<div id="yui-main">
<div class="yui-g">
<h1>About Koha</h1>
-
+
<div id="abouttabs" class="toptabs numbered">
<ul>
<li><a href="about.pl#about">Server Information</a></li>
<li><a href="about.pl#team">Koha Team</a></li>
<li><a href="about.pl#licenses">Licenses</a></li>
<li><a href="about.pl#translations">Translations</a></li>
+ <li><a href="about.pl#history">Koha Timeline</a></li>
</ul>
-
+
<div id="about">
-
+
<table>
<caption>Server information</caption>
<tr><th scope="row">Koha version: </th><td>[% kohaVersion |html %]</td></tr>
<li>The <strong><a href="http://library.neu.edu.tr">Near East University</a></strong>, Cyprus</li>
<li><strong>OPUS International Consultants</strong>, Wellington, New Zealand (Corporate Serials sponsorship)</li>
<li><strong><a href="http://www.famfamfam.com/">famfamfam.com</a></strong> Birmingham (UK) based developer Mark James for the famfamfam Silk iconset.</li>
- </ul>
-
+ </ul>
+
<h2>Koha Release Team</h2>
<ul>
- <li><strong>Colin Campbell</strong>(Koha 3.4 QA Manager)</li>
+ <li><strong>Colin Campbell</strong> (Koha 3.4 QA Manager)</li>
<li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544614260">Galen Charlton</a></strong> (Koha 3.2 Release Manager)</li>
<li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544609030">Chris Cormack</a></strong> (Koha 1.x, 3.4, 3.6 Release Manager, Koha 3.2 Translation Manager)</li>
<li><strong><a href="https://www.ohloh.net/p/koha/contributors/6620692210484">Frédéric Demians</a></strong>(Koha 3.4, 3.6 Translation Manager)</li>
<li><strong>Rachel Hamilton-Williams</strong> (Kaitiaki from 2004 to present)</li>
<li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544614275">Henri-Damien Laurent</a></strong> (Koha 3.0 Release Maintainer)</li>
<li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544609147">Owen Leonard</a></strong> (Koha 3.x Interface Design)</li>
- <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544615991">Chris Nighswonger</a></strong> (Koha 3.2, 3.4 Release Maintainer)</li>
- <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544612249">Paul Poulain</a></strong> (Koha 2.0 Release Manager, Koha 2.2 Release Manager/Maintainer)</li>
+ <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544615991">Chris Nighswonger</a></strong> (Koha 3.2, 3.4 Release Maintainer, Koha 3.6 Release Maintainer)</li>
+ <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544612249">Paul Poulain</a></strong> (Koha 2.0 Release Manager, Koha 2.2 Release Manager/Maintainer, Koha 3.8 Release Manager)</li>
<li><strong><a href="http://www.ohloh.net/p/koha/contributors/6620692116417">MJ Ray</a></strong> (Koha 2.0 Release Maintainer)</li>
- <li><strong>Ian Walls</strong> Koha 3.6 QA Manager</li>
+ <li><strong>Ian Walls</strong> Koha 3.6 QA Manager, Koha 3.8 QA Manager</li>
</ul>
<h2>Koha Development Team</h2>
<ul>
<li><strong>Katipo Communications</strong>, New Zealand</li>
<li><strong>KohaAloha</strong>, New Zealand</li>
<li><strong>LibLime</strong>, USA</li>
- <li><strong>Libriotech</strong>, Norway</li>
+ <li><strong>Libriotech</strong>, Norway</li>
<li><strong>Nelsonville Public Library</strong>, Ohio, USA</li>
<li><strong>PTFS</strong>, Maryland, USA</li>
<li><strong>PTFS Europe Ltd</strong>, United Kingdom</li>
<li><strong>Tamil</strong>, France</li>
<li><strong>Xercode</strong>, Spain</li>
</ul>
-
+
<h2>Additional Thanks To...</h2>
<ul>
<li>Jo Ransom</li>
<li>Nicolas Morin (French Translation in 2.0)</li>
</ul>
</div>
+
<div id="licenses">
<h2>Koha</h2>
<p>
<h2>YUI</h2>
<p>
<a href="http://developer.yahoo.com/auth/license.txt">BSD License</a>
- </p>
+ </p>
<h2>Famfamfam iconset</h2>
<ul>
<li><a href="http://www.famfamfam.com/lab/icons/silk/">FamFamFam Site</a></li>
by the Bridge Consortium of Carleton College and St. Olaf College.</li>
</ul>
</div>
+
<div id="translations">
<h2>Translation</h2>
<ul>
<li><strong>اردو(Urdu)</strong> Ata ur Rehman</li>
<li><strong>Українська (Ukrainian)</strong> Victor Titarchuk and Serhij Dubyk</li>
</ul>
-
+
+ </div>
+
+ <div id="history">
+ <h2>Koha history timeline</h2>
+ <table style="cursor:pointer">
+ <thead>
+ <tr>
+ <td style="font-weight:bold;" >Date</td>
+ <td style="font-weight:bold;" >Description</td>
+ </tr>
+ </thead>
+ [% FOREACH tabl IN table2 %]
+ <tr class="[% loop.parity %]">
+ [% FOREACH ro IN tabl.row2 %]
+ <td>[% ro.date %]</td>
+ <td>[% ro.desc|html %]</td>
+ [% END %]
+ </tr>
+ [% END %]
+ </table>
</div>
+
</div>
+
</div></div></div>
[% INCLUDE 'intranet-bottom.inc' %]
[% FOREACH item IN items %]
<div id="outeritemblock">
<div id="itemblock">
- <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li>
- <div class="subfield_line" style="[% iteminformatio.hidden %];" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
+ <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
+ <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
<label>[% iteminformatio.subfield %] - [% IF ( iteminformatio.mandatory ) %]<b>[% END %][% iteminformatio.marc_lib %][% IF ( iteminformatio.mandatory ) %] *</b>[% END %]</label>
[% iteminformatio.marc_value %]
[% INCLUDE 'doc-head-close.inc' %]
[% UNLESS ( closedate ) %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/JavaScript">
+<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#orders").tablesorter({
window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
}
}
-
function confirm_deletion() {
var is_confirmed = confirm(_('Are you sure you want to delete this basket?'));
if (is_confirmed) {
//]]>
</script>
[% ELSE %]
+<script type="text/javascript">
+//<![CDATA[
+ $(document).ready(function(){
+ $("#basketgroupid").change(function(){
+ if($(this).val() == "new"){
+ location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
+ }
+ });
+ });
+//]]>
+</script>
[% UNLESS ( grouped ) %]
<script type="text/javascript">
//<![CDATA[
</h2>
[% END %]
[% IF ( basketno ) %]
- <div id="acqui_basket_summary" class="yui-g">
- <h2>Basket details</h2>
- [% IF ( basketnote ) %]<p>Internal note: [% basketnote %]</p>[% END %]
- [% IF ( basketbooksellernote ) %]<p>Vendor note: [% basketbooksellernote %]</p>[% END %]
+ <div id="acqui_basket_summary" class="yui-g">
+ <div class="rows">
+ <div class="yui-u first">
+ <ol>
+ [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
+ [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
[% IF ( basketcontractno ) %]
- <p>Contract name: <a href="../admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]&booksellerid=[% booksellerid %]">[% basketcontractname %]</a></p>
+ <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]&booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
[% END %]
- [% IF ( authorisedbyname ) %]<p>Managed by: [% authorisedbyname %]</p>[% END %]
- [% IF ( creationdate ) %]<p>Opened on: [% creationdate %]</p>[% END %]
+ [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname %]</li>[% END %]
+ [% IF ( creationdate ) %]<li><span class="label">Opened on:</span> [% creationdate %]</li>[% END %]
+ [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate %]</li>[% END %]
+
+ </ol>
+ </div>
[% IF ( closedate ) %]
- <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
- <p>Closed on: [% closedate %]</p>
- [% IF ( basketgroups ) %]
- <p> Basket group: <select id="basketgroupid" name="basketgroupid">
- [% FOREACH basketgroup IN basketgroups %]
- [% IF ( basketgroup.default ) %]
+ <div class="yui-u">
+ <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
+
+ <p><label for="basketgroupid"><strong>Basket group:</strong></label></p>
+ <p><select id="basketgroupid" name="basketgroupid">
+ <option value="new">Add new group</option>
+ [% FOREACH basketgroup IN basketgroups %]
+ [% IF ( basketgroup.default ) %]
<option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
- [% ELSE %]
+ [% ELSE %]
<option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
- [% END %]
- [% END %]
- </select>
- <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
+ [% END %]
+ [% END %]
+ </select></p>
+
+ <p><input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
<input type="hidden" value="mod_basket" name="op" />
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
- <input type="submit" value="Change basket group" />
- </p>
- </form>
- [% ELSE %]
- <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basketgroups %]&basketgroupid=[% id %]">[% name %]</a>
- [% END %]
+ <input type="submit" value="Change basket group" /></p>
+
+ </form>
+ </div>
[% END %]
</div>
+ </div>
[% END %]
[% UNLESS ( delete_confirm ) %]
- <div id="acqui_basket_content">
+ <div id="acqui_basket_content" class="yui-g">
<h2>Order Details</h2>
[% IF ( books_loop ) %]
<table id="orders">
<tfoot>
[% IF ( GST ) %]
<tr>
- <th>Total Tax Exc.</th>
- <th>[% total_rrp_gste %]</th>
- <th> </th>
- <th>[% qty_total %]</th>
- <th>[% total_est_gste %]</th>
+ <th scope="row">Total Tax Exc.</th>
+ <td>[% total_rrp_gste %]</td>
+ <td> </td>
+ <td>[% qty_total %]</td>
+ <td>[% total_est_gste %]</td>
[% IF ( active ) %]
[% IF ( closedate ) %]
<td colspan="1" rowspan="3"> </td>
[% END %]
</tr>
<tr>
- <th>Tax ([% gist_rate %])</th>
- <th>[% gist_rrp %]</th>
- <th> </th>
- <th> </th>
- <th>[% gist_est %]</th>
+ <th scope="row">Tax ([% gist_rate %])</th>
+ <td>[% gist_rrp %]</td>
+ <td> </td>
+ <td> </td>
+ <td>[% gist_est %]</td>
</tr>
<tr>
- <th>Total Tax Inc. ([% currency %])</th>
- <th>[% total_rrp_gsti %]</th>
- <th> </th>
- <th>[% qty_total %]</th>
- <th>[% total_est_gsti %]</th>
+ <th scope="row">Total Tax Inc. ([% currency %])</th>
+ <td>[% total_rrp_gsti %]</td>
+ <td> </td>
+ <td>[% qty_total %]</td>
+ <td>[% total_est_gsti %]</td>
</tr>
[% ELSE %]
<tr>
- <th>Total ([% currency %])</th>
- <th>[% total_rrp_gsti %]</th>
- <th> </th>
- <th>[% qty_total %]</th>
- <th>[% total_est_gsti %]</th>
+ <th scope="row">Total ([% currency %])</th>
+ <td>[% total_rrp_gsti %]</td>
+ <td> </td>
+ <td>[% qty_total %]</td>
+ <td>[% total_est_gsti %]</td>
</tr>
[% END %]
</tfoot>
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Basket Grouping for [% booksellername %]</title>
+<title>Koha › Basket Grouping for [% booksellername |html %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/fonts/fonts-min.css" />
+<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
+[% IF ( grouping ) %]
<script type="text/javascript" src="[% yuipath %]/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="[% yuipath %]/animation/animation-min.js"></script>
<script type="text/javascript" src="[% yuipath %]/dragdrop/dragdrop-min.js"></script>
<script type="text/javascript" src="[% yuipath %]/element/element-min.js"></script>
-<script type="text/javascript" src="[% yuipath %]/tabview/tabview-min.js"></script>
-<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/tabview/assets/skins/sam/tabview.css" />
-
<style type="text/css">
/*margin and padding on body element
can introduce errors in determining
}
div.workarea_alt { padding: 5px; float:left; width: 95%;}
-div.closed { background-color="pink"; padding:10px; float:left; width: 45%;}
-
-ul.closed {
- position: relative;
- background: grey;
- padding-bottom:10;
- border: 1px solid gray;
- list-style: none;
- margin:0;
- padding: 5px;
-}
+div.closed { background-color: pink; padding:10px; float:left; width: 45%;}
ul.draglist {
position: relative;
- background: #f7f7f7;
+ background: #EEE;
padding-bottom:10;
- border: 1px solid gray;
+ border: 1px inset gray;
list-style: none;
margin:0;
padding: 5px;
clear: none;
}
-.basketgroup {
- margin-top: 10px;
- font-size: 1.2em;
- font-weight: bold;
- list-style: none;
- background-color: #D8D4E2;
- display: block;
-}
-.basketgroup li{
- font-size: 0.5em;
- list-style: none;
- display: inline;
-}
-
</style>
-
+ [% END %]
<script type="text/javascript">
//<![CDATA[
YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
- var tabView = new YAHOO.widget.TabView('bgtabs');
-//]]>
-
function submitForm(form) {
if (form.close.checked == true) {
form.appendChild(input);
}
}
+// prepare DOM for YUI Toolbar
+ $(document).ready(function() {
+ // $("#toolbar").empty();
+ yuiToolbar();
+ $("#basket_groups > ul").tabs();
+ });
+
+// YUI Toolbar Functions
+
+function yuiToolbar() {
+ var booksellermenu = [
+ { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]" },
+ { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
+ ]
+ var ordersbutton = [
+ { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=[% booksellerid %]" },
+ { text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" },
+ ]
+ new YAHOO.widget.Button("newbasketgroup");
+ new YAHOO.widget.Button({
+ type: "menu",
+ label: _("Vendor"),
+ name: "booksellerbutton",
+ menu: booksellermenu,
+ container: "toolbar"
+ });
+
+ new YAHOO.widget.Button({
+ type: "menu",
+ label: _("Orders"),
+ name: "ordersbutton",
+ menu: ordersbutton,
+ container: "toolbar"
+ });
+}
+//]]>
</script>
</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> › <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername %]</a> › Basket Grouping</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 %]">[% booksellername |html %]</a> › Basket Grouping</div>
<div id="doc" class="yui-t7">
<div class="yui-b">
<div id="toolbar">
- <script type="text/javascript">
- //<![CDATA[
-
- // prepare DOM for YUI Toolbar
-
- $(document).ready(function() {
- // $("#toolbar").empty();
- yuiToolbar();
- });
-
- // YUI Toolbar Functions
-
- function yuiToolbar() {
- var booksellermenu = [
- { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]" },
- { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
- ]
- var ordersbutton = [
- { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=[% booksellerid %]" },
- { text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" },
- ]
- new YAHOO.widget.Button("newbasketgroup");
- new YAHOO.widget.Button({
- type: "menu",
- label: _("Vendor"),
- name: "booksellerbutton",
- menu: booksellermenu,
- container: "toolbar"
- });
-
- new YAHOO.widget.Button({
- type: "menu",
- label: _("Orders"),
- name: "ordersbutton",
- menu: ordersbutton,
- container: "toolbar"
- });
- }
- //]]>
- </script>
<a href="?op=add&booksellerid=[% booksellerid %]" name="newbasketgroup" id="newbasketgroup">New Basket Group</a>
</div>
- <h1>Basket Grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername %]</a></h1>
+ <h1>Basket Grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername |html %]</a></h1>
</div>
[% IF ( grouping ) %]
<div id="bd">
<div class="yui-g">
- <div class="yui-u grouping">
+ <div class="yui-u">
<form action="[% scriptname %]" method="post" name="basketgroups" id="basketgroups">
<div id="groups">
+ <fieldset class="brief">
<div class="workarea_alt" >
<h3>Ungrouped Baskets</h3>
<ul id="ungrouped" class="draglist_alt">
[% END %]
</ul>
</div>
+ </fieldset>
</div>
</form>
<div class="yui-u first">
<form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
- <fieldset id="various" class='various' >
- <h3><label for="basketgroupname">Basket Group Name:</label></h3>
- <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" />
- <h3><label for="billingplace">Billing Place:</label></h3>
- <select name="billingplace" id="billingplace">
- [% FOREACH billingplaceloo IN billingplaceloop %]
- [% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
- [% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
- [% END %]
- </select>
- <h3><label for="deliveryplace">Delivery Place:</label></h3>
- <select name="deliveryplace" id="deliveryplace">
- <option value="">--</option>
- [% FOREACH deliveryplaceloo IN deliveryplaceloop %]
- [% IF ( deliveryplaceloo.selected ) %]<option value="[% deliveryplaceloo.value %]" selected="selected">[% deliveryplaceloo.branchname %]</option>
- [% ELSE %]<option value="[% deliveryplaceloo.value %]">[% deliveryplaceloo.branchname %]</option>[% END %]
- [% END %]
- </select>
- <p>or</p>
- <h3><label for="freedeliveryplace">Delivery Place:</label></h3>
- <textarea cols="26" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea>
- <h3><label for="deliverycomment">Delivery comment:</label></h3>
- <textarea cols="26" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
- <div class="workarea">
- <h3>Grouping:</h3>
+ <fieldset id="various" class="brief">
+ <ol>
+ <li><label for="basketgroupname">Basket Group Name:</label>
+ <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" /></li>
+ <li><label for="billingplace">Billing Place:</label>
+ <select name="billingplace" id="billingplace" style="width:13em;">
+ [% FOREACH billingplaceloo IN billingplaceloop %]
+ [% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
+ [% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
+ [% END %]
+ </select></li>
+ <li><label for="deliveryplace">Delivery Place:</label>
+ <select name="deliveryplace" id="deliveryplace" style="width:13em;">
+ <option value="">--</option>
+ [% FOREACH deliveryplaceloo IN deliveryplaceloop %]
+ [% IF ( deliveryplaceloo.selected ) %]<option value="[% deliveryplaceloo.value %]" selected="selected">[% deliveryplaceloo.branchname %]</option>
+ [% ELSE %]<option value="[% deliveryplaceloo.value %]">[% deliveryplaceloo.branchname %]</option>[% END %]
+ [% END %]
+ </select></li>
+ <li><p>or</p></li>
+ <li><label for="freedeliveryplace">Delivery Place:</label>
+ <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea></li>
+ <li><label for="deliverycomment">Delivery comment:</label>
+ <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
+ </li>
+ <li><span class="label">Baskets in this group:</span>
<ul class="draglist" id="bg">
[% FOREACH selectedbasket IN selectedbaskets %]
<li class="grouped" id="b-[% selectedbasket.basketno %]" >
<input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
</li>
[% END %]
-
</ul>
- </div>
- <div><input type="checkbox" name="close"> Close</input></div>
- <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
+ </li>
+ <li><label><input type="checkbox" id="close" name="close" /> Close basket group</label></li>
+ </ol>
+ </fieldset>
+
+ <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid %]" />
[% IF ( basketgroupid ) %]
<input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
[% END %]
<input type="hidden" name="op" value="attachbasket" />
<input type="submit" value="Save" />
- </fieldset>
+ </fieldset>
</form>
</div>
</div>
</div>
[% ELSE %]
- <div class="yui-g">
- <div id="bgtabs" class="yui-navset">
- <ul class="yui-nav">
- [% UNLESS ( closed ) %]<li class="selected"><a href="#opened"><em>Opened</em></a></li>
- [% ELSE%]<li><a href="#opened"><em>Opened</em></a></li>[% END %]
- [% IF ( closed ) %]<li class="selected"><a href="#closed"><em>Closed</em></a></li>
- [% ELSE %]<li><a href="#closed"><em>Closed</em></a></li>[% END %]
- </ul>
- <div class="yui-content">
- <div id="opened">
- <ul>
- [% FOREACH basketgroup IN basketgroups %]
- [% UNLESS ( basketgroup.closed ) %]
- <li class="basketgroup">
- [% IF ( basketgroup.name ) %]
- [% basketgroup.name %]
- [% ELSE %]
- Basket Group n°[% basketgroup.id %]
- [% END %]
- <ul>
- <li>
- <span class="yui-button yui-link-button">
- <span class="first-child">
- <a href="javascript:closeandprint([% basketgroup.id %])" class="yui-button yui-link-button">Close & Print</a>
- </span>
- </span>
- </li>
- <li>
- <span class="yui-button yui-link-button">
- <span class="first-child">
- <a href="?op=add&booksellerid=[% basketgroup.booksellerid %]&basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button" >Edit</a>
- </span>
- </span>
- </li>
- <li>
- <span class="yui-button yui-link-button">
- <span class="first-child">
- <a href="?op=delete&booksellerid=[% basketgroup.booksellerid %]&basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button" >Delete</a>
- </span>
- </span>
- </li>
-
- </ul>
- </li>
- [% END %]
- [% END %]
- </ul>
- </div>
- <div id="closed">
- <ul>
- [% FOREACH basketgroup IN basketgroups %]
- [% IF ( basketgroup.closed ) %]
- <li class="basketgroup">
- [% IF ( basketgroup.name ) %]
- [% basketgroup.name %]
- [% ELSE %]
- Basket Group n°[% basketgroup.id %]
- [% END %]
- <ul>
- <li>
- <span class="yui-button yui-link-button">
- <span class="first-child">
- <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&booksellerid=[% basketgroup.booksellerid %]&basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button">Reopen</a>
- </span>
- </span>
- </li>
- <li>
- <span class="yui-button yui-link-button">
- <span class="first-child">
- <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=print&basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button">Print</a>
- </span>
- </span>
- </li>
- </ul>
- </li>
- [% END %]
- [% END %]
- </ul>
+ <div class="yui-g">
+ <div id="basket_groups" class="toptabs">
+ <ul class="ui-tabs-nav">
+ [% UNLESS ( closed ) %]<li class="ui-tabs-selected"><a href="#opened">Open</a></li>
+ [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
+ [% IF ( closed ) %]<li class="ui-tabs-selected"><a href="#closed">Closed</a></li>
+ [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
+ </ul>
+ <div id="opened">
+ <table>
+ <thead>
+ <tr>
+ <th>Basket Group</th><th colspan="3">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH basketgroup IN basketgroups %]
+ [% UNLESS ( basketgroup.closed ) %]
+ <tr>
+ <td><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basketgroup.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
+ [% basketgroup.name %]
+ [% ELSE %]
+ Basket group no. [% basketgroup.id %]
+ [% END %]</a>
+ </td>
+ <td>
+ <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and Print" />
+ </td>
+ <td>
+ <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
+ </td>
+ <td>
+ <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="delete" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Delete" /></form>
+ </td>
+ </tr>
+ [% END %]
+ [% END %]
+ </tbody>
+ </table>
+ </div>
+ <div id="closed">
+ <table>
+ <thead>
+ <tr>
+ <th>Basket Group</th><th colspan="3">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH basketgroup IN basketgroups %]
+ [% IF ( basketgroup.closed ) %]
+ <tr>
+ <td>
+ <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&booksellerid=[% basketgroup.booksellerid %]&basketgroupid[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
+ [% basketgroup.name %]
+ [% ELSE %]
+ Basket group no. [% basketgroup.id %]
+ [% END %]</a>
+ </td>
+ <td>
+ <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
+ </td>
+ <td>
+ <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Print" /></form>
+ </td>
+ </tr>
+ [% END %]
+ [% END %]
+ </tbody>
+ </table>
</div>
</div>
- </div>
-
- </div>
+ </div>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]
</div></li>
[% END %]
</ol>
- <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">+</a>
- <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">-</a>
+ <a class="addItem" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">Add</a>
+ <a class="delItem" style="display:none;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">Delete</a>
</div><!-- /iteminformation -->
</div>
</div></li>
[% END %]
</ol>
- <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">+</a>
- <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">-</a>
+ <a class="addItem" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">Add</a>
+ <a class="delItem" style="display:none;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">Delete</a>
</div><!-- /iteminformation -->
</div>
</script>
<script type="text/javascript">
//<![CDATA[
- function confirm_delete_item(ordernumber, biblionumber) {
+ function confirm_delete_item(ordernumber, basketno, biblionumber) {
var is_confirmed = confirm(_('Are you sure you want to delete this order ?'));
if (is_confirmed) {
- window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
+ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber;
}
}
function confirm_delete_biblio(ordernumber, biblionumber) {
var is_confirmed = confirm(_('Are you sure you want to delete this catalog record and order ?'));
if (is_confirmed) {
- window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
+ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
}
}
[% IF ( loop_order.left_holds_on_order ) %]
<span class="button" title="Can't delete order, ([% loop_order.holds_on_order %]) holds are linked with this order cancel holds first">Can't delete order</span><br>
[% ELSE %]
- <a href="javascript:confirm_delete_item([% loop_order.ordernumber %],[% loop_order.biblionumber %])" class="button">Delete order</a><br>
+ <a href="javascript:confirm_delete_item([% loop_order.ordernumber %],[% loop_order.basketno %],[% loop_order.biblionumber %])" class="button">Delete order</a><br>
[% END %]
[% IF ( loop_order.can_del_bib ) %]
- <a href="javascript:confirm_delete_biblio([% loop_order.ordernumber %],[% loop_order.biblionumber %])" class="button">Delete order and catalog record</a><br>
+ <a href="javascript:confirm_delete_biblio([% loop_order.ordernumber %],[% loop_order.basketno %],[% loop_order.biblionumber %])" class="button">Delete order and catalog record</a><br>
[% ELSE %]
<span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
[% END %]
[% 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">
[% ELSE %]
- <h2>Results</h2>
+ <h2>Search results</h2>
[% IF ( breeding_loop ) %]
<table id="resultst">
<thead> <tr>
</li>
<li class="radio">
- <label for="show_mine">Show my<br /> funds only</label>
+ <label for="show_mine">Show my funds only</label>
[% IF ( show_mine ) %]
<input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
[% ELSE %]
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:
<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">
[% IF ( MARCAUTHORS ) %]
<li><strong>Additional Authors:</strong><ul>
[% FOREACH MARCAUTHOR IN MARCAUTHORS %]
- <li>[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value |url %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]</li>
+ <li>[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value |url %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]</li>
[% END %]
</ul>
<li><strong>Subjects:</strong>
<ul>
[% FOREACH MARCSUBJCT IN MARCSUBJCTS %]
- <li>[% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% MARCSUBJECT_SUBFIELDS_LOO.separator %] <a title="‡[% MARCSUBJECT_SUBFIELDS_LOO.code %] [% MARCSUBJECT_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCSUBJECT_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCSUBJECT_SUBFIELDS_LOO.value |html %]</a>[% END %]</li>
+ <li>[% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% MARCSUBJECT_SUBFIELDS_LOO.separator %] <a title="‡[% MARCSUBJECT_SUBFIELDS_LOO.code %] [% MARCSUBJECT_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCSUBJECT_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCSUBJECT_SUBFIELDS_LOO.value |html %]</a>[% END %]</li>
[% END %]
</ul>
</li>
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Catalog › Item details for [% FOREACH BIBITEM_DAT IN BIBITEM_DATA %][% BIBITEM_DAT.title %][% END %]</title>
+<title>Koha › Catalog › Item details for [% title %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<style type="text/css">h3{padding-top: 1em; border-top: 2px solid #CCCCCC;}</style>
</head>
[% 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> › Item Details for <i>[% FOREACH BIBITEM_DAT IN BIBITEM_DATA %][% BIBITEM_DAT.title |html %][% END %]</i></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Item Details for <i>[% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield|html %][% END %]</i></div>
<div id="doc3" class="yui-t2">
[% INCLUDE 'cat-toolbar.inc' %]
<div id="catalogue_detail_biblio">
- [% FOREACH BIBITEM_DAT IN BIBITEM_DATA %]
- <h2>[% BIBITEM_DAT.title |html %] [% IF ( BIBITEM_DAT.author ) %], by [% BIBITEM_DAT.author %][% END %]</h2>
+
+ <h2>[% title |html %]</h2>
+ [% IF ( subtitle ) %]<h4>[% FOREACH subtitl IN subtitle %] [% subtitl.subfield|html %][% END %]</h4>[% END %]
+ [% IF ( author ) %]<h4>by [% author %]</h4>[% END %]
<ol class="bibliodetails">
- <li><span class="label">Biblionumber:</span> [% BIBITEM_DAT.biblionumber %] </li>
+ <li><span class="label">Biblionumber:</span> [% biblionumber %] </li>
[% UNLESS ( item_level_itypes ) %]
- <li><span class="label">Item type:</span> [% BIBITEM_DAT.itemtypename %] </li>
+ <li><span class="label">Item type:</span> [% itemtypename %] </li>
[% END %]
- <!-- deprecated? <li><span class="label">Loan length:</span> [% BIBITEM_DAT.loanlength %] </li> -->
- <li><span class="label">Rental charge:</span>[% BIBITEM_DAT.rentalcharge %] </li>
- <li><span class="label">ISBN:</span> [% BIBITEM_DAT.isbn %] </li>
- <li><span class="label">Publisher:</span>[% BIBITEM_DAT.place %] [% BIBITEM_DAT.publishercode |html %] [% BIBITEM_DAT.publicationyear %] </li>
- [% IF ( BIBITEM_DAT.volumeddesc ) %]<li><span class="label">Volume:</span> [% BIBITEM_DAT.volumeddesc %]</li>[% END %]
- <li><span class="label">Physical Details:</span> [% BIBITEM_DAT.pages %] [% BIBITEM_DAT.illus %] [% BIBITEM_DAT.size %] </li>
- [% IF ( BIBITEM_DAT.bnotes ) %]<li><span class="label">Notes:</span> [% BIBITEM_DAT.bnotes %]</li>[% END %]
- <li><span class="label">No. of Items:</span> [% BIBITEM_DAT.count %] [% IF ( BIBITEM_DAT.hiddencount ) %]total ([% BIBITEM_DAT.showncount %] shown / [% BIBITEM_DAT.hiddencount %] hidden)
-<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% BIBITEM_DAT.biblionumber %]&showallitems=1">Show all items</a>[% END %]</li>
+ [% IF ( rentalcharge ) %]<li><span class="label">Rental charge:</span>[% rentalcharge %] </li>[% END %]
+ <li><span class="label">ISBN:</span> [% isbn %] </li>
+ <li><span class="label">Publisher:</span>[% place %] [% publishercode |html %] [% publicationyear %] </li>
+ [% IF ( volumeddesc ) %]<li><span class="label">Volume:</span> [% volumeddesc %]</li>[% END %]
+ <li><span class="label">Physical Details:</span> [% pages %] [% illus %] [% size %] </li>
+ [% IF ( bnotes ) %]<li><span class="label">Notes:</span> [% bnotes %]</li>[% END %]
+ <li><span class="label">No. of Items:</span> [% count %] [% IF ( hiddencount ) %]total ([% showncount %] shown / [% hiddencount %] hidden)
+<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblionumber %]&showallitems=1">Show all items</a>[% END %]</li>
</ol>
- [% END %]
+
<br clear="all" />
[% IF ( ONLY_ONE ) %]
<div class="dialog message">You are only viewing one item. <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblionumber %]&bi=[% biblioitemnumber %]#item[% itemnumber %]">View All</a></div>
<ol class="bibliodetails">
<li><span class="label">Current Location:</span> [% ITEM_DAT.holdingbranchname %] </li>
- <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>, Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]</li>
+ <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>[% IF ( ITEM_DAT.lastreneweddate ) %], Last renewed [% ITEM_DAT.lastreneweddate %][% END %], Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]</li>
<li><span class="label">Current Renewals:</span> [% ITEM_DAT.renewals %] </li>
[% IF ( ITEM_DAT.itemlostloop ) %]
<li><span class="label">Lost Status:</span>
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Catalog › [% IF ( searchdesc ) %]Results of Search [% IF ( query_desc ) %]for '[% query_desc %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc %]'[% END %][% ELSE %]You did not specify any search criteria[% END %]</title>
+<title>Koha › Catalog › [% IF ( searchdesc ) %]Results of Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.highlight-3.js"></script>
<script type="text/javascript">
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",
[% END %]
[% IF ( facets_loo.expandable ) %]
<li class="showmore">
- <a href="/cgi-bin/koha/catalogue/search.pl?q=[% facets_loo.searchdesc %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">
+ <a href="/cgi-bin/koha/catalogue/search.pl?q=[% facets_loo.searchdesc %][% IF ( offset ) %]&offset=[% offset %][% END %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">
Show More
</a>
</li>
<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>
<title>Koha › Cataloging › [% IF ( biblionumber ) %]Editing [% title |html %] (Record Number [% biblionumber %])[% ELSE %]Add MARC Record[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/yui/plugins/bubbling-min.js"></script>
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
+ $('#toolbar').fixFloat();
$("#z3950searchc").empty();
$("#savebutton").empty();
yuiToolbar();
[% IF ( breeding_loo.breedingid ) %]
<tr id="row[% breeding_loo.breedingid %]">
- <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview Card</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],0); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
+ <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview Card</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
<td>[% breeding_loo.title |html %]</td>
<td>[% breeding_loo.author %]</td>
<td>[% breeding_loo.date %]</td>
</table></div>
[% ELSE %]
-<div class="yui-ge">
- <div class="yui-u first">
+ [% IF ( reqmessage ) %]
+ <div class="dialog message">
+ <ul>
+ [% IF ( cancelled ) %]
+ <li>Reserve cancelled</li>
+ [% END %]
+ [% IF ( setwaiting ) %]
+ <li>Item should now be waiting at library: [% reqbrchname %]</li>
+ [% END %]
+ </ul>
+ </div>
+ [% END %]
+
+ [% IF ( errmsgloop ) %]
+ <div class="dialog message">
+ <ul>
+ [% FOREACH errmsgloo IN errmsgloop %]
+ [% IF ( errmsgloo.errbadcode ) %]
+ <li>No Item with barcode: [% errmsgloo.msg %]</li>
+ [% END %]
+ [% IF ( errmsgloo.errispermanent ) %]
+ <li>Please return item to home library: [% errmsgloo.msg %]</li>
+ [% END %]
+ [% IF ( errmsgloo.errnotallowed ) %]
+ <li>You cannot transfer items of [% errmsgloo.codeType %] <b>[% errmsgloo.code %]</b> to <b>[% errmsgloo.tbr %]</b></li>
+ [% END %]
+ [% IF ( errmsgloo.errdesteqholding ) %]
+ <li>Item is already at destination library.</li>
+ [% END %]
+ [% IF ( errmsgloo.errwasreturned ) %]
+ <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.borrowernumber %]">
+ [% errmsgloo.firstname %] [% errmsgloo.surname %]
+ ([% errmsgloo.cardnumber %])</a> and has been returned.</li>
+ [% END %]
+ [% END %]
+ </ul>
+ </div>
+ [% END %]
+
+<div id="branchtransfers">
<form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
<fieldset class="brief">
<legend>Transfer</legend>
<input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
[% END %]
</form></div>
-
- <div class="yui-u"><h4>Messages</h4>
- <ul>
- [% IF ( reqmessage ) %]
- [% IF ( cancelled ) %]
- <li>Reserve Cancelled</li>
- [% END %]
- [% IF ( setwaiting ) %]
- <li>Item should now be waiting at library: [% reqbrchname %]</li>
- [% END %]
- [% END %]
- [% FOREACH errmsgloo IN errmsgloop %]
- [% IF ( errmsgloo.errbadcode ) %]
- <li>No Item with barcode: [% errmsgloo.msg %]</li>
- [% END %]
- [% IF ( errmsgloo.errispermanent ) %]
- <li>Please return item to home library: [% errmsgloo.msg %]</li>
- [% END %]
- [% IF ( errmsgloo.errnotallowed ) %]
- <li>You cannot transfer items of [% errmsgloo.codeType %] <b>[% errmsgloo.code %]</b> to <b>[% errmsgloo.tbr %]</b></li>
- [% END %]
- [% IF ( errmsgloo.errdesteqholding ) %]
- <li>Item is already at destination library.</li>
- [% END %]
- [% IF ( errmsgloo.errwasreturned ) %]
- <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.borrowernumber %]">
-[% errmsgloo.firstname %] [% errmsgloo.surname %]
-([% errmsgloo.cardnumber %])</a> and has been returned.</li>
- [% END %]
- [% END %]
- </ul>
- </div><!-- /yui-u -->
-</div><!-- /yui-ge -->
-
+</div>
+
[% IF ( trsfitemloop ) %]
<div class="yui-g">
<table>
<caption>Transferred Items</caption>
<tr>
- <th>Bar Code</th>
<th>Title</th>
+ <th>Author</th>
+ <th>Barcode</th>
+ <th>Shelving location</th>
+ <th>Call number</th>
+ <th>Type</th>
<th>To</th>
</tr>
[% FOREACH trsfitemloo IN trsfitemloop %]
<tr>
- <td>
- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber %]">[% trsfitemloo.barcode %]</a>
- </td>
- <td>
- <p>[% trsfitemloo.title |html %] ([% trsfitemloo.author %])</p>
- <p>[% trsfitemloo.ccode %]</p>
- </td>
+ <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber %]">[% trsfitemloo.title |html %]</a></td>
+ <td>[% trsfitemloo.author %]</td>
+ <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber %]&itemnumber=[% trsfitemloo.itemnumber %]#item[% trsfitemloo.itemnumber %]">[% trsfitemloo.barcode %]</a></td>
+ <td>[% trsfitemloo.location %]</td>
+ <td>[% trsfitemloo.itemcallnumber %]</td>
+ <td>[% trsfitemloo.ccode %]</td>
<td>[% trsfitemloo.tobrname %]</td>
</tr>
[% END %]
<tbody>[% FOREACH overdueloo IN overdueloop %]
<tr>
<td>[% overdueloo.duedate %]</td>
- <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overdueloo.borrowernumber %]">[% overdueloo.name %]</a>
+ <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overdueloo.borrowernumber %]">[% overdueloo.surname %] [% overdueloo.firstname %]</a>
[% IF ( overdueloo.email ) %][<a href="mailto:[% overdueloo.email %]?subject=Overdue: [% overdueloo.title |html %]">email</a>][% END %]
[% IF ( overdueloo.phone ) %]([% overdueloo.phone %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro %])[% END %]</td>
<td>[% overdueloo.branchcode %]</td>
<li>Check 'Allow password' to make it possible to associate a password with this attribute.</li>
<li>Check 'Display in OPAC' to display this attribute on a patron's details page in the OPAC.</li>
<li>Check 'Searchable' to make this attribute searchable in the staff patron search.</li>
+ <li>Check 'Display in check-out' to make this attribute visible in the patron's short detail display on the left of the checkout screen and other patron pages</li>
<li>Authorized value category; if one is selected, the patron record input page will only allow values to be chosen from the authorized value list.
<ul>
<li>You will first need to add an authorized value list for it to appear in this menu</li>
[% END %]
[% IF ( CAN_user_acquisition ) %]
<h3><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></h3>
+ [% IF ( pendingsuggestions ) %]<ul><li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/suggestion/suggestion.pl">[% pendingsuggestions %]</a></span></li></ul>[% END %]
[% END %]
[% IF ( CAN_user_reports ) %]
<h3><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></h3>
[% END %]
[% IF ( CAN_user_tools ) %]
<h3><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></h3>
+ [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) %]
+ <ul>
+ [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) %]<li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span></li>[% END %]
+ [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]<li><a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span></li>[% END %]
+ </ul>
+ [% END %]
[% END %]
<h3><a href="/cgi-bin/koha/about.pl">About Koha</a></h3>
</div>
</div><!-- /koha-news -->
</div>
[% END %]
-
+
</div>
+
[% INCLUDE 'intranet-bottom.inc' %]
</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' %]
[% 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>
</tr>
[% IF ( looptable.looprow ) %]
[% FOREACH loopro IN looptable.looprow %]
- [% UNLESS ( loop.odd ) %]<tr class="highlight">
- [% ELSE %]<tr>[% END %]
+ [% DEFAULT
+ loopro.itemcallnumber="No Call Number"
+ loopro.barcode="No Barcode"
+ loopro.title="NO TITLE"
+ loopro.author=""
+ %]
+ [% UNLESS ( loop.odd ) %]<tr class="highlight">
+ [% ELSE %]<tr>[% END %]
+
<td>[% loop.count %]</td>
- <td>[% DEFAULT loopro.itemcallnumber="No Call Number" %]</td>
- <td>[% DEFAULT loopro.barcode="No Barcode" %]</td>
- <td><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber %]">[% DEFAULT loopro.title="NO TITLE" %]</a></p>
- [% DEFAULT loopro.author="" %]
+ <td>[% loopro.itemcallnumber %]</td>
+ <td>[% loopro.barcode %]</td>
+ <td><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber %]">[% loopro.title %]</a></p>
+ [% loopro.author %]
[% IF ( loopro.branch ) %]at [% loopro.branch %][% END %]
</td>
</tr>
[% 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>
[% 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>
[% FOREACH year IN years %]
<div id="subscription-year-[% year.year %]">
- <table style="width:400px;">
+ <table>
<tr>
[% UNLESS ( year.onesubscription ) %]
<th># Subs</th>
$("a.helptext").click(function(){
$(this).parent().find(".hint").toggle(); return false;
});
+ $("#dateofrange").each(function () { this.value = "" });
});
//]]>
</script>
<input type="hidden" id="newBranchName" name="newBranchName" />
</li>
<li>
- <strong>Date:</strong>
+ <strong>From Date:</strong>
<span id="newDaynameOutput"></span>,
[% IF ( dateformat_us ) %]<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>[% ELSIF ( dateformat_metric ) %]<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>[% ELSE %]<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>[% END %]
<input type="hidden" id="newMonth" name="newMonth" />
<input type="hidden" id="newYear" name="newYear" />
</li>
+ <li class="dateinsert">
+ <b>To Date : </b>
+ <input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" />
+ <img src="[% themelang %]/lib/calendar/cal.gif" id="dateofrange_button" alt="Show Calendar" />
+ <script language="JavaScript" type="text/javascript">
+ Calendar.setup(
+ {
+ inputField : "dateofrange",
+ ifFormat : "[% DHTMLcalendar_dateformat %]",
+ button : "dateofrange_button"
+ }
+ );
+ </script>
+ </li>
<li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li>
<li><label for="newDescription">Description:</label>
<textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
<a href="#" class="helptext">[?]</a>
<div class="hint">This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.</div>
</li>
+ <li class="radio"><input type="radio" name="newOperation" id="newOperationField" value="holidayrange" />
+ <label for="newOperationField">Holidays on a range</label>.
+ <a href="#" class="helptext">[?]</a>
+ <div class="hint">Make a single holiday on a range. For example, selecting August 1st, 2012 and August 10st, 2012 will make all days between 1st and 10st holiday, but will not affect August 1st-10st in other years.</div>
+ </li>
+ <li class="radio"><input type="radio" name="newOperation" id="newOperationFieldyear" value="holidayrangerepeat" />
+ <label for="newOperationFieldyear">Holidays repeated yearly on a range</label>.
+ <a href="#" class="helptext">[?]</a>
+ <div class="hint">Make a single holiday on a range repeated yearly. For example, selecting August 1st, 2012 and August 10st, 2012 will make all days between 1st and 10st holiday, and will affect August 1st-10st in other years.</div>
+ </li>
<li class="radio">
<input type="checkbox" name="allBranches" id="allBranches" />
<label for="allBranches">Copy to all libraries</label>.
var day_month_holidays = new Array();
var hola= "[% code %]";
[% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
- week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION %]"};
+ week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE | replace('"','\"') %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
[% END %]
[% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
- holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE %]", description:"[% HOLIDAYS_LOO.DESCRIPTION %]"};
+ holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
[% END %]
[% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
- exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]"};
+ exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
[% END %]
[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
- day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]"};
+ day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
[% END %]
/* This function gives css clases to each kind of day */
</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">
<h3>Patrons and circulation</h3>
<dl>
[% IF ( CAN_user_tools_moderate_comments ) %]
- <dt><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a></dt>
- <dd>Moderate patron comments</dd>
+ <dt><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a> [% IF ( pendingcomments ) %]<span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span>[% END %]</dt>
+ <dd>Moderate patron comments. </dd>
[% END %]
[% IF ( CAN_user_tools_import_patrons ) %]
[% END %]
[% IF ( CAN_user_tools_moderate_tags ) %]
- <dt><a href="/cgi-bin/koha/tags/review.pl">Tags</a></dt>
+ <dt><a href="/cgi-bin/koha/tags/review.pl">Tags</a> [% IF ( pendingtags ) %]<span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span>[% END %]</dt>
<dd>Moderate patron tags</dd>
[% END %]
var _alertString="";
var alertString2;
- if(f.addshelf.value.length ==0){
+ if($("#shelfname").val() == ""){
_alertString += _("- You must enter a List Name") + "\n";
}
</td>
[% END %]
[% UNLESS ( item_level_itypes ) %]<td>
- [% UNLESS ( noItemTypeImages ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
+ [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
</td>[% END %]
<td>
[% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
<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 %]
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" 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"/>
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<xsl:stylesheet version="1.0" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns="http://www.loc.gov/mods/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:include href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes"/>
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<xsl:stylesheet version="1.0" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc">
- <xsl:include href="http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl"/>
+ <xsl:include href="MARC21slimUtils-MODS31.xsl"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<!--
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
--->
\ No newline at end of file
+-->
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<xsl:stylesheet version="1.0" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc">
<xsl:include href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<xsl:stylesheet xmlns="http://www.loc.gov/mods/v3" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc" version="1.0">
<xsl:include href="MARC21slimUtils.xsl"/>
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<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:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes"/>
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
--->
\ No newline at end of file
+-->
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 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"/>
<metaInformation>
<scenarios ><scenario default="no" name="MODS Website Samples" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\modswebsitesamples.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="Ray Charles" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\raycharles.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="yes" name="s6" userelativepaths="yes" externalpreview="no" url="..\ifla\sally6.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="s7" userelativepaths="yes" externalpreview="no" url="..\ifla\sally7.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="s12" userelativepaths="yes" externalpreview="no" url="..\ifla\sally12.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
--->
\ No newline at end of file
+-->
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 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"/>
<metaInformation>
<scenarios ><scenario default="yes" name="RDF" userelativepaths="yes" externalpreview="no" url="marcxmlfile.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
--->
\ No newline at end of file
+-->
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" 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="MARC21slimUtils2.xsl"/>
<xsl:output method="xml" indent="yes"/>
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:srw_dc="info:srw/schema/1/dc-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="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" encoding="UTF-8"/>
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
--->
\ No newline at end of file
+-->
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
</xsl:call-template>
- <xsl:if test="marc:subfield[@code='b']">
+ <xsl:if test="marc:subfield[@code='h']">
<xsl:text> </xsl:text>
<xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">b</xsl:with-param>
+ <xsl:with-param name="codes">h</xsl:with-param>
</xsl:call-template>
</xsl:if>
- <xsl:if test="marc:subfield[@code='h']">
+ <xsl:if test="marc:subfield[@code='b']">
<xsl:text> </xsl:text>
<xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">h</xsl:with-param>
+ <xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:text> </xsl:text>
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
--- /dev/null
+<?xml version='1.0'?>
+<!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">
+
+ <!-- 08/08/08: tmee added corrected chopPunctuation templates for 260c -->
+ <!-- 08/19/04: ntra added "marc:" prefix to datafield element -->
+ <!-- 12/14/07: ntra added url encoding template -->
+ <!-- url encoding -->
+
+ <xsl:variable name="ascii">
+ <xsl:text> !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~</xsl:text>
+ </xsl:variable>
+
+ <xsl:variable name="latin1">
+ <xsl:text> ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ</xsl:text>
+ </xsl:variable>
+ <!-- Characters that usually don't need to be escaped -->
+ <xsl:variable name="safe">
+ <xsl:text>!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:text>
+ </xsl:variable>
+
+ <xsl:variable name="hex">0123456789ABCDEF</xsl:variable>
+
+
+ <xsl:template name="datafield">
+ <xsl:param name="tag"/>
+ <xsl:param name="ind1">
+ <xsl:text> </xsl:text>
+ </xsl:param>
+ <xsl:param name="ind2">
+ <xsl:text> </xsl:text>
+ </xsl:param>
+ <xsl:param name="subfields"/>
+ <xsl:element name="marc:datafield">
+ <xsl:attribute name="tag">
+ <xsl:value-of select="$tag"/>
+ </xsl:attribute>
+ <xsl:attribute name="ind1">
+ <xsl:value-of select="$ind1"/>
+ </xsl:attribute>
+ <xsl:attribute name="ind2">
+ <xsl:value-of select="$ind2"/>
+ </xsl:attribute>
+ <xsl:copy-of select="$subfields"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template name="subfieldSelect">
+ <xsl:param name="codes">abcdefghijklmnopqrstuvwxyz</xsl:param>
+ <xsl:param name="delimeter">
+ <xsl:text> </xsl:text>
+ </xsl:param>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($codes, @code)">
+ <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:param name="punctuation">
+ <xsl:text>.:,;/ </xsl:text>
+ </xsl:param>
+ <xsl:variable name="length" select="string-length($chopString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="contains($punctuation, substring($chopString,$length,1))">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+ <xsl:with-param name="punctuation" select="$punctuation"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not($chopString)"/>
+ <xsl:otherwise>
+ <xsl:value-of select="$chopString"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="chopPunctuationFront">
+ <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,1,1))">
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString" select="substring($chopString,2,$length - 1)"
+ />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not($chopString)"/>
+ <xsl:otherwise>
+ <xsl:value-of select="$chopString"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="chopPunctuationBack">
+ <xsl:param name="chopString"/>
+ <xsl:param name="punctuation">
+ <xsl:text>.:,;/] </xsl:text>
+ </xsl:param>
+ <xsl:variable name="length" select="string-length($chopString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="contains($punctuation, substring($chopString,$length,1))">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+ <xsl:with-param name="punctuation" select="$punctuation"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not($chopString)"/>
+ <xsl:otherwise>
+ <xsl:value-of select="$chopString"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- nate added 12/14/2007 for lccn.loc.gov: url encode ampersand, etc. -->
+ <xsl:template name="url-encode">
+
+ <xsl:param name="str"/>
+
+ <xsl:if test="$str">
+ <xsl:variable name="first-char" select="substring($str,1,1)"/>
+ <xsl:choose>
+ <xsl:when test="contains($safe,$first-char)">
+ <xsl:value-of select="$first-char"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="codepoint">
+ <xsl:choose>
+ <xsl:when test="contains($ascii,$first-char)">
+ <xsl:value-of
+ select="string-length(substring-before($ascii,$first-char)) + 32"
+ />
+ </xsl:when>
+ <xsl:when test="contains($latin1,$first-char)">
+ <xsl:value-of
+ select="string-length(substring-before($latin1,$first-char)) + 160"/>
+ <!-- was 160 -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="no">Warning: string contains a character
+ that is out of range! Substituting "?".</xsl:message>
+ <xsl:text>63</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="hex-digit1"
+ select="substring($hex,floor($codepoint div 16) + 1,1)"/>
+ <xsl:variable name="hex-digit2" select="substring($hex,$codepoint mod 16 + 1,1)"/>
+ <!-- <xsl:value-of select="concat('%',$hex-digit2)"/> -->
+ <xsl:value-of select="concat('%',$hex-digit1,$hex-digit2)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="string-length($str) > 1">
+ <xsl:call-template name="url-encode">
+ <xsl:with-param name="str" select="substring($str,2)"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+</xsl:stylesheet>
+<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
+<metaInformation>
+<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
+</metaInformation>
+-->
+
<?xml version='1.0'?>
+<!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:template name="datafield">
<xsl:param name="tag"/>
<?xml version='1.0'?>
+<!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">
<!-- 8/19/04: ntra added "marc:" prefix to datafield element -->
<xsl:template name="datafield">
<xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<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:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes"/>
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
--->
\ No newline at end of file
+-->
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
+<xsl:stylesheet version="1.0"
+ xmlns:marc="http://www.loc.gov/MARC21/slim"
+ xmlns:items="http://www.koha-community.org/items"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ exclude-result-prefixes="marc items">
+ <xsl:import href="NORMARCslimUtils.xsl"/>
+ <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="marc:record">
+
+ <!-- Sysprefs -->
+ <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
+
+ <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:variable name="field019b" select="marc:datafield[@tag=019]/marc:subfield[@code='b']"/>
+ <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
+ <xsl:variable name="materialTypeCode">
+ <xsl:choose>
+ <xsl:when test="$field019b='b' or $field019b='k' or $field019b='l' or $leader6='b'">Mon</xsl:when>
+ <xsl:when test="$field019b='e' or contains($field019b,'ec') or contains($field019b,'ed') or contains($field019b,'ee') or contains($field019b,'ef') or $leader6='g'">FV</xsl:when>
+ <xsl:when test="$field019b='c' or $field019b='d' or contains($field019b,'da') or contains($field019b,'db') or contains($field019b,'dc') or contains($field019b,'dd') or contains($field019b,'dg') or contains($field019b,'dh') or contains($field019b,'di') or contains($field019b,'dj') or contains($field019b,'dk') or $leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">Mus</xsl:when>
+ <xsl:when test="$field019b='a' or contains($field019b,'ab') or contains($field019b,'aj') or $leader6='e' or $leader6='f'">Kar</xsl:when>
+ <xsl:when test="$field019b='f' or $field019b='i' or contains($field019b,'ib') or contains($field019b,'ic') or contains($field019b,'fd') or contains($field019b,'ff') or contains($field019b,'fi') or $leader6='k'">gra</xsl:when>
+ <xsl:when test="$field019b='g' or contains($field019b,'gb') or contains($field019b,'gd') or contains($field019b,'ge') or $leader6='m'">Fil</xsl:when>
+ <xsl:when test="$leader6='o'">kom</xsl:when>
+ <xsl:when test="$field019b='h' or $leader6='r'">trd</xsl:when>
+ <xsl:when test="$field019b='j' or $leader6='a'">
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='m' or $leader7='p'">Mon</xsl:when>
+ <xsl:when test="$field019b='j' or $leader7='b' or $leader7='s'">Per</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="materialTypeLabel">
+ <xsl:choose>
+ <xsl:when test="$field019b='b' or $field019b='k' or $field019b='l' or $leader6='b'">Bok</xsl:when>
+ <xsl:when test="$field019b='e' or contains($field019b,'ec') or contains($field019b,'ed') or contains($field019b,'ee') or contains($field019b,'ef') or $leader6='g'">Film og video</xsl:when>
+ <xsl:when test="$field019b='c' or $field019b='d' or contains($field019b,'da') or contains($field019b,'db') or contains($field019b,'dc') or contains($field019b,'dd') or contains($field019b,'dg') or contains($field019b,'dh') or contains($field019b,'di') or contains($field019b,'dj') or contains($field019b,'dk') or $leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">Musikalier</xsl:when>
+ <xsl:when test="$field019b='a' or contains($field019b,'ab') or contains($field019b,'aj') or $leader6='e' or $leader6='f'">Kart</xsl:when>
+ <xsl:when test="$field019b='f' or $field019b='i' or contains($field019b,'ib') or contains($field019b,'ic') or contains($field019b,'fd') or contains($field019b,'ff') or contains($field019b,'fi') or $leader6='k'">Grafisk materiale</xsl:when>
+ <xsl:when test="$field019b='g' or contains($field019b,'gb') or contains($field019b,'gd') or contains($field019b,'ge') or $leader6='m'">Fil</xsl:when>
+ <xsl:when test="$leader6='o'">Kombidokument</xsl:when>
+ <xsl:when test="$field019b='h' or $leader6='r'">Tredimensjonal gjenstand</xsl:when>
+ <xsl:when test="$field019b='j' or $leader6='a'">
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='m' or $leader7='p'">Bok</xsl:when>
+ <xsl:when test="$field019b='j' or $leader7='b' or $leader7='s'">Periodikum</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+
+ </xsl:variable>
+
+ <!-- Tittel og ansvarsopplysninger -->
+ <xsl:if test="marc:datafield[@tag=245]">
+ <h1>
+ <xsl:for-each select="marc:datafield[@tag=245]">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='b']">
+ <xsl:text> : </xsl:text>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">b</xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='h']">
+ <xsl:text> </xsl:text>
+ (<xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">h</xsl:with-param>
+ </xsl:call-template>)
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">np</xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ </h1>
+ </xsl:if>
+
+ <!-- Author Statement -->
+ <!-- 245$9 is Koha authority number -->
+ <xsl:choose>
+ <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
+ <h5 class="author">av
+ <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
+ <a>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code=9]">
+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="nameABCDQ"/></a>
+ <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>
+
+ <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
+ <a>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code=9]">
+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="nameABCDN"/></a>
+ <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>
+
+ <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
+ <a>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code=9]">
+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="nameACDEQ"/></a>
+ <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>
+ </h5>
+ </xsl:when>
+ </xsl:choose>
+
+
+ <xsl:if test="$materialTypeCode!=''">
+ <span class="results_summary"><span class="label">Materialtype: </span>
+ <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
+ <xsl:value-of select="$materialTypeLabel"/>
+ </span>
+ </xsl:if>
+
+ <!--Series -->
+ <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
+ <span class="results_summary"><span class="label">Series: </span>
+ <xsl:for-each select="marc:datafield[@tag=440]">
+ <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">av</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ <xsl:text> </xsl:text><xsl:call-template name="part"/>
+ <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>
+
+ <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+ <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">av</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ <xsl:call-template name="part"/>
+ <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>
+
+ <!-- Publisher Statement -->
+
+ <xsl:if test="marc:datafield[@tag=260]">
+ <span class="results_summary"><span class="label">Utgiver: </span>
+ <xsl:for-each select="marc:datafield[@tag=260]">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">bcg</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>
+
+ <!-- Edition Statement -->
+
+ <xsl:if test="marc:datafield[@tag=250]">
+ <span class="results_summary"><span class="label">Utgave: </span>
+ <xsl:for-each select="marc:datafield[@tag=250]">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</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>
+
+ <!-- Description -->
+
+ <xsl:if test="marc:datafield[@tag=300]">
+ <span class="results_summary"><span class="label">Beskrivelse: </span>
+ <xsl:for-each select="marc:datafield[@tag=300]">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abceg</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>
+
+ <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr>
+
+ <xsl:if test="marc:datafield[@tag=020]">
+ <span class="results_summary"><span class="label">ISBN: </span>
+ <xsl:for-each select="marc:datafield[@tag=020]">
+ <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ <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=022]">
+ <span class="results_summary"><span class="label">ISSN: </span>
+ <xsl:for-each select="marc:datafield[@tag=022]">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ <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>
+
+ <!-- Other Title Statement -->
+
+ <xsl:if test="marc:datafield[@tag=246]">
+ <span class="results_summary"><span class="label">Parallelltittel: </span>
+ <xsl:for-each select="marc:datafield[@tag=246]">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abhfgnp</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 -->
+
+ <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
+ <span class="results_summary"><span class="label">Standardtittel: </span>
+ <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
+ <xsl:value-of select="text()"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+
+ </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[substring(@tag, 1, 1) = '6']">
+ <span class="results_summary"><span class="label">Emner: </span>
+ <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
+ <a>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code=9]">
+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/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/catalogue/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">abcdvxyz</xsl:with-param>
+ <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
+ <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template></a>
+ <xsl:choose>
+ <xsl:when test="position()=last()"></xsl:when>
+ <xsl:otherwise> | </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+
+ <xsl:if test="marc:datafield[@tag=856]">
+ <span class="results_summary"><span class="label">Nettbasert ressurs: </span>
+ <xsl:for-each select="marc:datafield[@tag=856]">
+ <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
+ <xsl:choose>
+ <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'])">
+ Klikk her for tilgang
+ </xsl:when>
+ </xsl:choose>
+ </a>
+ <xsl:choose>
+ <xsl:when test="position()=last()"></xsl:when>
+ <xsl:otherwise> | </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+
+ <!-- NORMARC does not define indicators for 505
+ <xsl:if test="marc:datafield[@tag=505]">
+ <xsl:for-each select="marc:datafield[@tag=505]">
+ <span class="results_summary"><span class="label">
+ <xsl:choose>
+ <xsl:when test="@ind1=0">
+ Contents:
+ </xsl:when>
+ <xsl:when test="@ind1=1">
+ Incomplete contents:
+ </xsl:when>
+ <xsl:when test="@ind1=1">
+ Partial contents:
+ </xsl:when>
+ </xsl:choose>
+ </span>
+ <xsl:choose>
+ <xsl:when test="@ind2=0">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">au</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ </xsl:for-each>
+ </xsl:if>
+ -->
+ <xsl:if test="marc:datafield[@tag=505]">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+
+ <!-- 780 -->
+ <xsl:if test="marc:datafield[@tag=780]">
+ <xsl:for-each select="marc:datafield[@tag=780]">
+ <span class="results_summary"><span class="label">
+ <xsl:choose>
+ <xsl:when test="@ind2=0">
+ Fortsettelse av:
+ </xsl:when>
+ <xsl:when test="@ind2=1">
+ Delvis fortsettelse av:
+ </xsl:when>
+ <xsl:when test="@ind2=2">
+ Avløser:
+ </xsl:when>
+ <xsl:when test="@ind2=3">
+ Avløser delvis:
+ </xsl:when>
+ <xsl:when test="@ind2=4">
+ Sammenslåing av: ... ; og ...
+ </xsl:when>
+ <xsl:when test="@ind2=5">
+ Har tatt opp:
+ </xsl:when>
+ <xsl:when test="@ind2=6">
+ Har delvis tatt opp:
+ </xsl:when>
+ <xsl:when test="@ind2=7">
+ Utskilt fra:
+ </xsl:when>
+ </xsl:choose>
+ </span>
+ <xsl:variable name="f780">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a_t</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
+ <xsl:value-of select="translate($f780, '()', '')"/>
+ </a>
+ </span>
+
+ <xsl:choose>
+ <xsl:when test="@ind1=0">
+ <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
+ </xsl:when>
+ </xsl:choose>
+
+ </xsl:for-each>
+ </xsl:if>
+
+ <!-- 785 -->
+ <xsl:if test="marc:datafield[@tag=785]">
+ <xsl:for-each select="marc:datafield[@tag=785]">
+ <span class="results_summary"><span class="label">
+ <xsl:choose>
+ <xsl:when test="@ind2=0">
+ Fortsettelse i:
+ </xsl:when>
+ <xsl:when test="@ind2=1">
+ Fortsettes delvis i:
+ </xsl:when>
+ <xsl:when test="@ind2=2">
+ Avløst av:
+ </xsl:when>
+ <xsl:when test="@ind2=3">
+ Delvis avløst av:
+ </xsl:when>
+ <xsl:when test="@ind2=4">
+ Gått inn i:
+ </xsl:when>
+ <xsl:when test="@ind2=5">
+ Delvis gått inn i:
+ </xsl:when>
+ <xsl:when test="@ind2=6">
+ Fortsettes av: ...; og ...
+ </xsl:when>
+ <xsl:when test="@ind2=7">
+ Slått sammen med: .., til: ...
+ </xsl:when>
+ </xsl:choose>
+ </span>
+ <xsl:variable name="f785">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a_t</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
+ <xsl:value-of select="translate($f785, '()', '')"/>
+ </a>
+
+ </span>
+ </xsl:for-each>
+ </xsl:if>
+
+ <!-- This will only work if the OPACBaseURL syspref is set. -->
+ <xsl:if test="string-length($OPACBaseURL) > 0">
+ <p>OPAC View: <a>
+ <xsl:attribute name="href">http://<xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
+ <xsl:attribute name="target">_blank</xsl:attribute>
+ Open in new window
+ </a></p>
+ </xsl:if>
+
+ </xsl:template>
+
+ <xsl:template name="part">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">n</xsl:with-param>
+ <xsl:with-param name="anyCodes">n</xsl:with-param>
+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="partName">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">p</xsl:with-param>
+ <xsl:with-param name="anyCodes">p</xsl:with-param>
+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partNumber"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partName"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="specialSubfieldSelect">
+ <xsl:param name="anyCodes"/>
+ <xsl:param name="axis"/>
+ <xsl:param name="beforeCodes"/>
+ <xsl:param name="afterCodes"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
+ <xsl:value-of select="text()"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </xsl:template>
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="datafield">
+ <xsl:param name="tag"/>
+ <xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
+ <xsl:param name="ind2"><xsl:text> </xsl:text></xsl:param>
+ <xsl:param name="subfields"/>
+ <xsl:element name="datafield">
+ <xsl:attribute name="tag">
+ <xsl:value-of select="$tag"/>
+ </xsl:attribute>
+ <xsl:attribute name="ind1">
+ <xsl:value-of select="$ind1"/>
+ </xsl:attribute>
+ <xsl:attribute name="ind2">
+ <xsl:value-of select="$ind2"/>
+ </xsl:attribute>
+ <xsl:copy-of select="$subfields"/>
+ </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="nameABCDQ">
+<xsl:call-template name="chopPunctuation">
+<xsl:with-param name="chopString">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">aq</xsl:with-param>
+</xsl:call-template>
+</xsl:with-param>
+<xsl:with-param name="punctuation">
+<xsl:text>:,;/ </xsl:text>
+</xsl:with-param>
+</xsl:call-template>
+<xsl:call-template name="termsOfAddress"/>
+</xsl:template>
+
+<xsl:template name="nameABCDN">
+<xsl:for-each select="marc:subfield[@code='a']">
+<xsl:call-template name="chopPunctuation">
+<xsl:with-param name="chopString" select="."/>
+</xsl:call-template>
+</xsl:for-each>
+<xsl:for-each select="marc:subfield[@code='b']">
+<xsl:value-of select="."/>
+</xsl:for-each>
+<xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">cdn</xsl:with-param>
+</xsl:call-template>
+</xsl:if>
+</xsl:template>
+
+<xsl:template name="nameACDEQ">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">acdeq</xsl:with-param>
+</xsl:call-template>
+</xsl:template>
+
+<xsl:template name="termsOfAddress">
+<xsl:if test="marc:subfield[@code='b' or @code='c']">
+<xsl:call-template name="chopPunctuation">
+<xsl:with-param name="chopString">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">bc</xsl:with-param>
+</xsl:call-template>
+</xsl:with-param>
+</xsl:call-template>
+</xsl:if>
+</xsl:template>
+
+ <!-- Function m880Select: Display Alternate Graphic Representation (MARC 880) for selected latin "base"tags
+ - should be called immediately before the corresonding latin tags are processed
+ - tags in right-to-left languages are displayed floating right
+ * Parameter:
+ + basetags: display these tags if found in linkage section ( subfield 6) of tag 880
+ + codes: display these subfields codes
+ * Options:
+ - class: wrap output in <span class="$class">...</span>
+ - label: prefix each(!) tag with label $label
+ - bibno: link to biblionumber $bibno
+ - index: build a search link using index $index with subfield $a as key; if subfield $9 is present use index 'an' with key $9 instead.
+ * Limitations:
+ - displays every field on a separate line (to switch between rtl and ltr)
+ * Pitfalls:
+ (!) output might be empty
+ -->
+ <xsl:template name="m880Select">
+ <xsl:param name="basetags"/> <!-- e.g. 100,700,110,710 -->
+ <xsl:param name="codes"/> <!-- e.g. abc -->
+ <xsl:param name="class"/> <!-- e.g. results_summary -->
+ <xsl:param name="label"/> <!-- e.g. Edition -->
+ <xsl:param name="bibno"/>
+ <xsl:param name="index"/> <!-- e.g. au -->
+
+ <xsl:for-each select="marc:datafield[@tag=880]">
+ <xsl:variable name="code6" select="marc:subfield[@code=6]"/>
+ <xsl:if test="contains(string($basetags), substring($code6,1,3))">
+ <span>
+ <xsl:if test="boolean($class)">
+ <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <!-- display right-to-left tags floating right of their left-to-right counterparts -->
+ <xsl:when test="substring($code6,10,2) ='/r'">
+ <xsl:attribute name="style">display:block; text-align:right; float:right; width:50%; padding-left:20px</xsl:attribute>
+ <xsl:attribute name="dir">rtl</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="style">display:block; </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="boolean($label)">
+ <span class="label">
+ <xsl:value-of select="$label"/>
+ </span>
+ </xsl:if>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($codes, @code)">
+ <xsl:value-of select="text()"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="boolean($bibno)">
+ <a>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$bibno"/></xsl:attribute>
+ <xsl:value-of select="$str"/>
+ </a>
+ </xsl:when>
+ <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9])">
+ <a>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+ <xsl:value-of select="$str"/>
+ </a>
+ </xsl:when>
+ <xsl:when test="boolean($index)">
+ <a>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+ <xsl:value-of select="$str"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ </xsl:if>
+ </xsl:for-each>
+
+ </xsl:template>
+
+</xsl:stylesheet>
+
+<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
+<metaInformation>
+<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
+</metaInformation>
+-->
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<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>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- identity transformation -->
<!-- Whenever you match any node or any attribute -->
<?xml version="1.0" encoding="UTF-8"?>
+<!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:output method="html"/>
font-size : 100%;
}
-input[type=submit], input[type=button], input[type=reset] {
- background : #b8d0e6 url(../../images/submit-bg.gif) repeat-x 0 0;
- background-color : #b8d0e6;
+input[type=submit],
+input[type=button],
+input[type=reset],
+fieldset.brief input[type=submit],
+fieldset.brief input[type=button],
+fieldset.brief input[type=reset]
+{
+ background: #f4f9fc; /* Old browsers */
+ background: -moz-linear-gradient(top, #f4f9fc 0%, #dfeefa 4%, #bfd5ea 93%, #a1c4e2 97%, #b8d0e6 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f4f9fc), color-stop(4%,#dfeefa), color-stop(93%,#bfd5ea), color-stop(97%,#a1c4e2), color-stop(100%,#b8d0e6)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f9fc', endColorstr='#b8d0e6',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* W3C */
border-top: 1px solid #cccccc;
border-left: 1px solid #cccccc;
border-right: 1px solid #eeeeee;
padding : 4px;
}
-input[type=submit]:active, input[type=button], input[type=reset] {
+input[type=submit]:active, input[type=button]:active, input[type=reset]:active {
border: 1px inset #666666;
}
}
#opac-main-search {
- background-image : url( ../../images/menu-background.gif);
- background-repeat : repeat-x;
- background-color : #739ACF;
- background-position : -10px top;
+ background: #8fb4e8; /* Old browsers */
+ background: -moz-linear-gradient(top, #8fb4e8 0%, #8cb1e5 19%, #80a8dc 48%, #7da5d8 52%, #7198cf 83%, #618ac0 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8fb4e8), color-stop(19%,#8cb1e5), color-stop(48%,#80a8dc), color-stop(52%,#7da5d8), color-stop(83%,#7198cf), color-stop(100%,#618ac0)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* IE10+ */
+ background: linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8fb4e8', endColorstr='#618ac0',GradientType=0 ); /* IE6-9 */
border-top : 1px solid #335599;
border-bottom : 1px solid #335599;
margin-left : -10px;
}
div.alert {
- background : #FFC url(../../images/alert-bg.gif) repeat-x left 0;
- text-align : center;
+ background: #fef8d3; /* Old browsers */
+ background: -moz-linear-gradient(top, #fef8d3 0%, #ffec91 9%, #ffed87 89%, #f9dc00 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fef8d3), color-stop(9%,#ffec91), color-stop(89%,#ffed87), color-stop(100%,#f9dc00)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fef8d3', endColorstr='#f9dc00',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* W3C */
+ text-align : center;
}
div.alert strong {
}
div.message {
- background : white url("../../images/message-bg.gif") repeat-x left 0;
- border : 1px solid #bcbcbc;
+ background: #ffffff; /* Old browsers */
+ background: -moz-linear-gradient(top, #ffffff 0%, #f4f6fa 2%, #eaeef5 23%, #e8edf6 94%, #cddbf2 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(2%,#f4f6fa), color-stop(23%,#eaeef5), color-stop(94%,#e8edf6), color-stop(100%,#cddbf2)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */
+ border : 1px solid #bcbcbc;
width : 55%;
}
}
#opac-main-search #listsmenu .bd {
- background-color : #f3f3f3;
+ background: #eef4fe; /* Old browsers */
+ background: -moz-linear-gradient(left, #eef4fe 0%, #eef4fe 88%, #f6f9fe 98%, #ffffff 99%, #a5c2f6 99%, #e6eefe 100%, #cbdefe 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eef4fe), color-stop(88%,#eef4fe), color-stop(98%,#f6f9fe), color-stop(99%,#ffffff), color-stop(99%,#a5c2f6), color-stop(100%,#e6eefe), color-stop(100%,#cbdefe)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eef4fe', endColorstr='#cbdefe',GradientType=1 ); /* IE6-9 */
+ background: linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* W3C */
border : 1px solid #739acf;
- background-image : url("../../images/listmenu-container-bg.gif");
- background-position : top right;
- background-repeat : repeat-y;
padding : .3em 1em 0 0;
}
padding : 0;
}
+div.lang{
+ float:left;
+}
+
#cartDetails,#cartUpdate,#holdDetails,#listsDetails {
background-color : #FFF;
border: 1px solid #739acf;
}
#opac-main-search input.submit {
- background : #b8d0e6 url(../../images/submit-bg.gif) repeat-x 0 0;
- background-color : #b8d0e6;
- border-top: 1px solid #cccccc;
- border-left: 1px solid #cccccc;
- border-right: 1px solid #eeeeee;
- border-bottom: 1px solid #eeeeee;
+ background: #e6f3fe; /* Old browsers */
+ background: -moz-linear-gradient(top, #e6f3fe 0%, #dfeefa 8%, #bfd5ea 49%, #b8d0e6 52%, #b8d0e6 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e6f3fe), color-stop(8%,#dfeefa), color-stop(49%,#bfd5ea), color-stop(52%,#b8d0e6), color-stop(100%,#b8d0e6)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e6f3fe', endColorstr='#b8d0e6',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* W3C */
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 1px 1px 1px 1px , , .3);
+ -moz-box-shadow: 1px 1px 1px 1px , , .3);
+ box-shadow: 1px 1px 1px 1px , , .3);
+
color : #333;
font-weight : normal;
font-size : 80%;
}
div#menu li a {
+ background: #eeeeee; /* Old browsers */
+ background: -moz-linear-gradient(left, #eeeeee 0%, #eeeeee 96%, #e6e6e6 97%, #cccccc 99%, #c1c1c1 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eeeeee), color-stop(96%,#eeeeee), color-stop(97%,#e6e6e6), color-stop(99%,#cccccc), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* IE10+ */
+ background: linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */
text-decoration : none;
display : block;
- background : #EEE url(../../images/side-tab-gradient.gif) repeat-y top right;
border : 1px solid #979797;
font-size : 111%;
margin : .5em 0;
}
div#menu li a:hover {
- background : #E8F0F6 url(../../images/side-tab-gradient-hover.gif) repeat-y top right;
+ background: #eaeef5; /* Old browsers */
+ background: -moz-linear-gradient(left, #eaeef5 0%, #dee6f4 96%, #c4d5ef 98%, #a2bee8 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eaeef5), color-stop(96%,#dee6f4), color-stop(98%,#c4d5ef), color-stop(100%,#a2bee8)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* IE10+ */
+ background: linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeef5', endColorstr='#a2bee8',GradientType=1 ); /* IE6-9 */
}
div#menu li.active a:hover {
background-color:#D9D9D9;
}
.nav_results ul.pg_menu {
- height:25px;
border-top: 1px solid #D0D0D0;
+ white-space : nowrap;
}
.nav_results ul.pg_menu li {
color:#B2B2B2;
- display:block;
- float:left;
- padding:5px 0;
+ display:inline;
list-style:none;
- text-align:center;
+ margin: 0;
}
-.nav_results ul.pg_menu li.back_results {
- padding:5px 0px;
- width:45%;
+.nav_results ul.pg_menu li.back_results a {
border-left: 1px solid #D0D0D0;
border-right: 1px solid #D0D0D0;
}
-.nav_results ul.pg_menu li a {
+.nav_results ul.pg_menu li a,
+.nav_results ul.pg_menu li span {
+ background-color: #F3F3F3;
+ display : block;
+ float:left;
+ padding:.4em .5em;
text-decoration:none;
font-weight:normal;
- color:#4D4D4D;
+ text-align:center;
}
-.nav_results ul.pg_menu li a:hover {
- color:#006699;
+
+.nav_results ul.pg_menu li span {
+ color : #B2B2B2;
}
-.nav_results ul.pg_menu li.left_results {
- margin-right:10px;
+
+.nav_results ul.pg_menu li.left_results a {
+ padding-left : 0;
}
-.nav_results ul.pg_menu li.right_results {
- margin-left:10px;
+
+.nav_results ul.pg_menu li a:hover {
}
.nav_results #listResults{
background-color : #FFF;
color : #333333;
font-family : arial, geneva, sans-serif;
- font-size : 12px;
+ font-size : 14px;
margin : 0px 0px 0px 0px;
}
border-left : 0px solid #CCCCCC;
margin : 3px 0px 5px 0px;
padding : 0px;
- width : 100%;
- height : 100%;
+ width : 99%;
}
td {
border-right : 1px solid #CCCCCC;
padding : 5px 5px 5px 5px;
vertical-align : top;
- width : 100%;
- height : 100%;
}
td:last-child {
border-right : 1px solid #CCCCCC;
font-weight : bold;
padding : 5px 5px 5px 5px;
- width: 100%;
- height : 100%;
}
th:last-child {
<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[
<div id="changelanguage" class="ft">
[% IF ( languages_loop && opaclanguagesdisplay ) %]
[% UNLESS ( one_language_enabled ) %]
- <strong>Languages: </strong>
+ <div class="lang"><strong>Languages: </strong></div>
[% FOREACH languages_loo IN languages_loop %]
+ <div class="lang">
[% IF ( languages_loo.group_enabled ) %]
[% IF ( languages_loo.plural ) %]
- <a id="show[% languages_loo.rfc4646_subtag %]" class="sublangs more" href="#">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a>
+ <a id="show[% languages_loo.rfc4646_subtag %]" class="sublangs more" href="#">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a>[% UNLESS ( loop.last ) %] | [% END %]
<div id="sub[% languages_loo.rfc4646_subtag %]">
<div class="bd"><ul>
[% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]
[% END %]
[% END %]
[% END %]
- [% END %][% UNLESS ( loop.last ) %] | [% END %]
+ [% END %][% UNLESS ( loop.last || languages_loo.plural ) %] | [% END %]
+ </div>
[% END %]
[% END %]
[% END %]
[% END %]
<ul>
[% FOREACH facet IN facets_loo.facets %]<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=[% facet.type_link_value %]:[% facet.facet_link_value %]" title="[% facet.facet_title_value |html %]">[% facet.facet_label_value %]</a> [% IF ( displayFacetCount ) %]([% facet.facet_count %])[% END %]</li>[% END %][% IF ( facets_loo.expandable ) %]
- <li class="showmore"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&offset=[% facets_loo.offset %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
+ <li class="showmore"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %][% IF ( offset ) %]&offset=[% offset %][% END %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
[% END %]
</ul></li>
[% END %]
<div id="doc" class="yui-t7">
<div id="userbasket" class="container">
-<h1>Your Cart</h1>
+<h2>Your Cart</h2>
[% UNLESS ( print_basket ) %]
<div id="toolbar">
[% IF ( MARCAUTHORS ) %]
<span class="results_summary"><span class="label">Authors:</span>
[% FOREACH MARCAUTHOR IN MARCAUTHORS %]
- [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]
+ [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]
[% UNLESS ( loop.last ) %]|
[% END %]
[% END %]
<div id="ulactioncontainer" class="container">
[% IF ( busc ) %]
<div class="nav_results">
- <div class="l_Results">[% IF ( listResults ) %]<a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>[% ELSE %]Browse results[% END %]</div>
- <ul class="pg_menu">
- <li class="left_results">[% IF ( previous ) %]<a href="[% previous %]" title="See: [% IF ( previousTitle ) %][% previousTitle |html %][% ELSE %]previous biblio[% END %]">« Previous</a>[% ELSE %]Previous[% END %]</li>
+ <div class="l_Results">[% IF ( listResults ) %]<a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>[% ELSE %]<span>Browse results</span>[% END %]</div>
+ <ul class="pg_menu clearfix">
+ <li class="left_results">[% IF ( previous ) %]<a href="[% previous %]" title="See: [% IF ( previousTitle ) %][% previousTitle |html %][% ELSE %]previous biblio[% END %]">« Previous</a>[% ELSE %]<span>Previous</span>[% END %]</li>
<li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
- <li class="right_results">[% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next »</a>[% ELSE %]Next[% END %]</li>
+ <li class="right_results">[% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next »</a>[% ELSE %]<span>Next</span>[% END %]</li>
</ul>
[% IF ( listResults ) %]
<div class="pagination">
[% INCLUDE 'masthead.inc' %]
<div id="yui-main">
- <div class="yui-b">
+ <div class="yui-b"><div class="yui-g" id="usermessaging">
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
<h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt=">" border="0" /> Your Messaging Settings</h3>
</form>
</div>
</div>
+</div>
<div class="yui-b">
<div id="leftmenus" class="container">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog ›
[% IF ( searchdesc ) %]
- Results of Search [% IF ( query_desc ) %]for '[% query_desc %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc %]'[% END %]
+ Results of Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]
[% ELSE %]
You did not specify any search criteria.
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog ›
[% IF ( searchdesc ) %]
- Results of Search [% IF ( query_desc ) %]for '[% query_desc %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc %]'[% END %]
+ Results of Search [% IF ( query_desc ) %]for '[% query_desc | html%]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]
[% ELSE %]
You did not specify any search criteria.
[% END %]
$("a.print").show();
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides\">"+_('Place Hold')+"<\/a>");
- $("a.hold").click(function(){
+ $("#toolbar a.hold").click(function(){
holdSelections();
return false;
});[% END %][% END %]
$("#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 %]
});
[% 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">
[% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span>
[% END %]
[% END %]
- [% IF ( itemsloo.TagLoop ) %]
- </div>[% END %]
+ [% IF ( loggedinusername ) %]
+ <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">Tag status here.</span>
+ [% END %]
[% END %]
- [% END %]
<span class="results_summary actions"><span class="label">Actions:</span>
[% IF ( RequestOnOpac ) %]
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
</xsl:call-template>
- <xsl:if test="marc:subfield[@code='b']">
+ <xsl:if test="marc:subfield[@code='h']">
<xsl:text> </xsl:text>
<xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">b</xsl:with-param>
+ <xsl:with-param name="codes">h</xsl:with-param>
</xsl:call-template>
</xsl:if>
- <xsl:if test="marc:subfield[@code='h']">
+ <xsl:if test="marc:subfield[@code='b']">
<xsl:text> </xsl:text>
<xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">h</xsl:with-param>
+ <xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:text> </xsl:text>
<?xml version="1.0" encoding="UTF-8"?>
+<!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:output method="html"/>
<xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><br /></xsl:otherwise></xsl:choose>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
<?xml version='1.0'?>
+<!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:template name="datafield">
<xsl:param name="tag"/>
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
<?xml version='1.0'?>
+<!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:template name="datafield">
<xsl:param name="tag"/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
push @pm, 'upgrade_pm' if $upgrade || $all;
push @pm, 'current_pm' if $installed || $all;
-print color 'bold white' if $color;
+print color 'bold blue' if $color;
print"
Installed Required Module is
Module Name Version Version Required
}
}
}
-print color 'bold white' if $color;
+print color 'bold blue' if $color;
my $footer = "
--------------------------------------------------------------------------------------------
Total modules reported: $count ";
}
print $footer;
+print color 'reset' if $color;
1;
#!/usr/bin/perl
+# Copyright Koha development team 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., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+#
+
use strict;
use warnings;
my $cgi = new CGI;
-my $batch_id = $cgi->param('batch_id') if $cgi->param('batch_id');
+my $batch_id;
+my @label_ids;
+my @item_numbers;
+$batch_id = $cgi->param('batch_id') if $cgi->param('batch_id');
my $template_id = $cgi->param('template_id') || undef;
my $layout_id = $cgi->param('layout_id') || undef;
-my @label_ids = $cgi->param('label_id') if $cgi->param('label_id');
-my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
+@label_ids = $cgi->param('label_id') if $cgi->param('label_id');
+@item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
my $items = undef;
use C4::AuthoritiesMarc;
use C4::Koha;
use C4::NewsChannels;
+use C4::Review qw/numberofreviews/;
+use C4::Suggestions qw/CountSuggestion/;
+use C4::Tags qw/get_count_by_tag_status/;
my $query = new CGI;
my $authtypes = getauthtypes;
my @authtypesloop;
koha_news_count => $koha_news_count
);
+my $pendingcomments = numberofreviews(0);
+my $pendingtags = get_count_by_tag_status(0);
+my $pendingsuggestions = CountSuggestion("ASKED");
+
+$template->param(
+ pendingcomments => $pendingcomments,
+ pendingtags => $pendingtags,
+ pendingsuggestions => $pendingsuggestions
+);
+
output_html_with_http_headers $query, $cookie, $template->output;
}
$data{debarred} = C4::Overdues::CheckBorrowerDebarred($borrowernumber);
-$data{datedebarred} = $data{debarred} if ( $data{debarred} ne "9999-12-31" );
+$data{datedebarred} = $data{debarred} if ( $data{debarred} && $data{debarred} ne "9999-12-31" );
foreach (qw(dateenrolled dateexpiry dateofbirth datedebarred)) {
$data{$_} = format_date($data{$_}); # back to syspref for display
$template->param( $_ => $data{$_});
}
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.
printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose);
if($confirm) {
ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'});
- LostItem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue);
+ LostItem($row->{'itemnumber'}, undef, 'CHARGE FEE') if( $charge && $charge eq $lostvalue);
}
$count++;
}
+++ /dev/null
-#!/usr/bin/perl
-use strict;
-#use warnings; FIXME - Bug 2505
-use Carp;
-BEGIN {
- # find Koha's Perl modules
- # test carefully before changing this
- use FindBin;
- eval { require "$FindBin::Bin/../kohalib.pl" };
-}
-use C4::Context;
-use C4::Dates qw/format_date/;
-use Mail::Sendmail; # comment out if not doing e-mail notices
-use Getopt::Long;
-use C4::Circulation;
-# use C4::Members;
-# this module will notify only the mail case
-# Now it's only programmed for ouest provence, you can modify it for yourself
-# sub function for get all notifications are not sends
-sub GetNotifys {
-# my($branch) = @_;
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("SELECT DISTINCT notifys.borrowernumber , borrowers.surname , borrowers.firstname , borrowers.title AS borrower_title , categories.category_type AS categorycode , borrowers.email , borrowers.contacttitle , borrowers.contactname , borrowers.contactfirstname ,
- notifys.notify_level , notifys.method
- FROM notifys,borrowers,categories WHERE (notifys.borrowernumber=borrowers.borrowernumber) AND (notifys.notify_send_date IS NULL) AND (borrowers.categorycode = categories.categorycode)");
-
- $sth->execute();
- my @getnotifys;
- my $i=0;
- while (my $data=$sth->fetchrow_hashref){
- $getnotifys[$i]=$data;
- $i++;
- }
- $sth->finish;
- return(@getnotifys);
-
-}
-
-sub GetBorrowerNotifys{
- my ($borrowernumber) = @_;
- my $dbh = C4::Context->dbh;
- my @getnotifys2;
- my $sth2=$dbh->prepare("SELECT notifys.itemnumber,notifys.notify_level,biblio.title ,itemtypes.description,
- issues.date_due
- FROM notifys,biblio,items,itemtypes,biblioitems,issues
- WHERE
- (items.itemnumber=notifys.itemnumber
- AND biblio.biblionumber=items.biblionumber)
- AND (itemtypes.itemtype=biblioitems.itemtype AND biblioitems.biblionumber=biblio.biblionumber)
- AND
- (notifys.borrowernumber=issues.borrowernumber AND notifys.itemnumber=issues.itemnumber)
- AND
- notifys.borrowernumber=?
- AND notify_send_date IS NULL");
- $sth2->execute($borrowernumber);
- my $j=0;
- while (my $data2=$sth2->fetchrow_hashref){
- $getnotifys2[$j]=$data2;
- $j++;
- }
- $sth2->finish;
- return(@getnotifys2);
-
-}
-
-sub GetOverduerules{
- my($category,$notify_level) = @_;
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("SELECT letter".$notify_level.",debarred".$notify_level." FROM overduerules WHERE categorycode=?");
- $sth->execute($category);
- my (@overduerules)=$sth->fetchrow_array;
- $sth->finish;
- return(@overduerules);
-
-}
-
-sub GetLetter{
-
- my($letterid) = @_;
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("SELECT title,content FROM letter WHERE code=?");
- $sth->execute($letterid);
- my (@getletter)=$sth->fetchrow_array;
- $sth->finish;
- return(@getletter);
-
-}
-
-sub UpdateBorrowerDebarred{
- my($borrowernumber) = @_;
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("UPDATE borrowers SET debarred='1' WHERE borrowernumber=?");
- $sth->execute($borrowernumber);
- $sth->finish;
- return 1;
-}
-
-sub UpdateNotifySendDate{
- my($borrowernumber,$itemnumber,$notifyLevel) = @_;
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("UPDATE notifys SET notify_send_date=now()
- WHERE borrowernumber=? AND itemnumber=? AND notify_send_date IS NULL AND notify_level=?");
- $sth->execute($borrowernumber,$itemnumber,$notifyLevel);
- $sth->finish;
- return 1;
-
-}
-
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-# work with get notifys
-my $smtpserver = 'smtp.yoursmtpserver'; # your smtp server (the server who sent mails)
-my $from = 'your@librarymailadress'; # all the mails sent to the borrowers will appear coming from here.
-
-
-# initiate file for wrong_mails
-my $outfile = 'wrong_mails.txt';
-open( OUT, ">$outfile" );
-binmode(OUT, 'utf8');
-
-my @getnofifys = GetNotifys();
-foreach my $num (@getnofifys) {
- my %notify;
-# if we have a method mail, we check witch mail letter we launch
- if ($num->{'method'} eq 'mail'){
- my ($letterid,$debarred) = GetOverduerules($num->{'categorycode'},$num->{'notify_level'});
-# now, we get the letter associated to letterid
- my($title,$content) = GetLetter($letterid);
- my $email = $num->{'email'};
- #my $email = 'alaurin@ouestprovence.fr';
- my $mailtitle = $title; # the title of the mails
-# Work with the adult category code
- if ($num->{'categorycode'} eq 'A') {
- # now deal with $content
- $content =~ s/\<<borrowers.title>\>/$num->{'borrower_title'}/g ;
- $content =~ s/\<<borrowers.surname>\>/$num->{'surname'}/g ;
- $content =~ s/\<<borrowers.firstname>\>/$num->{'firstname'}/g ;
-
- my @getborrowernotify=GetBorrowerNotifys($num->{'borrowernumber'});
- my $overdueitems;
- foreach my $notif(@getborrowernotify){
- my $date=format_date($notif->{'date_due'});
- if ($notif->{'notify_level'} eq $num->{'notify_level'}){
- $overdueitems .= " - <b>".$notif->{'title'}."</b>" ;
- $overdueitems .= " ( ".$notif->{'description'}." ) " ;
- $overdueitems .= "emprunté le :".$date;
- $overdueitems .= "<br>";
-
-# FIXME at this time, the program consider the mail is send (in notify_send_date) but with no real check must be improved , we don't know if the mail was really to a real adress, and if there is a problem, we don't know how to return the notification to koha...
- UpdateNotifySendDate($num->{'borrowernumber'},$notif->{'itemnumber'},$num->{'notify_level'});
-}
- }
- # if we don't have overdueitem replace content by nonotifys value, deal with it later
- if ($overdueitems){
- $content =~ s/\<<items.content>\>/$overdueitems/g;
- }
- else {
- $content = 'nonotifys';
- }
- }
-# Work with the child category code (we add the parents infos)
- if ($num->{'categorycode'} eq 'C') {
- $content =~ s/\<<borrowers.contacttitle>\>/$num->{'contacttitle'}/g ;
- $content =~ s/\<<borrowers.contactname>\>/$num->{'contactname'}/g ;
- $content =~ s/\<<borrowers.contactfirstname>\>/$num->{'contactfirstname'}/g ;
- $content =~ s/\<<borrowers.title>\>/$num->{'borrower_title'}/g ;
- $content =~ s/\<<borrowers.surname>\>/$num->{'surname'}/g ;
- $content =~ s/\<<borrowers.firstname>\>/$num->{'firstname'}/g ;
-
- my @getborrowernotify=GetBorrowerNotifys($num->{'borrowernumber'});
- my $overdueitems;
- foreach my $notif(@getborrowernotify){
- my $date=format_date($notif->{'date_due'});
-
- $overdueitems .= " - <b>".$notif->{'title'}."</b>" ;
- $overdueitems .= " ( ".$notif->{'description'}." ) " ;
- $overdueitems .= "emprunté le :".$date;
- $overdueitems .= "<br>";
-# FIXME at this time, the program consider the mail is send (in notify_send_date) but with no real check must be improved ...
- UpdateNotifySendDate($num->{'borrowernumber'},$notif->{'itemnumber'},$num->{'notify_level'});
- }
-
- if ($overdueitems){
- $content =~ s/\<<items.content>\>/$overdueitems/g;
- }
- else {
- $content = 'nonotifys';
- }
- }
-# initiate the send mail
-
-# decoding mailtitle for lisibility of mailtitle (bug with utf-8 values, so decoding it)
- utf8::decode($mailtitle);
-
- my $mailtext = $content;
- unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , $smtpserver;
-# set your own mail server name here
- my %mail = ( To => $email,
- From => $from,
- Subject => $mailtitle,
- Message => $mailtext,
- 'content-type' => 'text/html; charset="utf-8"',
- );
- # if we don't have any content for the mail, we don't launch mail, but notify it in a file
- if ($mailtext ne 'nonotifys') {
- sendmail(%mail) or carp $Mail::Sendmail::error;
- }
- else {
- print OUT $email ;
- }
-
-# now deal with the debarred mode
-# if ($debarred eq 1) {
-# �ajouter : si le lecteur est en mode debarred, ajouter la fonction qui nous permettra cela
-# UpdateBorrowerDebarred($num->{'borrowernumber'});
-# }
- close(OUT);
- }
-}
@branches = grep { $seen{$_} } @overduebranches;
- if (@overduebranches) {
+ if (@branches) {
my $branch_word = scalar @branches > 1 ? 'branches' : 'branch';
$verbose and warn "$branch_word @branches have overdue rules\n";
our $csv_fh; # the filehandle to the CSV file.
if ( defined $csvfilename ) {
my $sep_char = C4::Context->preference('delimiter') || ',';
+ $sep_char = "\t" if ($sep_char eq 'tabulation');
$csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } );
if ( $csvfilename eq '' ) {
$csv_fh = *STDOUT;
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"} );
items => \@items,
substitute => { # this appears to be a hack to overcome incomplete features in this code.
bib => $branch_details->{'branchname'}, # maybe 'bib' is a typo for 'lib<rary>'?
- 'items.content' => $titles
+ 'items.content' => $titles,
+ 'count' => $itemcount,
}
}
);
$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);
}
--- /dev/null
+#!/usr/bin/perl
+# This script implements a basic benchmarking and regression testing
+# utility for Koha
+
+use strict;
+use warnings;
+BEGIN {
+ # find Koha's Perl modules
+ # test carefully before changing this
+ use FindBin;
+ eval { require "$FindBin::Bin/kohalib.pl" };
+}
+
+use Getopt::Long;
+use HTTPD::Bench::ApacheBench;
+use LWP::UserAgent;
+use Data::Dumper;
+use HTTP::Cookies;
+use C4::Context;
+use C4::Debug;
+
+my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
+GetOptions(
+ 'help' => \$help,
+ 'steps:s' => \$steps,
+ 'url:s' => \$baseurl,
+ 'user:s' => \$user,
+ 'password:s' => \$password,
+ 'maxtries:s' => \$max_tries,
+ 'short' => \$short_print,
+);
+my $concurrency = 30;
+$max_tries=20 unless $max_tries;
+# if steps not provided, run all tests
+$steps='0123456789' unless $steps;
+
+# if short is set, we will only give number for direct inclusion on the wiki
+my $short_ms="|-\n|ON\n";
+my $short_psec="|-\n|ON\n";
+
+if ($help || !$baseurl || !$user || !$password) {
+ print <<EOF
+This script runs a benchmark of the staff interface. It benchmark 6 different pages:
+\t1- the staff main page
+\t2- the catalog detail page, with a random biblionumber
+\t3- the catalog search page, using a term retrieved from one of the 10 first title/author in the database
+\t4- the patron detail page, with a random borrowernumber
+\t5- the patron search page, searching for "Jean"
+\t6- the circulation itself, doing check-out and check-in of random items to random patrons
+
+\t0 all those tests at once
+parameters :
+\thelp = this screen
+\tsteps = which steps you want to run.
+\t\tDon't use it if you want to run all tests. enter 125 if you want to run tests 1, 2 and 5
+\t\tThe "all those tests at once" is numbered 0,and will run all tests previously run.
+\t\tIf you run only one step, it's useless to run the 0, you'll get the same result.
+\turl = the URL or your staff interface
+\tlogin = Koha login
+\tpassword = Koha password
+\tmaxtries = how many tries you want to do. Defaulted to 20
+
+SAMPLE : ./benchmark_staff.pl --url=http://yourstaff.org/cgi-bin/koha/ --user=test --password=test --steps=12
+
+EOF
+;
+exit;
+}
+
+
+# Authenticate via our handy dandy RESTful services
+# and grab a cookie
+my $ua = LWP::UserAgent->new();
+my $cookie_jar = HTTP::Cookies->new();
+my $cookie;
+$ua->cookie_jar($cookie_jar);
+my $resp = $ua->post( "$baseurl"."/svc/authentication" , {userid =>$user, password => $password} );
+if( $resp->is_success ) {
+ $cookie_jar->extract_cookies( $resp );
+ $cookie = $cookie_jar->as_string;
+ unless ($short_print) {
+ print "Authentication successful\n";
+ print "Auth:\n $resp->content" if $debug;
+ }
+}
+
+# remove some unnecessary garbage from the cookie
+$cookie =~ s/ path_spec; discard; version=0//;
+$cookie =~ s/Set-Cookie3: //;
+
+# Get some data to work with
+my $dbh=C4::Context->dbh();
+# grab some borrowernumbers
+my $sth = $dbh->prepare("select max(borrowernumber) from borrowers");
+$sth->execute;
+my ($borrowernumber_max) = $sth->fetchrow;
+my @borrowers;
+for (my $i=1;$i<=$max_tries;$i++) {
+ my $rand_borrowernumber = int(rand($borrowernumber_max)+1);
+ push @borrowers,"$baseurl/members/moremember.pl?borrowernumber=$rand_borrowernumber";
+}
+
+# grab some biblionumbers
+$sth = $dbh->prepare("select max(biblionumber) from biblio");
+$sth->execute;
+my ($biblionumber_max) = $sth->fetchrow;
+my @biblios;
+for (my $i=1;$i<=$max_tries;$i++) {
+ my $rand_biblionumber = int(rand($biblionumber_max)+1);
+ push @biblios,"$baseurl/catalogue/detail.pl?biblionumber=$rand_biblionumber";
+}
+
+# grab some title and author, for random search
+$sth = $dbh->prepare ("SELECT title, author FROM biblio LIMIT 10");
+$sth->execute;
+my ($title,$author);
+my @searchwords;
+while (($title,$author)=$sth->fetchrow) {
+ push @searchwords,split / /, $author;
+ push @searchwords,split / /, $title;
+}
+
+$sth = $dbh->prepare("select max(itemnumber) from items");
+$sth->execute;
+# find the biggest itemnumber
+my ($itemnumber_max) = $sth->fetchrow;
+
+$|=1;
+unless ($short_print) {
+ print "--------------\n";
+ print "Koha STAFF benchmarking utility\n";
+ print "--------------\n";
+ print "Benchmarking with $max_tries occurences of each operation and $concurrency concurrent sessions \n";
+}
+#
+# the global benchmark we do at the end...
+#
+my $b = HTTPD::Bench::ApacheBench->new;
+$b->concurrency( $concurrency );
+my $ro;
+#
+# STEP 1: mainpage : (very) low RDBMS dependency
+#
+if ($steps=~ /1/) {
+ my $b0 = HTTPD::Bench::ApacheBench->new;
+ $b0->concurrency( $concurrency ); my @mainpage;
+ unless ($short_print) {
+ print "Step 1: staff client main page ";
+ }
+ for (my $i=1;$i<=$max_tries;$i++) {
+ push @mainpage,"$baseurl/mainpage.pl";
+ }
+ my $run0 = HTTPD::Bench::ApacheBench::Run->new
+ ({ urls => \@mainpage,
+ cookies => [$cookie],
+ });
+ $b0->add_run($run0);
+ $b->add_run($run0);
+
+ # send HTTP request sequences to server and time responses
+ $ro = $b0->execute;
+ # calculate hits/sec
+ if ($short_print) {
+ $short_ms.= "|".$b0->total_time."\n";
+ $short_psec.="|".(int((1000*$b0->total_requests/$b0->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b0->total_time."ms\t".(int((1000*$b0->total_requests/$b0->total_time)*1000)/1000)." pages/sec\n");
+ print "ALERT : ".$b0->total_responses_failed." failures\n" if $b0->total_responses_failed;
+ }
+} else {
+ print "Skipping step 1\n";
+}
+
+#
+# STEP 2: biblios
+#
+if ($steps=~ /2/) {
+ my $b1 = HTTPD::Bench::ApacheBench->new;
+ $b1->concurrency( $concurrency );
+
+ unless ($short_print) {
+ print "Step 2: catalog detail page ";
+ }
+ my $run1 = HTTPD::Bench::ApacheBench::Run->new
+ ({ urls => \@biblios,
+ cookies => [$cookie],
+ });
+ $b1->add_run($run1);
+ $b->add_run($run1);
+
+ # send HTTP request sequences to server and time responses
+ $ro = $b1->execute;
+ # calculate hits/sec
+ if ($short_print) {
+ $short_ms.= "|".$b1->total_time."\n";
+ $short_psec.="|".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b1->total_time."ms\t".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)." biblios/sec\n");
+ print "ALERT : ".$b1->total_responses_failed." failures\n" if $b1->total_responses_failed;
+ }
+} else {
+ print "Skipping step 2\n";
+}
+#
+# STEP 3: search
+#
+if ($steps=~ /3/) {
+ my $b1 = HTTPD::Bench::ApacheBench->new;
+ $b1->concurrency( $concurrency );
+ unless ($short_print) {
+ print "Step 3: catalogue search ";
+ }
+ my @searches;
+ for (my $i=1;$i<=$max_tries;$i++) {
+ push @searches,"$baseurl/catalogue/search.pl?q=".@searchwords[int(rand(scalar @searchwords))];
+ }
+ my $run1 = HTTPD::Bench::ApacheBench::Run->new
+ ({ urls => \@searches,
+ cookies => [$cookie],
+ });
+ $b1->add_run($run1);
+ $b->add_run($run1);
+
+ # send HTTP request sequences to server and time responses
+ $ro = $b1->execute;
+ # calculate hits/sec
+ if ($short_print) {
+ $short_ms.= "|".$b1->total_time."\n";
+ $short_psec.="|".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b1->total_time."ms\t".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)." biblios/sec\n");
+ print "ALERT : ".$b1->total_responses_failed." failures\n" if $b1->total_responses_failed;
+ }
+} else {
+ print "Skipping step 3\n";
+}
+#
+# STEP 4: borrowers
+#
+if ($steps=~ /4/) {
+ my $b2 = HTTPD::Bench::ApacheBench->new;
+ $b2->concurrency( $concurrency );
+ unless ($short_print) {
+ print "Step 5: patron detail page ";
+ }
+ my $run2 = HTTPD::Bench::ApacheBench::Run->new
+ ({ urls => \@borrowers,
+ cookies => [$cookie],
+ });
+ $b2->add_run($run2);
+ $b->add_run($run2);
+
+ # send HTTP request sequences to server and time responses
+ $ro = $b2->execute;
+ # calculate hits/sec
+ if ($short_print) {
+ $short_ms.= "|".$b2->total_time."\n";
+ $short_psec.="|".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b2->total_time."ms\t".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)." borrowers/sec\n");
+ }
+} else {
+ print "Skipping step 4\n";
+}
+
+#
+# STEP 5: borrowers search
+#
+if ($steps=~ /5/) {
+ my $b2 = HTTPD::Bench::ApacheBench->new;
+ $b2->concurrency( $concurrency );
+ unless ($short_print) {
+ print "Step 5: patron search page ";
+ }
+ for (my $i=1;$i<=$max_tries;$i++) {
+ # print "$baseurl/members/moremember.pl?borrowernumber=$rand_borrowernumber\n";
+ push @borrowers,"$baseurl/members/member.pl?member=jean";
+ }
+ my $run2 = HTTPD::Bench::ApacheBench::Run->new
+ ({ urls => \@borrowers,
+ cookies => [$cookie],
+ });
+ $b2->add_run($run2);
+ $b->add_run($run2);
+
+ # send HTTP request sequences to server and time responses
+ $ro = $b2->execute;
+ if ($short_print) {
+ $short_ms.= "|".$b2->total_time."\n";
+ $short_psec.="|".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b2->total_time."ms\t".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)." borrowers/sec\n");
+ }
+} else {
+ print "Skipping step 5\n";
+}
+
+#
+# STEP 6: issue (& then return) books
+#
+if ($steps=~ /6/) {
+ my $b3 = HTTPD::Bench::ApacheBench->new;
+ $b3->concurrency( $concurrency );
+ my $b4 = HTTPD::Bench::ApacheBench->new;
+ $b4->concurrency( $concurrency );
+
+ my @issues;
+ my @returns;
+ unless ($short_print) {
+ print "Step 6a circulation (checkouts) ";
+ }
+ $sth = $dbh->prepare("SELECT barcode FROM items WHERE itemnumber=?");
+ my $sth2 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE borrowernumber=?");
+ for (my $i=1;$i<=$max_tries;$i++) {
+ my $rand_borrowernumber;
+ # check that the borrowernumber exist
+ until ($rand_borrowernumber) {
+ $rand_borrowernumber = int(rand($borrowernumber_max)+1);
+ $sth2->execute($rand_borrowernumber);
+ ($rand_borrowernumber) = $sth2->fetchrow;
+ }
+ # find a barcode & check it exists
+ my $rand_barcode;
+ until ($rand_barcode) {
+ my $rand_itemnumber = int(rand($itemnumber_max)+1);
+ $sth->execute($rand_itemnumber);
+ ($rand_barcode) = $sth->fetchrow();
+ }
+ push @issues,"$baseurl/circ/circulation.pl?borrowernumber=$rand_borrowernumber&barcode=$rand_barcode&issueconfirmed=1";
+ push @returns,"$baseurl/circ/returns.pl?barcode=$rand_barcode";
+ }
+ my $run3 = HTTPD::Bench::ApacheBench::Run->new
+ ({ urls => \@issues,
+ cookies => [$cookie],
+ });
+ $b3->add_run($run3);
+ $b->add_run($run3);
+
+ # send HTTP request sequences to server and time responses
+ $ro = $b3->execute;
+ # calculate hits/sec
+ if ($short_print) {
+ $short_ms.= "|".$b3->total_time."\n";
+ $short_psec.="|".(int((1000*$b3->total_requests/$b3->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b3->total_time."ms\t".(int((1000*$b3->total_requests/$b3->total_time)*1000)/1000)." checkouts/sec\n");
+ }
+ unless ($short_print) {
+ print "Step 6b circulation (checkins) ";
+ }
+ my $run4 = HTTPD::Bench::ApacheBench::Run->new
+ ({ urls => \@returns,
+ cookies => [$cookie],
+ });
+ $b4->add_run($run4);
+ $b->add_run($run4);
+
+ # send HTTP request sequences to server and time responses
+ $ro = $b4->execute;
+ # calculate hits/sec
+ if ($short_print) {
+ $short_ms.= "|".$b4->total_time."\n";
+ $short_psec.="|".(int((1000*$b4->total_requests/$b4->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b4->total_time."ms\t".(int((1000*$b4->total_requests/$b4->total_time)*1000)/1000)." checkins/sec\n");
+ }
+} else {
+ print "Skipping step 6\n";
+}
+
+if ($steps=~ /0/) {
+ unless ($short_print) {
+ print "all transactions at once ";
+ }
+ $ro = $b->execute;
+ if ($short_print) {
+ $short_ms.= "|".$b->total_time."\n";
+ $short_psec.="|".(int((1000*$b->total_requests/$b->total_time)*1000)/1000)."\n";
+ } else {
+ print ("\t".$b->total_time."ms\t".(int((1000*$b->total_requests/$b->total_time)*1000)/1000)." operations/sec\n");
+ }
+} else {
+ print "Skipping 'testing all transactions at once'\n (step 0)";
+}
+
+if ($short_print) {
+print $short_ms."\n=====\n".$short_psec."\n";
+}
sub check_zebra_dirs {
my ($base) = shift() . '/';
my $needed_repairing = 0;
- my @dirs = ( '', 'key', 'register', 'shadow' );
+ my @dirs = ( '', 'key', 'register', 'shadow', 'tmp' );
foreach my $dir (@dirs) {
my $bdir = $base . $dir;
if (! -d $bdir) {
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>
#!/usr/bin/perl
+# This file is part of Koha.
+#
+# Copyright (C) 2007 LibLime
+# Parts Copyright BSZ 2011
+#
+# 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.
+
use strict;
-#use warnings; FIXME - Bug 2505
+use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
$| = 1;
# command-line parameters
+my $encoding = "";
my $match_bibs = 0;
my $add_items = 0;
my $input_file = "";
my $no_replace ;
my $result = GetOptions(
+ 'encoding:s' => \$encoding,
'file:s' => \$input_file,
- 'match-bibs:s' => \$match_bibs,
+ 'match-bibs:s' => \$match_bibs,
'add-items' => \$add_items,
'no-replace' => \$no_replace,
'comment:s' => \$batch_comment,
'h|help' => \$want_help
);
+if ($encoding eq "") {
+ $encoding = "utf8";
+}
+
if (not $result or $input_file eq "" or $want_help) {
print_usage();
exit 0;
}
close IN;
- my $marc_flavor = C4::Context->preference('marcflavour');
-
print "... staging MARC records -- please wait\n";
my ($batch_id, $num_valid, $num_items, @import_errors) =
- BatchStageMarcRecords($marc_flavor, $marc_records, $input_file, $batch_comment, '', $add_items, 0,
+ BatchStageMarcRecords($encoding, $marc_records, $input_file, $batch_comment, '', $add_items, 0,
100, \&print_progress_and_commit);
print "... finished staging MARC records\n";
Parameters:
--file <file_name> name of input MARC bib file
+ --encoding <encoding> encoding of MARC records, default is utf8.
+ Other possible options are: MARC-8,
+ ISO_5426, ISO_6937, ISO_8859-1, EUC-KR
--match-bibs <match_id> use this option to match bibs
in the file with bibs already in
the database for future overlay.
$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}} ) {
);
my $libravatar_enabled = 0;
-eval 'use Libravatar::URL';
-if (!$@ and C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
- $libravatar_enabled = 1;
+if ( C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
+ eval {
+ require Libravatar::URL;
+ Libravatar::URL->import();
+ };
+ if (!$@ ) {
+ $libravatar_enabled = 1;
+ }
}
my $reviews = getreviews( $biblionumber, 1 );
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 $libravatar_enabled = 0;
-eval 'use Libravatar::URL';
-if (!$@ and C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
- $libravatar_enabled = 1;
+if ( C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
+ eval {
+ require Libravatar::URL;
+ Libravatar::URL->import();
+ };
+ if ( !$@ ) {
+ $libravatar_enabled = 1;
+ }
}
my $reviews = getallreviews(1,$offset,$results_per_page);
my $marcflavour = C4::Context->preference("marcflavour");
-my $hits = numberofreviews();
+my $hits = numberofreviews(1);
my $i = 0;
my $latest_comment_date;
for my $result (@$reviews){
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;
}
my $line = $input->param("Line");
my $column = $input->param("Column");
my @filters = $input->param("Filter");
-$filters[0]= (($line =~ /closedate/ || $column =~ /closedate/) ? format_date_in_iso($filters[0]) : undef);
-$filters[1]= (($line =~ /closedate/ || $column =~ /closedate/) ? format_date_in_iso($filters[1]) : undef);
-$filters[2]= (($line =~ /delivery/ || $column =~ /delivery/) ? format_date_in_iso($filters[2]) : undef);
-$filters[3]= (($line =~ /delivery/ || $column =~ /delivery/) ? format_date_in_iso($filters[3]) : undef);
+$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.
use C4::Auth;
use CGI;
use C4::Context;
-use HTML::Template::Pro;
use C4::Search;
use C4::Output;
use C4::Koha;
use C4::Auth;
use CGI;
use C4::Context;
-use HTML::Template::Pro;
use C4::Search;
use C4::Output;
use C4::Koha;
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;
}
);
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;
# get currencies and rates
my @rates = GetCurrencies();
my $count = scalar @rates;
+my $active_currency = GetCurrency();
+my $selected_currency;
+if ($$suggestion_ref{'currency'}) {
+ $selected_currency = $$suggestion_ref{'currency'};
+}
+else {
+ $selected_currency = $active_currency->{currency};
+}
my @loop_currency = ();
for ( my $i = 0 ; $i < $count ; $i++ ) {
my %line;
$line{currcode} = $rates[$i]->{'currency'};
$line{rate} = $rates[$i]->{'rate'};
- $line{selected} = 1 if ($$suggestion_ref{'currency'} && $line{'currcode'} eq $$suggestion_ref{'currency'});
+ $line{selected} = 1 if ($line{'currcode'} eq $selected_currency);
push @loop_currency, \%line;
}
--- /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();
wanted => sub {
my $file = $_;
- return if $file =~ /\.(ico|jpg|gif|ogg|pdf|png|psd|swf|zip)$/;
+ return if $file =~ /\.(ico|jpg|gif|ogg|pdf|png|psd|swf|zip|.*\~)$/;
return unless -f $file;
my @name_parts = File::Spec->splitpath($file);
labels members misc offline_circ opac patroncards reports reserve reviews rotating_collections
serials sms suggestion t tags test tools virtualshelves);
-my @dirs = qw( acqui admin authorities basket circ debian errors offline_circ reserve reviews rotating_collections
-serials sms virtualshelves );
+my @dirs = qw( acqui admin authorities basket catalogue cataloguing circ debian errors labels
+ offline_circ reserve reviews rotating_collections serials sms virtualshelves );
if ( not $ENV{TEST_QA} ) {
my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run';
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More tests => 2;
BEGIN {
use_ok('C4::AuthoritiesMarc::UNIMARC');
}
+my @test = C4::AuthoritiesMarc::UNIMARC::default_auth_type_location();
+ok(($test[0] == 152) && ($test[1] eq 'b'), "correct variables being returned");
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 13;
BEGIN { use_ok( 'C4::Boolean', qw( true_p ) ); }
is( true_p(undef), undef, 'recognizes undefined as not boolean' );
is( true_p('foo'), undef, 'recognizes \'foo\' as not boolean' );
+is( true_p([]), undef, 'recognizes a reference as not a boolean' );
+++ /dev/null
-#!/usr/bin/perl
-#
-# This Koha test module is a stub!
-# Add more tests here!!!
-
-use strict;
-use warnings;
-
-use Test::More tests => 1;
-
-BEGIN {
- use FindBin;
- use lib "$FindBin::Bin/../C4/SIP";
- use_ok('C4::SIP::ILS');
-}
-
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 8;
BEGIN {
use FindBin;
$date_time = Sip::timestamp('2011-01-12');
ok( $date_time eq '20110112 235900', 'Timestamp iso date string');
+my $myChecksum = Sip::Checksum::checksum("12345");
+my $checker = 65281;
+my $stringChecksum = Sip::Checksum::checksum("teststring");
+my $stringChecker = 64425;
+
+is( $myChecksum, $checker, "Checksum: $myChecksum matches expected output");
+is( $stringChecksum, $stringChecker, "Checksum: $stringChecksum matches expected output");
+
+my $testdata = "abcdAZ";
+my $something = Sip::Checksum::checksum($testdata);
+
+$something = sprintf("%4X", $something);
+ok( Sip::Checksum::verify_cksum($testdata.$something), "Checksum: $something is valid.");
+
+my $invalidTest = Sip::Checksum::verify_cksum("1234567");
+is($invalidTest, 0, "Checksum: 1234567 is invalid as expected");
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More tests => 19;
BEGIN {
use FindBin;
use lib $FindBin::Bin;
my ($scrubber,$html,$result,@types,$collapse);
$collapse = 1;
-@types = qw(comment tag);
+@types = qw(default comment tag staff);
$html = q|
<![CDATA[selfdestruct]]]>
<?php echo(" EVIL EVIL EVIL "); ?> <!-- COMMENT -->
print pretty_line('default'), $result, "\n", pretty_line();
foreach(@types) {
- ok($scrubber = C4::Scrubber->new($_), "Constructor: C4::Scrubber->new($_)");
+ ok($scrubber = C4::Scrubber->new($_), "testing Constructor: C4::Scrubber->new($_)");
ok(printf("# scrubber settings: default %s, comment %s, process %s\n",
$scrubber->default(),$scrubber->comment(),$scrubber->process()),
"Outputting settings from scrubber object (type: $_)"
$collapse and $result =~ s/\s*\n\s*/\n/g;
print pretty_line($_), $result, "\n", pretty_line();
}
+
+print "\n\n######################################################\nStart of invalid tests\n";
+
+#Test for invalid new entry
+eval{
+ C4::Scrubber->new("");
+ fail("test should fail on entry of ''\n");
+};
+pass("Test should have failed on entry of '' (empty string) and it did. YAY!\n");
+
+eval{
+ C4::Scrubber->new("Client");
+ fail("test should fail on entry of 'Client'\n");
+};
+pass("Test should have failed on entry of 'Client' and it did. YAY!\n");
+
+print "######################################################\n";
+
diag "done.\n";
--- /dev/null
+#!/usr/bin/perl
+#
+# This Koha test module is a stub!
+# Add more tests here!!!
+
+use strict;
+use warnings;
+use C4::TmplTokenType;
+use Test::More tests => 7;
+
+BEGIN {
+ use_ok('C4::TmplToken');
+}
+
+ok (my $token = C4::TmplToken->new('test',C4::TmplTokenType::TEXT,10,'/tmp/translate.txt'), "Create new");
+ok ($token->string eq 'test', "String works");
+ok ($token->type == C4::TmplTokenType::TEXT, "Token works");
+ok ($token->line_number == 10, "Line number works");
+ok ($token->pathname eq '/tmp/translate.txt', "Path works");
+
+
+ok ($token->text_p, "text_p works");
use warnings;
use C4::Auth;
use CGI;
-use Test::More tests => 8;
+use Test::More tests => 10;
BEGIN {
use_ok('C4::BackgroundJob');
$background->size("56");
is ($background->size, "56", "testing size");
+$background->finish("finished");
+is ($background->status,'completed', "testing finished");
+
+ok ($background->results); # Will return undef unless finished
\ No newline at end of file
#!/usr/bin/perl
-#
-# This Koha test module is a stub!
-# Add more tests here!!!
+
+# some simple tests of the elements of C4::External::BakerTaylor that do not require a valid username and password
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More tests => 9;
BEGIN {
use_ok('C4::External::BakerTaylor');
}
+# for testing, to avoid using C4::Context
+my $username="testing_username";
+my $password="testing_password";
+
+# taken from C4::External::BakerTaylor::initialize
+my $image_url = "http://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=$username&Password=$password&Options=Y&Return=T&Type=S&Value=";
+
+# test without initializing
+is( C4::External::BakerTaylor::image_url(), undef, "testing image url pre initilization");
+is( C4::External::BakerTaylor::link_url(), undef, "testing link url pre initilization");
+is( C4::External::BakerTaylor::content_cafe_url(""), undef, "testing content cafe url pre initilization");
+is( C4::External::BakerTaylor::http_jacket_link(""), undef, "testing http jacket link pre initilization");
+is( C4::External::BakerTaylor::availability(""), undef, "testing availability pre initilization");
+
+# intitialize
+C4::External::BakerTaylor::initialize($username, $password, "link_url");
+
+# testing basic results
+is( C4::External::BakerTaylor::image_url("aa"), $image_url."aa", "testing image url construction");
+is( C4::External::BakerTaylor::link_url("bb"), "link_urlbb", "testing link url construction");
+is( C4::External::BakerTaylor::content_cafe_url("cc"), "http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=$username&Password=$password&Options=Y&ItemKey=cc", "testing content cafe url construction");
font_size => 3,
callnum_split => 0,
text_justify => 'L',
- format_string => 'title, author, isbn, issn, itemtype, barcode, callnumber',
+ format_string => 'title, author, isbn, issn, itemtype, barcode, itemcallnumber',
};
my $layout;
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";
'Test',
0,
);
-my $BRANCH_IDX = 5;
+my $BRANCH_IDX = 4;
C4::Context->_new_userenv ('DUMMY_SESSION_ID');
C4::Context->set_userenv ( @USERENV );
$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");
--- /dev/null
+#!/usr/bin/perl
+#
+# This Koha test module is a stub!
+# Add more tests here!!!
+
+use strict;
+use warnings;
+
+use Test::More tests => 4;
+
+BEGIN {
+ use FindBin;
+ use lib "$FindBin::Bin/../../C4/SIP";
+ use_ok('C4::SIP::ILS');
+};
+
+my $transaction = ILS::Transaction::RenewAll->new();
+
+$transaction->patron(my $patron = ILS::Patron->new(23529000120056));
+
+ok(defined $patron, "patron code: 23529000120056 is valid");
+
+my $transaction2 = ILS::Transaction::RenewAll->new();
+$transaction2->patron(my $patron2 = ILS::Patron->new("ABCDE12345"));
+
+#This test assumes that the patron code ABCDE12345 is invalid
+ok(!defined $patron2, "patron code: ABCDE12345 is invalid");
+
+ok($transaction->do_renew_all(), "items renewed correctly");
use C4::Debug;
use C4::SQLHelper qw(:all);
-use Test::More tests => 22;
+use Test::More tests => 20;
use_ok('C4::SQLHelper');
ok(keys %{$$borrowers[0]} ==1, "Search In Table columns out limit");
$borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname surname title)]);
ok(@$borrowers>0, "Search In Table columns out limit to borrowernumber AND filter firstname surname title");
-$borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)]);
-ok(@$borrowers==0, "Search In Table columns filter firstname title limit Valjean not in other fields than surname ");
$borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"start_with");
ok(@$borrowers>0, "Search In Table columns filter surname Val on a wide search found ");
-$borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"exact");
-ok(@$borrowers==0, "Search In Table columns filter surname Val in exact search not found ");
$borrowers=eval{SearchInTable("borrowers",["Val",{member=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)],"exact")};
ok(@$borrowers==0 && !($@), "Search In Table fails gracefully when no correct field passed in hash");
$borrowers=eval{SearchInTable("borrowers",["Jea"],undef,undef,undef,[qw(firstname surname borrowernumber)],"start_with")};
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");
#!/usr/bin/perl
#
-# This Koha test module is a stub!
-# Add more tests here!!!
+
+# A simple test for UploadedFile
+# only ->new is covered
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More tests => 2;
BEGIN {
use_ok('C4::UploadedFile');
}
+ok(my $file = C4::UploadedFile->new());
CheckAccountLineLevelInfo
GetOverduerules
CheckBorrowerDebarred
- UpdateBorrowerDebarred
CheckExistantNotifyid
CheckAccountLineItemInfo
CheckItemNotify
ModReserveAffect
ModReserveCancelAll
ModReserveMinusPriority
+ MoveReserve
GetReserveInfo
_FixPriority
_Findgroupreserve
exclude = Miscellanea::RequireRcsKeywords
+
+
+[Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval]
+allow_includes =1
\ No newline at end of file
UpdateMarcWith( $marcitem, $localmarcitem );
eval{
if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) {
- LostItem($itemnumber, 'MARK RETURNED') if $item->{itemlost};
+ LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $item->{itemlost};
}
};
}
keydate => $keydate,
branchcodes => $branchcodes,
branch => $branch,
+ DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
branchname => $branchname
);
use C4::Calendar;
+use DateTime;
-my $input = new CGI;
-my $dbh = C4::Context->dbh();
+my $input = new CGI;
+my $dbh = C4::Context->dbh();
-my $branchcode = $input->param('newBranchName');
-my $originalbranchcode = $branchcode;
-my $weekday = $input->param('newWeekday');
-my $day = $input->param('newDay');
-my $month = $input->param('newMonth');
-my $year = $input->param('newYear');
-my $title = $input->param('newTitle');
-my $description = $input->param('newDescription');
-my $newoperation = $input->param('newOperation');
-my $allbranches = $input->param('allBranches');
+my $branchcode = $input->param('newBranchName');
+my $originalbranchcode = $branchcode;
+my $weekday = $input->param('newWeekday');
+my $day = $input->param('newDay');
+my $month = $input->param('newMonth');
+my $year = $input->param('newYear');
+my $day1;
+my $month1;
+my $year1;
+my $dateofrange = $input->param('dateofrange');
+my $title = $input->param('newTitle');
+my $description = $input->param('newDescription');
+my $newoperation = $input->param('newOperation');
+my $allbranches = $input->param('allBranches');
-my $calendardate = sprintf("%04d-%02d-%02d", $year, $month, $day);
-my $isodate = C4::Dates->new($calendardate, 'iso');
-$calendardate = $isodate->output('syspref');
+my $calendardate = sprintf("%04d-%02d-%02d", $year, $month, $day);
+my $isodate = C4::Dates->new($calendardate, 'iso');
+$calendardate = $isodate->output('syspref');
+my @dateend = split(/[\/-]/, $dateofrange);
+if (C4::Context->preference("dateformat") eq "metric") {
+ $day1 = $dateend[0];
+ $month1 = $dateend[1];
+ $year1 = $dateend[2];
+}elsif (C4::Context->preference("dateformat") eq "us") {
+ $month1 = $dateend[0];
+ $day1 = $dateend[1];
+ $year1 = $dateend[2];
+} else {
+ $year1 = $dateend[0];
+ $month1 = $dateend[1];
+ $day1 = $dateend[2];
+}
$title || ($title = '');
if ($description) {
$description =~ s/\r/\\r/g;
description => $description);
}
- }
+ } elsif ( $newoperation eq 'holidayrange' ) {
+ #Make an array with holiday's days
+ my $first_dt = DateTime->new(year => $year, month => $month, day => $day);
+ my $end_dt = DateTime->new(year => $year1, month => $month1, day => $day1);
+ my @holiday_list = ();
+
+ for (my $dt = $first_dt->clone();
+ $dt <= $end_dt;
+ $dt->add(days => 1) )
+ {
+ push @holiday_list, $dt->clone();
+ }
+
+ foreach my $date (@holiday_list){
+ unless ( $calendar->isHoliday( $date->{local_c}->{day}, $date->{local_c}->{month}, $date->{local_c}->{year} ) ) {
+ $calendar->insert_single_holiday(
+ day => $date->{local_c}->{day},
+ month => $date->{local_c}->{month},
+ year => $date->{local_c}->{year},
+ title => $title,
+ description => $description
+ );
+ }
+ }
+ } elsif ( $newoperation eq 'holidayrangerepeat' ) {
+ #Make an array with holiday's days
+ my $first_dt = DateTime->new(year => $year, month => $month, day => $day);
+ my $end_dt = DateTime->new(year => $year1, month => $month1, day => $day1);
+ my @holiday_list = ();
+
+ for (my $dt = $first_dt->clone();
+ $dt <= $end_dt;
+ $dt->add(days => 1) )
+ {
+ push @holiday_list, $dt->clone();
+ }
+
+ foreach my $date (@holiday_list){
+ unless ( $calendar->isHoliday( $date->{local_c}->{day}, $date->{local_c}->{month}, $date->{local_c}->{year} ) ) {
+ $calendar->insert_day_month_holiday(
+ day => $date->{local_c}->{day},
+ month => $date->{local_c}->{month},
+ title => $title,
+ description => $description
+ );
+ }
+ }
+ }
}
use CGI;
use C4::Auth;
use C4::Output;
+use C4::Review qw/numberofreviews/;
+use C4::Tags qw/get_count_by_tag_status/;
my $query = new CGI;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
+my $pendingcomments = numberofreviews(0);
+my $pendingtags = get_count_by_tag_status(0);
+
+$template->param(
+ pendingcomments => $pendingcomments,
+ pendingtags => $pendingtags
+);
+
output_html_with_http_headers $query, $cookie, $template->output;
my @warnings;
while (<PH>) {
# ignore some noise on STDERR
- next if /^\.* done\.$/;
- next if /^\.* terminé\.$/;
+ # the output of msmerge, that consist in .... followed by a "done" (localized), followed by a .
+ # The "done" localized can include diacritics, so ignoring the whole word
+ # FIXME PP: the flow is not correct UTF8, testing \p{IsLetter} does not work, but I think this regexp will do the job
+ next if (/^\.+ .*\.$/);
+ # other Koha-specific catses that should not worry us
next if /^Warning: Can't determine original templates' charset/;
next if /^Warning: Charset Out defaulting to/;
next if /^Removing empty file /;