Bug 31803 - "remove from cart" button displayed even if not in cart
Summary: "remove from cart" button displayed even if not in cart
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 30952
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-14 15:09 UTC by Jonathan Druart
Modified: 2023-12-28 20:42 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31803: "remove from cart" button displayed even if not in cart (3.50 KB, patch)
2022-10-20 11:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31803: "remove from cart" button displayed even if not in cart (3.55 KB, patch)
2022-10-20 13:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 31803: "remove from cart" button displayed even if not in cart (3.61 KB, patch)
2022-10-21 11:42 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 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!