Bug 11328 - Show local cover images in staff client search results
Summary: Show local cover images in staff client search results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-02 03:36 UTC by Nicole C. Engard
Modified: 2015-06-04 23:30 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
local cover (73.94 KB, image/png)
2014-02-19 16:49 UTC, Marjorie Barry-Vila
Details
Bug 11328 - Show local cover images in staff client search results (4.65 KB, patch)
2014-02-20 20:29 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11328 - Show local cover images in staff client search results (4.67 KB, patch)
2014-02-26 19:41 UTC, wajasu
Details | Diff | Splinter Review
[PASSED-QA] Bug 11328 - Show local cover images in staff client search results (4.72 KB, patch)
2014-03-10 14:51 UTC, Brendan Gallagher
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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