From db5aadaeb9761a8e4d1be974a05d59bea865ca3d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 3 Mar 2021 17:26:39 +0000 Subject: [PATCH] Bug 25846: (follow-up) Show "No cover image available" message This patch restores the use of a "No cover image available" message in staff interface search results when no cover image was found by any image service. The patch also corrects markup in the search results template which was preventing the "Adlibris cover image" text from being correctly hidden. Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/pages/results.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index b1db2c9db8..af5497a319 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2201,6 +2201,7 @@ td { min-width: 120px; text-align: center; } + .cover-slides { background: transparent none; border: 0; @@ -2602,6 +2603,8 @@ td { display: block; font-size: 86%; font-weight: bold; + margin: 1em auto; + padding: 1em; text-align: center; width: 75px; } 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 01ed7f72e9..d135b88c5d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -436,8 +436,8 @@ [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %]
Adlibris cover image +
Adlibris cover image
-
Adlibris cover image
[% END %] [% IF ( AmazonCoverImages && SEARCH_RESULT.normalized_isbn ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js index 07bf9abd53..785817c097 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js @@ -95,7 +95,7 @@ function verify_images() { /* If no slides contain any cover images, remove the container */ if( $(".cover-image:visible", slide).length < 1 ){ - slide.remove(); + slide.html('
' + __("No cover image available") + '
'); } }); } -- 2.39.5