From 1bd931b654068cd5de8ca31b369efb210c12c2a7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Jan 2016 14:46:06 +0000 Subject: [PATCH] Bug 15360: Add a "Replace with Z39.50" button when editing an authority If the record exist, a new button "Replace with Z39.50" is added Test plan: Go on the authority home page (authorities/authorities-home.pl) You should see a "New from Z39.50" button. Edit an authority You should now see "Replace with Z39.50" and "New from Z39.50" Confirm that the 2 buttons work as expected. --- .../prog/en/includes/authorities-toolbar.inc | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc index 8270327..08dd36a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc @@ -6,16 +6,15 @@ return false; }); - $("#z3950submit").click(function(){ - [% IF ( authid ) %] - if (confirm(_("Please note that this Z39.50 search could replace the current record."))){ - window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid %]","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes'); - } - [% ELSE %] - window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes'); - [% END %] + $("#z3950_new").click(function(){ + window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes'); return false; }); + $("#z3950_replace").click(function(){ + if (confirm(_("Please note that this Z39.50 search could replace the current record."))){ + window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid %]","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes'); + } + }); }); @@ -59,8 +58,14 @@ [% END %] + [% IF authid %] +
+ Replace using Z39.50 +
+ [% END %]
- New from Z39.50 + New from Z39.50 +
[% END %] -- 2.1.0