From d4f02c469bdb9626f456aadf160c9ffc9ad23863 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 12 Nov 2010 22:41:30 -0500 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. Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- C4/Auth.pm | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- koha-tmpl/opac-tmpl/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 6ba852d065..c7477b194e 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" ) { @@ -363,7 +364,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 1ee82d05aa..ec77493be5 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -135,7 +135,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 1e5e2b7b32..876ae81f52 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 250a77a8ed..5f551777e4 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 7a77f59ad3..c9d5819bdf 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'} ); -- 2.20.1
TitleItem TypeItem Type Call No. Date
" title="" alt="" /> " alt="" /> (Checked out)