Bug 30094: Make the patron search from request-article.pl use the REST API
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / clubs-table.inc
1 [% IF destination == 'holds' %]
2     <table id="clubs-table" class="selections-table">
3 [% ELSE %]
4     <table id="clubs-table">
5 [% END %]
6     <thead>
7         <tr>
8             <th>Name</th>
9             <th>Template</th>
10             <th>Description</th>
11             [% UNLESS destination == 'holds' %]
12                 <th>Public enrollment</th>
13                 <th>Email required</th>
14             [% END %]
15             <th>Library</th>
16             <th>Start date</th>
17             <th>End date</th>
18             <th>Enrolled patrons</th>
19             [% UNLESS destination == 'holds' %]
20                 <th>&nbsp;</th>
21             [% END %]
22         </tr>
23     </thead>
24     <tbody>
25         [% FOREACH c IN clubs %]
26             [% IF destination == 'holds' %]
27                 [% SET data_url = "/cgi-bin/koha/reserve/request.pl?club=" _ c.id %]
28                 [% FOREACH biblionumber IN biblionumbers %]
29                     [% SET data_url = data_url _ "&amp;biblionumber=" _ biblionumber %]
30                 [% END %]
31                 [% IF multi_hold %]
32                     [% SET data_url = data_url _ "&amp;multi_hold=1" %]
33                 [% END %]
34                 <tr class="clickable" data-url="[% data_url | html %]">
35                     <td><a href="[% data_url | url %]">[% c.name | html %]</a></td>
36             [% ELSE %]
37                 <tr>
38                     <td>[% c.name | html %]</td>
39             [% END %]
40                 <td>[% c.club_template.name | html %]</td>
41                 <td>[% c.description | html %]</td>
42                 [% UNLESS destination == 'holds' %]
43                     <td>
44                         [% IF c.club_template.is_enrollable_from_opac %]
45                             Yes
46                         [% ELSE %]
47                             No
48                         [% END %]
49                     </td>
50                     <td>
51                         [% IF c.club_template.is_email_required %]
52                             Yes
53                         [% ELSE %]
54                             No
55                         [% END %]
56                     </td>
57                 [% END %]
58                 <td>[% Branches.GetName( c.branchcode ) | html %]</td>
59                 <td>
60                     [% IF c.date_start %]
61                         [% c.date_start | $KohaDates %]
62                     [% END %]
63                 </td>
64                 <td>
65                     [% IF c.date_end %]
66                         [% c.date_end | $KohaDates %]
67                     [% END %]
68                 </td>
69                 <td>
70                     [% c.club_enrollments.count | html %]
71                 </td>
72                 [% UNLESS destination == 'holds' %]
73                     <td class="actions">
74                         <div class="btn-group dropup">
75                             <a class="btn btn-default btn-xs dropdown-toggle" id="clubactions[% c.id | html %]" role="button" data-toggle="dropdown" href="#">
76                                 Actions <b class="caret"></b>
77                             </a>
78                             <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="clubactions[% c.id | html %]">
79                                 [% IF ( c.club_enrollments.count ) %]
80                                     <li>
81                                         <a href="club-enrollments.pl?id=[% c.id | uri %]">
82                                             <i class="fa fa-list-ul"></i> Enrollments
83                                         </a>
84                                     </li>
85                                 [% ELSE %]
86                                     <li class="disabled">
87                                         <a href="#" data-toggle="tooltip" data-placement="left" title="There are no enrollments for this club yet">
88                                             <i class="fa fa-list-ul"></i> Enrollments
89                                         </a>
90                                     </li>
91                                 [% END %]
92                                 [% IF CAN_user_clubs_edit_clubs %]
93                                     <li>
94                                         <a href="clubs-add-modify.pl?id=[% c.id | uri %]">
95                                             <i class="fa fa-pencil"></i> Edit
96                                         </a>
97                                     </li>
98                                     <li>
99                                         <a href="#" class="delete_club" data-id="[% c.id | html %]" data-name="[% c.name | html %]">
100                                             <i class="fa fa-trash"></i> Delete
101                                         </a>
102                                     </li>
103                                 [% END %]
104                                 [% IF ( c.club_enrollments.count ) %]
105                                     <li>
106                                         <a href="#" class="club_hold_search" data-id="[% c.id | html %]">
107                                             <i class="fa fa-search"></i> Search to hold
108                                         </a>
109                                     </li>
110                                 [% END %]
111                             </ul>
112                         </div>
113                     </td>
114                 [% END %]
115             </tr>
116         [% END %]
117     </tbody>
118 </table> <!-- /.clubs-table -->