From 45222335d90e86df530962385089eb633fd462e8 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. Signed-off-by: Stina Hallin --- .../opac-tmpl/bootstrap/en/includes/shelfbrowser.inc | 12 +++++++++--- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 14 ++++++++++---- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 19 ++++++++++++------- .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 18 ++++++++++++------ 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc index e2af2e9d55..af40b5e638 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc @@ -22,9 +22,15 @@ [% FOREACH item IN shelfbrowser_items %] + [% IF ( item.title ) %] + [% img_title = item.title %] + [% ELSE %] + [% img_title = item.biblionumber %] + [% END %] + [% IF ( OPACLocalCoverImages ) %] -
+
[% END %] [% IF ( OPACAmazonCoverImages ) %] [% IF ( item.browser_normalized_isbn ) %] @@ -46,14 +52,14 @@ [% IF ( GoogleJackets ) %] [% IF ( item.browser_normalized_isbn ) %] -
+
[% ELSE %] No cover image available [% END %] [% END %] [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] [% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %] -
+
[% END %] [% IF ( BakerTaylorEnabled ) %] [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 197672c124..126dbcf2a9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -53,8 +53,14 @@
+ [% IF ( biblio.title ) %] + [% img_title = biblio.title %] + [% ELSE %] + [% img_title = biblio.biblionumber %] + [% END %] + [% IF ( OPACLocalCoverImages ) %] -
+
[% END %] [% IF ( AdlibrisEnabled && normalized_isbn ) %] @@ -79,14 +85,14 @@ [% END %] [% IF ( GoogleJackets ) %] -
+
[% END %] [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] [% coce_id = normalized_ean || normalized_isbn | html %] -
+
[% END %] [% IF OpenLibraryCovers %] -
+
[% END %] [% bt_id = ( normalized_upc || normalized_isbn ) %] [% IF ( BakerTaylorEnabled && bt_id ) %] 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 66912e6a44..66a49d5b58 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -270,19 +270,24 @@
+ [% IF ( SEARCH_RESULT.title ) %] + [% img_title = SEARCH_RESULT.title %] + [% ELSE %] + [% img_title = SEARCH_RESULT.biblionumber %] + [% 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 %] @@ -290,7 +295,7 @@ [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %] - + [% ELSE %] No cover image available [% END %] @@ -298,7 +303,7 @@ [% IF ( GoogleJackets ) %] [% IF ( SEARCH_RESULT.normalized_isbn ) %] - + [% ELSE %] No cover image available [% END %] @@ -307,7 +312,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 %] @@ -315,7 +320,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..974e4f0266 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 @@