From 8c858f50a85614945a14ded29675a9be409b0a92 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 18 Mar 2019 17:44:30 +0000 Subject: [PATCH] Bug 22445: (follow-up) Use CSS to set a max-width for images - Staff client This patch adds some CSS and markup to staff client templates so that custom cover images have a maximum width of 140px (to match the width of generated local cover image thumbnails). This prevents oversized images from displaying inconsistently compared to images from other services. This patch also adds a missing to fix display problems. To test, apply the patch and regenerate the staff client CSS. Post an oversized image which corresponds to a record in your catalog. View the following pages to confirm that the image displays well: - Catalog search results - Bibliographic detail page Sponsored-by: Orex Digital Signed-off-by: Hayley Mapley Signed-off-by: Hugo Agud Signed-off-by: Owen Leonard Signed-off-by: Michal Denar Signed-off-by: Kyle Hall Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- 3 files changed, 8 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 1f0c3274d2..1e6c23282a 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2094,6 +2094,12 @@ li { text-align: center; } +.custom_cover_image { + img { + max-width: 140px; + } +} + .searchhighlightblob { font-size: 75%; font-style: italic; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 21feb30194..f3bb3a1bf4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -155,7 +155,7 @@ [% END %] [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] - Cover image + Cover image [% END %] [% END %] 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 044f490c47..d52245a71d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -418,7 +418,7 @@ [% END %] [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] - Cover image + Cover image [% END %] [% END # /IF( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce )%] -- 2.39.5