Bugzilla – Attachment 19724 Details for
Bug 7706
AuthorisedValueImages not displaying all images on the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7706 - Do not display authorized value image if url is empty
0002-Bug-7706-Do-not-display-authorized-value-image-if-ur.patch (text/plain), 5.17 KB, created by
Fridolin Somers
on 2013-07-17 14:10:35 UTC
(
hide
)
Description:
Bug 7706 - Do not display authorized value image if url is empty
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2013-07-17 14:10:35 UTC
Size:
5.17 KB
patch
obsolete
>From fb73ce37127e7736da564ce4b4b3988f52ce411a Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Wed, 17 Jul 2013 15:56:36 +0200 >Subject: [PATCH 2/3] Bug 7706 - Do not display authorized value image if url > is empty > >The image url can be empty string so check this in get_authorised_value_images. >No use to check it in template. >--- > C4/Items.pm | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 4 ++-- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 6 ++---- > koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 6 ++---- > 4 files changed, 7 insertions(+), 11 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 212a9d3..467bdac 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1749,7 +1749,7 @@ sub get_authorised_value_images { > if ( exists $authorised_values->{ $this_authorised_value->{'category'} } > && $authorised_values->{ $this_authorised_value->{'category'} } eq $this_authorised_value->{'authorised_value'} ) { > # warn ( Data::Dumper->Dump( [ $this_authorised_value ], [ 'this_authorised_value' ] ) ); >- if ( defined $this_authorised_value->{'imageurl'} ) { >+ if ( $this_authorised_value->{'imageurl'} ) { > push @imagelist, { imageurl => C4::Koha::getitemtypeimagelocation( 'intranet', $this_authorised_value->{'imageurl'} ), > label => $this_authorised_value->{'lib'}, > category => $this_authorised_value->{'category'}, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index db5aaec..5145e46 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -479,10 +479,10 @@ var holdForPatron = function () { > </p> > [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<p class="searchhighlightblob">[% SEARCH_RESULT.searchhighlightblob %]</p>[% END %] > >- [% IF ( SEARCH_RESULT.authorised_value_images ) %] >+ [% IF ( StaffAuthorisedValueImages && SEARCH_RESULT.authorised_value_images ) %] > <p> > [% FOREACH authorised_value_image IN SEARCH_RESULT.authorised_value_images %] >- <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.description %]" /> >+ <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.description %]" /> > [% END %] > </p> > [% END %] >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 4e4d140..0ef48de 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -750,15 +750,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > </div> > [% END %] > [% END %] >- [% IF ( AuthorisedValueImages ) %] >- [% IF ( authorised_value_images ) %] >+ [% IF ( AuthorisedValueImages && authorised_value_images) %] > <div class="authorised_value_images"> > [% FOREACH authorised_value_image IN authorised_value_images %] >- <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.label %]" title="[% authorised_value_image.label %]" /> >+ <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.label %]" title="[% authorised_value_image.label %]" /> > [% END %] > </div> > [% END %] >- [% END %] > > <!-- This puts the LTFL reviews in, and if TabbedView is not set, puts the remaining content above the Tabs instead of in them --> > [% IF ( LibraryThingForLibrariesID ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >index 0df0322..dd700db 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -487,12 +487,10 @@ $(document).ready(function(){ > [% END %] > [% END %] > >- [% IF ( AuthorisedValueImages ) %] >+ [% IF ( AuthorisedValueImages && SEARCH_RESULT.authorised_value_images ) %] > <td class="itypecol"> > [% FOREACH authorised_value_image IN SEARCH_RESULT.authorised_value_images %] >- [% IF ( authorised_value_image.imageurl ) %] >- <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.label %]" title="[% authorised_value_image.label %]"> >- [% END %] >+ <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.label %]" title="[% authorised_value_image.label %]"> > [% END %] > </td> > [% END %] >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7706
:
19722
| 19724 |
19725