From 315f6fd0410fc10059ab1c0e8518002522bf104a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 18 Mar 2019 17:44:30 +0000 Subject: [PATCH] Bug 22455: (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 https://bugs.koha-community.org/show_bug.cgi?id=22445 --- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- koha-tmpl/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 af5afa2..4787e69 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2425,6 +2425,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 332990b..1449b7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -149,7 +149,7 @@ [% END %] [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] - Cover image + Cover image [% END %] [% END %] [% ELSE %] 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 f8b562a..6d0336d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -387,7 +387,7 @@ [% END %] [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] - Cover image + Cover image [% END %] [% END %] -- 2.1.4