Bug 7257 - Add a link to remove an individual title from a list
Summary: Add a link to remove an individual title from a list
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact:
Depends on:
Reported: 2011-11-23 15:45 UTC by Owen Leonard
Modified: 2014-12-07 20:02 UTC (History)
4 users (show)

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

Screenshot of the proposed change (8.17 KB, image/png)
2011-11-23 15:45 UTC, Owen Leonard
Bug 7257 - Add a link to remove an individual title from a list (5.27 KB, patch)
2013-08-02 18:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 7257 - Add a link to remove an individual title from a list (5.32 KB, patch)
2013-08-07 12:16 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2011-11-23 15:45:31 UTC
Created attachment 6382 [details]
Screenshot of the proposed change

When viewing a list in the OPAC there are several title-level options displayed: Place hold, save to another list, add to cart. I propose adding another item: Remove from this list. This gives the user the option of a single click instead of checking a box and scrolling to find the "remove" button.
Comment 1 Marcel de Rooy 2011-11-24 14:23:40 UTC
Today I received the question from a user if it is possible to move a book from one list to the other. Well, you can copy it with "Save to another list" and then remove it with your new button. But if we add "Remove", we could also think of "Move to another list".
Perhaps with shorter labels like Copy, Move and Delete ?
Comment 2 Owen Leonard 2013-08-02 18:45:24 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2013-08-02 19:17:15 UTC
Note that because of Bug 10679 you can't test whether the "Remove from this list" links are correctly shown or hidden based on the logged-in user's permission to remove items from a list. The links will always appear to a logged-in user.
Comment 4 Marcel de Rooy 2013-08-07 12:16:17 UTC
Created attachment 20141 [details] [review]
Bug 7257 - Add a link to remove an individual title from a list

It should be possible when viewing the contents of a list to click a
link to remove an individual title from the list without having to check
a checkbox and click another button.

This patch adds a link to each list item to "Remove from this list."
The functionality is JavaScript-dependent, automatically checking the
appropriate checkbox and submitting the form to delete.

To test, view a list for which you have delete permission. There should
be a "Remove from this list" link next to each item on the list. Test
delete functionality by:

- Clicking the link and then clicking cancel.
- Clicking the link and confirming.
- Checking more than one checkbox and then clicking a single remove
  link (only the one corresponding record should be removed).
- Checking one or more checkboxes and clicking the "Remove from list"
  link at the top of the page.

If JavaScript is disabled the links should not appear.

There are now two delete confirmation messages: One if you're removing
only one item, another if you're removing more than one. This is true
whether you use the links or the checkboxes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2013-08-07 12:17:53 UTC
QA Comment:
Works as advertised.
Looks good to me. No complaints from koha-qa.

Passed QA
Comment 6 Galen Charlton 2013-08-07 14:46:20 UTC
Pushed to master.  Thanks, Owen!
Comment 7 Tomás Cohen Arazi 2013-08-28 17:02:45 UTC
This patch has been pushed to 3.12.x, will be in 3.12.5.

Thanks Owen!
Comment 8 Bernardo Gonzalez Kriegel 2013-09-14 19:12:54 UTC
Pushed to 3.10.x, will be in 3.10.11