From 924580edef1b712393ae02f961f7a037342f943e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 6 Jul 2010 10:45:49 -0400 Subject: [PATCH] Fix for Bug 4359, noItemTypeImages not active in OPAC - Auth.pm put the noItemTypeImages preference under "intranet only." Moved it to "OPAC or intranet." - Added check for the preference on the OPAC advanced search page. - Improved logic for displaying images on the reading history page. --- C4/Auth.pm | 2 +- .../opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 2 +- .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- .../prog/en/modules/opac-readingrecord.tmpl | 4 ++-- opac/opac-readingrecord.pl | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 593f36e..9a599af 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -339,6 +339,7 @@ sub get_template_and_user { XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), BranchesLoop => GetBranchesLoop(), using_https => $in->{'query'}->https() ? 1 : 0, + noItemTypeImages => C4::Context->preference("noItemTypeImages"), ); if ( $in->{'type'} eq "intranet" ) { @@ -364,7 +365,6 @@ sub get_template_and_user { intranetstylesheet => C4::Context->preference("intranetstylesheet"), intranetuserjs => C4::Context->preference("intranetuserjs"), intranetbookbag => C4::Context->preference("intranetbookbag"), - noItemTypeImages => C4::Context->preference("noItemTypeImages"), suggestion => C4::Context->preference("suggestion"), virtualshelves => C4::Context->preference("virtualshelves"), StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"), diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index 52b00e7..2ba2629 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -134,7 +134,7 @@ - diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index b1fdf84..fe7239b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -395,7 +395,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { - + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl index 250a77a..5f55177 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl @@ -54,7 +54,7 @@ You have never borrowed anything from this library.
-" name="limit" value="mc-:"/>-" name="limit" value="mc-:"/>
Date Due
" title="" alt="" />
" title="" alt="" /> "> (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf)
- + @@ -80,7 +80,7 @@ You have never borrowed anything from this library. - + diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index 7a77f59..c9d5819 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -95,6 +95,7 @@ foreach my $issue (@{$issues} ) { $line{date_due} = format_date( $issue->{'date_due'} ); $line{returndate} = format_date( $issue->{'returndate'} ); $line{volumeddesc} = $issue->{'volumeddesc'}; + $issue->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $issue->{'itype'} : $issue->{'itemtype'}; if($issue->{'itemtype'}) { $line{'description'} = $itemtypes->{ $issue->{'itemtype'} }->{'description'}; $line{imageurl} = getitemtypeimagelocation( 'opac', $itemtypes->{ $issue->{'itemtype'} }->{'imageurl'} ); -- 1.7.0.4
TitleItem TypeItem Type Call No. Date
" title="" alt="" /> " alt="" /> (Checked out)