Bug 11328

Summary: Show local cover images in staff client search results
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, gmcharlt, marjorie.barry-vila, matted-34813, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: local cover
Bug 11328 - Show local cover images in staff client search results
[SIGNED-OFF] Bug 11328 - Show local cover images in staff client search results
[PASSED-QA] Bug 11328 - Show local cover images in staff client search results

Description Nicole C. Engard 2013-12-02 03:36:04 UTC
The local cover images don't show on the staff results.  This is what was reported to me:

It looks like the staff client search results is using the same localcovers.js that the OPAC search results does however it doesn't work because the two pages are formatted differently.


Here is a jquery that solves it for now:

$("#searchresults").ready(function(){
$("#searchresults table td").each(function(i){
td = $(this);
var tdv = td.find("input[class^='selection']");
var linkv = tdv.attr("value");
var a = $("<a />").attr('href', '/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=' + $(tdv).attr("value"));
var img = $("<img />").attr('src', '/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=' + $(tdv).attr("value"))
if(linkv){
$(td).append(a);
$(a).append(img);
}
});
});
Comment 1 Marjorie Barry-Vila 2014-02-19 16:49:53 UTC
Created attachment 25459 [details]
local cover
Comment 2 Marjorie Barry-Vila 2014-02-19 16:50:03 UTC
Hi,

It's the same for a staff detail biblio (see attachment).

Jquery code you proposed is just for a results list? is there a jquery code for detail biblio?

Regards,

Marjorie
Comment 3 Owen Leonard 2014-02-20 20:29:40 UTC Comment hidden (obsolete)
Comment 4 wajasu 2014-02-26 19:41:02 UTC Comment hidden (obsolete)
Comment 5 Brendan Gallagher 2014-03-10 14:51:59 UTC
Created attachment 26012 [details] [review]
[PASSED-QA] Bug 11328 - Show local cover images in staff client search results

Local cover images do not appear in staff client search results. This
patch adds them.

To test, enable the LocalCoverImages system preference and add at least
one cover image to a title. Perform a search which will return results
that include your title. Confirm that the local cover image is
displayed.

Search results should also display correctly with and without
AmazonCoverImages enabled as well as with LocalCoverImages disabled.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 6 Galen Charlton 2014-03-10 15:18:07 UTC
Pushed to master.  Thanks, Owen!
Comment 7 Fridolin Somers 2014-05-27 12:27:00 UTC
Pushed to 3.14.x, will be in 3.14.07