Koha/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc
Nick Clemens 65ed212fae Bug 14874 - Add ability to search for patrons by date of birth from checkout and patron quick searches
This patch adds a new syspef 'DefaultPatronSearchFields' which defines
the fields that should be used when searching for a patron if none are
defined.

To test:
1 - Aply patch, updatedatabase
2 - Ensure patron search has not changed
3 - Add dateofbirth to new pref
4 - Ensure things work wll
5 - Experiment with adding and removing other fields from borrowers
table
6 - prove t/db_dependent/Utils/Datatables_Members.t

Tested together with followup. Works as described.
Signed-off-by: Marc Véron <veron@veron.ch>

Bug 14874 (QA Followup)

    Fix atomicupdate file name

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-27 13:21:13 +00:00

42 lines
1.9 KiB
HTML

<script type="text/javascript">
$(document).ready(function() {
$(".clickable").click(function() {
window.document.location = $(this).data('url');
});
var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, {
"aaSorting": [ 0, "asc" ],
"sDom": "t",
"iDisplayLength": -1
}));
});
</script>
<legend>Patron selection</legend>
<table id="table_borrowers" class="table_borrowers">
<thead>
<tr>
<th>Name</th>
<th>Card number</th>
<th>Date of birth</th>
<th>Category</th>
<th>Library</th>
<th>Address</th>
</tr>
</thead>
<tbody>
[% FOREACH borrower IN borrowers %]
[% IF ( destination == "circ" ) %]
<tr class="clickable" data-url="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">
<td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
[% ELSE %]
<tr class="clickable" data-url="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">
<td><a href="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
[% END %]
<td>[% borrower.cardnumber %]</td>
<td>[% borrower.dateofbirth %]</td>
<td>[% Categories.GetName( borrower.categorycode ) %]</td>
<td>[% Branches.GetName( borrower.branchcode ) %]</td>
<td>[% borrower.address %]</td>
</tr>
[% END %]
</tbody>
</table>