From 68ba16afe8989291df8afe54dd72fdf0f0a99fbf Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Sat, 9 Jun 2012 09:18:00 -0400 Subject: [PATCH] Bug 4460 - Amazon's AssociateID tag not used in links so referred revenue lost Rewrite of patch authored by Reed Wade Signed-off-by: Jared Camins-Esakov --- C4/Auth.pm | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++-- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt | 3 +-- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index b6dc2f5ad2..70669e4d5c 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -335,6 +335,7 @@ sub get_template_and_user { if ( $in->{'type'} eq "intranet" ) { $template->param( AmazonContent => C4::Context->preference("AmazonContent"), + AmazonAssocTag => C4::Context->preference("AmazonAssocTag"), AmazonCoverImages => C4::Context->preference("AmazonCoverImages"), AmazonEnabled => C4::Context->preference("AmazonEnabled"), AmazonSimilarItems => C4::Context->preference("AmazonSimilarItems"), @@ -399,6 +400,7 @@ sub get_template_and_user { } $template->param( AmazonContent => "" . C4::Context->preference("AmazonContent"), + AmazonAssocTag => C4::Context->preference("AmazonAssocTag"), AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), BranchesLoop => GetBranchesLoop($opac_name), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 4f005247fe..0123d89a42 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -118,7 +118,7 @@ function verify_images() { [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]
- [% END %][% END %] +
[% END %][% END %] [% ELSE %]

[% title |html %]

@@ -522,7 +522,7 @@ function verify_images() { [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]

Editions

-[% FOREACH XISBN IN XISBNS %][% IF ( XISBN.AmazonEnabled ) %][% END %] +[% FOREACH XISBN IN XISBNS %][% IF ( XISBN.AmazonEnabled ) %][% END %][% END %] [% ELSE %][% END %] [% IF ( JacketImages ) %]
[% IF noItemTypeImages %][% description %][% ELSE %][% description %][% END %] [% UNLESS ( item_level_itypes ) %][% IF ( noItemTypeImages ) %][% XISBN.description %][% ELSE %][% XISBN.description %][% END %][% XISBN.title |html %] by [% XISBN.author %] ©[% XISBN.copyrightdate %] [% IF ( XISBN.publishercode ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index 5e2b55edc7..10113976ec 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -296,7 +296,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
[% IF ( OPACLocalCoverImages ) %]
[% END %] - [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( OPACurlOpenInNewWindow ) %]Cover image[% ELSE %]Cover image[% END %][% END %][% END %] + [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( OPACURLOpenInNewWindow ) %]Cover Image[% ELSE %]Cover Image[% END %][% END %][% END %] [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( content_identifier_exists ) %][% IF ( using_https ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt index 878692515e..528d611166 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt @@ -65,8 +65,7 @@ You have never borrowed anything from this library. [% UNLESS ( loop.odd ) %]
-[% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( READING_RECOR.normalized_isbn ) %]Cover Image[% ELSE %]No cover image available[% END %][% END %][% END %] - +[% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( READING>RECOR.normalized_isbn ) %]Cover Image[% ELSE %]No cover image available[% END %][% END %][% END %] [% IF ( GoogleJackets ) %][% IF ( READING_RECOR.normalized_isbn ) %]
[% ELSE %]No cover image available[% END %][% END %] [% IF ( BakerTaylorEnabled ) %][% IF ( READING_RECOR.normalized_isbn ) %]See Baker & Taylor[% ELSE %]No cover image available[% END %][% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 33e3b4849b..8791e28755 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -158,7 +158,7 @@ $.tablesorter.addParser({ [% IF ( JacketImages ) %]
-[% IF ( OPACAmazonCoverImages ) %][% IF ( ISSUE.normalized_isbn ) %]Cover Image[% ELSE %]No cover image available[% END %][% END %] +[% IF ( OPACAmazonCoverImages ) %][% IF ( ISSUE.normalized_isbn ) %]Cover Image[% END %]No cover image available[% END %][% END %] [% IF ( GoogleJackets ) %][% IF ( ISSUE.normalized_isbn ) %]
[% ELSE %]No cover image available[% END %][% END %] @@ -302,7 +302,7 @@ $.tablesorter.addParser({
-[% IF ( OPACAmazonCoverImages ) %][% IF ( OVERDUE.normalized_isbn ) %][% ELSE %]No cover image available[% END %][% END %] +[% IF ( OPACAmazonCoverImages ) %][% IF ( ISSUE.normalized_isbn ) %]Cover Image[% END %]No cover image available[% END %][% END %] [% IF ( GoogleJackets ) %][% IF ( OVERDUE.normalized_isbn ) %]
[% ELSE %]No cover image available[% END %][% END %] -- 2.39.5