[Koha-patches] [PATCH] Fix to enable Amazon cover images in the staff client.

Owen Leonard oleonard at myacpl.org
Tue Apr 27 20:13:04 CEST 2010


Since this fix enables the previously-missing variable
'AmazonEnabled' in Auth.pm, this will also enable other
Amazon content in the staff client like Product
Descriptions and Amazon Similar Items (See Bug 3863)
---
 C4/Auth.pm                                         |    2 ++
 .../prog/en/modules/catalogue/results.tmpl         |   11 +++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/C4/Auth.pm b/C4/Auth.pm
index 94a05fb..387a352 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -354,6 +354,8 @@ sub get_template_and_user {
     if ( $in->{'type'} eq "intranet" ) {
         $template->param(
             AmazonContent               => C4::Context->preference("AmazonContent"),
+            AmazonCoverImages           => C4::Context->preference("AmazonCoverImages"),
+            AmazonEnabled               => C4::Context->preference("AmazonEnabled"),
             AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
             AutoLocation                => C4::Context->preference("AutoLocation"),
             "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
index b81970a..b9b6a7d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
@@ -371,23 +371,22 @@ function GetZ3950Terms(){
                 <!-- /TMPL_IF -->
 
                     <!-- TABLE RESULTS START -->
-
                 <table>
                     <tr>
-                        <!-- TMPL_IF NAME="AmazonEnabled" --><th>&nbsp;</th><!-- /TMPL_IF -->
+                        <!-- TMPL_IF NAME="AmazonEnabled" --><!-- TMPL_IF NAME="AmazonCoverImages" --><th>&nbsp;</th><!-- /TMPL_IF --><!-- /TMPL_IF -->
                         <th colspan="2">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="AmazonEnabled" -->
+                            <!-- TMPL_IF NAME="AmazonEnabled" --><!-- TMPL_IF NAME="AmazonCoverImages" -->
                                 <td>
                                     <a class="p1" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
-									<!-- 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 -->
+									
+                                        <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" /> 
                                     </a></td>
-                            <!-- /TMPL_IF -->
+                            <!-- /TMPL_IF --><!-- /TMPL_IF -->
                             <td>
                                 <input type="checkbox" class="selection" id="bib<!-- TMPL_VAR NAME="biblionumber" -->" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" style="display:none" />
                             </td>
-- 
1.6.3.3




More information about the Koha-patches mailing list