From 056c2feeaea534c1d1ba0556f5b4464d7da84dee Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 2 Aug 2013 14:25:37 -0400 Subject: [PATCH] Bug 7257: Add a link to remove an individual title from a list in the OPAC 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 Signed-off-by: Galen Charlton (cherry picked from commit cf902c704ba9b0560bc8ff2006fe5763ffa2a090) Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 6df54fd2fa2e33166c5c6e24b5aabf8299ed5ef9) Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit 6df54fd2fa2e33166c5c6e24b5aabf8299ed5ef9) --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 14 ++++++++++- .../opac-tmpl/prog/en/modules/opac-shelves.tt | 24 +++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 72be186211..2eda1589d1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -775,6 +775,7 @@ a.tag_add { text-decoration : none; padding-left : 33px; } + /* Search results place hold link */ #placehold input.submit { background-image: url("../../images/sprite.png"); /* Place hold */ @@ -1487,7 +1488,8 @@ padding-left : .4em; .actions a.addtocart, .actions a.addtoshelf, .actions a.addtolist, -.actions a.tag_add { +.actions a.tag_add, +.actions a.removefromlist { margin-left : 1em; text-decoration : none; } @@ -1509,6 +1511,16 @@ padding-left : .4em; display : none; } +/* List contents remove from list link */ +.removefromlist { + background-image : url("../../images/sprite.png"); /* Delete */ + background-position : -8px -690px; + background-repeat: no-repeat; + text-decoration : none; + padding-left : 15px; + display : none; +} + /* Search results rows save to lists */ .actions a.addtoshelf { background-image : url("../../images/sprite.png"); /* MARC view */ diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt index f7c02d7f2c..f68953a94f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt @@ -7,6 +7,7 @@