Bug 31803

Summary: "remove from cart" button displayed even if not in cart
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Staff interfaceAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: gmcharlt, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on: 30952    
Bug Blocks:    
Attachments: Bug 31803: "remove from cart" button displayed even if not in cart
Bug 31803: "remove from cart" button displayed even if not in cart
Bug 31803: "remove from cart" button displayed even if not in cart

Description Jonathan Druart 2022-10-14 15:09:48 UTC
on catalogue/detail.pl
Comment 1 Owen Leonard 2022-10-20 11:21:11 UTC Comment hidden (obsolete)
Comment 2 David Nind 2022-10-20 13:29:16 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2022-10-21 11:41:14 UTC
I am going to pass this one as it's a clear bug fix, but there is a small remaining issue: When Add to cart is replaced with Remove from cart, the writing is not in line with the other options but displayed a little higher up.
Comment 4 Katrin Fischer 2022-10-21 11:42:47 UTC
Created attachment 142337 [details] [review]
Bug 31803: "remove from cart" button displayed even if not in cart

This patch modifies CSS related to the "Remove from cart" button
associated with bibligraphic record views. A change in specificity of
buttons made by Bug 30952 made it so that the button was no longer
hidden correctly.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Locate a bibliographic record in the staff interface and view the
  detail page.
- In the toolbar you should see an "Add to cart" button but not a
  "Remove from cart" button.
- The buttons should correctly toggle on and off as you add and remove
  the title from the cart.

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 5 Tomás Cohen Arazi 2022-10-21 12:58:51 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!