It would be nice if the HighlightOwnItemsOnOPAC preference worked on sites using XSLT
I agree. This is still an issue. While at this time, it does move the item(s), it does not increase the size of the font or highlight the row. I would also add it would be nice it the prefernce allowed you to choose both options for detection, rather than either or.
In my quick test this looks like it works with or without XSLT on the detail page and neither with or without XSLT on the results page. Can anyone confirm?
(In reply to Owen Leonard from comment #2) > In my quick test this looks like it works with or without XSLT on the detail > page and neither with or without XSLT on the results page. Can anyone > confirm? I can confirm that for us, it puts the items at the top of the list, but I don't see any font changes or highlighting. I think we have XSLT in use, but am not sure.
Detail page: The highlight is supposed to be done adding a "highlight-row-detail" class, but it does not appear in the css file. Result page: The code has been copied from the detail page, but... cannot work. A class is also used, highlight-row-results, but is never set. The 'branchcode' key that is compared with $branchcode: 850 if ( $item->{branchcode} eq $branchcode ) { does not exist (not set by searchResults)
(In reply to Jonathan Druart from comment #4) > Result page: The code has been copied from the detail page, but... cannot > work. > A class is also used, highlight-row-results, but is never set. The > 'branchcode' key that is compared with $branchcode: > 850 if ( $item->{branchcode} eq $branchcode ) { > does not exist (not set by searchResults) => This is actually a regression, my bad. commit df97814f3034a3d5015546c4eca21f08ae951e37 Bug 15758: Koha::Libraries - Remove GetBranches
Created attachment 94631 [details] [review] Bug 11426: Restore HighlightOwnItemsOnOPAC for XSLT view
With this page you will get the feature working as expected with the non-XSLT views (do not forget `yarn build --view opac`)
Should this be 'Needs signoff'?
(In reply to Katrin Fischer from comment #8) > Should this be 'Needs signoff'? No, see my previous comment. It only makes the feature work for non-XSLT view. We need it for the XSLT view.
Created attachment 103379 [details] [review] Bug 11426: [POC] Make HighlightOwnItemsOnOPAC work with XSLT This xsl syntax is insane. We should add this ugly choose test all over this xsl file, then also in the detail page (with the class highlight-row-detail). Note that the non-XSLT view use HighlightOwnItemsOnOPACWhich that can be 'OpacURLBranch'. In that case we should not test logged_in_user_branchcode, but $ENV{BRANCHCODE}. However since we use plack this feature may have been lost.
This is a way to go, feel free to continue the job if you need it.
Jonathan are you unsatisfied with your solution for some reason? What do you think is unfinished?
I cannot remember exactly but I think the answer is in the patch comment: """ This xsl syntax is insane. We should add this ugly choose test all over this xsl file, then also in the detail page (with the class highlight-row-detail). """
This non-XSLT feature will be removed on bug 12561.