Bug 20524: Make columns of pending discharges table sortable
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / discharges.tt
1 [% USE Branches %]
2 [% SET footerjs = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Patrons &rsaquo; Pending discharge requests</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
7 </head>
8 <body id="pat_discharges" class="pat">
9 [% INCLUDE 'header.inc' %]
10 [% INCLUDE 'patron-search.inc' %]
11
12 <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; Pending discharge requests</div>
13
14     <div class="main container-fluid">
15         <div class="row">
16             <div class="col-md-8 col-md-offset-2">
17
18     [% IF pending_discharges %]
19       <h2>Pending discharge requests</h2>
20       <div id="pending_updates">
21         <table>
22           <thead>
23             <tr>
24               <th>Patron</th>
25               <th>Library</th>
26               <th>Allow</th>
27             </tr>
28           </thead>
29           <tbody>
30             [% FOREACH d IN pending_discharges %]
31               <tr>
32                 <td><a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% d.borrower.borrowernumber %]">[% d.borrower.surname %], [% d.borrower.firstname %]</a></td>
33                 <td>[% d.borrower.branchcode.branchname %]</td>
34                 <td><a href="/cgi-bin/koha/members/discharges.pl?op=allow&borrowernumber=[% d.borrower.borrowernumber %]">Allow</a></td>
35               </tr>
36             [% END %]
37           </tbody>
38         </table>
39       </div>
40     [% ELSE %]
41       <div class="dialog message">
42         <p>There are no pending discharge requests.</p>
43       </div>
44     [% END %]
45
46     </div>
47 </div>
48
49 [% MACRO jsinclude BLOCK %]
50     <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
51
52     [% INCLUDE 'datatables.inc' %]
53     <script>
54         $(document).ready(function() {
55             $('#pending_updates table').DataTable($.extend(true, {}, dataTablesDefaults, {
56                 paging: false,
57                 info: false,
58                 searching: false,
59                 order: [],
60                 columnDefs: [
61                     { targets: -1, orderable: false },
62                 ],
63             }));
64         });
65     </script>
66 [% END %]
67
68 [% INCLUDE 'intranet-bottom.inc' %]