[Bug 29713] New: Make item table when placing an item level hold sortable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Bug ID: 29713 Summary: Make item table when placing an item level hold sortable Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org For serial records where the items are different volumes and issues, item level holds make sense, but there are often a lot of items to pick from too. It would be great if the item form on the hold request page in the OPAC had sorting and filter options to make picking the correct item easier. The table is already sortable in the staff interface. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |/cgi-bin/koha/opac-reserve. | |pl?biblionumber= -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 129812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129812&action=edit Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. Note: This patch includes some whitespace changes, so diff accordingly. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129812|0 |1 is obsolete| | --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 129815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129815&action=edit Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. Note: This patch includes some whitespace changes, so diff accordingly. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- This works well and I am signing off on it but thought it would be worth mentioning that the QA tool says: FAIL koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt FAIL forbidden patterns forbidden pattern: Font Awesome icons need the aria-hidden attribute for accessibility purpose (see bug 25166) (line 378) I don't quite understand what would be wrong because the FA icon on line 378 does have the aria-hidden attribute: <i class="fa fa-remove danger" aria-hidden="true" title="Cannot be put on hold"></i> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- *** Bug 29972 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|Signed Off |Patch doesn't apply --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129815|0 |1 is obsolete| | --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 130050 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130050&action=edit Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. Note: This patch includes some whitespace changes, so diff accordingly. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130050|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 130864 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130864&action=edit Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. Note: This patch includes some whitespace changes, so diff accordingly. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Not a big deal but I don't understand how the "Information" column is sorted: https://snipboard.io/zkms9E.jpg QA script raises an error, but it's not a regression: forbidden pattern: Font Awesome icons need the aria-hidden attribute for accessibility purpose (see bug 25166) (line 379) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply CC| |fridolin.somers@biblibre.co | |m --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Arf sorry patch does not apply anymore. Looks like it is because of Bug 29660. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I tried... but it's way too confusing for me. :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I don't have the time right now, but here is the result of the -w version of the local branch I have. That should make the patch easier to rewrite. diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 2d84cdffb44..424a26bac19 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -345,6 +345,7 @@ [% IF bibitemloo.itemholdable %] <table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber | html %]"> <caption>Select a specific item:</caption> + <thead> <tr> <th>Copy number</th> [% IF ( item_level_itypes ) %] @@ -365,10 +366,11 @@ <th>Notes</th> <th>Information</th> </tr> - + </thead> + <tbody> [% FOREACH itemLoo IN bibitemloo.itemLoop %] <tr class="[% itemLoo.backgroundcolor | html %]"> - <td class="copynumber"> + <td class="copynumber" data-order="[% itemLoo.copynumber | html %]"> [% IF ( itemLoo.available ) %] <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" /> [% ELSE %] @@ -451,6 +453,7 @@ </td> </tr> [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%] + </tbody> </table> <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] --> [% END # / IF ( bibitemloo.itemholdable )%] </div> <!-- / #hold-options-[% bibitemloo.biblionumber | html %] --> @@ -472,6 +475,7 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] <script> var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); @@ -673,6 +677,11 @@ return true; }); + $(".copiesrow").each(function(){ + $(this).DataTable({ + dom: "t" + }); + }); }); </script> [% END %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130864|0 |1 is obsolete| | --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 131206 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131206&action=edit Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. This patch also removes some obsolete JavaScript left over from before Flatpickr. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - The first entry in the table should be selected. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131206|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 131410 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131410&action=edit Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. This patch also removes some obsolete JavaScript left over from before Flatpickr. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - The first entry in the table should be selected. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This works nicely, thx for rescuing the patch, Owen! Only 'nit-pick' I have that we offer sorting on the first column with the checkboxes, but that doesn't appear to work, so we might want to remove the sorting option there altogether. (QA follow-up?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131410|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 132002 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132002&action=edit Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. This patch also removes some obsolete JavaScript left over from before Flatpickr. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - The first entry in the table should be selected. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |kyle@bywatersolutions.com Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29713 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31355 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31355 [Bug 31355] Specific item holds table on OPAC only showing 10 items -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org