Bug 16490

Summary: Add an "add to cart" link for each search results in the staff client
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: f.demians, kyle, veron
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/catalogue/search.pl?q=X
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16490 - Add an "add to cart" link for each search results in the staff client
Bug 16490 - Add an "add to cart" link for each search results in the staff client
Bug 16490: Tidy updateLink and updateAllLinks
Bug 16490: Tidy updateLink and updateAllLinks
Bug 16490 - Add an "add to cart" link for each search results in the staff client
Bug 16490: Tidy updateLink and updateAllLinks
Bug 16490 - Add an "add to cart" link for each search results in the staff client
Bug 16490: Tidy updateLink and updateAllLinks

Description Owen Leonard 2016-05-10 14:23:24 UTC
On the OPAC search results page each line has an "add to cart" link. This lets the user select individual results without having to check a box and scroll all the way to the top. I propose to add this to the staff client search results.
Comment 1 Owen Leonard 2016-05-10 15:06:03 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-05-10 15:17:51 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-06-18 15:48:54 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2016-06-18 16:32:19 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-06-19 10:40:11 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-06-19 10:40:15 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2016-06-24 13:45:46 UTC
Created attachment 52797 [details] [review]
Bug 16490 - Add an "add to cart" link for each search results in the staff client

This patch adds an "add to cart" link to each line of search results in
the staff client.

To test, apply the patch and clear your browser cache if necessary.

- Enable the intranetbookbag system preference.
- Perform a search which will return multiple search results.
- Each result should have an "Add to cart" link.
  - Clicking the "Add to cart" link should add the title to the cart,
    triggering the correct pop-up message and changing the link to read
    "In your cart (remove)."
  - Clicking the "remove" link should remove the title from your cart
    and trigger the correct messages.
- Add multiple titles to your cart and perform the same search again.
  Each result should correctly indicate which titles are already in your
  cart.
- Open the cart popup window.
  - Check the checkbox for one or more titles in your cart and choose
    "Remove." The titles should be removed, and the "In your cart" label
    in the search results page should reflect that the titles are no
    longer in the cart.
  - Choose "Empty and close." All titles in the parent page should now
    indicate that they are not in the cart.
- Disable the intranetbookbag preference and confirm that the "Add to
  cart" links are no longer there.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall 2016-06-24 13:45:53 UTC
Created attachment 52798 [details] [review]
Bug 16490: Tidy updateLink and updateAllLinks

Went through test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall 2016-06-24 13:46:14 UTC
Pushed to master for 16.11, thanks Owen!
Comment 10 Frédéric Demians 2016-08-01 13:17:07 UTC
Pushed in 16.05. Will be in 16.05.02.