$template->param( loggedinusername => $user );
$template->param( sessionID => $sessionID );
- my ($total, $pubshelves, $barshelves) = C4::Context->get_shelves_userenv();
- if (defined($pubshelves)) {
- $template->param( pubshelves => scalar (@$pubshelves),
- pubshelvesloop => $pubshelves,
- );
- $template->param( pubtotal => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
- }
- if (defined($barshelves)) {
- $template->param( barshelves => scalar (@$barshelves),
- barshelvesloop => $barshelves,
- );
- $template->param( bartotal => $total->{'bartotal'}, ) if ($total->{'bartotal'} > scalar (@$barshelves));
- }
+ my ($total, $pubshelves, $barshelves) = C4::Context->get_shelves_userenv();
+ if (defined($pubshelves)) {
+ $template->param( pubshelves => scalar (@$pubshelves),
+ pubshelvesloop => $pubshelves,
+ );
+ $template->param( pubtotal => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
+ }
+ if (defined($barshelves)) {
+ $template->param( barshelves => scalar (@$barshelves),
+ barshelvesloop => $barshelves,
+ );
+ $template->param( bartotal => $total->{'bartotal'}, ) if ($total->{'bartotal'} > scalar (@$barshelves));
+ }
$borrowernumber = getborrowernumber($user);
my ( $borr ) = GetMemberDetails( $borrowernumber );
}
}
}
- else { # if this is an anonymous session, setup to display public lists...
+ else { # if this is an anonymous session, setup to display public lists...
# load the template variables for stylesheets and JavaScript
$template->param( css_libs => $in->{'css_libs'} );
$template->param( js_widgets => $in->{'js_widgets'} );
$template->param( sessionID => $sessionID );
-
- my ($total, $pubshelves) = C4::Context->get_shelves_userenv(); # an anonymous user has no 'barshelves'...
- if (defined(($pubshelves))) {
- $template->param( pubshelves => scalar (@$pubshelves),
- pubshelvesloop => $pubshelves,
- );
- $template->param( pubtotal => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
- }
+
+ my ($total, $pubshelves) = C4::Context->get_shelves_userenv(); # an anonymous user has no 'barshelves'...
+ if (defined(($pubshelves))) {
+ $template->param( pubshelves => scalar (@$pubshelves),
+ pubshelvesloop => $pubshelves,
+ );
+ $template->param( pubtotal => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
+ }
- }
+ }
# these template parameters are set the same regardless of $in->{'type'}
$template->param(
'item-level_itypes' => C4::Context->preference('item-level_itypes'),
patronimages => C4::Context->preference("patronimages"),
singleBranchMode => C4::Context->preference("singleBranchMode"),
- SyndeticsClientCode => C4::Context->preference("SyndeticsClientCode"),
- SyndeticsEnabled => C4::Context->preference("SyndeticsEnabled"),
- SyndeticsCoverImages => C4::Context->preference("SyndeticsCoverImages"),
- SyndeticsTOC => C4::Context->preference("SyndeticsTOC"),
- SyndeticsSummary => C4::Context->preference("SyndeticsSummary"),
- SyndeticsEditions => C4::Context->preference("SyndeticsEditions"),
- SyndeticsExcerpt => C4::Context->preference("SyndeticsExcerpt"),
- SyndeticsReviews => C4::Context->preference("SyndeticsReviews"),
- SyndeticsAuthorNotes => C4::Context->preference("SyndeticsAuthorNotes"),
- SyndeticsAwards => C4::Context->preference("SyndeticsAwards"),
- SyndeticsSeries => C4::Context->preference("SyndeticsSeries"),
+ SyndeticsClientCode => C4::Context->preference("SyndeticsClientCode"),
+ SyndeticsEnabled => C4::Context->preference("SyndeticsEnabled"),
+ SyndeticsCoverImages => C4::Context->preference("SyndeticsCoverImages"),
+ SyndeticsTOC => C4::Context->preference("SyndeticsTOC"),
+ SyndeticsSummary => C4::Context->preference("SyndeticsSummary"),
+ SyndeticsEditions => C4::Context->preference("SyndeticsEditions"),
+ SyndeticsExcerpt => C4::Context->preference("SyndeticsExcerpt"),
+ SyndeticsReviews => C4::Context->preference("SyndeticsReviews"),
+ SyndeticsAuthorNotes => C4::Context->preference("SyndeticsAuthorNotes"),
+ SyndeticsAwards => C4::Context->preference("SyndeticsAwards"),
+ SyndeticsSeries => C4::Context->preference("SyndeticsSeries"),
+ SyndeticsCoverImageSize => C4::Context->preference("SyndeticsCoverImageSize"),
);
if ( $in->{'type'} eq "intranet" ) {
$template->param(
- AmazonContent => C4::Context->preference("AmazonContent"),
+ AmazonEnabled => C4::Context->preference("AmazonEnabled"),
+ AmazonCoverImages => C4::Context->preference("AmazonCoverImages"),
AmazonSimilarItems => C4::Context->preference("AmazonSimilarItems"),
AutoLocation => C4::Context->preference("AutoLocation"),
"BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
$LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
$LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
$template->param(
- AmazonContent => "" . C4::Context->preference("AmazonContent"),
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"),
AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"),
LibraryName => "" . C4::Context->preference("LibraryName"),
LibraryNameTitle => "" . $LibraryNameTitle,
LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
+ OPACAmazonEnabled => C4::Context->preference("OPACAmazonEnabled"),
+ OPACAmazonCoverImages => C4::Context->preference("OPACAmazonCoverImages"),
OPACAmazonSimilarItems => "" . C4::Context->preference("OPACAmazonSimilarItems"),
OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"),
OPACItemHolds => C4::Context->preference("OPACItemHolds"),
my $version;
# If Version syspref is unavailable, it means Koha is beeing installed,
# and so we must redirect to OPAC maintenance page or to the WebInstaller
- # also, if OpacMaintenance is ON, OPAC should redirect to maintenance
- if (C4::Context->preference('OpacMaintenance') && $type eq 'opac') {
- warn "OPAC Install required, redirecting to maintenance";
- print $query->redirect("/cgi-bin/koha/maintenance.pl");
- }
+ # also, if OpacMaintenance is ON, OPAC should redirect to maintenance
+ if (C4::Context->preference('OpacMaintenance') && $type eq 'opac') {
+ warn "OPAC Install required, redirecting to maintenance";
+ print $query->redirect("/cgi-bin/koha/maintenance.pl");
+ }
unless ($version = C4::Context->preference('Version')) { # assignment, not comparison
if ($type ne 'opac') {
warn "Install required, redirecting to Installer";
sub checkauth {
my $query = shift;
- $debug and warn "Checking Auth";
+ $debug and warn "Checking Auth";
# $authnotrequired will be set for scripts which will run without authentication
my $authnotrequired = shift;
my $flagsrequired = shift;
$ip = $session->param('ip');
$lasttime = $session->param('lasttime');
$userid = $session->param('id');
- $sessiontype = $session->param('sessiontype');
+ $sessiontype = $session->param('sessiontype');
}
- if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) {
- #if a user enters an id ne to the id in the current session, we need to log them in...
- #first we need to clear the anonymous session...
- $debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id');
+ if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) {
+ #if a user enters an id ne to the id in the current session, we need to log them in...
+ #first we need to clear the anonymous session...
+ $debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id');
$session->flush;
$session->delete();
C4::Context->_unset_userenv($sessionID);
- $sessionID = undef;
- $userid = undef;
- }
+ $sessionID = undef;
+ $userid = undef;
+ }
elsif ($logout) {
# voluntary logout the user
$session->flush;
$sessionID = undef;
$userid = undef;
}
- elsif ( $lasttime < time() - $timeout ) {
- # timed logout
- $info{'timed_out'} = 1;
- $session->delete();
- C4::Context->_unset_userenv($sessionID);
- _session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,localtime);
- $userid = undef;
- $sessionID = undef;
- }
- elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) {
- # Different ip than originally logged in from
- $info{'oldip'} = $ip;
- $info{'newip'} = $ENV{'REMOTE_ADDR'};
- $info{'different_ip'} = 1;
- $session->delete();
- C4::Context->_unset_userenv($sessionID);
- _session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,localtime, $info{'newip'});
- $sessionID = undef;
- $userid = undef;
- }
- else {
- $cookie = $query->cookie( CGISESSID => $session->id );
- $session->param('lasttime',time());
- unless ( $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in...
- $flags = haspermission( $dbh, $userid, $flagsrequired );
- if ($flags) {
- $loggedin = 1;
- } else {
- $info{'nopermission'} = 1;
- }
- }
- }
+ elsif ( $lasttime < time() - $timeout ) {
+ # timed logout
+ $info{'timed_out'} = 1;
+ $session->delete();
+ C4::Context->_unset_userenv($sessionID);
+ _session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,localtime);
+ $userid = undef;
+ $sessionID = undef;
+ }
+ elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) {
+ # Different ip than originally logged in from
+ $info{'oldip'} = $ip;
+ $info{'newip'} = $ENV{'REMOTE_ADDR'};
+ $info{'different_ip'} = 1;
+ $session->delete();
+ C4::Context->_unset_userenv($sessionID);
+ _session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,localtime, $info{'newip'});
+ $sessionID = undef;
+ $userid = undef;
+ }
+ else {
+ $cookie = $query->cookie( CGISESSID => $session->id );
+ $session->param('lasttime',time());
+ unless ( $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in...
+ $flags = haspermission( $dbh, $userid, $flagsrequired );
+ if ($flags) {
+ $loggedin = 1;
+ } else {
+ $info{'nopermission'} = 1;
+ }
+ }
+ }
}
unless ($userid || $sessionID) {
#we initiate a session prior to checking for a username to allow for anonymous sessions...
- my $session = get_session("") or die "Auth ERROR: Cannot get_session()";
+ my $session = get_session("") or die "Auth ERROR: Cannot get_session()";
my $sessionID = $session->id;
- C4::Context->_new_userenv($sessionID);
+ C4::Context->_new_userenv($sessionID);
$cookie = $query->cookie(CGISESSID => $sessionID);
- if ( $userid = $query->param('userid') ) {
- my $password = $query->param('password');
- my ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password );
- if ($return) {
- _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime);
- if ( $flags = haspermission( $dbh, $userid, $flagsrequired ) ) {
- $loggedin = 1;
- }
- else {
- $info{'nopermission'} = 1;
- C4::Context->_unset_userenv($sessionID);
- }
-
- my ($borrowernumber, $firstname, $surname, $userflags,
- $branchcode, $branchname, $branchprinter, $emailaddress);
-
- if ( $return == 1 ) {
- my $select = "
- SELECT borrowernumber, firstname, surname, flags, borrowers.branchcode,
- branches.branchname as branchname,
- branches.branchprinter as branchprinter,
- email
- FROM borrowers
- LEFT JOIN branches on borrowers.branchcode=branches.branchcode
- ";
- my $sth = $dbh->prepare("$select where userid=?");
- $sth->execute($userid);
- unless ($sth->rows) {
- $debug and print STDERR "AUTH_1: no rows for userid='$userid'\n";
- $sth = $dbh->prepare("$select where cardnumber=?");
- $sth->execute($cardnumber);
- unless ($sth->rows) {
- $debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n";
- $sth->execute($userid);
- unless ($sth->rows) {
- $debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n";
- }
- }
- }
- if ($sth->rows) {
- ($borrowernumber, $firstname, $surname, $userflags,
- $branchcode, $branchname, $branchprinter, $emailaddress) = $sth->fetchrow;
- $debug and print STDERR "AUTH_3 results: " .
- "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n";
- } else {
- print STDERR "AUTH_3: no results for userid='$userid', cardnumber='$cardnumber'.\n";
- }
+ if ( $userid = $query->param('userid') ) {
+ my $password = $query->param('password');
+ my ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password );
+ if ($return) {
+ _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime);
+ if ( $flags = haspermission( $dbh, $userid, $flagsrequired ) ) {
+ $loggedin = 1;
+ }
+ else {
+ $info{'nopermission'} = 1;
+ C4::Context->_unset_userenv($sessionID);
+ }
+
+ my ($borrowernumber, $firstname, $surname, $userflags,
+ $branchcode, $branchname, $branchprinter, $emailaddress);
+
+ if ( $return == 1 ) {
+ my $select = "
+ SELECT borrowernumber, firstname, surname, flags, borrowers.branchcode,
+ branches.branchname as branchname,
+ branches.branchprinter as branchprinter,
+ email
+ FROM borrowers
+ LEFT JOIN branches on borrowers.branchcode=branches.branchcode
+ ";
+ my $sth = $dbh->prepare("$select where userid=?");
+ $sth->execute($userid);
+ unless ($sth->rows) {
+ $debug and print STDERR "AUTH_1: no rows for userid='$userid'\n";
+ $sth = $dbh->prepare("$select where cardnumber=?");
+ $sth->execute($cardnumber);
+ unless ($sth->rows) {
+ $debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n";
+ $sth->execute($userid);
+ unless ($sth->rows) {
+ $debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n";
+ }
+ }
+ }
+ if ($sth->rows) {
+ ($borrowernumber, $firstname, $surname, $userflags,
+ $branchcode, $branchname, $branchprinter, $emailaddress) = $sth->fetchrow;
+ $debug and print STDERR "AUTH_3 results: " .
+ "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n";
+ } else {
+ print STDERR "AUTH_3: no results for userid='$userid', cardnumber='$cardnumber'.\n";
+ }
# launch a sequence to check if we have a ip for the branch, i
# if we have one we replace the branchcode of the userenv by the branch bound in the ip.
- my $ip = $ENV{'REMOTE_ADDR'};
- # if they specify at login, use that
- if ($query->param('branch')) {
- $branchcode = $query->param('branch');
- $branchname = GetBranchName($branchcode);
- }
- my $branches = GetBranches();
- if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){
- # we have to check they are coming from the right ip range
- my $domain = $branches->{$branchcode}->{'branchip'};
- if ($ip !~ /^$domain/){
- $loggedin=0;
- $info{'wrongip'} = 1;
- }
- }
-
- my @branchesloop;
- foreach my $br ( keys %$branches ) {
- # now we work with the treatment of ip
- my $domain = $branches->{$br}->{'branchip'};
- if ( $domain && $ip =~ /^$domain/ ) {
- $branchcode = $branches->{$br}->{'branchcode'};
-
- # new op dev : add the branchprinter and branchname in the cookie
- $branchprinter = $branches->{$br}->{'branchprinter'};
- $branchname = $branches->{$br}->{'branchname'};
- }
- }
- $session->param('number',$borrowernumber);
- $session->param('id',$userid);
- $session->param('cardnumber',$cardnumber);
- $session->param('firstname',$firstname);
- $session->param('surname',$surname);
- $session->param('branch',$branchcode);
- $session->param('branchname',$branchname);
- $session->param('flags',$userflags);
- $session->param('emailaddress',$emailaddress);
- $session->param('ip',$session->remote_addr());
- $session->param('lasttime',time());
- $debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map {$session->param($_)} qw(cardnumber firstname surname branch) ;
- }
- elsif ( $return == 2 ) {
- #We suppose the user is the superlibrarian
- $borrowernumber = 0;
- $session->param('number',0);
- $session->param('id',C4::Context->config('user'));
- $session->param('cardnumber',C4::Context->config('user'));
- $session->param('firstname',C4::Context->config('user'));
- $session->param('surname',C4::Context->config('user'));
- $session->param('branch','NO_LIBRARY_SET');
- $session->param('branchname','NO_LIBRARY_SET');
- $session->param('flags',1);
- $session->param('emailaddress', C4::Context->preference('KohaAdminEmailAddress'));
- $session->param('ip',$session->remote_addr());
- $session->param('lasttime',time());
- }
- C4::Context::set_userenv(
- $session->param('number'), $session->param('id'),
- $session->param('cardnumber'), $session->param('firstname'),
- $session->param('surname'), $session->param('branch'),
- $session->param('branchname'), $session->param('flags'),
- $session->param('emailaddress'), $session->param('branchprinter')
- );
-
- # Grab borrower's shelves and public shelves and add them to the session
- # $row_count determines how many records are returned from the db query
- # and the number of lists to be displayed of each type in the 'Lists' button drop down
- my $row_count = 10; # FIXME:This probably should be a syspref
- my ($total, $totshelves, $barshelves, $pubshelves);
- ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber);
- $total->{'bartotal'} = $totshelves;
- ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
- $total->{'pubtotal'} = $totshelves;
- $session->param('barshelves', $barshelves->[0]);
- $session->param('pubshelves', $pubshelves->[0]);
- $session->param('totshelves', $total);
-
- C4::Context::set_shelves_userenv('bar',$barshelves->[0]);
- C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
- C4::Context::set_shelves_userenv('tot',$total);
- }
- else {
- if ($userid) {
- $info{'invalid_username_or_password'} = 1;
- C4::Context->_unset_userenv($sessionID);
- }
- }
- } # END if ( $userid = $query->param('userid') )
- elsif ($type eq "opac") {
+ my $ip = $ENV{'REMOTE_ADDR'};
+ # if they specify at login, use that
+ if ($query->param('branch')) {
+ $branchcode = $query->param('branch');
+ $branchname = GetBranchName($branchcode);
+ }
+ my $branches = GetBranches();
+ if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){
+ # we have to check they are coming from the right ip range
+ my $domain = $branches->{$branchcode}->{'branchip'};
+ if ($ip !~ /^$domain/){
+ $loggedin=0;
+ $info{'wrongip'} = 1;
+ }
+ }
+
+ my @branchesloop;
+ foreach my $br ( keys %$branches ) {
+ # now we work with the treatment of ip
+ my $domain = $branches->{$br}->{'branchip'};
+ if ( $domain && $ip =~ /^$domain/ ) {
+ $branchcode = $branches->{$br}->{'branchcode'};
+
+ # new op dev : add the branchprinter and branchname in the cookie
+ $branchprinter = $branches->{$br}->{'branchprinter'};
+ $branchname = $branches->{$br}->{'branchname'};
+ }
+ }
+ $session->param('number',$borrowernumber);
+ $session->param('id',$userid);
+ $session->param('cardnumber',$cardnumber);
+ $session->param('firstname',$firstname);
+ $session->param('surname',$surname);
+ $session->param('branch',$branchcode);
+ $session->param('branchname',$branchname);
+ $session->param('flags',$userflags);
+ $session->param('emailaddress',$emailaddress);
+ $session->param('ip',$session->remote_addr());
+ $session->param('lasttime',time());
+ $debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map {$session->param($_)} qw(cardnumber firstname surname branch) ;
+ }
+ elsif ( $return == 2 ) {
+ #We suppose the user is the superlibrarian
+ $borrowernumber = 0;
+ $session->param('number',0);
+ $session->param('id',C4::Context->config('user'));
+ $session->param('cardnumber',C4::Context->config('user'));
+ $session->param('firstname',C4::Context->config('user'));
+ $session->param('surname',C4::Context->config('user'));
+ $session->param('branch','NO_LIBRARY_SET');
+ $session->param('branchname','NO_LIBRARY_SET');
+ $session->param('flags',1);
+ $session->param('emailaddress', C4::Context->preference('KohaAdminEmailAddress'));
+ $session->param('ip',$session->remote_addr());
+ $session->param('lasttime',time());
+ }
+ C4::Context::set_userenv(
+ $session->param('number'), $session->param('id'),
+ $session->param('cardnumber'), $session->param('firstname'),
+ $session->param('surname'), $session->param('branch'),
+ $session->param('branchname'), $session->param('flags'),
+ $session->param('emailaddress'), $session->param('branchprinter')
+ );
+
+ # Grab borrower's shelves and public shelves and add them to the session
+ # $row_count determines how many records are returned from the db query
+ # and the number of lists to be displayed of each type in the 'Lists' button drop down
+ my $row_count = 10; # FIXME:This probably should be a syspref
+ my ($total, $totshelves, $barshelves, $pubshelves);
+ ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber);
+ $total->{'bartotal'} = $totshelves;
+ ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
+ $total->{'pubtotal'} = $totshelves;
+ $session->param('barshelves', $barshelves->[0]);
+ $session->param('pubshelves', $pubshelves->[0]);
+ $session->param('totshelves', $total);
+
+ C4::Context::set_shelves_userenv('bar',$barshelves->[0]);
+ C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
+ C4::Context::set_shelves_userenv('tot',$total);
+ }
+ else {
+ if ($userid) {
+ $info{'invalid_username_or_password'} = 1;
+ C4::Context->_unset_userenv($sessionID);
+ }
+ }
+ } # END if ( $userid = $query->param('userid') )
+ elsif ($type eq "opac") {
# if we are here this is an anonymous session; add public lists to it and a few other items...
# anonymous sessions are created only for the OPAC
- $debug and warn "Initiating an anonymous session...";
-
- # Grab the public shelves and add to the session...
- my $row_count = 20; # FIXME:This probably should be a syspref
- my ($total, $totshelves, $pubshelves);
- ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
- $total->{'pubtotal'} = $totshelves;
- $session->param('pubshelves', $pubshelves->[0]);
- $session->param('totshelves', $total);
- C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
- C4::Context::set_shelves_userenv('tot',$total);
-
- # setting a couple of other session vars...
- $session->param('ip',$session->remote_addr());
- $session->param('lasttime',time());
- $session->param('sessiontype','anon');
- }
- } # END unless ($userid)
+ $debug and warn "Initiating an anonymous session...";
+
+ # Grab the public shelves and add to the session...
+ my $row_count = 20; # FIXME:This probably should be a syspref
+ my ($total, $totshelves, $pubshelves);
+ ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
+ $total->{'pubtotal'} = $totshelves;
+ $session->param('pubshelves', $pubshelves->[0]);
+ $session->param('totshelves', $total);
+ C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
+ C4::Context::set_shelves_userenv('tot',$total);
+
+ # setting a couple of other session vars...
+ $session->param('ip',$session->remote_addr());
+ $session->param('lasttime',time());
+ $session->param('sessiontype','anon');
+ }
+ } # END unless ($userid)
my $insecure = C4::Context->boolean_preference('insecure');
# finished authentification, now respond
my $branches = GetBranches();
my @branch_loop;
for my $branch_hash (sort keys %$branches) {
- push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, };
+ push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, };
}
my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tmpl' : 'auth.tmpl';
TagsEnabled => C4::Context->preference("TagsEnabled"),
OPACUserCSS => C4::Context->preference("OPACUserCSS"),
intranetcolorstylesheet =>
- C4::Context->preference("intranetcolorstylesheet"),
+ C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),
intranetuserjs => C4::Context->preference("intranetuserjs"),
TemplateEncoding => C4::Context->preference("TemplateEncoding"),
IndependantBranches=> C4::Context->preference("IndependantBranches"),
AutoLocation => C4::Context->preference("AutoLocation"),
- wrongip => $info{'wrongip'}
+ wrongip => $info{'wrongip'}
);
$template->param( loginprompt => 1 ) unless $info{'nopermission'};
use LWP::Simple;
use LWP::UserAgent;
use HTTP::Request::Common;
+use C4::Koha;
use strict;
use warnings;
sub get_amazon_details {
my ( $isbn, $record, $marcflavour ) = @_;
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
-
- my $upc = _get_amazon_upc($record,$marcflavour);
- my $ean = _get_amazon_ean($record,$marcflavour);
+ # Normalize the fields
+ $isbn = GetNormalizedISBN($isbn);
+ my $upc = GetNormalizedUPC($record,$marcflavour);
+ my $ean = GetNormalizedEAN($record,$marcflavour);
# warn "ISBN: $isbn | UPC: $upc | EAN: $ean";
return $available;
}
-sub _get_amazon_upc {
- my ($record,$marcflavour) = @_;
- my (@fields,$upc);
-
- if ($marcflavour eq 'MARC21') {
- @fields = $record->field('024');
- foreach my $field (@fields) {
- my $indicator = $field->indicator(1);
- my $upc = _normalize_match_point($field->subfield('a'));
- if ($indicator == 1 and $upc ne '') {
- return $upc;
- }
- }
- }
- else { # assume unimarc if not marc21
- @fields = $record->field('072');
- foreach my $field (@fields) {
- my $upc = _normalize_match_point($field->subfield('a'));
- if ($upc ne '') {
- return $upc;
- }
- }
- }
-}
-
-sub _get_amazon_ean {
- my ($record,$marcflavour) = @_;
- my (@fields,$ean);
-
- if ($marcflavour eq 'MARC21') {
- @fields = $record->field('024');
- foreach my $field (@fields) {
- my $indicator = $field->indicator(1);
- my $upc = _normalize_match_point($field->subfield('a'));
- if ($indicator == 3 and $upc ne '') {
- return $upc;
- }
- }
- }
- else { # assume unimarc if not marc21
- @fields = $record->field('073');
- foreach my $field (@fields) {
- my $upc = _normalize_match_point($field->subfield('a'));
- if ($upc ne '') {
- return $upc;
- }
- }
- }
-}
-
-sub _normalize_match_point {
- my $match_point = shift;
- (my $normalized_match_point) = $match_point =~ /([\d-]*[X]*)/;
- $normalized_match_point =~ s/-//g;
-
- return $normalized_match_point;
-}
-
1;
__END__
=over 4
-my $syndetics_summary= &get_syndetics_summary( $xisbn );
+my $syndetics_summary= &get_syndetics_summary( $isbn );
=back
=cut
sub get_syndetics_index {
- my ( $isbn ) = @_;
-
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
+ my ( $isbn,$upc,$oclc ) = @_;
# grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
}
sub get_syndetics_summary {
- my ( $isbn ) = @_;
-
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
+ my ( $isbn,$upc,$oclc ) = @_;
# grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
}
sub get_syndetics_toc {
- my ( $isbn ) = @_;
-
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
+ my ( $isbn,$upc,$oclc ) = @_;
# grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
}
sub get_syndetics_excerpt {
- my ( $isbn ) = @_;
-
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
+ my ( $isbn,$upc,$oclc ) = @_;
# grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
}
sub get_syndetics_reviews {
- my ( $isbn, $syndetics_elements ) = @_;
-
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
+ my ( $isbn,$upc,$oclc,$syndetics_elements ) = @_;
# grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
}
sub get_syndetics_editions {
- my ( $isbn ) = @_;
-
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
+ my ( $isbn,$upc,$oclc ) = @_;
# grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
}
sub get_syndetics_anotes {
- my ( $isbn ) = @_;
-
- #normalize the ISBN
- $isbn = _normalize_match_point ($isbn);
+ my ( $isbn,$upc,$oclc) = @_;
# grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
return \@anotes;
}
-sub _normalize_match_point {
- my $match_point = shift;
- (my $normalized_match_point) = $match_point =~ /([\d-]*[X]*)/;
- $normalized_match_point =~ s/-//g;
-
- return $normalized_match_point;
-}
-
1;
__END__
&GetKohaAuthorisedValues
&GetAuthValCode
&GetManagedTagSubfields
+ &GetNormalizedUPC
+ &GetNormalizedISBN
+ &GetNormalizedEAN
+ &GetNormalizedOCLCNumber
$DEBUG
);
return $indicators;
}
+sub GetNormalizedUPC {
+ my ($record,$marcflavour) = @_;
+ my (@fields,$upc);
+
+ if ($marcflavour eq 'MARC21') {
+ @fields = $record->field('024');
+ foreach my $field (@fields) {
+ my $indicator = $field->indicator(1);
+ my $upc = _normalize_match_point($field->subfield('a'));
+ if ($indicator == 1 and $upc ne '') {
+ return $upc;
+ }
+ }
+ }
+ else { # assume unimarc if not marc21
+ @fields = $record->field('072');
+ foreach my $field (@fields) {
+ my $upc = _normalize_match_point($field->subfield('a'));
+ if ($upc ne '') {
+ return $upc;
+ }
+ }
+ }
+}
+
+# Normalizes and returns the first valid ISBN found in the record
+sub GetNormalizedISBN {
+ my ($isbn,$record,$marcflavour) = @_;
+ my @fields;
+ if ($isbn) {
+ return _isbn_cleanup($isbn);
+ }
+ return undef unless $record;
+
+ if ($marcflavour eq 'MARC21') {
+ @fields = $record->field('020');
+ foreach my $field (@fields) {
+ $isbn = $field->subfield('a');
+ if ($isbn) {
+ return _isbn_cleanup($isbn);
+ } else {
+ return undef;
+ }
+ }
+ }
+ else { # assume unimarc if not marc21
+ @fields = $record->field('010');
+ foreach my $field (@fields) {
+ my $isbn = $field->subfield('a');
+ if ($isbn) {
+ return _isbn_cleanup($isbn);
+ } else {
+ return undef;
+ }
+ }
+ }
+
+}
+
+sub GetNormalizedEAN {
+ my ($record,$marcflavour) = @_;
+ my (@fields,$ean);
+
+ if ($marcflavour eq 'MARC21') {
+ @fields = $record->field('024');
+ foreach my $field (@fields) {
+ my $indicator = $field->indicator(1);
+ $ean = _normalize_match_point($field->subfield('a'));
+ if ($indicator == 3 and $ean ne '') {
+ return $ean;
+ }
+ }
+ }
+ else { # assume unimarc if not marc21
+ @fields = $record->field('073');
+ foreach my $field (@fields) {
+ $ean = _normalize_match_point($field->subfield('a'));
+ if ($ean ne '') {
+ return $ean;
+ }
+ }
+ }
+}
+sub GetNormalizedOCLCNumber {
+ my ($record,$marcflavour) = @_;
+ my (@fields,$oclc);
+
+ if ($marcflavour eq 'MARC21') {
+ @fields = $record->field('035');
+ foreach my $field (@fields) {
+ $oclc = $field->subfield('a');
+ if ($oclc =~ /OCoLC/) {
+ $oclc =~ s/\(OCoLC\)//;
+ return $oclc;
+ } else {
+ return undef;
+ }
+ }
+ }
+ else { # TODO: add UNIMARC fields
+ }
+}
+
+sub _normalize_match_point {
+ my $match_point = shift;
+ (my $normalized_match_point) = $match_point =~ /([\d-]*[X]*)/;
+ $normalized_match_point =~ s/-//g;
+
+ return $normalized_match_point;
+}
+
+sub _isbn_cleanup ($) {
+ my $normalized_isbn = shift;
+ $normalized_isbn =~/([0-9]{1,})/;
+ $normalized_isbn = $1;
+ if (
+ $normalized_isbn =~ /\b(\d{13})\b/ or
+ $normalized_isbn =~ /\b(\d{10})\b/ or
+ $normalized_isbn =~ /\b(\d{9}X)\b/i
+ ) {
+ return $1;
+ }
+ return undef;
+}
+
1;
__END__
$times = $hits; # FIXME: if $hits is undefined, why do we want to equal it?
}
+ my $marcflavour = C4::Context->preference("marcflavour");
# loop through all of the records we've retrieved
for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) {
my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] );
$oldbiblio->{imageurl} = getitemtypeimagelocation( 'opac', $itemtypes{ $oldbiblio->{itemtype} }->{imageurl} );
$oldbiblio->{'authorised_value_images'} = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $oldbiblio->{'biblionumber'}, $marcrecord ) );
- (my $aisbn) = $oldbiblio->{isbn} =~ /([\d-]*[X]*)/;
- $aisbn =~ s/-//g;
- $oldbiblio->{amazonisbn} = $aisbn;
+ $oldbiblio->{normalized_upc} = GetNormalizedUPC($marcrecord,$marcflavour);
+ $oldbiblio->{normalized_ean} = GetNormalizedEAN($marcrecord,$marcflavour);
+ $oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour);
+ $oldbiblio->{normalized_isbn} = GetNormalizedISBN(undef,$marcrecord,$marcflavour);
$oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{description};
# Build summary if there is one (the summary is defined in the itemtypes table)
# FIXME: is this used anywhere, I think it can be commented out? -- JF
$oldbiblio->{damagedcount} = $itemdamaged_count;
$oldbiblio->{intransitcount} = $item_in_transit_count;
$oldbiblio->{orderedcount} = $ordered_count;
- $oldbiblio->{isbn} =~
- s/-//g; # deleting - in isbn to enable amazon content
push( @newresults, $oldbiblio );
}
return @newresults;
#use LWP::Simple;
use C4::Biblio;
use C4::Items;
+use C4::Koha;
use C4::External::Syndetics qw(get_syndetics_editions);
use LWP::UserAgent;
use HTTP::Request::Common;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
&get_xisbns
- &get_biblio_from_xisbn
&get_biblionumber_from_isbn
);
}
sub get_biblionumber_from_isbn {
my $isbn = shift;
- if ($isbn =~ /(\d{9,}[X]*)/) {
- $isbn = $1.'%';
- }
+ $isbn.='%';
my @biblionumbers;
my $dbh=C4::Context->dbh;
my $query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ? LIMIT 10";
=cut
-sub get_biblio_from_xisbn {
+sub _get_biblio_from_xisbn {
my $xisbn = shift;
- $xisbn .='%' if ($xisbn =~ /(\d{9,}[X]*)/);
+ $xisbn.='%';
my $dbh = C4::Context->dbh;
my $query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ?";
my $sth = $dbh->prepare($query);
my $xbiblio;
if ($xbib_data->{biblionumber}) {
$xbiblio = GetBiblioData($xbib_data->{biblionumber});
- $xbiblio->{isbn} =~ /(\d{9,}[X]*)/;
- $xbiblio->{amazonisbn} = $1;
+ $xbiblio->{normalized_isbn} = GetNormalizedISBN($xbiblio->{isbn});
$xbiblio->{items} = GetItemsByBiblioitemnumber($xbib_data->{biblionumber});
}
return ($xbiblio);
sub get_xisbns {
my ( $isbn ) = @_;
my ($response,$thing_response,$xisbn_response,$gapines_response,$syndetics_response);
- $isbn =~ /(\d{9,}[X]*)/;
- $isbn = $1;
# THINGISBN
if ( C4::Context->preference('ThingISBN') ) {
my $url = "http://www.librarything.com/api/thingISBN/".$isbn;
next if $isbn eq $response_data;
next if $unique_xisbns->{ $response_data->{content} };
$unique_xisbns->{ $response_data->{content} }++;
- my $xbiblio= get_biblio_from_xisbn($response_data->{content});
- push @xisbns, $xbiblio if $xbiblio; #response_data->{xbiblio}; #->{biblionumber}; # if $xbiblionumber;
+ my $xbiblio= _get_biblio_from_xisbn($response_data->{content});
+ push @xisbns, $xbiblio if $xbiblio;
}
return \@xisbns;
}
$tabsysprefs{AdvancedSearchTypes} = "Searching";
# EnhancedContent
-$tabsysprefs{AmazonContent} = "EnhancedContent";
+$tabsysprefs{AmazonEnabled} = "EnhancedContent";
+$tabsysprefs{OPACAmazonEnabled} = "EnhancedContent";
+$tabsysprefs{AmazonCoverImages} = "EnhancedContent";
+$tabsysprefs{OPACAmazonCoverImages} = "EnhancedContent";
$tabsysprefs{AWSAccessKeyID} = "EnhancedContent";
$tabsysprefs{AmazonLocale} = "EnhancedContent";
$tabsysprefs{AmazonAssocTag} = "EnhancedContent";
$tabsysprefs{AmazonSimilarItems} = "EnhancedContent";
-$tabsysprefs{OPACAmazonContent} = "EnhancedContent";
$tabsysprefs{OPACAmazonSimilarItems} = "EnhancedContent";
# Baker & Taylor
$tabsysprefs{SyndeticsAuthorNotes} = 'EnhancedContent';
$tabsysprefs{SyndeticsAwards} = 'EnhancedContent';
$tabsysprefs{SyndeticsSeries} = 'EnhancedContent';
+$tabsysprefs{SyndeticsCoverImageSize} = 'EnhancedContent';
# FRBR
use C4::Reserves;
use C4::Members;
use C4::Serials;
-use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn get_biblio_from_xisbn);
+use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
use C4::External::Amazon;
# use Smart::Comments;
my $marcflavour = C4::Context->preference("marcflavour");
my $record = GetMarcBiblio($biblionumber);
+# some useful variables for enhanced content;
+# in each case, we're grabbing the first value we find in
+# the record and normalizing it
+my $upc = GetNormalizedUPC($record,$marcflavour);
+my $ean = GetNormalizedEAN($record,$marcflavour);
+my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
+my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+
+$template->param(
+ normalized_upc => $upc,
+ normalized_ean => $ean,
+ normalized_oclc => $oclc,
+ normalized_isbn => $isbn,
+);
+
unless (defined($record)) {
print $query->redirect("/cgi-bin/koha/errors/404.pl");
exit;
# $debug and $template->param(debug_display => 1);
# XISBN Stuff
-my $xisbn=$dat->{'isbn'};
-$xisbn =~ /(\d*[X]*)/ if ( $xisbn );
-$template->param(amazonisbn => $1); # FIXME: so it is OK if the ISBN = 'XXXXX' ?
if (C4::Context->preference("FRBRizeEditions")==1) {
eval {
$template->param(
- xisbn => $xisbn,
- XISBNS => get_xisbns($xisbn)
+ XISBNS => get_xisbns($isbn)
);
};
if ($@) { warn "XISBN Failed $@"; }
}
-if ( C4::Context->preference("AmazonContent") == 1 ) {
+if ( C4::Context->preference("AmazonEnabled") == 1 ) {
my $similar_products_exist;
- my $amazon_details = &get_amazon_details( $xisbn, $record, $marcflavour );
+ my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour );
my $item_attributes = \%{$amazon_details->{Items}->{Item}->{ItemAttributes}};
my $customer_reviews = \@{$amazon_details->{Items}->{Item}->{CustomerReviews}->{Review}};
my @similar_products;
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('acquisitions','normal','Choose Normal, budget-based acquisitions, or Simple bibliographic-data acquisitions','simple|normal','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor',0,'If ON, the MARC editor won\'t display field/subfield descriptions','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonContent',0,'Turn ON Amazon Content - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonEnabled',0,'Turn ON Amazon Content - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonSimilarItems',0,'Turn ON Amazon Similar Items feature - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonContent',0,'Turn ON Amazon Content in the OPAC - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonEnabled',0,'Turn ON Amazon Content in the OPAC - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonSimilarItems',0,'Turn ON Amazon Similar Items feature - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web Services','US|CA|DE|FR|JP|UK','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'UseBranchTransferLimits', '0', '', 'If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowHoldPolicyOverride', '0', 'Allow staff to override hold policies when placing holds',NULL,'YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'BranchTransferLimitsType', 'ccode', 'itemtype|ccode', 'When using branch transfer limits, choose whether to limit by itemtype or collection code.', 'Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsClientCode', '0', 'Client Code for using Syndetics Solutions content','','free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEnabled', '0', 'Turn on Syndetics Enhanced Content','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImages', '0', 'Display Cover Images from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsTOC', '0', 'Display Table of Content information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSummary', '0', 'Display Summary Information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEditions', '0', 'Display Editions from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsExcerpt', '0', 'Display Excerpts and first chapters on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsReviews', '0', 'Display Reviews on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAuthorNotes', '0', 'Display Notes about the Author on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAwards', '0', 'Display Awards on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo');
set NAMES 'utf8';
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor', '0', 'Si ce paramètre est mis à 1, l''éditeur MARC n''affichera pas les libellés des champs/sous-champs, seulement leur code. Devrait être à 0 dans la plupart des cas.', '', '');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonContent', '0', 'Ce paramètre active la récupération des images de couverture sur Amazon. Vous DEVEZ positionner AmazonDevKey AmazonAssocTag si vous activez cette option', '', 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonEnabled', '0', 'Ce paramètre active la récupération des images de couverture sur Amazon. Vous DEVEZ positionner AmazonDevKey AmazonAssocTag si vous activez cette option', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonSimilarItems','0','Active ou non les fonctions Amazon ''les lecteurs ayant acheté...'' - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonContent','0','Active ou non l''affichage du contenu Amazon à l''OPAC. - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonEnabled','0','Active ou non l''affichage du contenu Amazon à l''OPAC. - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonSimilarItems','0','Active ou non les fonctions Amazon ''Les lecteurs ayant acheté...'' - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web Services','US|CA|DE|FR|JP|UK','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'UseBranchTransferLimits', '0', '', 'If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowHoldPolicyOverride', '0', "Autorise le personnel á outrepasser la politique de réservation au moment d'une réservation",NULL,'YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ('BranchTransferLimitsType', 'ccode', 'itemtype|ccode', 'When using branch transfer limits, choose whether to limit by itemtype or collection code.', 'Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsClientCode', '0', 'Client Code for using Syndetics Solutions content','','free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEnabled', '0', 'Turn on Syndetics Enhanced Content','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImages', '0', 'Display Cover Images from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsTOC', '0', 'Display Table of Content information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSummary', '0', 'Display Summary Information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEditions', '0', 'Display Editions from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsExcerpt', '0', 'Display Excerpts and first chapters on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsReviews', '0', 'Display Reviews on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAuthorNotes', '0', 'Display Notes about the Author on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAwards', '0', 'Display Awards on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo');
print "Upgrade to $DBversion done (data for Email Checkout Slips project)\n";
SetVersion ($DBversion);
- }
- $DBversion = '3.01.00.013';
- if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+}
+
+$DBversion = "3.01.00.014";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE `branch_transfer_limits` CHANGE `itemtype` `itemtype` VARCHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL");
+ $dbh->do("ALTER TABLE `branch_transfer_limits` ADD `ccode` VARCHAR( 10 ) NULL ;");
+ $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` )
+ VALUES (
+ 'BranchTransferLimitsType', 'ccode', 'itemtype|ccode', 'When using branch transfer limits, choose whether to limit by itemtype or collection code.', 'Choice'
+ );");
+
+ print "Upgrade to $DBversion done ( Updated table for Branch Transfer Limits)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = '3.01.00.015';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsClientCode', '0', 'Client Code for using Syndetics Solutions content','','free')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEnabled', '0', 'Turn on Syndetics Enhanced Content','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEnabled', '0', 'Turn on Syndetics Enhanced Content','','YesNo')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImages', '0', 'Display Cover Images from Syndetics','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImages', '0', 'Display Cover Images from Syndetics','','YesNo')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsTOC', '0', 'Display Table of Content information from Syndetics','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsTOC', '0', 'Display Table of Content information from Syndetics','','YesNo')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSummary', '0', 'Display Summary Information from Syndetics','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSummary', '0', 'Display Summary Information from Syndetics','','YesNo')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEditions', '0', 'Display Editions from Syndetics','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEditions', '0', 'Display Editions from Syndetics','','YesNo')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsExcerpt', '0', 'Display Excerpts and first chapters on OPAC from Syndetics','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsExcerpt', '0', 'Display Excerpts and first chapters on OPAC from Syndetics','','YesNo')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsReviews', '0', 'Display Reviews on OPAC from Syndetics','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsReviews', '0', 'Display Reviews on OPAC from Syndetics','','YesNo')");
- $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAuthorNotes', '0', 'Display Notes about the Author on OPAC from Syndetics','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAuthorNotes', '0', 'Display Notes about the Author on OPAC from Syndetics','','YesNo')");
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAwards', '0', 'Display Awards on OPAC from Syndetics','','YesNo')");
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo')");
- print "Upgrade to $DBversion done (added Syndetics Enhanced Content system preferences)\n";
- SetVersion ($DBversion);
-}
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice')");
-$DBversion = "3.01.00.014";
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
- $dbh->do("ALTER TABLE `branch_transfer_limits` CHANGE `itemtype` `itemtype` VARCHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL");
- $dbh->do("ALTER TABLE `branch_transfer_limits` ADD `ccode` VARCHAR( 10 ) NULL ;");
- $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` )
- VALUES (
- 'BranchTransferLimitsType', 'ccode', 'itemtype|ccode', 'When using branch transfer limits, choose whether to limit by itemtype or collection code.', 'Choice'
- );");
-
- print "Upgrade to $DBversion done ( Updated table for Branch Transfer Limits)\n";
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo')");
+
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo')");
+
+ $dbh->do("UPDATE systempreferences SET variable='AmazonEnabled' WHERE variable = 'AmazonContent'");
+
+ $dbh->do("UPDATE systempreferences SET variable='OPACAmazonEnabled' WHERE variable = 'OPACAmazonContent'");
+
+ print "Upgrade to $DBversion done (added Syndetics Enhanced Content system preferences)\n";
SetVersion ($DBversion);
}
-
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
$(document).ready(function() {
$('#bibliodetails > ul').tabs();
});
- <!-- TMPL_IF NAME="AmazonContent" -->$(window).load(function() {
+ <!-- TMPL_IF NAME="AmazonEnabled" -->$(window).load(function() {
verify_images();
});<!-- /TMPL_IF -->
//]]>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="cat-toolbar.inc" -->
- <!-- TMPL_IF NAME="AmazonContent" --><div class="yui-gb"><!-- TMPL_ELSE --><div class="yui-g"><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="AmazonEnabled" --><div class="yui-gb"><!-- TMPL_ELSE --><div class="yui-g"><!-- /TMPL_IF -->
<div id="catalogue_detail_biblio" class="yui-u first">
<h3><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" --></h3>
</ul>
</div>
-<!-- TMPL_IF NAME="AmazonContent" --><div class="yui-u" id="bookcoverimg">
- <a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="" /></a></div><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="AmazonEnabled" --><!-- TMPL_IF NAME="AmazonCoverImages" --><div class="yui-u" id="bookcoverimg">
+ <a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="" /></a></div><!-- /TMPL_IF --><!-- /TMPL_IF -->
<div class="yui-u" style="margin-top: 1em;">
<ul>
- <!-- TMPL_IF name="isbn" -->
- <li><strong>ISBN:</strong> <!-- TMPL_VAR NAME="isbn" --></li>
+ <!-- TMPL_IF name="normalized_isbn" -->
+ <li><strong>ISBN:</strong> <!-- TMPL_VAR NAME="normalized_isbn" --></li>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="issn" -->
<li><strong>ISSN:</strong><!-- TMPL_VAR NAME="issn" --></li>
<div id="description">
<div class="content_set">
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="AmazonEnabled" -->
<!-- TMPL_LOOP NAME="AMAZON_EDITORIAL_REVIEWS" -->
<!-- TMPL_IF NAME="Content" -->
<h4>From <!-- TMPL_VAR NAME="Source" -->:</h4>
<!-- TMPL_IF NAME="FRBRizeEditions" --><!-- TMPL_IF NAME="XISBNS" -->
<div id="editions"><h2>Editions</h2>
<table>
-<!-- TMPL_LOOP NAME="XISBNS" --><tr><!-- TMPL_IF NAME="AmazonContent" --><td><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn" -->.01._AA75_PU_PU-5_.jpg" /></a></td><!-- /TMPL_IF --><td><!-- TMPL_IF NAME="noItemTypeImages" --><!-- TMPL_VAR NAME="description" --><!-- TMPL_ELSE --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!-- TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->"><!-- /TMPL_IF --></td><td>
+<!-- TMPL_LOOP NAME="XISBNS" --><tr><!-- TMPL_IF NAME="AmazonEnabled" --><td><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._AA75_PU_PU-5_.jpg" /></a></td><!-- /TMPL_IF --><td><!-- TMPL_IF NAME="noItemTypeImages" --><!-- TMPL_VAR NAME="description" --><!-- TMPL_ELSE --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!-- TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->"><!-- /TMPL_IF --></td><td>
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> by <!-- TMPL_VAR NAME="author" --> ©<!-- TMPL_VAR NAME="copyrightdate" -->
<!-- TMPL_IF name="publishercode" -->
<!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_IF name="place" -->(<!-- TMPL_VAR NAME="place"-->)<!--/TMPL_IF--> <!-- TMPL_IF NAME="publicationyear" -->, <!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="editionstatement" --><!-- TMPL_VAR NAME="editionstatement" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="editionresponsability" --><!-- TMPL_VAR NAME="editionresponsability" --><!-- /TMPL_IF -->
</table></div><!-- /TMPL_IF -->
<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="AmazonSimilarItems" -->
+<!-- TMPL_IF NAME="AmazonEnabled" --><!-- TMPL_IF NAME="AmazonSimilarItems" -->
<div id="related">
<h4>Similar Items</h4>
<ul>
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha › Catalog › <!-- TMPL_IF NAME="searchdesc" -->Results of Search <!-- TMPL_IF NAME="query_desc" -->for '<!-- TMPL_VAR NAME="query_desc" -->'<!-- /TMPL_IF --><!-- TMPL_IF NAME="limit_desc" --> with limit(s): '<!-- TMPL_VAR NAME="limit_desc" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->You did not specify any search criteria<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_IF NAME="AmazonContent" --><script type="text/javascript">
+<!-- TMPL_IF NAME="AmazonEnabled" --><script type="text/javascript">
//<![CDATA[
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
function verify_images() {
<table>
<tr>
- <!-- TMPL_IF NAME="AmazonContent" --><th> </th><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="AmazonEnabled" --><th> </th><!-- /TMPL_IF -->
<th>Results</th>
<th>Location</th>
</tr>
<!-- Actual Search Results -->
<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
<!-- TMPL_IF NAME="__odd__" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="AmazonContent" -->
+ <!-- TMPL_IF NAME="AmazonEnabled" -->
<td>
<a class="p1" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
- <img src="<!-- TMPL_IF NAME="isbn" -->http://images.amazon.com/images/P/<!-- TMPL_VAR name="amazonisbn" -->.01.TZZZZZZZ.jpg<!-- TMPL_ELSE -->http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif<!-- /TMPL_IF -->" alt="image" class="thumbnail" />
+ <!-- TMPL_IF NAME="AmazonCoverImages" -->
+ <img src="<!-- TMPL_IF NAME="normalized_isbn" -->http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.TZZZZZZZ.jpg<!-- TMPL_ELSE -->http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif<!-- /TMPL_IF -->" alt="image" class="thumbnail" /> <!-- /TMPL_IF -->
</a></td>
<!-- /TMPL_IF -->
<td>
<!-- TMPL_IF name="publicationyear" -->, <!-- TMPL_VAR name="publicationyear" -->
<!-- TMPL_ELSIF name="copyrightdate"-->, <!-- TMPL_VAR name="copyrightdate" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="pages" -->: <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
- <!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="isbn" -->ISBN: <!-- TMPL_VAR NAME="isbn" --><!-- /TMPL_IF -->
+ <!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="normalized_isbn" -->ISBN: <!-- TMPL_VAR NAME="normalized_isbn" --><!-- /TMPL_IF -->
<!-- TMPL_VAR name="description" -->
<!-- TMPL_IF name="timestamp" --> <i>(modified on <!-- TMPL_VAR name="timestamp" -->)</i><!-- /TMPL_IF -->
<!-- TMPL_IF name="cn_class" -->[<a href="/cgi-bin/koha/catalogue/search.pl?q=callnum:<!-- TMPL_VAR NAME="cn_class" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="cn_class" --></a>]<!-- /TMPL_IF -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.hoverIntent.minified.js"></script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.dropshadow-min.js"></script>
<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/script.js"></script>
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" -->
<script type="text/javascript" language="javascript">//<![CDATA[
var NO_AMAZON_IMAGE = _("No cover image available");
//]]>
var MSG_NO_RECORD_ADDED = _("No item was added to your cart");
var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");<!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="AmazonContent" -->$(window).load(function() {
+ <!-- TMPL_IF NAME="OPACAmazonCoverImages" -->$(window).load(function() {
verify_images();
});<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="SyndeticsCoverImages" -->$(window).load(function() {
<a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#opac-isbd-subscriptions">Subscriptions</a>
</li><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="reviewson" --><li><a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#comments">Comments</a></li><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="AmazonContent" --><li><a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#opac-isbd-amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="OPACAmazonEnabled" --><li><a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#opac-isbd-amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
</ul>
<div id="opac-isbd-subscriptions"> <!-- TMPL_IF name="subscriptionsnumber" -->
<!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="AmazonContent" -->
+ <!-- TMPL_IF NAME="OPACAmazonEnabled" -->
<!-- Amazon Reviews -->
<div id="opac-isbd-amazonreviews">
<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
- <!-- TMPL_IF NAME="isbn" -->
- <h4><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="isbn" -->&store=books">Add your own review</a></h4>
+ <!-- TMPL_IF NAME="normalized_isbn" -->
+ <h4><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&store=books">Add your own review</a></h4>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP --><br/>
<div id="catalogue_detail_biblio">
<div id="bookcover">
- <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->/MC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
-
- <!-- TMPL_IF NAME="GoogleJackets" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR NAME="amazonisbn" -->" id="gbs-thumbnail"></div><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" target="_blank"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/<!-- TMPL_VAR NAME="SyndeticsCoverImageSize" -->.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" class="thumbnail" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="GoogleJackets" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR NAME="normalized_isbn" -->" id="gbs-thumbnail"></div><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" target="_blank"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
</div>
<!-- TMPL_IF NAME="XSLTDetailsDisplay" -->
<!-- TMPL_IF NAME="pages" --><span class="results_summary"><span class="label">Physical details:</span> <!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></span><!-- /TMPL_IF -->
<!-- COinS / OpenURL -->
<!-- TMPL_IF NAME="ocoins_format" -->
- <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A<!-- TMPL_VAR NAME="ocoins_format" -->&rft.au=<!-- TMPL_VAR NAME="author" -->&rft.btitle=<!-- TMPL_VAR NAME="title" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&rft.pages=<!-- TMPL_VAR NAME="pages" -->&rft.isbn=<!-- TMPL_VAR NAME=amazonisbn -->&rft.aucorp=&rft.place=<!-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publishercode" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!-- TMPL_VAR NAME="series" -->&rft.genre="></span><!-- /TMPL_IF -->
- <!-- TMPL_IF name="isbn" -->
+ <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A<!-- TMPL_VAR NAME="ocoins_format" -->&rft.au=<!-- TMPL_VAR NAME="author" -->&rft.btitle=<!-- TMPL_VAR NAME="title" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&rft.pages=<!-- TMPL_VAR NAME="pages" -->&rft.isbn=<!-- TMPL_VAR NAME=normalized_isbn -->&rft.aucorp=&rft.place=<!-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publishercode" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!-- TMPL_VAR NAME="series" -->&rft.genre="></span><!-- /TMPL_IF -->
+ <!-- TMPL_IF name="normalized_isbn" -->
<!-- unAPI <abbr/> tag -->
- <span class="results_summary"><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:<!-- TMPL_VAR NAME="isbn" -->"><!-- TMPL_VAR NAME="isbn" --></abbr></span><!-- /TMPL_IF -->
+ <span class="results_summary"><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:<!-- TMPL_VAR NAME="normalized_isbn" -->"><!-- TMPL_VAR NAME="normalized_isbn" --></abbr></span><!-- /TMPL_IF -->
<!-- TMPL_IF name="issn" -->
<span class="results_summary"><span class="label">ISSN:</span><!-- TMPL_VAR NAME="issn" --></span>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsSeries" --><!-- TMPL_IF NAME="SyndeticsSERIES1Exists" -->
<span class="results_summary">
- <span class="label">Series Information:</span> <a target="_blank" href="http://syndetics.com/ffseries.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->&type=series&num=1&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->">Click to open in new window</a>
+ <span class="label">Series Information:</span> <a target="_blank" href="http://syndetics.com/ffseries.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->&type=series&num=1&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->">Click to open in new window</a>
</span>
<!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="SyndeticsAwards" --><!-- TMPL_IF NAME="SyndeticsAWARDS1Exists" -->
<span class="results_summary">
- <span class="label">Awards:</span> <a target="_blank" href="http://syndetics.com/ffawards.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->&type=awards&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->">Click to open in new window</a>
+ <span class="label">Awards:</span> <a target="_blank" href="http://syndetics.com/ffawards.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->&type=awards&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->">Click to open in new window</a>
</span>
<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="OPACFRBRizeEditions" --><!-- TMPL_IF NAME="XISBNS" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#editions">Editions</a></li><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="AmazonContent" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="OPACAmazonEnabled" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
</ul>
<!-- TMPL_LOOP NAME="PREVIOUS_SHELF_BROWSE" -->
<td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&shelfbrowse_itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#shelfbrowser">
- <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="isbn" -->
- <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="isbn" -->
- <img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+ <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="browser_normalized_isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="browser_normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="browser_normalized_upc" -->&upc=<!-- TMPL_VAR NAME="browser_normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="browser_normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="browser_normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="browser_normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="browser_normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+ <img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="browser_normalized_isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
</a></td>
<!-- /TMPL_LOOP -->
<!-- TMPL_LOOP NAME="NEXT_SHELF_BROWSE" -->
<td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&shelfbrowse_itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#shelfbrowser">
- <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="isbn" -->
- <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="isbn" -->
- <img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+ <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="browser_normalized_isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="browser_normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="browser_normalized_upc" -->&upc=<!-- TMPL_VAR NAME="browser_normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="browser_normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="browser_normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="browser_normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="browser_normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+ <img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="browser_normalized_isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
</a></td>
<!-- /TMPL_LOOP -->
<div id="descriptions">
<div class="content_set">
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" -->
<!-- TMPL_LOOP NAME="AMAZON_EDITORIAL_REVIEWS" -->
<!-- TMPL_IF NAME="Content" -->
<h4>From <!-- TMPL_VAR NAME="Source" -->:</h4>
- <p><!-- TMPL_VAR NAME="Content" --></p>
+ <div><!-- TMPL_VAR NAME="Content" --></div>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF-->
<!-- TMPL_IF NAME="SyndeticsSummary" --><!-- TMPL_IF NAME="SyndeticsSUMMARYExists" -->
<!-- TMPL_LOOP NAME="SYNDETICS_SUMMARY" -->
<!-- TMPL_IF NAME="a" -->
- <h4>Enhanced Description:</h4>
+ <h4>Enhanced Descriptions from Syndetics:</h4>
<p><!-- TMPL_VAR NAME="a" --></p>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF -->
</div>
</div>
+
<!-- TMPL_IF NAME="SyndeticsEnabled" -->
+
+<!-- TMPL_IF NAME="SyndeticsTOC" --><!-- TMPL_IF NAME="SYNDETICS_TOC" -->
<div id="toc">
<div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsTOC" --><!-- TMPL_IF NAME="SYNDETICS_TOC" -->
+<h3>Table of Contents provided by Syndetics</h3>
<ul>
<!-- TMPL_LOOP NAME="SYNDETICS_TOC" -->
<!-- TMPL_IF NAME="p" -->
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</ul>
-<!-- /TMPL_IF --><!-- /TMPL_IF -->
</div>
</div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsExcerpt" --><!-- TMPL_IF NAME="SYNDETICS_EXCERPT" -->
<div id="excerpt">
<div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsExcerpt" -->
+<h3>Excerpt provided by Syndetics</h3>
<!-- TMPL_VAR NAME="SYNDETICS_EXCERPT" -->
-<!-- /TMPL_IF -->
</div>
</div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsReviews" --><!-- TMPL_IF NAME="SYNDETICS_REVIEWS" -->
<div id="reviews">
<div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsReviews" --><!-- TMPL_IF NAME="SYNDETICS_REVIEWS" -->
+<h3>Reviews provided by Syndetics</h3>
<!-- TMPL_LOOP NAME="SYNDETICS_REVIEWS" -->
<!-- TMPL_IF NAME="title" -->
<h4><!-- TMPL_VAR NAME="title" --></h4>
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
-<!-- /TMPL_IF --><!-- /TMPL_IF -->
</div>
</div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsAuthorNotes" --><!-- TMPL_IF NAME="SYNDETICS_ANOTES" -->
<div id="anotes">
<div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsAuthorNotes" --><!-- TMPL_IF NAME="SYNDETICS_ANOTES" -->
+<h3>Author Notes provided by Syndetics</h3>
<!-- TMPL_LOOP NAME="SYNDETICS_ANOTES" -->
<!-- TMPL_IF NAME="content" -->
<!-- TMPL_VAR NAME="content" -->
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
-<!-- /TMPL_IF --><!-- /TMPL_IF -->
</div>
</div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- /TMPL_IF --> <!-- /SyndeticsEnabled -->
-<!-- /TMPL_IF -->
<!-- TMPL_IF name="subscriptionsnumber" -->
<div id="subscriptions">
<h2>This is a serial subscription</h2>
<!-- TMPL_LOOP NAME="XISBNS" -->
<tr>
<td>
-<!-- TMPL_IF NAME="AmazonContent" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" class="thumbnail" />
-<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" class="thumbnail" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
</td>
<td><!-- TMPL_VAR NAME="description" --></td><td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a><!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR NAME="author" ESCAPE="HTML" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="copyrightdate" --> ©<!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->
<!-- /TMPL_LOOP -->
</table>
</div><!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" -->
<!-- Amazon Reviews -->
<div id="amazonreviews">
<!-- TMPL_IF NAME="amazon_average_rating" -->
- <div class="clearfix"><h3 style="float: left;">Average Rating (from Amazon.com): </h3><span class="starMT" style="float: left;"><span class="starFull" style="float: left; width:<!-- TMPL_VAR EXPR="amazon_average_rating / 2" -->px"></span></span> <!-- TMPL_IF NAME="isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="amazonisbn" -->&store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="amazonisbn" -->&store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></div>
+ <div class="clearfix"><h3 style="float: left;">Average Rating (from Amazon.com): </h3><span class="starMT" style="float: left;"><span class="starFull" style="float: left; width:<!-- TMPL_VAR EXPR="amazon_average_rating / 2" -->px"></span></span> <!-- TMPL_IF NAME="normalized_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></div>
<!-- TMPL_LOOP NAME="AMAZON_CUSTOMER_REVIEWS" -->
<div class="content_set">
<!-- /TMPL_LOOP -->
<!-- TMPL_ELSE -->
- <p> Sorry, there are no reviews available for this title. <!-- TMPL_IF NAME="isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="amazonisbn" -->&store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="amazonisbn" -->&store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></p>
+ <p> Sorry, there are no reviews available for this title. <!-- TMPL_IF NAME="normalized_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></p>
<!-- /TMPL_IF -->
</div>
</a></li><!-- /TMPL_IF -->
</ul>
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="OPACAmazonSimilarItems" --><!-- TMPL_IF NAME="AMAZON_SIMILAR_PRODUCTS" -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonSimilarItems" --><!-- TMPL_IF NAME="AMAZON_SIMILAR_PRODUCTS" -->
<div id="similars">
<h4>Similar Items</h4>
<ul>
<!-- TMPL_LOOP NAME="AMAZON_SIMILAR_PRODUCTS" -->
<!-- TMPL_LOOP NAME="similar_biblionumbers" -->
-<li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><img alt="" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="ASIN"-->.01._SS50_.jpg" /></a> <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="HTML" --></a> </li>
+<li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" --><img alt="" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="ASIN"-->.01._SS50_.jpg" /><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="ASIN"-->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="HTML" --></a>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
</ul>
<!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="AmazonContent" --><td><!-- TMPL_IF NAME="amazonisbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="amazonisbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><td><!-- TMPL_IF NAME="normalized_isbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="GoogleJackets" --><td><!-- TMPL_IF NAME="amazonisbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="GoogleJackets" --><td><!-- TMPL_IF NAME="normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="BakerTaylorEnabled" --><td><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="BakerTaylorEnabled" --><td><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="SyndeticsCoverImages" --><td><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt=""/></td><!-- /TMPL_IF -->
<td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
<span class="item-details">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
- <td><!-- TMPL_IF NAME="AmazonContent" -->
+ <td><!-- TMPL_IF NAME="OPACAmazonEnabled" -->
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_IF NAME="isbn" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /><!-- TMPL_ELSE --><img src="http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" /><!-- /TMPL_IF -->
</a>
<!-- TMPL_ELSE -->
<!-- TMPL_IF name="size" --> <!-- TMPL_VAR name="size" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="timestamp" --> <i>(modified on <!-- TMPL_VAR name="timestamp" -->)</i><!-- /TMPL_IF -->
</span>
- <!-- TMPL_IF NAME="copyrightdate" --><span class="results_summary"><span class="label">Date:</span><!-- TMPL_VAR NAME="copyrightdate" --></span><!-- COinS / OpenURL --><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=<!-- TMPL_VAR NAME="author_nospan" -->&rft.btitle=<!-- TMPL_VAR NAME="title_nospan" ESCAPE="url" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&rft.tpages=<!-- TMPL_VAR NAME="size" -->&rft.isbn=<!-- TMPL_VAR NAME="isbn" ESCAPE="url" -->&rft.aucorp=&rft.place=<!-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publisher" ESCAPE="url" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!-- TMPL_VAR NAME="series" -->&rft.genre="></span><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="copyrightdate" --><span class="results_summary"><span class="label">Date:</span><!-- TMPL_VAR NAME="copyrightdate" --></span><!-- COinS / OpenURL --><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=<!-- TMPL_VAR NAME="author_nospan" -->&rft.btitle=<!-- TMPL_VAR NAME="title_nospan" ESCAPE="url" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&rft.tpages=<!-- TMPL_VAR NAME="size" -->&rft.isbn=<!-- TMPL_VAR NAME="normalized_isbn" ESCAPE="url" -->&rft.aucorp=&rft.place=<!-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publisher" ESCAPE="url" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!-- TMPL_VAR NAME="series" -->&rft.genre="></span><!-- /TMPL_IF -->
<span class="results_summary">
<span class="label">Availability:</span>
</span>
</td><td>
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
- <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="normalized_isbn" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10<!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="amazonisbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
</a>
- <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR name="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR name="clean_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR name="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR name="clean_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR name="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR name="normalized_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR name="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR name="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
</td>
</tr>
<!-- /TMPL_LOOP -->
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog › Library Home for
<!-- TMPL_LOOP name="BORROWER_INFO" -->
- <!-- TMPL_VAR name="firstname" --><!-- TMPL_VAR name="surname" -->
+ <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" -->
<!-- /TMPL_LOOP -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<!-- TMPL_IF NAME="JacketImages" --><td class="jacketcell">
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="amazonisbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="amazonisbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="amazonisbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="normalized_isbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- BakerTaylor needs clean_isbn! --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_isbn! --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" class="thumbnail"/><!-- /TMPL_IF -->
</td><!-- /TMPL_IF -->
<tr>
<!-- TMPL_IF NAME="JacketImages" --><td class="jacketcell">
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="amazonisbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="amazonisbn" -->.01.THUMBZZZ.jpg" alt="" class="thumbnail" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.THUMBZZZ.jpg" alt="" class="thumbnail" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="normalized_isbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="amazonisbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><!-- BakerTaylor needs normalized_isbn! --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" class="thumbnail"/><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker & Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><!-- BakerTaylor needs clean_isbn! --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
</td><!-- /TMPL_IF -->
+
<td><a href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> <span class="item-details"><!-- TMPL_VAR NAME="author" --></span></td>
<!-- TMPL_UNLESS NAME="item-level_itypes" --><td><!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- TMPL_VAR name="description" -->" alt="<!-- TMPL_VAR NAME="description" -->" /><!-- /TMPL_IF --> <!-- TMPL_VAR name="description" --></td><!-- /TMPL_UNLESS -->
use C4::Acquisition;
use C4::Review;
use C4::Serials; # uses getsubscriptionfrom biblionumber
-use C4::Koha; # use getitemtypeinfo
+use C4::Koha;
use C4::Members; # GetMember
+use C4::External::Amazon;
my $query = new CGI;
my $marcflavour = C4::Context->preference("marcflavour");
my $record = GetMarcBiblio($biblionumber);
+# some useful variables for enhanced content;
+# in each case, we're grabbing the first value we find in
+# the record and normalizing it
+my $upc = GetNormalizedUPC($record,$marcflavour);
+my $ean = GetNormalizedEAN($record,$marcflavour);
+my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
+my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+
+$template->param(
+ normalized_upc => $upc,
+ normalized_ean => $ean,
+ normalized_oclc => $oclc,
+ normalized_isbn => $isbn,
+);
+
#coping with subscriptions
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
my $dat = TransformMarcToKoha( $dbh, $record );
## Amazon.com stuff
#not used unless preference set
-if ( C4::Context->preference("AmazonContent") == 1 ) {
- use C4::External::Amazon;
- $dat->{'amazonisbn'} = $dat->{'isbn'};
- $dat->{'amazonisbn'} =~ s|-||g;
-
- $template->param( amazonisbn => $dat->{amazonisbn} );
+if ( C4::Context->preference("OPACAmazonEnabled") == 1 ) {
- my $amazon_details = &get_amazon_details( $dat->{amazonisbn}, $record, $marcflavour );
+ my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour );
foreach my $result ( @{ $amazon_details->{Details} } ) {
$template->param( item_description => $result->{ProductDescription} );
use C4::Circulation;
use C4::Tags qw(get_tags);
use C4::Dates qw/format_date/;
-use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn get_biblio_from_xisbn);
+use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
use C4::External::Amazon;
use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes );
use C4::Review;
$template->param( "$_" => $dat->{$_} . "" );
}
+# some useful variables for enhanced content;
+# in each case, we're grabbing the first value we find in
+# the record and normalizing it
+my $upc = GetNormalizedUPC($record,$marcflavour);
+my $ean = GetNormalizedEAN($record,$marcflavour);
+my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
+my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+
+$template->param(
+ normalized_upc => $upc,
+ normalized_ean => $ean,
+ normalized_oclc => $oclc,
+ normalized_isbn => $isbn,
+);
+
# COinS format FIXME: for books Only
my $coins_format;
my $fmt = substr $record->leader(), 6,2;
loggedincommenter => $loggedincommenter
);
-sub isbn_cleanup ($) {
- my $isbn=shift;
- ($isbn) = $isbn =~ /([\d-]*[X]*)/;
- $isbn =~ s/-//g;
- if (
- $isbn =~ /\b(\d{13})\b/ or
- $isbn =~ /\b(\d{10})\b/ or
- $isbn =~ /\b(\d{9}X)\b/i
- ) {
- return $1;
- }
- return undef;
-}
-
# XISBN Stuff
-my $xisbn=$dat->{'isbn'};
-(my $aisbn) = $xisbn =~ /([\d-]*[X]*)/;
-$aisbn =~ s/-//g;
-$template->param(amazonisbn => $aisbn); # FIXME: so it is OK if the ISBN = 'XXXXX' ?
-my ($clean,$clean2);
-# these might be overkill, but they are better than the regexp above.
-if ($clean = isbn_cleanup($xisbn)){
- $template->param(clean_isbn => $clean);
-}
-
if (C4::Context->preference("OPACFRBRizeEditions")==1) {
eval {
$template->param(
- xisbn => $xisbn,
- XISBNS => get_xisbns($xisbn)
+ XISBNS => get_xisbns($isbn)
);
};
if ($@) { warn "XISBN Failed $@"; }
}
# Amazon.com Stuff
-if ( C4::Context->preference("OPACAmazonContent") == 1 ) {
+if ( C4::Context->preference("OPACAmazonEnabled") && C4::Context->preference("OPACAmazonSimilarItems") ) {
my $similar_products_exist;
- my $amazon_details = &get_amazon_details( $xisbn, $record, $marcflavour );
+ my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour );
my $item_attributes = \%{$amazon_details->{Items}->{Item}->{ItemAttributes}};
my $customer_reviews = \@{$amazon_details->{Items}->{Item}->{CustomerReviews}->{Review}};
for my $one_review (@$customer_reviews) {
}
my $syndetics_elements;
+
if ( C4::Context->preference("SyndeticsEnabled") ) {
eval {
- $syndetics_elements = &get_syndetics_index($xisbn);
+ $syndetics_elements = &get_syndetics_index($isbn,$upc,$oclc);
for my $element (values %$syndetics_elements) {
$template->param("Syndetics$element"."Exists" => 1 );
#warn "Exists: "."Syndetics$element"."Exists";
&& C4::Context->preference("SyndeticsSummary")
&& $syndetics_elements->{'SUMMARY'} =~ /SUMMARY/) {
eval {
- my $syndetics_summary = &get_syndetics_summary($xisbn);
+ my $syndetics_summary = &get_syndetics_summary($isbn,$upc,$oclc);
$template->param( SYNDETICS_SUMMARY => $syndetics_summary );
};
warn $@ if $@;
&& C4::Context->preference("SyndeticsTOC")
&& $syndetics_elements->{'TOC'} =~ /TOC/) {
eval {
- my $syndetics_toc = &get_syndetics_toc($xisbn);
+ my $syndetics_toc = &get_syndetics_toc($isbn,$upc,$oclc);
$template->param( SYNDETICS_TOC => $syndetics_toc );
};
warn $@ if $@;
&& C4::Context->preference("SyndeticsExcerpt")
&& $syndetics_elements->{'DBCHAPTER'} =~ /DBCHAPTER/ ) {
eval {
- my $syndetics_excerpt = &get_syndetics_excerpt($xisbn);
+ my $syndetics_excerpt = &get_syndetics_excerpt($isbn,$upc,$oclc);
$template->param( SYNDETICS_EXCERPT => $syndetics_excerpt );
};
warn $@ if $@;
if ( C4::Context->preference("SyndeticsEnabled")
&& C4::Context->preference("SyndeticsReviews")) {
eval {
- my $syndetics_reviews = &get_syndetics_reviews($xisbn,$syndetics_elements);
+ my $syndetics_reviews = &get_syndetics_reviews($isbn,$upc,$oclc,$syndetics_elements);
$template->param( SYNDETICS_REVIEWS => $syndetics_reviews );
};
warn $@ if $@;
&& C4::Context->preference("SyndeticsAuthorNotes")
&& $syndetics_elements->{'ANOTES'} =~ /ANOTES/ ) {
eval {
- my $syndetics_anotes = &get_syndetics_anotes($xisbn);
+ my $syndetics_anotes = &get_syndetics_anotes($isbn,$upc,$oclc);
$template->param( SYNDETICS_ANOTES => $syndetics_anotes );
};
warn $@ if $@;
my $sth_get_biblio = $dbh->prepare("SELECT biblio.*,biblioitems.isbn AS isbn FROM biblio LEFT JOIN biblioitems ON biblio.biblionumber=biblioitems.biblionumber WHERE biblio.biblionumber=?");
$sth_get_biblio->execute($this_item->{biblionumber});
while (my $this_biblio = $sth_get_biblio->fetchrow_hashref()) {
- $this_item->{'title'} = $this_biblio->{'title'};
- if ($clean2 = isbn_cleanup($this_biblio->{'isbn'})) {
- $this_item->{'isbn'} = $clean2;
- } else {
- $this_item->{'isbn'} = $this_biblio->{'isbn'};
- }
+ $this_item->{'title'} = $this_biblio->{'title'};
+ my $this_record = GetMarcBiblio($this_biblio->{'biblionumber'});
+ $this_item->{'browser_normalized_upc'} = GetNormalizedUPC($this_record,$marcflavour);
+ $this_item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour);
+ $this_item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour);
}
unshift @previous_items, $this_item;
}
$sth_get_biblio->execute($this_item->{biblionumber});
while (my $this_biblio = $sth_get_biblio->fetchrow_hashref()) {
$this_item->{'title'} = $this_biblio->{'title'};
- if ($clean2 = isbn_cleanup($this_biblio->{'isbn'})) {
- $this_item->{'isbn'} = $clean2;
- } else {
- $this_item->{'isbn'} = $this_biblio->{'isbn'};
- }
+ my $this_record = GetMarcBiblio($this_biblio->{'biblionumber'});
+ $this_item->{'browser_normalized_upc'} = GetNormalizedUPC($this_record,$marcflavour);
+ $this_item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour);
+ $this_item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour);
}
push @next_items, $this_item;
}
BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
);
my ($bt_user, $bt_pass);
- if ($clean and
+ if ($isbn and
$bt_user = C4::Context->preference('BakerTaylorUsername') and
$bt_pass = C4::Context->preference('BakerTaylorPassword') )
{
$template->param(
BakerTaylorContentURL =>
sprintf("http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y",
- $bt_user,$bt_pass,$clean)
+ $bt_user,$bt_pass,$isbn)
);
}
}
my ( $count, $issues ) = GetAllIssues( $borrowernumber, $order2, $limit );
-# add the row parity
-#my $num = 0;
-#foreach my $row (@$issues) {
-# $row->{'even'} = 1 if $num % 2 == 0;
-# $row->{'odd'} = 1 if $num % 2 == 1;
-# $num++;
-#}
+my $borr = GetMemberDetails( $borrowernumber );
+my @bordat;
+$bordat[0] = $borr;
+$template->param( BORROWER_INFO => \@bordat );
my @loop_reading;
}
# XISBN Stuff
- my $xisbn=$issues->[$i]->{'isbn'};
- $xisbn =~ /(\d*[X]*)/;
- $line{amazonisbn} = $1; # FIXME: so it is OK if the ISBN = 'XXXXX' ?
- my ($clean, $amazonisbn);
- $amazonisbn = $1;
- # these might be overkill, but they are better than the regexp above.
- if (
- $amazonisbn =~ /\b(\d{13})\b/ or
- $amazonisbn =~ /\b(\d{10})\b/ or
- $amazonisbn =~ /\b(\d{9}X)\b/i
- ) {
- $clean = $1;
- $line{clean_isbn} = $1;
- }
-
+ my $isbn = GetNormalizedISBN($issues->[$i]->{'isbn'});
+ $line{normalized_isbn} = $isbn;
$line{biblionumber} = $issues->[$i]->{'biblionumber'};
$line{title} = $issues->[$i]->{'title'};
$line{author} = $issues->[$i]->{'author'};
- $line{isbn} = $issues->[$i]->{'isbn'};
$line{itemcallnumber} = $issues->[$i]->{'itemcallnumber'};
$line{date_due} = format_date( $issues->[$i]->{'date_due'} );
$line{returndate} = format_date( $issues->[$i]->{'returndate'} );
}
}
-for(qw(AmazonContent GoogleJackets)) { # BakerTaylorEnabled handled above
+for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above
C4::Context->preference($_) or next;
$template->param($_=>1);
$template->param(JacketImages=>1);
limit=>$tag_quantity });
}
}
- foreach (@newresults) {
- my $clean = $_->{isbn} or next;
- unless (
- $clean =~ /\b(\d{13})\b/ or
- $clean =~ /\b(\d{10})\b/ or
- $clean =~ /\b(\d{9}X)\b/i
- ) {
- next;
- }
- $_ ->{'clean_isbn'} = $1;
- }
$total = $total + $results_hashref->{$server}->{"hits"};
## If there's just one result, redirect to the detail page
if ($total == 1) {
my $query = new CGI;
BEGIN {
- if (C4::Context->preference('BakerTaylorEnabled')) {
- require C4::External::BakerTaylor;
- import C4::External::BakerTaylor qw(&image_url &link_url);
- }
+ if (C4::Context->preference('BakerTaylorEnabled')) {
+ require C4::External::BakerTaylor;
+ import C4::External::BakerTaylor qw(&image_url &link_url);
+ }
}
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
my @issuedat;
my $itemtypes = GetItemTypes();
foreach my $issue ( @issue_list ) {
- if($count%2 eq 0){ $issue->{'toggle'} = 1; } else { $issue->{'toggle'} = 0; }
+ if($count%2 eq 0){ $issue->{'toggle'} = 1; } else { $issue->{'toggle'} = 0; }
# check for reserves
my ( $restype, $res ) = CheckReserves( $issue->{'itemnumber'} );
if ( $restype ) {
# check if item is renewable
my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
- ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
+ ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
$issue->{'status'} = $status || C4::Context->preference("OpacRenewalAllowed");
$issue->{date_due} = format_date($issue->{date_due});
push @issuedat, $issue;
$count++;
-
- # XISBN Stuff
- my $xisbn=$issue->{'isbn'};
- $xisbn =~ /(\d*[X]*)/;
- $issue->{amazonisbn} = $1; # FIXME: so it is OK if the ISBN = 'XXXXX' ?
- my ($clean, $amazonisbn);
- $amazonisbn = $1;
- # these might be overkill, but they are better than the regexp above.
- if (
- $amazonisbn =~ /\b(\d{13})\b/ or
- $amazonisbn =~ /\b(\d{10})\b/ or
- $amazonisbn =~ /\b(\d{9}X)\b/i
- ) {
- $clean = $1;
- $issue->{clean_isbn} = $1;
- }
-
+
+ my $isbn = GetNormalizedISBN($issue->{'isbn'});
+ $issue->{normalized_isbn} = $isbn;
}
$template->param( ISSUES => \@issuedat );
$res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
my $biblioData = GetBiblioData($res->{'biblionumber'});
$res->{'reserves_title'} = $biblioData->{'title'};
- if ($OPACDisplayRequestPriority) {
- $res->{'priority'} = '' if $res->{'priority'} eq '0';
- }
+ if ($OPACDisplayRequestPriority) {
+ $res->{'priority'} = '' if $res->{'priority'} eq '0';
+ }
}
# use Data::Dumper;
$res->{'wait'}= 1;
$res->{'holdingbranch'}=$item->{'holdingbranch'};
$res->{'biblionumber'}=$item->{'biblionumber'};
- $res->{'barcodenumber'} = $item->{'barcode'};
+ $res->{'barcodenumber'} = $item->{'barcode'};
$res->{'wbrcode'} = $res->{'branchcode'};
- $res->{'itemnumber'} = $res->{'itemnumber'};
+ $res->{'itemnumber'} = $res->{'itemnumber'};
$res->{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'};
if($res->{'holdingbranch'} eq $res->{'wbrcode'}){
$res->{'atdestination'} = 1;
}
if (C4::Context->preference('BakerTaylorEnabled')) {
- $template->param(
- BakerTaylorEnabled => 1,
- BakerTaylorImageURL => &image_url(),
- BakerTaylorLinkURL => &link_url(),
- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
- );
+ $template->param(
+ BakerTaylorEnabled => 1,
+ BakerTaylorImageURL => &image_url(),
+ BakerTaylorLinkURL => &link_url(),
+ BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
+ );
}
-if (C4::Context->preference("AmazonContent" ) or
- C4::Context->preference("GoogleJackets" ) or
- C4::Context->preference("BakerTaylorEnabled") ) {
- $template->param(JacketImages=>1);
+if (C4::Context->preference("OPACAmazonCoverImages") or
+ C4::Context->preference("GoogleJackets") or
+ C4::Context->preference("BakerTaylorEnabled") or
+ C4::Context->preference("SyndeticsCoverImages")) {
+ $template->param(JacketImages=>1);
}
$template->param(
waiting_count => $wcount,
textmessaging => $borr->{textmessaging},
- patronupdate => $patronupdate,
- OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
- userview => 1,
- dateformat => C4::Context->preference("dateformat"),
+ patronupdate => $patronupdate,
+ OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
+ userview => 1,
+ dateformat => C4::Context->preference("dateformat"),
);
output_html_with_http_headers $query, $cookie, $template->output;