|
Lines 1-71
Link Here
|
| 1 |
[% USE KohaDates %] |
1 |
[% USE KohaDates %] |
| 2 |
[% USE Branches %] |
2 |
[% USE Branches %] |
| 3 |
[% USE Koha %] |
3 |
[% USE Koha %] |
|
|
4 |
[% SET footerjs = 1 %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
| 5 |
<title>Koha › Tools › Patron clubs</title> |
6 |
<title>Koha › Tools › Patron clubs</title> |
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
|
8 |
|
| 8 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
9 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
| 9 |
[% INCLUDE 'datatables.inc' %] |
|
|
| 10 |
|
| 11 |
<script type="text/javascript"> |
| 12 |
//<![CDATA[ |
| 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>', |
| 17 |
"aoColumnDefs": [ |
| 18 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
| 19 |
] |
| 20 |
} )); |
| 21 |
|
| 22 |
cTable = $('#clubs-table').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 23 |
"sPaginationType": "four_button", |
| 24 |
"sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>', |
| 25 |
"aoColumnDefs": [ |
| 26 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
| 27 |
] |
| 28 |
} )); |
| 29 |
}); |
| 30 |
|
| 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) ) ) { |
| 33 |
$.ajax({ |
| 34 |
type: "POST", |
| 35 |
url: '/cgi-bin/koha/svc/club/template/delete', |
| 36 |
data: { id: id }, |
| 37 |
success: function( data ) { |
| 38 |
if ( data.success ) { |
| 39 |
location.reload(); |
| 40 |
} else { |
| 41 |
alert(_("Unable to delete template!")); |
| 42 |
} |
| 43 |
}, |
| 44 |
dataType: 'json' |
| 45 |
}); |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 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) ) ) { |
| 51 |
$.ajax({ |
| 52 |
type: "POST", |
| 53 |
url: '/cgi-bin/koha/svc/club/delete', |
| 54 |
data: { id: id }, |
| 55 |
success: function( data ) { |
| 56 |
if ( data.success ) { |
| 57 |
location.reload(); |
| 58 |
} else { |
| 59 |
alert(_("Unable to delete club!")); |
| 60 |
} |
| 61 |
}, |
| 62 |
dataType: 'json' |
| 63 |
}); |
| 64 |
} |
| 65 |
} |
| 66 |
//]]> |
| 67 |
</script> |
| 68 |
|
| 69 |
</head> |
10 |
</head> |
| 70 |
|
11 |
|
| 71 |
<body id="clubs_clubs" class="clubs"> |
12 |
<body id="clubs_clubs" class="clubs"> |
|
Lines 278-281
Link Here
|
| 278 |
</div> |
219 |
</div> |
| 279 |
</div> <!-- /#bd --> |
220 |
</div> <!-- /#bd --> |
| 280 |
|
221 |
|
|
|
222 |
[% MACRO jsinclude BLOCK %] |
| 223 |
[% INCLUDE 'datatables.inc' %] |
| 224 |
|
| 225 |
<script type="text/javascript"> |
| 226 |
$(document).ready(function() { |
| 227 |
tTable = $('#club-templates-table').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 228 |
"sPaginationType": "four_button", |
| 229 |
"sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>', |
| 230 |
"aoColumnDefs": [ |
| 231 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
| 232 |
] |
| 233 |
} )); |
| 234 |
|
| 235 |
cTable = $('#clubs-table').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 236 |
"sPaginationType": "four_button", |
| 237 |
"sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>', |
| 238 |
"aoColumnDefs": [ |
| 239 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
| 240 |
] |
| 241 |
} )); |
| 242 |
}); |
| 243 |
|
| 244 |
function ConfirmDeleteTemplate( id, name, a ) { |
| 245 |
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) ) ) { |
| 246 |
$.ajax({ |
| 247 |
type: "POST", |
| 248 |
url: '/cgi-bin/koha/svc/club/template/delete', |
| 249 |
data: { id: id }, |
| 250 |
success: function( data ) { |
| 251 |
if ( data.success ) { |
| 252 |
location.reload(); |
| 253 |
} else { |
| 254 |
alert(_("Unable to delete template!")); |
| 255 |
} |
| 256 |
}, |
| 257 |
dataType: 'json' |
| 258 |
}); |
| 259 |
} |
| 260 |
} |
| 261 |
|
| 262 |
function ConfirmDeleteClub( id, name, a ) { |
| 263 |
if ( confirm( _("Are you sure you want to delete the club %s? This will cancel all patron enrollments in this club." ).format(name) ) ) { |
| 264 |
$.ajax({ |
| 265 |
type: "POST", |
| 266 |
url: '/cgi-bin/koha/svc/club/delete', |
| 267 |
data: { id: id }, |
| 268 |
success: function( data ) { |
| 269 |
if ( data.success ) { |
| 270 |
location.reload(); |
| 271 |
} else { |
| 272 |
alert(_("Unable to delete club!")); |
| 273 |
} |
| 274 |
}, |
| 275 |
dataType: 'json' |
| 276 |
}); |
| 277 |
} |
| 278 |
} |
| 279 |
</script> |
| 280 |
[% END %] |
| 281 |
|
| 281 |
[% INCLUDE 'intranet-bottom.inc' %] |
282 |
[% INCLUDE 'intranet-bottom.inc' %] |
| 282 |
- |
|
|