Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version
Summary: Replace OPAC detail's results browser with non-JavaScript version
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-07 18:22 UTC by Owen Leonard
Modified: 2018-08-10 14:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Screenshot of the proposed change (142.71 KB, image/png)
2018-06-07 18:22 UTC, Owen Leonard
Details
Wanted: help adding pagination to the pagination (17.28 KB, image/png)
2018-06-07 19:25 UTC, Owen Leonard
Details
Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version (110.29 KB, patch)
2018-06-08 12:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version (22.77 KB, patch)
2018-06-08 12:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version (23.04 KB, patch)
2018-06-27 13:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20898 - Replace OPAC detail's results browser with non-JavaScript version (23.09 KB, patch)
2018-08-09 13:02 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 20898: Replace OPAC detail's results browser with non-JavaScript version (22.81 KB, patch)
2018-08-10 13:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20898: Replace OPAC detail's results browser with non-JavaScript version (22.87 KB, patch)
2018-08-10 14:24 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2018-06-07 18:22:03 UTC
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.
Comment 1 Owen Leonard 2018-06-07 19:25:42 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2018-06-08 12:10:02 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2018-06-08 12:16:51 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2018-06-27 13:00:23 UTC Comment hidden (obsolete)
Comment 5 sandboxes@biblibre.com 2018-08-09 13:02:14 UTC
Patch tested with a sandbox, by Cab Vinton <bibliwho@gmail.com>
Comment 6 sandboxes@biblibre.com 2018-08-09 13:02:46 UTC
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>
Comment 7 Katrin Fischer 2018-08-10 12:21:55 UTC
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
Comment 8 Owen Leonard 2018-08-10 13:13:54 UTC
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>
Comment 9 Katrin Fischer 2018-08-10 14:24:02 UTC
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>