From 9ce9eea2dbb35be4f3f28314cb90f4edb624c31c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 20 Feb 2014 15:18:46 -0500 Subject: [PATCH] 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 Signed-off-by: Brendan Gallagher Signed-off-by: Galen Charlton --- .../prog/en/css/staff-global.css | 13 ++++++++++++ .../prog/en/modules/catalogue/results.tt | 20 +++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 2a04c35cf4..685ebef73e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2012,6 +2012,19 @@ a.localimage img { margin : 0 .5em; padding : .3em; } + +.no-image { + background-color : #FFF; + border: 1px solid #AAA; + color : #979797; + display:block; + font-size : 86%; + font-weight : bold; + text-align : center; + width : 75px; + border-radius : 3px; +} + div.pager p { margin: 0; } 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 84206fe6c1..7bb75f8fde 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -148,6 +148,9 @@ $('#sort_by').change(function() { window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.last.biblionumber %] + '&searchid=[% searchid %]'; [% END %] [% END %] + +[% IF LocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %] + }); @@ -430,19 +433,24 @@ var holdForPatron = function () { - [% IF ( AmazonCoverImages ) %][% END %] + [% IF ( AmazonCoverImages || LocalCoverImages ) %][% END %] [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] [% IF ( loop.odd ) %][% ELSE %][% END %] - [% IF ( AmazonCoverImages ) %] + [% IF ( AmazonCoverImages || LocalCoverImages ) %] + [% IF ( LocalCoverImages ) %] + + [% END %] + [% IF ( AmazonCoverImages ) %] + + + + [% END %] + [% END %]
  Results Location
- - - - -- 2.20.1