Bug 23915 - Replace OPAC list sort menu with Bootstrap menu button
Summary: Replace OPAC list sort menu with Bootstrap menu button
Status: RESOLVED FIXED
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: Testopia
URL:
Keywords:
Depends on: 23913
Blocks: 24996
  Show dependency treegraph
 
Reported: 2019-10-28 17:49 UTC by Owen Leonard
Modified: 2020-03-29 05:49 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
This patch adds JavaScript to the list contents page which converts the resort form's <select> menu into a Bootstrap dropdown menu. This allows for a more compact and consistent display.
Version(s) released in:
20.05.00


Attachments
Screenshot showing the new menu button (in its active state) (97.15 KB, image/png)
2019-10-28 17:49 UTC, Owen Leonard
Details
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button (4.33 KB, patch)
2019-10-28 18:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button (4.33 KB, patch)
2020-01-27 12:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button (7.60 KB, patch)
2020-01-28 15:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button (7.65 KB, patch)
2020-01-28 18:30 UTC, David Nind
Details | Diff | Splinter Review
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button (7.71 KB, patch)
2020-01-29 21:47 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 2019-10-28 17:49:44 UTC
Created attachment 94816 [details]
Screenshot showing the new menu button (in its active state)

After consolidating the menus in Bug 23913, the structure of the resort form lends itself to being replaced, via JavaScript with a Bootstrap menu button. This allows for a more compact toolbar.
Comment 1 Owen Leonard 2019-10-28 18:13:19 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass 2019-12-09 15:41:54 UTC
Owen,

This is by far better than the old form! I have two comments:

1. When you pull up the new dropdown I think the .dropdown-header classes look a bit off. Can the text be bold and can we include a margin-left so the text isn't right up against the dropdown.

2. On smaller mobile screens #toolbar disappears entirely eliminating the ability to sort from a phone or small screen size. (This is at 600px and below).
Comment 3 David Nind 2020-01-26 20:26:02 UTC
Error message when applying patch - I think this means the patch didn't apply:

Applying: Bug 23915: Replace OPAC list sort menu with Bootstrap menu button
error: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 23915: Replace OPAC list sort menu with Bootstrap menu button
The copy of the patch that failed is found in: .git/rebase-apply/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-23915-Replace-OPAC-list-sort-menu-with-Bootstr-dRZj3P.patch
Comment 4 Owen Leonard 2020-01-27 12:50:58 UTC Comment hidden (obsolete)
Comment 5 David Nind 2020-01-27 19:30:13 UTC
Everything looks and works fine except for the sort by copyright date.

- Copyright date (newest to oldest): sorts as asc when it should be desc (for example, lists an 1875 item before 2009)

- Copyright date (oldest to newest): sorts as desc when it should be asc (for example, lists an 2009 item before 1875)

It looks like this was introduced by Bug 23913 - the above behaviour is in master, but not in 19.11.x.

Should this be fixed in this bug, or should it be a new bug?
Comment 6 Owen Leonard 2020-01-28 15:38:44 UTC
Created attachment 98039 [details] [review]
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button

This patch adds JavaScript to the list contents page which converts the
resort form's <select> menu into a Bootstrap dropdown menu. This allows
for a more compact and consistent display.

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).

View a list in the OPAC. The toolbar of list controls ("New list,"
"Download list," etc.) should have a similary-styled "Sort" button. Each
sorting option should work correctly.
Comment 7 Owen Leonard 2020-01-28 15:43:15 UTC
(In reply to David Nind from comment #5)
> Should this be fixed in this bug, or should it be a new bug?

I have modified the patch.
Comment 8 David Nind 2020-01-28 18:30:33 UTC
Created attachment 98045 [details] [review]
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button

This patch adds JavaScript to the list contents page which converts the
resort form's <select> menu into a Bootstrap dropdown menu. This allows
for a more compact and consistent display.

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).

View a list in the OPAC. The toolbar of list controls ("New list,"
"Download list," etc.) should have a similary-styled "Sort" button. Each
sorting option should work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Katrin Fischer 2020-01-29 21:47:30 UTC
Created attachment 98092 [details] [review]
Bug 23915: Replace OPAC list sort menu with Bootstrap menu button

This patch adds JavaScript to the list contents page which converts the
resort form's <select> menu into a Bootstrap dropdown menu. This allows
for a more compact and consistent display.

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).

View a list in the OPAC. The toolbar of list controls ("New list,"
"Download list," etc.) should have a similary-styled "Sort" button. Each
sorting option should work correctly.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Martin Renvoize 2020-01-30 11:04:03 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Joy Nelson 2020-02-10 23:19:46 UTC
Enhancement not backported to 19.11.x