Bug 13778: Only the last column is not sortable
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patron_lists / lists.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; Patron lists</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'greybox.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'datatables.inc' %]
7
8 <script type="text/javascript">
9 //<![CDATA[
10     $(document).ready(function() {
11         $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
12             "autoWidth": false,
13             "aoColumnDefs": [
14                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
15             ],
16             "sPaginationType": "four_button"
17         } ));
18     });
19
20     function ConfirmDelete( list ) {
21         return confirm( _("Are you sure you want to delete the list %s?").format(list) );
22     }
23 //]]>
24 </script>
25
26 </head>
27
28 <body id="patlist_lists" class="pat patlist">
29 [% INCLUDE 'header.inc' %]
30 [% INCLUDE 'cat-search.inc' %]
31 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Patron lists</div>
32
33 <div class="yui-t7">
34     <div class="yui-main">
35         <h1>Your patron lists</h1>
36
37         <div class="btn-group">
38             <a class="btn btn-small" href="add-modify.pl"><i class="fa fa-plus"></i> New patron list</a>
39         </div>
40
41         [% IF ( lists ) %]
42
43         <table id="patron-lists-table">
44             <thead>
45                 <tr>
46                     <th>Name</th>
47                     <th>Patrons in list</th>
48                     <th>&nbsp;</th>
49                 </tr>
50             </thead>
51
52             <tbody>
53                 [% FOREACH l IN lists %]
54                     <tr>
55                         <td>[% l.name %]</td>
56                         <td>[% l.patron_list_patrons_rs.count || 0 %]</td>
57                         <td>
58                             <div class="dropdown">
59                                 <a class="btn btn-mini dropdown-toggle" id="listactions[% l.patron_list_id %]" role="button" data-toggle="dropdown" href="#">
60                                    Actions <b class="caret"></b>
61                                 </a>
62                                 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id %]">
63                                     <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id %]"><i class="fa fa-user"></i> Add patrons</a></li>
64                                     <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id %]"><i class="fa fa-edit"></i> Edit</a></li>
65                                     <li><a href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id %]" onclick='return ConfirmDelete("[% l.name %]")'><i class="fa fa-trash"></i> Delete</a></li>
66                                     <li><a href="#" onclick='GB_showCenter(_("Print patron cards from list"), "/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id %]", 400, 800);return false;'><i class="icon-print"></i> Print patron cards</a></li>
67                                 </ul>
68                             </div>
69                         </td>
70                     </tr>
71                 [% END %]
72             </tbody>
73         </table>
74         [% ELSE %]
75            <div class="dialog message">There are no patron lists.</div>
76         [% END %]
77     </div>
78 </div>
79 [% INCLUDE 'intranet-bottom.inc' %]