From 0256b4f94d2bb68594c2b3c476b6dc0bebe7b5ee 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 | 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 7567a7c..7751d49 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 ) %]