Bug 21479: Fix remove from cart links at the OPAC (should remove only 1)
authorOwen Leonard <oleonard@myacpl.org>
Wed, 3 Oct 2018 14:13:49 +0000 (14:13 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 24 Oct 2018 09:15:21 +0000 (11:15 +0200)
commit01281fdc966395a5e668f7c042bbeeccd8fbcdd9
treee7487a6163bd1bbb02b1aec4d42f2aec84e2fb7d
parentf7ad8af0f77688a6eaf8075a6ba56d77e455263e
Bug 21479: Fix remove from cart links at the OPAC (should remove only 1)

This patch changes the way biblionumbers are passed to the cart script
for adding and removing single items. The title's biblionumber is now
stored in a data-attribute on the links for adding and removing. This
should be a more robust, unified way to handle these single-item
operations.

To test, apply the patch and enable the opacbookbag system preference.

Test adding and removing items from the cart from various pages using
various methods:

 - By clicking an "Add to your cart" / "Remove" link in search results
 - By clicking an "Add to your cart" / "Remove" link on a detail page
 - By checking boxes in search results and adding via the dropdown

Each operation should work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cd49034c43a16c7497f05e94c18396532fceddc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2d078a18e5e090bcafa64262bb5f8dceed796169)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/bootstrap/js/basket.js