Bugzilla – Attachment 14326 Details for
Bug 9276
Display of biblio-level authorized values on OPAC search results broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9276 - Display of biblio-level auth vals on OPAC search broken
Bug-9276---Display-of-biblio-level-auth-vals-on-OP.patch (text/plain), 2.80 KB, created by
Chris Cormack
on 2012-12-29 09:25:58 UTC
(
hide
)
Description:
Bug 9276 - Display of biblio-level auth vals on OPAC search broken
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-12-29 09:25:58 UTC
Size:
2.80 KB
patch
obsolete
>From 19dfda9591e8424aa86b44936d8e8d37ac19e856 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 12 Dec 2012 11:43:27 -0500 >Subject: [PATCH] Bug 9276 - Display of biblio-level auth vals on OPAC search > broken > >If you have your MARC framework configured to link a biblio-level >field with an authorized value, and that value is linked to an >image, and the AuthorisedValueImages system preference is turned on, >the OPAC is supposed to display that image in search results >much like item type images are displayed if item-level itemtypes >are enabled. The switch to Template::Toolkit broke this feature >with a variable scope error. > >This patch corrects the variable scope of the sytem preference check >and adds a check for the existence of the image so that the template >doesn't try to display broken images. > >To test: > >1. Turn on the AuthorisedValueImages system preference. >2. If necessary, create or configure an authorized value with images. >3. Configure a MARC framework to link a field to the authorized value. I > chose an arbitrary field, 942e. >4. Edit a bibliographic record and set a value for the MARC field > you configured. >5. Make sure Zebra has reindexed, and perform an OPAC search which > will include the record you edited. With AuthorisedValueImages > ON, you should see the correct authorized value image. >6. With AuthorisedValueImages OFF, you should see no image. >7. Turn AuthorisedValueImages back on. Edit the authorized value again > and configure it with no image. Perform your search again. You should > see no image. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >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 2e3ad22..89cc5db 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -445,10 +445,12 @@ $(document).ready(function(){ > [% END %] > [% END %] > >- [% IF ( SEARCH_RESULT.AuthorisedValueImages ) %] >+ [% IF ( AuthorisedValueImages ) %] > <td class="itypecol"> > [% FOREACH authorised_value_image IN SEARCH_RESULT.authorised_value_images %] >- <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.label %]" title="[% authorised_value_image.label %]"> >+ [% IF ( authorised_value_image.imageurl ) %] >+ <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.label %]" title="[% authorised_value_image.label %]"> >+ [% END %] > [% 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 9276
:
14050
|
14326
|
14593