When a user is placing a hold in a consortium, there may be many items on a record that cannot be held. We display these items which can cause the need for scrolling to get to items that can be held.
Created attachment 128580 [details] [review] Bug 29706: Improve table elements This patch add a thead and tbody element to the 'copiesrow' table
Created attachment 128581 [details] [review] Bug 29706: Hide items that cannot be held by default when placing hold on OPAC This patch adds a 'holdable' and 'unholdable' class to the rows of the table Additionally I rename the 'backgroundcolor' field to 'onloan' as that is what it contains. Note: Out of the box, there is no css associated with this class I add a div around the table to allow hiding the new buttons as well when optiuons are hidden It would be nice in the future to utilise a Koha table here, however, it is complicated by multi-holds To test: 1 - Add a number of items to a record, ensuring they belong to different libraries 2 - Set 'Default checkout, hold and return policy'->'Hold policy' to 'From home library' 3 - Sign in to opac and attempt to placehold on the record 4 - Click 'show more options' and 'a specificitem' 5 - Note holds table includes items that cannot be held 6 - Apply patch 7 - Reload holds page 8 - Note items that cannot be heldare hidden 9 - Click 'Show unholdable items' and note they appear 10 - Click 'Hide unholdable items' and veriofy they hide 11 - Test with multi holds
Created attachment 129196 [details] [review] Bug 29706: Hide items that cannot be held by default when placing hold on OPAC This patch adds a 'holdable' and 'unholdable' class to the rows of the table Additionally I rename the 'backgroundcolor' field to 'onloan' as that is what it contains. Note: Out of the box, there is no css associated with this class I add a div around the table to allow hiding the new buttons as well when optiuons are hidden It would be nice in the future to utilise a Koha table here, however, it is complicated by multi-holds To test: 1 - Add a number of items to a record, ensuring they belong to different libraries 2 - Set 'Default checkout, hold and return policy'->'Hold policy' to 'From home library' 3 - Sign in to opac and attempt to placehold on the record 4 - Click 'show more options' and 'a specificitem' 5 - Note holds table includes items that cannot be held 6 - Apply patch 7 - Reload holds page 8 - Note items that cannot be heldare hidden 9 - Click 'Show unholdable items' and note they appear 10 - Click 'Hide unholdable items' and veriofy they hide 11 - Test with multi holds Signed-off-by: The Minh Luong <the-minh.luong@inlibro.com>
Created attachment 130262 [details] [review] Bug 29706: Improve table elements This patch add a thead and tbody element to the 'copiesrow' table Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 130263 [details] [review] Bug 29706: Hide items that cannot be held by default when placing hold on OPAC This patch adds a 'holdable' and 'unholdable' class to the rows of the table Additionally I rename the 'backgroundcolor' field to 'onloan' as that is what it contains. Note: Out of the box, there is no css associated with this class I add a div around the table to allow hiding the new buttons as well when optiuons are hidden It would be nice in the future to utilise a Koha table here, however, it is complicated by multi-holds To test: 1 - Add a number of items to a record, ensuring they belong to different libraries 2 - Set 'Default checkout, hold and return policy'->'Hold policy' to 'From home library' 3 - Sign in to opac and attempt to placehold on the record 4 - Click 'show more options' and 'a specificitem' 5 - Note holds table includes items that cannot be held 6 - Apply patch 7 - Reload holds page 8 - Note items that cannot be heldare hidden 9 - Click 'Show unholdable items' and note they appear 10 - Click 'Hide unholdable items' and veriofy they hide 11 - Test with multi holds Signed-off-by: The Minh Luong <the-minh.luong@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I would have put the button at the top of the table, but not considering blocker.
It actually does not work for multi holds, the button will show/hide the items for the other biblios as well.
Created attachment 130281 [details] [review] Bug 29706: (follow-up) Adjust code to work for multi-holds
Created attachment 130297 [details] [review] Bug 29706: Improve table elements This patch add a thead and tbody element to the 'copiesrow' table Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 130298 [details] [review] Bug 29706: Hide items that cannot be held by default when placing hold on OPAC This patch adds a 'holdable' and 'unholdable' class to the rows of the table Additionally I rename the 'backgroundcolor' field to 'onloan' as that is what it contains. Note: Out of the box, there is no css associated with this class I add a div around the table to allow hiding the new buttons as well when optiuons are hidden It would be nice in the future to utilise a Koha table here, however, it is complicated by multi-holds To test: 1 - Add a number of items to a record, ensuring they belong to different libraries 2 - Set 'Default checkout, hold and return policy'->'Hold policy' to 'From home library' 3 - Sign in to opac and attempt to placehold on the record 4 - Click 'show more options' and 'a specificitem' 5 - Note holds table includes items that cannot be held 6 - Apply patch 7 - Reload holds page 8 - Note items that cannot be heldare hidden 9 - Click 'Show unholdable items' and note they appear 10 - Click 'Hide unholdable items' and veriofy they hide 11 - Test with multi holds Signed-off-by: The Minh Luong <the-minh.luong@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 130299 [details] [review] Bug 29706: (follow-up) Adjust code to work for multi-holds Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.03
Pushed to 21.05.x for 21.05.12
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.