When OpacHighlightedWords syspref is on, the current search terms are highlighted in results and detail pages. This workes in detail page with the URL param 'query_desc'. This parameter must be managed in results browser (appears when OpacBrowseResults syspref is on) links.
Created attachment 24116 [details] [review] Bug 11516 - OPAC highlight lost in results browser When OpacHighlightedWords syspref is on, the current search terms are highlighted in results and detail pages. This workes in detail page with the URL param 'query_desc'. This parameter must be managed in results browser (appears when OpacBrowseResults syspref is on) links. This patch adds query_desc parameter in results list and changes next and previous links to be build into TT instead of perl to manage query_desc parameter only into TT. Test plan : - Edit sysprefs : OpacHighlightedWords on, OpacBrowseResults on, OPACXSLTDetailsDisplay off, OPACXSLTResultsDisplay off (highlight actually does not work with XSLT) - Perform a search with a term existing into title => You see the term highlighted in search results - Go to detail of a result with highlight => You see the term highlighted - Click on "Next" => you see query_desc in URL, and if search term is present it is highlighted - Same for "Previous" - Click on "Browse results" - Click on a result => you see query_desc in URL, and if search term is present it is highlighted
Created attachment 24118 [details] [review] Bug 11516 - OPAC highlight lost in results browser When OpacHighlightedWords syspref is on, the current search terms are highlighted in results and detail pages. This workes in detail page with the URL param 'query_desc'. This parameter must be managed in results browser (appears when OpacBrowseResults syspref is on) links. This patch adds query_desc parameter in results list and changes next and previous links to be build into TT instead of perl to manage query_desc parameter only into TT. Test plan : - Edit sysprefs : OpacHighlightedWords on, OpacBrowseResults on, OPACXSLTDetailsDisplay off, OPACXSLTResultsDisplay off (highlight actually does not work with XSLT) - Perform a search with a term existing into title => You see the term highlighted in search results - Go to detail of a result with highlight => You see the term highlighted - Click on "Next" => you see query_desc in URL, and if search term is present it is highlighted - Same for "Previous" - Click on "Browse results" - Click on a result => you see query_desc in URL, and if search term is present it is highlighted
Patch tested with a sandbox, by Aurélie <aurelie.fichot@gmail.com>
Created attachment 24144 [details] [review] Bug 11516 - OPAC highlight lost in results browser When OpacHighlightedWords syspref is on, the current search terms are highlighted in results and detail pages. This workes in detail page with the URL param 'query_desc'. This parameter must be managed in results browser (appears when OpacBrowseResults syspref is on) links. This patch adds query_desc parameter in results list and changes next and previous links to be build into TT instead of perl to manage query_desc parameter only into TT. Test plan : - Edit sysprefs : OpacHighlightedWords on, OpacBrowseResults on, OPACXSLTDetailsDisplay off, OPACXSLTResultsDisplay off (highlight actually does not work with XSLT) - Perform a search with a term existing into title => You see the term highlighted in search results - Go to detail of a result with highlight => You see the term highlighted - Click on "Next" => you see query_desc in URL, and if search term is present it is highlighted - Same for "Previous" - Click on "Browse results" - Click on a result => you see query_desc in URL, and if search term is present it is highlighted Signed-off-by: Aur
YES ! The current search terms are highlighted in results and detail pages (but not in the "Browse results" but perhaps it's normal...).
The choice to "unhighlight" search terms is not remembered when moving between pages. If this is not an issue, please reset status to "Signed off".
(In reply to Kyle M Hall from comment #6) > The choice to "unhighlight" search terms is not remembered when moving > between pages. If this is not an issue, please reset status to "Signed off". The "Unhighlight" link is a JavaScript function. I think it is used only some times to maybe have a clearer look at record datas. So in my opinion, this choice should not be remembered when moving to another result. Note that in results page, "unhighlight" choice is not remembered when moving to another results page. (but not in the "Browse results" but perhaps it's normal...).(In reply to Aurélie Fichot from comment #5) > but not in the "Browse results" but perhaps it's normal... It is normal. It would be to much highlight in my opinion.
Created attachment 24512 [details] [review] Bug 11516 - OPAC highlight lost in results browser
Pushed to master. Thanks, Fridolin! I should point out one edit in particular I made to the commit message: I removed the statement that highlighting does not work when using XSLT -- it works for me.
Pushed to 3.14.x, will be in 3.14.07