to reproduce : 'xsltresultsdisplay' => default In intranet search, icons are not displayed
Created attachment 64276 [details] [review] Bub 18799: Display icons on results.tt TEST PLAN: 1 - Set xsltresultsdisplay to default 2 - Search something in the catalog => you shouldn't see any icon 3 - Apply patch 4 - Search again, you shall see icons beside the titles of resources
Created attachment 64277 [details] [review] Bug 18799: Display icons on results.tt TEST PLAN: 1 - Set xsltresultsdisplay to default 2 - Search something in the catalog => you shouldn't see any icon 3 - Apply patch 4 - Search again, you shall see icons beside the titles of resources
You must have item-level_itypes on biblio record and biblio.itemtypes defined on itemtypes with an icon.
Created attachment 64279 [details] [review] Bug 18799: Display icons on results.tt TEST PLAN: 1 - Set xsltresultsdisplay to default 2 - Search something in the catalog => you shouldn't see any icon 3 - Apply patch 4 - Search again, you shall see icons beside the titles of resources Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
I signoff. Anyone outside Biblibre is free to sign also.
This change doesn't make sense to me. Generally I think we consider biblio-level itemtype to be superseded by item-level itemtype when it comes to displaying itemtype information. I think without this patch it works correctly.
In this case, shouldn't the non XSLT interface hide those icons to ?
(In reply to Owen Leonard from comment #6) > This change doesn't make sense to me. Generally I think we consider > biblio-level itemtype to be superseded by item-level itemtype when it comes > to displaying itemtype information. I think without this patch it works > correctly. But in OPAC icons are displayed and in intranet if no XSLT. Behavior with or without XSLT should be the same outside XSLT generate HTML code. One can always hide the icons with syspref noItemTypeImages.
Regarding last comments another signoff is needed.
I think this bug can be fixed in a different way which will be acceptable to all. I'm preparing an alternate patch.
Created attachment 64327 [details] Alternate patch which preserves status quo on biblio vs. item-level itemtypes Bug 18799 [ Alternate ] 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.
Created attachment 64728 [details] [review] Alternate patch which preserves status quo on biblio vs. item-level itemtypes Hopefully this makes Owen's patch a nice patch.
I hope Fridolin doesn't mind, but I really believe Owen's patch is better. Style inlined is really bad HTML, not to mention Owen actually optimizes the UNLESS code into one spot and brings code consistency. It's beautiful, Owen.
Comment on attachment 64279 [details] [review] Bug 18799: Display icons on results.tt Owen's patch is better, in my opinion.
Comment on attachment 64279 [details] [review] Bug 18799: Display icons on results.tt Review of attachment 64279 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ +532,5 @@ > [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %] > [% SEARCH_RESULT.result_number %]. > + [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] > + <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="[% SEARCH_RESULT.description %]" /> > + [% END %] Now after testing, I get it. This will always display for XSLT records regardless of the item-itype system preference setting.
The icons should ALWAYS display, regardless of the item-itype system preference, should they not?
(In reply to M. Tompsett from comment #13) > I hope Fridolin doesn't mind, but I really believe Owen's patch is better. > Style inlined is really bad HTML, not to mention Owen actually optimizes the > UNLESS code into one spot and brings code consistency. It's beautiful, Owen. No problem, this patch is indeed better, Owen is a first class patcher ;). I'll test.
I don't see any difference between DisplayIconsXSLT setted and not setted, in all case, all icons are displayed in intranet results and not in intranet details. I tested on this sandbox because I have locally no Marc21: http://pro.user03-koha.sandbox.biblibre.eu/cgi-bin/koha/catalogue/detail.pl?biblionumber=73&searchid=scs_1498810298579 If you have an idea of what went wrong.. ;)
(In reply to Baptiste from comment #18) > I don't see any difference between DisplayIconsXSLT setted and not setted, > in all case, all icons are displayed in intranet results and not in intranet > details. > > I tested on this sandbox because I have locally no Marc21: > http://pro.user03-koha.sandbox.biblibre.eu/cgi-bin/koha/catalogue/detail. > pl?biblionumber=73&searchid=scs_1498810298579 > > If you have an idea of what went wrong.. ;) XSLT sysprefs are empty on this sandbox, use "default"
The issue isn't the XSLT sysprefs per say. The issue is the item-itype system preference. Toggle that in your testing too! And make sure to have 2 records one with a biblio level item type and another with an item level item type.
Hum ok.. So the settings: item-level_itype => biblio record XSLTDetailsDisplay, XSLTListsDisplay , XSLTResultsDisplay => "default" DisplayIconsXSLT => show noItemTypeImages => show I can find icons on this page http://pro.user03-koha.sandbox.biblibre.eu/cgi-bin/koha/catalogue/detail.pl?biblionumber=384&searchid=scs_1499067251739 but with all others settings it works
I have tested, works well. But with biblio level item type, the image is displayed right of record text. Without patch it is left. Shouldn't it be CSS : .result-biblio-itemtype { float: left; ... ? I think display is better with image left.
Created attachment 73514 [details] [review] Bug 18799 [ Alternate ] 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.
Rebased the patch and solved conflicts.
Comment on attachment 64728 [details] [review] Alternate patch which preserves status quo on biblio vs. item-level itemtypes >From a971568d84bb64f5e1cdefda13192fac2653695f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 15 Jun 2017 12:32:43 +0000 >Subject: [PATCH] Bug 18799 [ Alternate ] 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. >--- > koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 14 ++++++++++++ > .../prog/en/modules/catalogue/results.tt | 25 ++++++++++------------ > 2 files changed, 25 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >index fb09d51..6d37ce3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >@@ -3007,3 +3007,17 @@ fieldset.rows + fieldset.action { > #patron_search #filters { > display: none; > } >+ >+.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 e035200..a8e8f44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -529,6 +529,16 @@ var holdForPatron = function () { > <input type="checkbox" class="selection" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" style="display:none" /> > </td> > <td> >+ >+ [% UNLESS ( item_level_itypes ) %] >+ <div class="result-biblio-itemtype"> >+ [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] >+ <img src="[% SEARCH_RESULT.imageurl %]" alt="[% SEARCH_RESULT.description %]" /> >+ [% END %] >+ [% SEARCH_RESULT.description %] >+ </div> >+ [% END %] >+ > [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %] > [% SEARCH_RESULT.result_number %]. > [% SEARCH_RESULT.XSLTResultsRecord %] >@@ -549,22 +559,9 @@ var holdForPatron = function () { > [% ELSE %] > > [% END %] >- <p> >- [% UNLESS ( item_level_itypes ) %] >- [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] >- <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="[% SEARCH_RESULT.description %]" /> >- [% END %] >- [% SEARCH_RESULT.description %] >- [% END %] >- [% SEARCH_RESULT.summary %]</p> >+ <p>[% SEARCH_RESULT.summary %]</p> > [% ELSE %] > <p> >- [% UNLESS ( item_level_itypes ) %] >- [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] >- <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="" /> >- [% END %] >- [% END %] >- > [% IF ( SEARCH_RESULT.author ) %] > <a href="/cgi-bin/koha/catalogue/search.pl?idx=au&q=[% SEARCH_RESULT.author |url %]" title="Search for this Author">[% SEARCH_RESULT.author %]</a> > [% ELSE %] >-- >2.1.4
(In reply to Fridolin SOMERS from comment #22) > I have tested, works well. > > But with biblio level item type, the image is displayed right of record text. > Without patch it is left. > > Shouldn't it be CSS : > .result-biblio-itemtype { float: left; ... > ? > > I think display is better with image left. In the end, no worries I'm ok with this change. It can be customized with intranetusercss syspref anyway.
Created attachment 74417 [details] [review] 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 <victor.grousset@biblibre.com>
(sorry for comment 25, by searching how to get diff of a patch, I somehow triggered a review...)
Created attachment 74609 [details] [review] 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 <victor.grousset@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 18.05, thanks to everybody involved!
Pushed to 17.11.x for 17.11.07