4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Tools › Patron clubs</title>
6 [% INCLUDE 'doc-head-close.inc' %]
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
11 <script type="text/javascript">
13 $(document).ready(function() {
14 tTable = $('#club-templates-table').dataTable($.extend(true, {}, dataTablesDefaults, {
15 "sPaginationType": "four_button",
16 "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
18 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
22 cTable = $('#clubs-table').dataTable($.extend(true, {}, dataTablesDefaults, {
23 "sPaginationType": "four_button",
24 "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
26 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
31 function ConfirmDeleteTemplate( id, name, a ) {
32 if ( confirm( _("Are you sure you want to delete the club template %s? This will delete all clubs using this template and cancel patron enrollments" ).format(name) ) ) {
35 url: '/cgi-bin/koha/svc/club/template/delete',
37 success: function( data ) {
41 alert(_("Unable to delete template!"));
49 function ConfirmDeleteClub( id, name, a ) {
50 if ( confirm( _("Are you sure you want to delete the club %s? This will cancel all patron enrollments in this club." ).format(name) ) ) {
53 url: '/cgi-bin/koha/svc/club/delete',
55 success: function( data ) {
59 alert(_("Unable to delete club!"));
71 <body id="clubs_clubs" class="clubs">
72 [% INCLUDE 'header.inc' %]
73 [% INCLUDE 'cat-search.inc' %]
74 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Patron clubs</div>
76 <div id="doc3" class="yui-t2">
82 [% IF club_template %]
83 <div class="dialog message">
84 [% IF stored == 'updated' %]
85 <p>Club template <i>[% club_template.name %]</i> was updated.</p>
87 <p>Club template <i>[% club_template.name %]</i> was saved.</p>
91 <div class="dialog message">
92 [% IF stored == 'updated' %]
93 <p>Club <i>[% club.name %]</i> was updated.</p>
95 <p>Club <i>[% club.name %]</i> was saved.</p>
100 <h3>Club templates</h3>
102 [% IF CAN_user_clubs_edit_templates %]
103 <div class="btn-toolbar">
104 <div class="btn-group">
105 <a class="btn btn-sm btn-default" href="templates-add-modify.pl"><i class="fa fa-plus"></i> New club template</a>
110 [% IF club_templates %]
111 <table id="club-templates-table">
116 <th>Public enrollment</th>
117 <th>Email required</th>
123 [% FOREACH t IN club_templates %]
125 <td>[% t.name %]</td>
126 <td>[% t.description %]</td>
128 [% IF t.is_enrollable_from_opac %]
135 [% IF t.is_email_required %]
141 <td>[% Branches.GetName( t.branchcode ) %]</td>
143 [% IF CAN_user_clubs_edit_templates %]
144 <a class="btn btn-xs btn-default" style="white-space:nowrap" href="/cgi-bin/koha/clubs/templates-add-modify.pl?id=[% t.id %]">
145 <i class="fa fa-pencil"></i> Edit
147 <a class="btn btn-xs btn-default" href="#" onclick='ConfirmDeleteTemplate([% t.id %], "[% t.name | html %]", $(this) ); return false;'>
148 <i class="fa fa-trash"></i> Delete
157 <div class="dialog message">No club templates defined.</div>
162 [% IF CAN_user_clubs_edit_clubs %]
163 <div class="btn-toolbar">
164 <div class="btn-group">
165 [% IF club_templates %]
166 <button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button>
168 <button disabled="disabled" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button>
170 <ul class="dropdown-menu">
171 [% FOREACH t IN club_templates %]
172 <li><a href="/cgi-bin/koha/clubs/clubs-add-modify.pl?club_template_id=[% t.id %]">[% t.name %]</a></li>
180 <table id="clubs-table">
186 <th>Public enrollment</th>
187 <th>Email required</th>
191 <th>Enrolled patrons</th>
196 [% FOREACH c IN clubs %]
198 <td>[% c.name %]</td>
199 <td>[% c.club_template.name %]</td>
200 <td>[% c.description %]</td>
202 [% IF c.club_template.is_enrollable_from_opac %]
209 [% IF c.club_template.is_email_required %]
215 <td>[% Branches.GetName( c.branchcode ) %]</td>
217 [% IF c.date_start %]
218 [% c.date_start | $KohaDates %]
223 [% c.date_end | $KohaDates %]
227 [% c.club_enrollments.count %]
230 <div class="dropdown">
231 <a class="btn btn-default btn-xs dropdown-toggle" id="clubactions[% c.id %]" role="button" data-toggle="dropdown" href="#">
232 Actions <b class="caret"></b>
234 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="clubactions[% c.id %]">
235 [% IF ( c.club_enrollments.count ) %]
237 <a href="club-enrollments.pl?id=[% c.id %]">
238 <i class="fa fa-list-ul"></i> Enrollments
242 <li class="disabled">
243 <a href="club-enrollments.pl?id=[% c.id %]">
244 <i class="fa fa-list-ul"></i> Enrollments
248 [% IF CAN_user_clubs_edit_clubs %]
250 <a href="clubs-add-modify.pl?id=[% c.id %]">
251 <i class="fa fa-pencil"></i> Edit
255 <a href="#" onclick='ConfirmDeleteClub([% c.id %], "[% c.name | html %]", $(this) ); return false;'>
256 <i class="fa fa-trash"></i> Delete
266 </table> <!-- /.clubs-table -->
268 [% IF club_templates %]
269 <div class="dialog message">No clubs defined.</div>
271 <div class="dialog message">No clubs defined. A club template must be defined before a club can be defined.</div>
274 </div> <!-- /.yui-b -->
275 </div> <!-- /.yui-main -->
276 <div class="yui-b noprint">
277 [% INCLUDE 'tools-menu.inc' %]
281 [% INCLUDE 'intranet-bottom.inc' %]