From aec676d8cbf419a1b4e76097eaf4b50ba15ad12b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 15 Jun 2017 12:32:43 +0000 Subject: [PATCH] Bug 18799: XSLTresultsdisplay hides the icons If item-level_itypes is turned off and XSLTResultsDisplay is turned on, biblio-level itemtype images are not shown in staff client search results. This patch corrects the problem. This patch also adds some markup and CSS to the itemtype image to make it look a litte cleaner and work better in result sets in which some titles have images and some don't. To test, apply the patch and view the staff client search results page with various settings: - XSLT turned on and off - item-level_itypes turned on and off - noItemTypeImages turned on and off Confirm that item type images are shown or not shown correctly according to each setting. The difference between this patch and the other patch currently on this bug is that this patch continues the practice of hiding biblio-level itemtype information when item-level_itypes is ON. Signed-off-by: Victor Grousset Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart (cherry picked from commit 3c5843b1564cc2f1cab2c6bb8be7556b51730631) Signed-off-by: Fridolin Somers --- .../intranet-tmpl/prog/css/staff-global.css | 21 +++++++++++++++- .../prog/en/modules/catalogue/results.tt | 25 ++++++++----------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index 7e1e5d4f24..171dbe3e10 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -3213,4 +3213,23 @@ table#ill-requests { .loggedin-menu-label { display: none; } -} \ No newline at end of file +} + +span.name { + font-weight: bold; + font-style: italic; +} + +.result-biblio-itemtype { + float: right; + padding: .5em; + margin: .5em; + font-size: 85%; + text-align: center; +} + +.result-biblio-itemtype img { + display: block; + margin: auto; + margin-bottom: 2px; +} 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 b20150efc5..cde7d8c2f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -630,6 +630,16 @@ function holdForPatron() { + + [% UNLESS ( item_level_itypes ) %] +
+ [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] + [% SEARCH_RESULT.description %] + [% END %] + [% SEARCH_RESULT.description %] +
+ [% END %] + [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %] [% SEARCH_RESULT.result_number %]. [% SEARCH_RESULT.XSLTResultsRecord %] @@ -650,22 +660,9 @@ function holdForPatron() { [% ELSE %]   [% END %] -

- [% UNLESS ( item_level_itypes ) %] - [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] - [% SEARCH_RESULT.description %] - [% END %] - [% SEARCH_RESULT.description %] - [% END %] - [% SEARCH_RESULT.summary %]

+

[% SEARCH_RESULT.summary %]

[% ELSE %]

- [% UNLESS ( item_level_itypes ) %] - [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] - - [% END %] - [% END %] - [% IF ( SEARCH_RESULT.author ) %] [% SEARCH_RESULT.author %] [% ELSE %] -- 2.39.5