Summary: | Make list of lists in OPAC sortable | ||
---|---|---|---|
Product: | Koha | Reporter: | Alexandre <alexandre.breton> |
Component: | OPAC | Assignee: | Bugs List <koha-bugs> |
Status: | In Discussion --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P2 | CC: | barbara.johnson, bwsdonna, chloe.zermatten, dcook, ffogden, jrobb, koha, marjorie.barry-vila, martin.renvoize, maura.stephens, patrick.robitaille, sally.healey, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32341 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38712 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 28965 | ||
Bug Blocks: |
Description
Alexandre
2017-02-21 17:15:50 UTC
I just checked, the table is not sortable, but it would be nice to have. The list of lists in the OPAC is paginated server-side, so adding sorting would require one of these methods: 1. Add sorting to the query, including handling of ascending and descending and the ability to order by the number of titles on the list. 2. Remove the server-side pagination and use DataTables to sort and paginate the all the results client-side. This would be adequate only if it isn't expected that there might be a very large number of lists. 3. Remove the server-side pagination and re-implement the table with an AJAX datasource, doing AJAX pagination. I think 1) might be easiest, but I think we will keep adding new sort requests for every columsn etc and it seems a bit non-standard these days. I am not sure how many entries some lists have - I haven't seen a really really long one, but it could happen... so maybe 3) would be best? Adding tcohen as I think handling big table data server side is something he has been working on for acquisitions in order to fix performance issues. (In reply to Owen Leonard from comment #2) > The list of lists in the OPAC is paginated server-side, so adding sorting > would require one of these methods: > > 1. Add sorting to the query, including handling of ascending and descending > and the ability to order by the number of titles on the list. > > 2. Remove the server-side pagination and use DataTables to sort and paginate > the all the results client-side. This would be adequate only if it isn't > expected that there might be a very large number of lists. > > 3. Remove the server-side pagination and re-implement the table with an AJAX > datasource, doing AJAX pagination. 4. Add an API route for this, and use the features we've recently added (specially bug 24561). It would make sorting by any column just trivial. We currently have a metric ton of public lists. Having a way to sort and filter the list of lists in the OPAC like we can in the staff client would be incredibly beneficial to our OPAC users. We don't have a metric tonne, because we review and remove ours periodically, but it would be brilliant to have lists be sortable on the OPAC. It'd be even better if the staff client could control the default order (e.g. date added, date desc). We don't have a preference over 1, 2, 3 or 4 - they're all workable solutions. 2 might be nice for consistency; I think the Charges table uses DataTables on the OPAC? We can always target a DataTable with jQuery to set the default sort. (In reply to Sally from comment #6) > 2 might be nice for consistency; I think the Charges table uses DataTables > on the OPAC? We can always target a DataTable with jQuery to set the > default sort. Truth is, 4 implies 2. i.e. implement using DataTables, but against the API instead of a custom script in svc. Let's do it :-D Ah brilliant - sounds like a great approach! +1 Our library would like to be able to sort the list of lists alphabetically and by date. It would also be nice if there was a way to bump a specific list (such as a seasonal list or hot top) to the top of the list of lists in order to highlight it for patrons. We're still interested in this development. We've recently had more libraries asking for options in how the lists display in the OPAC. Ideally, the option to order them like news items are handled using "display in position" would be best. (In reply to Donna from comment #12) > We've recently had more libraries asking for options in how the lists > display in the OPAC. Ideally, the option to order them like news items are > handled using "display in position" would be best. I think it makes it a little hard to order/reorder if you have a lot of lists. Maybe we could integrate something like drag&drop sorting to make this easier to handle. Had a library ask for this today, but it sounds like the community is a bit stuck on how to proceed? For what it's worth, on the server side, we're using DataTables. We may as well do it on the OPAC too. PLEASE can the list of lists at the very least be sortable alphabetically? Sorted by creation or some other random order really makes it a challenge to promote the lists and the only workaround is to create links to the lists manually in alpha order in an html page so defeating the otherwise brilliant idea of the lists. This is coming from a Koha user & Librarian in a membership organisation. Thank you, Fiona, RICS. (In reply to Fiona Fogden from comment #15) > PLEASE can the list of lists at the very least be sortable alphabetically? > Sorted by creation or some other random order really makes it a challenge to > promote the lists and the only workaround is to create links to the lists > manually in alpha order in an html page so defeating the otherwise brilliant > idea of the lists. > This is coming from a Koha user & Librarian in a membership organisation. > > Thank you, Fiona, RICS. It looks like the list of lists is sorted alphabetically in the OPAC: http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=list&public=0 http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=list&public=1 Although in the "Lists" dropdown it seems to be sorted by newest to oldest. Funnily enough the list of lists in the staff interface seems to sort by oldest to newest: http://localhost:8081/cgi-bin/koha/virtualshelves/shelves.pl I do want to look at this before the end of the year. Reminder to myself and others that the DataTable wrapper around the REST API comes from bug 24561 I'm not sure this feature is currently used in OPAC at all, but bug 24561 appears to have added it for OPAC so fingers crossed that it works. Not quite ready to take this one as Assignee yet. At the moment, I'm trying to still figure out how much work this is going to be... Thank you @david cook. I am not technical but happy to help with testing if I can remember how to do that from my recent PTFS customer forum session! Are you still intending to look into this David? (In reply to Martin Renvoize (ashimema) from comment #20) > Are you still intending to look into this David? It's on my TODO list (as a low priority), but I'm not as adept with the API-driven DataTables as others I think, so if someone else wants to do it I'd be more than happy for them to do it. I had hoped to have time in December 2024 to do it, but other things took priority. But if no one else does it, eventually I plan to do it. |