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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 6 Apr 2023 12:47:28 +0000 (09:47 -0300)
commitdf8aca0252750d8d660007a1d1eeaf1f483a3e84
tree57ca28354cd8a91d772f455267298056561fef04
parentb46220cbc752c30cec8baab72aa6009f470fcfc8
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>
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