Bug 23349: Add batch operations to staff interface catalog search results
authorOwen Leonard <oleonard@myacpl.org>
Mon, 6 Apr 2020 20:39:35 +0000 (20:39 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 20 Apr 2020 12:33:22 +0000 (13:33 +0100)
commit743f40a202ba915dccbf35058e5b7ecf707e3e67
tree1c2d034c6a172e5f3a424e9d446ea83d5a761953
parentc54654c12944250ed75bbdd011e6ac6cacf58d3f
Bug 23349: Add batch operations to staff interface catalog search results

This patch adds three new options to the staff interface catalog search
results for users with cataloging permission: batch edit, batch delete,
and merge. The choices are found in an "Edit" menu which is disabled by
default. Checking any boxes in the search results table enables the
button.

To test, apply the patch and log in to Koha as a user with
edit_catalogue permission.

 - Perform a search in the catalog
 - You should see a disabled "Edit" button in the toolbar at the top of
   the search results table.
 - Check a single checkbox. The button should become enabled.
   - Test the "Batch edit" and "Batch delete" menu items. They should
     work correctly.
   - Test the "Merge records" item. It should warn you that you must
     select at least two records.
 - Check more than one checkbox and test each menu item again. All
   should work as expected.
 - Log in to the staff client as a user who does not have edit_catalogue
   permission. The "Edit" menu should no longer appear on the search
   results page.

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
koha-tmpl/intranet-tmpl/prog/js/pages/results.js