From f119b4d2f85a2fabc8dd3113580df8a418496f4c 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 --- 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 0ac6b70d48..09742e1d5d 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2454,6 +2454,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 019c4aad15..f103567670 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -143,7 +143,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 6008047a74..d1679f3fc6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -396,7 +396,7 @@ [% END # /IF AmazonCoverImages %] [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] - Cover image + Cover image [% END %] [% END # /IF( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled )%] -- 2.11.0