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 <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit d4f02c469b)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
8257c0eb63
commit
41e99198db
|
|
@ -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"),
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
<table>
|
||||
<tr>
|
||||
<!--TMPL_LOOP Name="itemtypeloop"-->
|
||||
<td><input type="checkbox" id="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->" name="limit" value="mc-<!-- TMPL_VAR NAME="ccl" -->:<!--TMPL_VAR Name="code" -->"/><label for="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->"><!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
|
||||
<td><input type="checkbox" id="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->" name="limit" value="mc-<!-- TMPL_VAR NAME="ccl" -->:<!--TMPL_VAR Name="code" -->"/><label for="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->"><!-- TMPL_UNLESS NAME="noItemTypeImages" --><!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF --> <!-- /TMPL_UNLESS -->
|
||||
<!--TMPL_VAR Name="description" --></label></td>
|
||||
<!-- TMPL_UNLESS name="count5" --><!-- TMPL_UNLESS name="__last__" --></tr><tr><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS -->
|
||||
<!--/TMPL_LOOP-->
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
<th>Date Due</th>
|
||||
</tr></thead>
|
||||
<tbody><!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
|
||||
<tr><!-- TMPL_IF NAME="item-level_itypes" --><td><!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- TMPL_VAR NAME="description" -->" alt="<!-- TMPL_VAR NAME="description" -->" /><!-- /TMPL_IF --> <!-- TMPL_VAR NAME="description" --></td><!-- /TMPL_IF -->
|
||||
<tr><!-- TMPL_IF NAME="item-level_itypes" --><td><!-- TMPL_UNLESS NAME="noItemTypeImages" --><!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- TMPL_VAR NAME="description" -->" alt="<!-- TMPL_VAR NAME="description" -->" /><!-- /TMPL_IF --><!-- /TMPL_UNLESS --> <!-- TMPL_VAR NAME="description" --></td><!-- /TMPL_IF -->
|
||||
<td><!-- TMPL_UNLESS NAME="singleBranchMode" --><!-- TMPL_IF name="branchurl" --><a href="<!-- TMPL_VAR NAME="branchurl" -->"><!-- TMPL_VAR NAME="branchname" --></a><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="branchname" --><!-- /TMPL_IF --><!-- /TMPL_UNLESS --> <!-- TMPL_VAR NAME="location_description" --> </td>
|
||||
<!-- TMPL_IF NAME="itemdata_ccode" --><td><!-- TMPL_VAR NAME="ccode" --></td><!-- /TMPL_IF -->
|
||||
<td><!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- TMPL_IF NAME="OPACShelfBrowser" -->(<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&shelfbrowse_itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#shelfbrowser">Browse Shelf</a>)<!-- /TMPL_IF --><!-- /TMPL_IF --></td>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ You have never borrowed anything from this library.
|
|||
<div class="ui-tabs-panel"><table id="readingrec">
|
||||
<tr>
|
||||
<th colspan="2">Title</th>
|
||||
<!-- TMPL_UNLESS NAME="item-level_itypes" --><th>Item Type</th><!-- /TMPL_UNLESS -->
|
||||
<!-- TMPL_UNLESS NAME="noItemTypeImages" --><th>Item Type</th><!-- /TMPL_UNLESS -->
|
||||
<th>Call No.</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
|
|
@ -80,7 +80,7 @@ You have never borrowed anything from this library.
|
|||
<span class="item-details">
|
||||
<!-- TMPL_VAR NAME="author" -->
|
||||
</span></td>
|
||||
<!-- TMPL_UNLESS NAME="item-level_itypes" --><td><!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- TMPL_VAR name="itypedescription" -->" alt="<!-- TMPL_VAR NAME="itypedescription" -->" /><!-- /TMPL_IF --> <!-- TMPL_VAR name="itypedescription" --></td><!-- /TMPL_UNLESS -->
|
||||
<!-- TMPL_UNLESS NAME="noItemTypeImages" --><td><!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="" /><!-- /TMPL_IF --> <!-- TMPL_VAR name="description" --></td><!-- /TMPL_UNLESS -->
|
||||
<td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
|
||||
<td><!-- TMPL_IF NAME="returndate" --><!-- TMPL_VAR NAME="returndate" --><!-- TMPL_ELSE --><em>(Checked out)</em><!-- /TMPL_IF --></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -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'} );
|
||||
|
|
|
|||
Loading…
Reference in New Issue