Bug 16596: Display library and patron category descriptions instead of their code
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / circ-patron-search-results.inc
1 <script type="text/javascript">
2     $(document).ready(function() {
3         $(".clickable").click(function() {
4             window.document.location = $(this).data('url');
5         });
6         var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, {
7             "aaSorting": [ 1, "asc" ],
8             "sDom": "t",
9             "iDisplayLength": -1
10         }));
11     });
12 </script>
13 <legend>Patron selection</legend>
14 <table id="table_borrowers" class="table_borrowers">
15     <thead>
16         <tr>
17             <th>Name</th>
18             <th>Card number</th>
19             <th>Category</th>
20             <th>Library</th>
21             <th>Address</th>
22         </tr>
23     </thead>
24     <tbody>
25         [% FOREACH borrower IN borrowers %]
26             [% IF ( destination == "circ" ) %]
27                 <tr class="clickable" data-url="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">
28                     <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
29             [% ELSE %]
30                 <tr class="clickable" data-url="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">
31                     <td><a href="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&amp;biblionumber=[% biblionumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td>
32             [% END %]
33                 <td>[% borrower.cardnumber %]</td>
34                 <td>[% Categories.GetName( borrower.categorycode ) %]</td>
35                 <td>[% Branches.GetName( borrower.branchcode ) %]</td>
36                 <td>[% borrower.address %]</td>
37             </tr>
38         [% END %]
39     </tbody>
40 </table>