From 74106f7dc515e1f22164375d306525b598d7f464 Mon Sep 17 00:00:00 2001 From: Didier GAutheron Date: Thu, 27 Feb 2020 10:51:19 +0100 Subject: [PATCH] BUG 24740: Use biblio title rather than biblio number in OPAC search result cover images tooltips In OPAC biblionum doesn't mean much to patrons, use biblio title field if not empty. Test plan: OPAC search 1) Apply the patch 2) For each cover images providers available to tester in: /cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=Cover OPACLocalCoverImages, AdlibrisEnabled, OPACAmazonCoverImages, GoogleJackets, Coce provider. 3) Enable the provider. 4) Search a Library Catalog for a book with a cover image. 6) test mouse over cover image display biblio title. OPAC Shelves 1) Enable OPAC virtualshelves preference 2) Create a list. 3) For each covers providers available. 4) Search the List 5) test mouse over cover image display biblio title. --- .../bootstrap/en/modules/opac-results.tt | 19 ++++++++++++------- .../bootstrap/en/modules/opac-shelves.tt | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index a9bf80502e..83603570b3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -250,19 +250,24 @@
+ [% IF ( SEARCH_RESULT.title ) %] + [% img_title = SEARCH_RESULT.title | html %] + [% ELSE %] + [% img_title = SEARCH_RESULT.biblionumber |url %] + [% END %] [% IF ( OPACLocalCoverImages ) %] - + [% END %] [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %] - + Adlibris thumbnail for ISBN: [% SEARCH_RESULT.normalized_isbn | html %] [% END %] [% IF ( OPACAmazonCoverImages ) %] [% IF ( SEARCH_RESULT.normalized_isbn ) %] - + [% ELSE %] No cover image available [% END %] @@ -270,7 +275,7 @@ [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %] - + [% ELSE %] No cover image available [% END %] @@ -278,7 +283,7 @@ [% IF ( GoogleJackets ) %] [% IF ( SEARCH_RESULT.normalized_isbn ) %] - + [% ELSE %] No cover image available [% END %] @@ -287,7 +292,7 @@ [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %] [% IF ( coce_id ) %] - + [% ELSE %] No cover image available [% END %] @@ -295,7 +300,7 @@ [% IF OpenLibraryCovers %] [% IF SEARCH_RESULT.normalized_isbn %] - + [% ELSE %] No cover image available [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index dd99fa2788..faee8c658d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -323,27 +323,33 @@