Line 0
Link Here
|
|
|
1 |
[% USE Branches %] |
2 |
[% USE Categories %] |
3 |
[% USE KohaDates %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
<title>Koha › Patrons › Merge patron records</title> |
6 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
|
8 |
<script type="text/javascript"> |
9 |
//<![CDATA[ |
10 |
$(document).ready(function() { |
11 |
$('#merge-patrons').prop('disabled', true); |
12 |
$('#patron-merge-table').on('change', 'input', function() { |
13 |
if ( $('.keeper:checked').length > 0 ) { |
14 |
$('#merge-patrons').prop('disabled', false); |
15 |
} else { |
16 |
$('#merge-patrons').prop('disabled', true); |
17 |
} |
18 |
}); |
19 |
}); |
20 |
//]]> |
21 |
</script> |
22 |
|
23 |
</head> |
24 |
<body id="pat_merge" class="pat"> |
25 |
[% INCLUDE 'header.inc' %] |
26 |
[% INCLUDE 'patron-search.inc' %] |
27 |
|
28 |
[% BLOCK display_names %] |
29 |
[% SWITCH rs %] |
30 |
[% CASE 'Accountline' %]account lines |
31 |
[% CASE 'ArticleRequest' %]article requests |
32 |
[% CASE 'BorrowerAttribute' %]extended patron attributes |
33 |
[% CASE 'BorrowerDebarment' %]patron restrictions |
34 |
[% CASE 'BorrowerFile' %]patrons files |
35 |
[% CASE 'BorrowerModification' %]patron modification requests |
36 |
[% CASE 'ClubEnrollment' %]club enrollments |
37 |
[% CASE 'Issue' %]checkouts |
38 |
[% CASE 'ItemsLastBorrower' %]marks as last borrower of item |
39 |
[% CASE 'Linktracker' %]tracked link clicks |
40 |
[% CASE 'Message' %]patron messages |
41 |
[% CASE 'MessageQueue' %]patron notices |
42 |
[% CASE 'OldIssue' %]previous checkouts |
43 |
[% CASE 'OldReserve' %]filled holds |
44 |
[% CASE 'Rating' %]ratings |
45 |
[% CASE 'Reserve' %]current holds |
46 |
[% CASE 'Review' %]reviews |
47 |
[% CASE 'Statistic' %]statistics |
48 |
[% CASE 'SearchHistory' %]historical searches |
49 |
[% CASE 'Suggestion' %]purchase suggestions |
50 |
[% CASE 'TagAll' %]tags |
51 |
[% CASE 'Virtualshelfcontent' %]list items |
52 |
[% CASE 'Virtualshelfshare' %]list shares |
53 |
[% CASE 'Virtualshelve' %]lists |
54 |
[% CASE %][% rs %] |
55 |
[% END %] |
56 |
[% END %] |
57 |
|
58 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Merge patron records</div> |
59 |
|
60 |
<div id="doc2" class="yui-t7"> |
61 |
<div id="bd"> |
62 |
<div id="yui-main"> |
63 |
<h3>Merge patron records</h3> |
64 |
|
65 |
[% IF action == 'show' %] |
66 |
<p>Select patron to keep. Data from the other patrons will be transferred to this patron record and the remaining patron records will be deleted.</p> |
67 |
<form type="post" action="merge-patrons.pl"> |
68 |
<table id="patron-merge-table" class="datatable"> |
69 |
<thead> |
70 |
<tr> |
71 |
<th> </th> |
72 |
<th>Card</th> |
73 |
<th>Name</th> |
74 |
<th>Date of birth</th> |
75 |
<th>Category</th> |
76 |
<th>Library</th> |
77 |
<th>Expires on</th> |
78 |
</tr> |
79 |
</thead> |
80 |
|
81 |
<tbody> |
82 |
[% FOREACH p IN patrons %] |
83 |
<tr> |
84 |
<td><input class='keeper' type='radio' name='keeper' value='[% p.id %]' /></td> |
85 |
<td>[% p.cardnumber | html %]</td> |
86 |
<td>[% p.firstname | html %] [% p.surname | html %]</td> |
87 |
<td>[% p.dateofbirth | $KohaDates %]</td> |
88 |
<td>[% Categories.GetName( p.categorycode ) %] ([% p.categorycode %])</td> |
89 |
<td>[% Branches.GetName( p.branchcode ) %]</td> |
90 |
<td>[% p.dateexpiry | $KohaDates %]</td> |
91 |
[% END %] |
92 |
</tbody> |
93 |
</table> |
94 |
|
95 |
[% FOREACH p IN patrons %] |
96 |
<input type="hidden" name="id" value="[% p.id %]" /> |
97 |
[% END %] |
98 |
|
99 |
<p/> |
100 |
|
101 |
<input type="hidden" name="action" value="merge" /> |
102 |
<input id="merge-patrons" type="submit" value="Merge patrons" /> |
103 |
</form> |
104 |
[% ELSIF action == 'merge' %] |
105 |
<h4>Results</h4> |
106 |
|
107 |
<p> |
108 |
Patron records merged into <a href="moremember.pl?borrowernumber=[% results.keeper.id %]">[% results.keeper.firstname %] [% results.keeper.surname %] ([% results.keeper.cardnumber | html %])</a> |
109 |
</p> |
110 |
|
111 |
[% FOREACH pair IN results.merged.pairs %] |
112 |
[% SET patron = pair.value.patron %] |
113 |
|
114 |
<h5>[% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])</h5> |
115 |
|
116 |
[% USE Dumper %] |
117 |
[% FOREACH r IN pair.value.updated.pairs %] |
118 |
[% SET name = r.key %] |
119 |
[% SET count = r.value %] |
120 |
[% IF count %] |
121 |
<p> |
122 |
[% count %] [% PROCESS display_names rs = name %] transferred. |
123 |
[% IF name == 'Reserve' %] |
124 |
<strong>It is advisable to check for and resolve duplicate holds due to merging.</strong> |
125 |
[% END %] |
126 |
</p> |
127 |
[% END %] |
128 |
[% END %] |
129 |
[% END %] |
130 |
[% END %] |
131 |
</div> |
132 |
</div> |
133 |
[% INCLUDE 'intranet-bottom.inc' %] |