Bug 32164: Add link to MARC modification templates from batch record modification...
authorOwen Leonard <oleonard@myacpl.org>
Mon, 13 Feb 2023 19:34:45 +0000 (19:34 +0000)
committerJacob O'Mara <jacobomara901@gmail.com>
Tue, 9 May 2023 20:34:59 +0000 (21:34 +0100)
commit6ce18a8cdb62f279cbfb73bc4f6a46bfd8acc20d
treedf41f86fbdf5ac5934381b2e65b8dc07e3c6901f
parentfc4d7c3d4deeec4f9bfae2dd31e83be7527e2887
Bug 32164: Add link to MARC modification templates from batch record modification page

This patch adds a more visible link from the batch record modification
page in the event that there are no MARC modification templates defined.
The template checks that the user has permission.

The patch also modifies the same message on the MARC modification
templates page so that the interfaces are more unified, and tweaks the
operation of the "New action" button.

To test you should have no MARC modification templates defined.

- Apply the patch and go to Tools -> Batch record modification.
- If you're logged in as a user with permission you should see a message
  dialog containing a button, "Create a new MARC modification template."
- Clicking it should take you to the MARC modification templates page,
  where you'll see a similar message and a button, "Create a new
  template." Clicking this button should trigger a modal form, just like
  clicking the "New template" button in the toolbar should.
- Submit the form to create a new template. You should see message on
  the following page that says "New action." Clicking the button should
  display the entry form, and then clicking "Cancel" should hide the
  form and redisplay the message.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df8aca0252750d8d660007a1d1eeaf1f483a3e84)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt
koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js