[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/opac opac-detail.pl
From: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha/opac opac-detail.pl |
Date: |
Sun, 21 May 2006 02:17:02 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch:
Changes by: Joshua Ferraro <address@hidden> 06/05/21 02:17:02
Modified files:
opac : opac-detail.pl
Log message:
syncing dev-week and HEAD
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-detail.pl.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
Patches:
Index: koha/opac/opac-detail.pl
diff -u koha/opac/opac-detail.pl:1.26 koha/opac/opac-detail.pl:1.27
--- koha/opac/opac-detail.pl:1.26 Thu Sep 22 10:01:46 2005
+++ koha/opac/opac-detail.pl Sun May 21 02:17:02 2006
@@ -32,7 +32,19 @@
my ($websitecount, @websites) = &getwebsites($biblionumber);
my $subscriptionsnumber = getsubscriptionfrombiblionumber($biblionumber);
-my @title;
+ #coping with subscriptions
+ my $subscriptionsnumber = getsubscriptionfrombiblionumber($biblionumber);
+ my @subscriptions =
getsubscriptions($dat->{title},$dat->{issn},$biblionumber);
+ my @subs;
+ foreach my $subscription (@subscriptions){
+ my %cell;
+ $cell{subscriptionid}= $subscription->{subscriptionid};
+ $cell{subscriptionnotes}= $subscription->{notes};
+ #get the three latest serials.
+
$cell{latestserials}=getlatestserials($subscription->{subscriptionid},3);
+ push @subs, \%cell;
+ }
+
$dat->{'count'address@hidden;
my @author;
if ($dat->{'author'}){
@@ -124,38 +136,43 @@
LibraryName =>
C4::Context->preference("LibraryName"),
suggestion =>
C4::Context->preference("suggestion"),
virtualshelves =>
C4::Context->preference("virtualshelves"),
- titlewords => $titlewords,
- authorwords => $authorwords,
+ titlewords => $titlewords,
+ authorwords => $authorwords,
);
- ## Amazon.com stuff
-=head
-my $isbn=$dat->{'isbn'};
-my $amazon_details = &get_amazon_details($isbn);
-foreach my $result (@{$amazon_details->{Details}}){
- $template->param(item_description => $result->{ProductDescription});
- $template->param(image => $result->{ImageUrlMedium});
- $template->param(list_price => $result->{ListPrice});
- $template->param(amazon_url => $result->{url});
- }
-
-my @products;
-my @reviews;
-for my $details( @{ $amazon_details->{ Details } } ) {
- next unless $details->{ SimilarProducts };
- for my $product ( @{ $details->{ SimilarProducts }->{ Product } } ) {
- push @products, +{ Product => $product };
- }
- next unless $details->{ Reviews };
- for my $product ( @{ $details->{ Reviews }->{ AvgCustomerRating } } ) {
- $template->param(rating => $product);
- }
- for my $reviews ( @{ $details->{ Reviews }->{ CustomerReview } } ) {
- push @reviews, +{ Summary => $reviews->{ Summary }, Comment =>
$reviews->{ Comment }, };
- }
+## Amazon.com stuff
+#not used unless preference set
+if (C4::Context->preference("AmazonContent")==1) {
+ use C4::Amazon;
+ $dat->{'amazonisbn'}=$dat->{'isbn'};
+ $dat->{'amazonisbn'} =~ s|-||g;
+
+ $template->param( amazonisbn => $dat->{amazonisbn} );
+
+ my $amazon_details = &get_amazon_details($dat->{amazonisbn});
+
+ foreach my $result (@{$amazon_details->{Details}}){
+ $template->param(item_description =>
$result->{ProductDescription});
+ $template->param(image => $result->{ImageUrlMedium});
+ $template->param(list_price => $result->{ListPrice});
+ $template->param(amazon_url => $result->{url});
+ }
+
+ my @products;
+ my @reviews;
+ for my $details( @{ $amazon_details->{ Details } } ) {
+ next unless $details->{ SimilarProducts };
+ for my $product ( @{ $details->{ SimilarProducts }->{ Product }
} ) {
+ push @products, +{ Product => $product };
+ }
+ next unless $details->{ Reviews };
+ for my $product ( @{ $details->{ Reviews }->{ AvgCustomerRating
} } ) {
+ $template->param(rating => $product * 20);
+ }
+ for my $reviews ( @{ $details->{ Reviews }->{ CustomerReview }
} ) {
+ push @reviews, +{ Summary => $reviews->{ Summary },
Comment => $reviews->{ Comment }, };
+ }
+ }
+ $template->param( SIMILAR_PRODUCTS => address@hidden );
+ $template->param( REVIEWS => address@hidden );
}
-$template->param( SIMILAR_PRODUCTS => address@hidden );
-$template->param( REVIEWS => address@hidden );
- ## End of Amazon Stuff
-=cut
output_html_with_http_headers $query, $cookie, $template->output;
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/opac opac-detail.pl,
Joshua Ferraro <=