3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Patron clubs</title>
5 [% INCLUDE 'doc-head-close.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
10 <script type="text/javascript">
12 $(document).ready(function() {
13 tTable = $('#club-templates-table').dataTable($.extend(true, {}, dataTablesDefaults, {
14 "sPaginationType": "four_button",
15 "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
17 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
21 cTable = $('#clubs-table').dataTable($.extend(true, {}, dataTablesDefaults, {
22 "sPaginationType": "four_button",
23 "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
25 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
30 function ConfirmDeleteTemplate( id, name, a ) {
31 if ( confirm( _("Are you sure you want to delete the club template %s?" ).format(name) ) ) {
34 url: '/cgi-bin/koha/svc/club/template/delete',
36 success: function( data ) {
38 tTable.fnDeleteRow(a.closest("tr")[0]);
40 alert(_("Unable to delete template!"));
48 function ConfirmDeleteClub( id, name, a ) {
49 if ( confirm( _("Are you sure you want to delete the club %s?" ).format(name) ) ) {
52 url: '/cgi-bin/koha/svc/club/delete',
54 success: function( data ) {
56 cTable.fnDeleteRow(a.closest("tr")[0]);
58 alert(_("Unable to delete club!"));
70 <body id="clubs_clubs" class="clubs">
71 [% INCLUDE 'header.inc' %]
72 [% INCLUDE 'cat-search.inc' %]
73 <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>
75 <div id="doc3" class="yui-t2">
81 [% IF club_template %]
82 <div class="dialog message">
83 [% IF stored == 'updated' %]
84 <p>Club template <i>[% club_template.name %]</i> was updated.</p>
86 <p>Club template <i>[% club_template.name %]</i> was saved.</p>
90 <div class="dialog message">
91 [% IF stored == 'updated' %]
92 <p>Club <i>[% club.name %]</i> was updated.</p>
94 <p>Club <i>[% club.name %]</i> was saved.</p>
99 <h3>Club templates</h3>
101 [% IF CAN_user_clubs_edit_templates %]
102 <div class="btn-toolbar">
103 <div class="btn-group">
104 <a class="btn btn-default" href="templates-add-modify.pl"><i class="fa fa-plus"></i> New club template</a>
109 <table id="club-templates-table">
114 <th>Public enrollment</th>
115 <th>Email required</th>
123 [% IF club_templates %]
124 [% FOREACH t IN club_templates %]
126 <td>[% t.name %]</td>
127 <td>[% t.description %]</td>
129 [% IF t.is_enrollable_from_opac %]
136 [% IF t.is_email_required %]
142 <td>[% Branches.GetName( t.branchcode ) %]</td>
144 [% IF CAN_user_clubs_edit_templates %]
145 <a class="btn btn-default" style="white-space:nowrap" href="templates-add-modify.pl?id=[% t.id %]">
146 <i class="fa fa-edit"></i> Edit
151 [% IF CAN_user_clubs_edit_templates %]
152 <a class="btn btn-default" href="#" onclick='ConfirmDeleteTemplate([% t.id %], "[% t.name | html %]", $(this) ); return false;'>
153 <i class="fa fa-trash"></i> Delete
162 No club templates defined.
171 [% IF CAN_user_clubs_edit_clubs %]
172 <div class="btn-toolbar">
173 <div class="btn-group">
174 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button>
175 <ul class="dropdown-menu">
176 [% FOREACH t IN club_templates %]
177 <li><a href="/cgi-bin/koha/clubs/clubs-add-modify.pl?club_template_id=[% t.id %]">[% t.name %]</a></li>
184 <table id="clubs-table">
190 <th>Public enrollment</th>
191 <th>Email required</th>
200 [% FOREACH c IN clubs %]
202 <td>[% c.name %]</td>
203 <td>[% c.club_template.name %]</td>
204 <td>[% c.description %]</td>
206 [% IF c.club_template.is_enrollable_from_opac %]
213 [% IF c.club_template.is_email_required %]
219 <td>[% Branches.GetName( c.branchcode ) %]</td>
221 [% IF CAN_user_clubs_edit_clubs %]
222 <a class="btn btn-default" style="white-space:nowrap" href="clubs-add-modify.pl?id=[% c.id %]">
223 <i class="fa fa-edit"></i> Edit
228 [% IF CAN_user_clubs_edit_clubs %]
229 <a class="btn btn-default" href="#" onclick='ConfirmDeleteClub([% c.id %], "[% c.name | html %]", $(this) ); return false;'>
230 <i class="fa fa-trash"></i> Delete
239 No club templates defined.
247 <div class="yui-b noprint">
248 [% INCLUDE 'tools-menu.inc' %]
252 [% INCLUDE 'intranet-bottom.inc' %]