From 8ce80a035542b3d2e17fdec2d674fcf19440ec35 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 11 Sep 2020 16:33:15 +0000 Subject: [PATCH] Bug 27607: Add the ability to compare patron records during merge process This patch adds an option to compare two patron records during the patron merge process. It can't work with more than two patrons, so the option only appears if one has selected only two patrons to merge. This patch also adds links to the patron names for opening the patron record in a new tab. To test, apply the patch and perform a search for patrons in the staff client Patrons module. - Select two patrons in the list of search results and click "Merge selected patrons." - On the merge patron records page, confirm that the two patron names are links which, when clicked, open the patron details in another tab. - Click the "Compare patrons" button. A modal window should display highlighting the differences in some selected values in the patron record. - Close the modal and click "Compare patrons" again. It should still display correctly. - Repeat the same process above but select more than two patrons for merging. The "Compare patrons" button should not appear. Signed-off-by: Barbara Johnson Signed-off-by: Katrin Fischer --- .../prog/en/modules/members/merge-patrons.tt | 155 ++++++++++++++++++++- 1 file changed, 152 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt index 3ac0fbe1cc..d68ea36a4e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt @@ -7,7 +7,39 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Merge patron records [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] @@ -52,7 +84,18 @@ [% IF action == 'show' %] [% IF patrons.count > 1 %] + [% IF ( patrons.count == 2 ) %] +
+
+ +
+
+ [% END %] +

Select patron to keep. Data from the other patrons will be transferred to this patron record and the remaining patron records will be deleted.

+
@@ -76,7 +119,12 @@ [% p.cardnumber | html %] - + @@ -139,10 +187,95 @@ + + + [% MACRO jsinclude BLOCK %] [% INCLUDE 'str/members-menu.inc' %] [% Asset.js("js/members-menu.js") | $raw %] - + [% Asset.js("lib/jsdiff/jsdiff.min.js") | $raw %] [% END %] -- 2.11.0
[% INCLUDE 'patron-title.inc' patron = p %] + + [% INCLUDE 'patron-title.inc' patron = p %] + + + [% p.dateofbirth | $KohaDates %] [% Categories.GetName( p.categorycode ) | html %] ([% p.categorycode | html %]) [% Branches.GetName( p.branchcode ) | html %]