+
+ </main>
+ </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+ <div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% INCLUDE 'tools-menu.inc' %]
+ </aside>
+ </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+ </div> <!-- /.row -->
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ [% Asset.js("js/tools-menu.js") | $raw %]
+ <script>
+ $(document).ready(function() {
+ tTable = $('#club-templates-table').dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sPaginationType": "four_button",
+ "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
+ "aoColumnDefs": [
+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+ ]
+ } ));
+
+ cTable = $('#clubs-table').dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sPaginationType": "four_button",
+ "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
+ "aoColumnDefs": [
+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+ ]
+ } ));
+ });
+
+ function ConfirmDeleteTemplate( id, name, a ) {
+ 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) ) ) {
+ $.ajax({
+ type: "POST",
+ url: '/cgi-bin/koha/svc/club/template/delete',
+ data: { id: id },
+ success: function( data ) {
+ if ( data.success ) {
+ location.reload();
+ } else {
+ alert(_("Unable to delete template!"));
+ }
+ },
+ dataType: 'json'
+ });
+ }
+ }
+
+ function ConfirmDeleteClub( id, name, a ) {
+ if ( confirm( _("Are you sure you want to delete the club %s? This will cancel all patron enrollments in this club." ).format(name) ) ) {
+ $.ajax({
+ type: "POST",
+ url: '/cgi-bin/koha/svc/club/delete',
+ data: { id: id },
+ success: function( data ) {
+ if ( data.success ) {
+ location.reload();
+ } else {
+ alert(_("Unable to delete club!"));
+ }
+ },
+ dataType: 'json'
+ });
+ }
+ }
+ </script>
+[% END %]