From 522d4436974c6a28f4ab79495b954b1882f5a3d6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 8 Jun 2018 12:13:04 +0000 Subject: [PATCH] Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version This patch moves generation of the OPAC detail page's results browser from JavaScript to the template. This makes the template easier to understand and easier to debug. It also makes it possible for the widget to be completely non-dependent on JavaScript. To test, apply the patch and regenerate the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_Bootstrap_OPAC_LESS_files). - Enable the OpacBrowseResults system preference and perform a search in the OPAC which will return multiple results. - Click on any title in the first page of search results. - On the bibliographic detail page there should be a "Browse results" link in the right-hand sidebar just as before. - Test that the "Previous," "Back to results," and "Next" links work correctly. - Click the "Browse results" link. A list of the first 20 search results should appear. An arrow should indicate the title you're viewing. - Click any title in the results browser. The page should correctly load that record. - Clicking the numbered links at the top of the results browser should do the same. Signed-off-by: Cab Vinton --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 209 +++++---------------- koha-tmpl/opac-tmpl/bootstrap/less/opac.less | 110 ++++++----- koha-tmpl/opac-tmpl/bootstrap/less/responsive.less | 12 +- opac/opac-detail.pl | 2 +- 4 files changed, 112 insertions(+), 221 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 3278210..798a662 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1061,19 +1061,20 @@
- [% IF ( OpacBrowseResults && busc ) %] + [% IF ( Koha.Preference('OpacBrowseResults') && busc ) %]