Bug 31516: Add error message for viewing enrollments for a non-existent club
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / clubs / club-enrollments.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% USE Koha %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Club enrollments &rsaquo; Patron clubs &rsaquo; Tools &rsaquo; Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="club_enrollments" class="clubs">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
15
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17     <ol>
18         <li>
19             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20         </li>
21         <li>
22             <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
23         </li>
24         <li>
25             <a href="clubs.pl">Patron clubs</a>
26         </li>
27         <li>
28             <a href="#" aria-current="page">
29                 Club enrollments
30             </a>
31         </li>
32     </ol>
33 </nav>
34
35 <div class="main container-fluid">
36     <div class="row">
37         <div class="col-sm-10 col-sm-push-2">
38             <main>
39                 [% IF !club %]
40                 <div class="dialog message">The club you requested does not exist.</div>
41                 [% ELSE %]
42                 <h1>Club enrollments for <em>[% club.name | html %]</em></h1>
43
44                 <table id="enrollments-table">
45                     <thead>
46                         <tr>
47                             <th>Name</th>
48                             <th>Card number</th>
49                         </tr>
50                     </thead>
51
52                     <tbody>
53                         [% FOREACH e IN club.club_enrollments %]
54                             [% SET p = e.patron %]
55                             <tr>
56                                 <td>
57                                     <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.id | uri %]">[% p.surname | html %], [% p.firstname | html %]</a>
58                                 </td>
59                                 <td>
60                                     [% p.cardnumber | html %]
61                                 </td>
62                             </tr>
63                         [% END %]
64                     </tbody>
65                 </table>
66                 [% END %]
67
68             </main>
69         </div> <!-- /.col-sm-10.col-sm-push-2 -->
70
71         <div class="col-sm-2 col-sm-pull-10">
72             <aside>
73                 [% INCLUDE 'tools-menu.inc' %]
74             </aside>
75         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
76      </div> <!-- /.row -->
77
78 [% MACRO jsinclude BLOCK %]
79     [% INCLUDE 'datatables.inc' %]
80     [% Asset.js("js/tools-menu.js") | $raw %]
81     <script>
82         $(document).ready(function() {
83             eTable = $('#enrollments-table').dataTable($.extend(true, {}, dataTablesDefaults, {
84                 "sPaginationType": "full",
85                 "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
86                 "aoColumnDefs": [
87                         { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
88                 ]
89             } ));
90         });
91     </script>
92 [% END %]
93
94 [% INCLUDE 'intranet-bottom.inc' %]