Bug 8525: highlight matches on OPAC detail page
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 30 Jul 2012 21:16:07 +0000 (17:16 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 3 Sep 2012 07:58:28 +0000 (09:58 +0200)
commitba9c71f04ff34c88d6773257b1ae7c4c26bc2d97
treedf110b30cd012e39cf9e86b202543b6639856505
parent52973fc76d78ee7903b48c32870f5075fa73e57f
Bug 8525: highlight matches on OPAC detail page

After doing a search and going to the details page, it can sometimes
be difficult to see exactly *why* a record was returned by a search.
By highlighting matches on the detail page as well as the results
page, we make it much easier to figure that out.

This patch uses a query_desc CGI parameter which is inserted into links
from the results page with javascript. This serves to avoid the
potential privacy implications of a cookie, and ensures that users
without javascript enabled see no change whatsoever.

To test:
1) Do a search (or two) in the OPAC with OpacHighlightedWords on.
2) View a record or two of the results, and ensure that the correct
   words are highlighted.
3) Disable OpacHighlightedWords and do another search (or two),
   this time ensuring that no words are highlighted.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/includes/opac-detail-sidebar.inc
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
opac/opac-detail.pl