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, -2 ], "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, -2 ], "bSortable": false, "bSearchable": false },
31 function ConfirmDeleteTemplate( id, name, a ) {
32 if ( confirm( _("Are you sure you want to delete the club template %s?" ).format(name) ) ) {
35 url: '/cgi-bin/koha/svc/club/template/delete',
37 success: function( data ) {
39 tTable.fnDeleteRow(a.closest("tr")[0]);
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?" ).format(name) ) ) {
53 url: '/cgi-bin/koha/svc/club/delete',
55 success: function( data ) {
57 cTable.fnDeleteRow(a.closest("tr")[0]);
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-default" href="templates-add-modify.pl"><i class="fa fa-plus"></i> New club template</a>
110 <table id="club-templates-table">
115 <th>Public enrollment</th>
116 <th>Email required</th>
124 [% IF club_templates %]
125 [% FOREACH t IN club_templates %]
127 <td>[% t.name %]</td>
128 <td>[% t.description %]</td>
130 [% IF t.is_enrollable_from_opac %]
137 [% IF t.is_email_required %]
143 <td>[% Branches.GetName( t.branchcode ) %]</td>
145 [% IF CAN_user_clubs_edit_templates %]
146 <a class="btn btn-default" style="white-space:nowrap" href="templates-add-modify.pl?id=[% t.id %]">
147 <i class="fa fa-edit"></i> Edit
152 [% IF CAN_user_clubs_edit_templates %]
153 <a class="btn btn-default" href="#" onclick='ConfirmDeleteTemplate([% t.id %], "[% t.name | html %]", $(this) ); return false;'>
154 <i class="fa fa-trash"></i> Delete
163 No club templates defined.
172 [% IF CAN_user_clubs_edit_clubs %]
173 <div class="btn-toolbar">
174 <div class="btn-group">
175 [% IF club_templates %]
176 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button>
178 <button disabled="disabled" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button>
180 <ul class="dropdown-menu">
181 [% FOREACH t IN club_templates %]
182 <li><a href="/cgi-bin/koha/clubs/clubs-add-modify.pl?club_template_id=[% t.id %]">[% t.name %]</a></li>
189 <table id="clubs-table">
195 <th>Public enrollment</th>
196 <th>Email required</th>
200 <th>Enrolled patrons</th>
208 [% FOREACH c IN clubs %]
210 <td>[% c.name %]</td>
211 <td>[% c.club_template.name %]</td>
212 <td>[% c.description %]</td>
214 [% IF c.club_template.is_enrollable_from_opac %]
221 [% IF c.club_template.is_email_required %]
227 <td>[% Branches.GetName( c.branchcode ) %]</td>
229 [% IF c.date_start %]
230 [% c.date_start | $KohaDates %]
235 [% c.date_end | $KohaDates %]
239 [% c.club_enrollments.count %]
240 <a class="btn btn-xs" href="club-enrollments.pl?id=[% c.id %]">
245 [% IF CAN_user_clubs_edit_clubs %]
246 <a class="btn btn-default" style="white-space:nowrap" href="clubs-add-modify.pl?id=[% c.id %]">
247 <i class="fa fa-edit"></i> Edit
252 [% IF CAN_user_clubs_edit_clubs %]
253 <a class="btn btn-default" href="#" onclick='ConfirmDeleteClub([% c.id %], "[% c.name | html %]", $(this) ); return false;'>
254 <i class="fa fa-trash"></i> Delete
271 <div class="yui-b noprint">
272 [% INCLUDE 'tools-menu.inc' %]
276 [% INCLUDE 'intranet-bottom.inc' %]