Bug 11516: make OPAC search term highlighting work in results browser
authorFridolin SOMERS <fridolin.somers@biblibre.com>
Fri, 10 Jan 2014 10:42:06 +0000 (11:42 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 10 Mar 2014 21:30:38 +0000 (21:30 +0000)
commit9d9a002432554913bc21f91cae031b3afa9077f9
tree0505c2bfab91d23cd3e1d023093f10670e7d2296
parent5c4ae8768dee984a1bdb240e0fee790c76ae6919
Bug 11516: make OPAC search term highlighting work 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
nd 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.
- 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élie <aurelie.fichot@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
opac/opac-detail.pl