From 92ea1dc7db1ed25eca555003f5cb49037e78fb66 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. --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 207 +++++---------------- 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, 111 insertions(+), 220 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 121fe6d..69f3191 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1090,19 +1090,20 @@
- [% IF ( OpacBrowseResults && busc ) %] + [% IF ( Koha.Preference('OpacBrowseResults') && busc ) %]