Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt
Owen Leonard 2d7eba5be3 Bug 22698: Fix incorrect button classes
This patch builds on Bug 22023 in making further corrections to toolbar
button classes.

To test, apply the patch and view the following pages to confirm that
toolbar buttons are consistent:

- Acquisitions -> Vendor -> View basket.
- Administration -> Additional fields -> Select a table.
- Administration -> Audio alerts.
- Catalog -> Advanced search -> More/fewer options link
- Cataloging -> Edit record -> Advanced editor -> Advanced search.
- Cataloging -> Edit record -> Advanced editor -> Macros.
- Cataloging -> Edit record -> MARC21 008 value builder.
- Cataloging -> Search results.
- Circulation -> Checkout notes.
- Circulation: Sticky due date clear button, view restrictions, override
   restrictions temporarily, add message, delete message
- Course reserves: Toolbar buttons on that page and the course reserve
   detail page.
- ILL requests -> View ILL requests. The "New ILL request" and "List
   requests" button.
- Lists and Lists -> View list.
- Patrons -> Search -> Merge patrons.
- Patrons -> View patron -> "Edit" button on patron image (patronimages
   must be enabled).
- Patrons -> View patron -> "More" menu -> Manage API keys.
- Patrons -> View patron -> "More" menu -> Set permissions.
- Patrons -> View patron -> Delete circulation message link.
- Patrons -> View patron -> Edit patron.
- Patrons -> View patron -> Housebound.
- Reports -> Dictionary.
- Serials -> Numbering patterns.
- Serials -> Subscription -> Receive.
- Tools -> Labels -> Manage -> Label batches: Export selected.
- Tools -> Patron card creator -> Manage -> Card batches -> Edit batch.
- Tools -> Patron card creator. The "New" and "Manage" buttons.
- Tools -> Patron clubs.
- Tools -> Quote editor -> Import quotes.
- Tools -> Rotating collections. Toolbar buttons on that page and the
   collection view page.
- Tools -> Tags.
- Tools -> Upload local cover image.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-16 13:17:33 +00:00

156 lines
7.1 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% USE Categories %]
[% USE KohaDates %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo; Merge patron records</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="pat_merge" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% BLOCK display_names %]
[% SWITCH rs %]
[% CASE 'Accountline' %]account lines
[% CASE 'ArticleRequest' %]article requests
[% CASE 'BorrowerAttribute' %]extended patron attributes
[% CASE 'BorrowerDebarment' %]patron restrictions
[% CASE 'BorrowerFile' %]patrons files
[% CASE 'BorrowerModification' %]patron modification requests
[% CASE 'ClubEnrollment' %]club enrollments
[% CASE 'Issue' %]checkouts
[% CASE 'ItemsLastBorrower' %]marks as last borrower of item
[% CASE 'Linktracker' %]tracked link clicks
[% CASE 'Message' %]patron messages
[% CASE 'MessageQueue' %]patron notices
[% CASE 'OldIssue' %]previous checkouts
[% CASE 'OldReserve' %]filled holds
[% CASE 'Rating' %]ratings
[% CASE 'Reserve' %]current holds
[% CASE 'Review' %]reviews
[% CASE 'Statistic' %]statistics
[% CASE 'SearchHistory' %]historical searches
[% CASE 'Suggestion' %]purchase suggestions
[% CASE 'TagAll' %]tags
[% CASE 'Virtualshelfcontent' %]list items
[% CASE 'Virtualshelfshare' %]list shares
[% CASE 'Virtualshelve' %]lists
[% CASE %][% rs | html %]
[% END %]
[% END %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo; Merge patron records</div>
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
<h3>Merge patron records</h3>
[% IF action == 'show' %]
[% IF patrons.count > 1 %]
<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>
<form type="post" action="merge-patrons.pl">
<table id="patron-merge-table" class="datatable">
<thead>
<tr>
<th>&nbsp;</th>
<th>Card</th>
<th>Name</th>
<th>Date of birth</th>
<th>Category</th>
<th>Library</th>
<th>Expires on</th>
</tr>
</thead>
<tbody>
[% FOREACH p IN patrons %]
<tr>
<td><input class='keeper' type='radio' name='keeper' value='[% p.id | html %]' /></td>
<td>[% p.cardnumber | html %]</td>
<td>[% INCLUDE 'patron-title.inc' patron = p %]</td>
<td>[% p.dateofbirth | $KohaDates %]</td>
<td>[% Categories.GetName( p.categorycode ) | html %] ([% p.categorycode | html %])</td>
<td>[% Branches.GetName( p.branchcode ) | html %]</td>
<td>[% p.dateexpiry | $KohaDates %]</td>
[% END %]
</tbody>
</table>
[% FOREACH p IN patrons %]
<input type="hidden" name="id" value="[% p.id | html %]" />
[% END %]
<p/>
<input type="hidden" name="action" value="merge" />
<input id="merge-patrons" type="submit" value="Merge patrons" />
[% ELSE %]
<div class="dialog alert">Error: Two or more patrons need to be selected for merging</div>
[% END %]
</form>
[% ELSIF action == 'merge' %]
<h4>Results</h4>
[% IF error %]
[% IF error == 'INVALID_KEEPER' %]
<div class="dialog alert">Merge failed! The patron to keep was invalid.</div>
[% ELSE %]
<div class="dialog alert">Merge failed! The following error was reported: [% error | html %].</div>
[% END %]
[% ELSIF !results.merged.keys.size %]
<div class="dialog alert">No valid patrons to merge were found.</div>
[% ELSE %]
<p>
Patron records merged into <a href="moremember.pl?borrowernumber=[% keeper.id | uri %]">[% INCLUDE 'patron-title.inc' patron = keeper %]</a>
</p>
[% FOREACH pair IN results.merged.pairs %]
[% SET patron = pair.value.patron %]
<h5>[% INCLUDE 'patron-title.inc' %]</h5>
[% FOREACH r IN pair.value.updated.pairs %]
[% SET name = r.key %]
[% SET count = r.value %]
[% IF count %]
<p>
<span>[% count | html %] [% PROCESS display_names rs = name %] transferred.</span>
[% IF name == 'Reserve' %]
<strong>It is advisable to check for and resolve duplicate holds due to merging.</strong>
[% END %]
</p>
[% END %]
[% END %]
[% END %]
[% END %]
[% UNLESS error %]
<a class="btn btn-default" href="moremember.pl?borrowernumber=[% keeper.id | html %]">View patron record</a>
[% END %]
[% END %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
<script>
$(document).ready(function() {
$('#merge-patrons').prop('disabled', true);
$('#patron-merge-table').on('change', 'input', function() {
if ( $('.keeper:checked').length > 0 ) {
$('#merge-patrons').prop('disabled', false);
} else {
$('#merge-patrons').prop('disabled', true);
}
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]