@@ -, +, @@ --- .../prog/en/modules/cataloguing/addbooks.tt | 21 ++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -18,6 +18,10 @@ PopupZ3950($(this).prop('id')); return false; }); + $(".merge-items").on("click",function(e){ + e.preventDefault(); + MergeItems(); + }); }); /* this function open a popup to search on z3950 server. */ @@ -36,6 +40,20 @@ return strQuery; } + /** + * This function checks if the adequate number of records are checked for merging + */ + function MergeItems() { + var checkboxes = $("input:checkbox:checked"); + var nbCheckbox = checkboxes.length; + if (nbCheckbox != 2) { + alert(_("Two records must be selected for merging.")); + } else { + location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value; + } + return false; + } + //]]> @@ -73,6 +91,7 @@ [% END %] +
[% END %] @@ -89,6 +108,7 @@
+ @@ -101,6 +121,7 @@ [% ELSE %] [% END %] +
  Title Location Preview

[% resultsloo.title |html %] --