Created attachment 75888 [details] Screenshot of the proposed change The HTML generated by the OPAC detail page's results browser (enabled by the OpacBrowseResults system preference) could be easily done in the HTML. This would make it easier to understand and debug, and provide the possibility of having it work without JavaScript.
Created attachment 75889 [details] Wanted: help adding pagination to the pagination Ideally the numbered links should have a forward and back as mocked up in this screenshot. Clicking the "back" link in this example would take you to results 21-40. However, I don't know how to accomplish it.
Created attachment 75918 [details] [review] 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.
Created attachment 75919 [details] [review] 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.
Created attachment 76486 [details] [review] 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.
Patch tested with a sandbox, by Cab Vinton <bibliwho@gmail.com>
Created attachment 77620 [details] [review] 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 <bibliwho@gmail.com>
Hi Owen, can you please provide a rebased patch? Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version Using index info to reconstruct a base tree... A koha-tmpl/opac-tmpl/bootstrap/less/opac.less A koha-tmpl/opac-tmpl/bootstrap/less/responsive.less Falling back to patching base and 3-way merge... CONFLICT (modify/delete): koha-tmpl/opac-tmpl/bootstrap/less/opac.less deleted in HEAD and modified in Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version. Version Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version of koha-tmpl/opac-tmpl/bootstrap/less/opac.less left in tree. Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss error: Failed to merge in the changes. Patch failed at 0001 Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version Use 'git am --show-current-patch' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-20898---Replace-OPAC-details-results-browser-w-3X0gZy.patch
Created attachment 77660 [details] [review] 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_SCSS_in_the_OPAC_and_staff_client) - 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 <bibliwho@gmail.com>
Created attachment 77680 [details] [review] 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_SCSS_in_the_OPAC_and_staff_client) - 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 <bibliwho@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 78131 [details] [review] 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_SCSS_in_the_OPAC_and_staff_client) - 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 <bibliwho@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I rebased (I think correctly) but I notice that when I hit 'Close' in the browse results it actually opens the list? Seems a little confusing. Is the JS section with "prepareShelfBrowser" still needed? Or was that bad rebase on my part?
Created attachment 78328 [details] [review] 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_SCSS_in_the_OPAC_and_staff_client) - 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 <bibliwho@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Nick Clemens from comment #11) > I rebased (I think correctly) but I notice that when I hit 'Close' in the > browse results it actually opens the list? Seems a little confusing. I tried my own rebase and it looked good to me when I tested. Can you please try again?
Awesome work all! Pushed to master for 18.11
I really like this change :) Enhancement, will not be backported to 18.05.x series.