Bug 25694: Add ability to delete a Marc Modification Template when viewing
authorOwen Leonard <oleonard@myacpl.org>
Mon, 27 Jul 2020 14:39:22 +0000 (14:39 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 18 Aug 2020 15:39:48 +0000 (17:39 +0200)
This patch adds a "delete template" button to the MARC modification
templates "Edit actions" view.

To test, apply the patch and go to Tools -> MARC modification templates.

 - On the main MARC modification templates page the toolbar should have
   only one button: "New template."
 - Click the "Edit actions" button for an existing template.
 - On the "Actions for..." view there should be three buttons, "New
   template," "New action," and "Delete template."
   - Test that the "Delete template" button works correctly.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt

index f692b42..64a0588 100644 (file)
@@ -42,6 +42,7 @@
                 <a href="#" data-toggle="modal" data-template_id="" data-target="#createTemplate" id="new_template" class="btn btn-default duplicate_template"><i class="fa fa-plus"></i> New template</a>
                 [% IF ( template_id != '' ) %]
                     <a href="#" id="new_action" class="btn btn-default"><i class="fa fa-plus"></i> New action</a>
+                    <a class="btn btn-default delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% template_id | html %]&amp;op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete template</a>
                 [% END %]
             </div>