Lines 8-17
Link Here
|
8 |
<caption class="sr-only">Clubs</caption> |
8 |
<caption class="sr-only">Clubs</caption> |
9 |
<thead> |
9 |
<thead> |
10 |
<tr> |
10 |
<tr> |
11 |
<th>Name</th> |
11 |
<th class="all">Name</th> |
12 |
<th>Description</th> |
12 |
<th>Description</th> |
13 |
<th>Date enrolled</th> |
13 |
<th>Date enrolled</th> |
14 |
<th> </th> |
14 |
<th class="NoSort all"> </th> |
15 |
<th></th> |
15 |
<th></th> |
16 |
</tr> |
16 |
</tr> |
17 |
</thead> |
17 |
</thead> |
Lines 24-30
Link Here
|
24 |
<td>[% e.date_enrolled | $KohaDates %]</td> |
24 |
<td>[% e.date_enrolled | $KohaDates %]</td> |
25 |
<td> |
25 |
<td> |
26 |
[% IF e.club.club_template.is_enrollable_from_opac %] |
26 |
[% IF e.club.club_template.is_enrollable_from_opac %] |
27 |
<button class="btn btn-xs btn-default" onclick="cancelEnrollment( [% e.id | html %] )"> |
27 |
<button class="btn btn-sm btn-danger cancel_enrollment" data-id="[% e.id | html %]"> |
28 |
<i class="fa fa-times" aria-hidden="true"></i> Cancel enrollment |
28 |
<i class="fa fa-times" aria-hidden="true"></i> Cancel enrollment |
29 |
</button> |
29 |
</button> |
30 |
[% ELSE %] |
30 |
[% ELSE %] |
Lines 45-53
Link Here
|
45 |
<table id="clubs-table-unenrolled" class="table table-bordered table-striped"> |
45 |
<table id="clubs-table-unenrolled" class="table table-bordered table-striped"> |
46 |
<thead> |
46 |
<thead> |
47 |
<tr> |
47 |
<tr> |
48 |
<th>Name</th> |
48 |
<th class="all">Name</th> |
49 |
<th>Description</th> |
49 |
<th>Description</th> |
50 |
<th> </th> |
50 |
<th class="NoSort all"> </th> |
51 |
<th></th> |
51 |
<th></th> |
52 |
</tr> |
52 |
</tr> |
53 |
</thead> |
53 |
</thead> |
Lines 59-65
Link Here
|
59 |
<td>[% c.description | html %]</td> |
59 |
<td>[% c.description | html %]</td> |
60 |
<td> |
60 |
<td> |
61 |
[% IF !c.club_template.is_email_required || ( c.club_template.is_email_required && borrower.notice_email_address ) %] |
61 |
[% IF !c.club_template.is_email_required || ( c.club_template.is_email_required && borrower.notice_email_address ) %] |
62 |
<button class="btn btn-xs btn-default" onclick="loadEnrollmentForm([% c.id | html%])"> |
62 |
<button class="btn btn-sm btn-primary load_enrollment" data-id="[% c.id | html%]"> |
63 |
<i class="fa fa-plus" aria-hidden="true"></i> Enroll |
63 |
<i class="fa fa-plus" aria-hidden="true"></i> Enroll |
64 |
</button> |
64 |
</button> |
65 |
[% ELSE %] |
65 |
[% ELSE %] |
Lines 102-120
function cancelEnrollment( id ) {
Link Here
|
102 |
}); |
102 |
}); |
103 |
return false; |
103 |
return false; |
104 |
} |
104 |
} |
105 |
var Tables = $("#clubs-table-enrolled,#clubs-table-unenrolled"); |
105 |
|
106 |
Tables.each(function(){ |
106 |
var Tables = $("#clubs-table-enrolled,#clubs-table-unenrolled"); |
107 |
$(this).dataTable($.extend(true, {}, dataTablesDefaults, { |
107 |
Tables.each(function(){ |
108 |
"searching": false, |
108 |
$(this).dataTable($.extend(true, {}, dataTablesDefaults, { |
109 |
"paging": false, |
109 |
"searching": false, |
110 |
"info": false, |
110 |
"paging": false, |
111 |
"autoWidth": false, |
111 |
"info": false, |
112 |
"responsive": { |
112 |
"autoWidth": false, |
113 |
"details": { "type": 'column',"target": -1 } |
113 |
"responsive": { |
114 |
}, |
114 |
"details": { "type": "column", "target": -1 } |
115 |
"columnDefs": [ |
115 |
}, |
116 |
{ "className": 'dtr-control', "orderable": false, "targets": -1 } |
116 |
"columnDefs": [ |
117 |
], |
117 |
{ "orderable": false, "searchable": false, "targets": [ 'NoSort' ] }, |
118 |
})); |
118 |
{ "className": "dtr-control", "orderable": false, "targets": -1 }, |
119 |
}); |
119 |
], |
|
|
120 |
})); |
121 |
}); |
122 |
|
123 |
$(".cancel_enrollment").on("click", function(e){ |
124 |
e.preventDefault(); |
125 |
let clubid = $(this).data("id"); |
126 |
cancelEnrollment( clubid ); |
127 |
}); |
128 |
|
129 |
$(".load_enrollment").on("click", function(e){ |
130 |
e.preventDefault(); |
131 |
let clubid = $(this).data("id"); |
132 |
loadEnrollmentForm( clubid ); |
133 |
}); |
134 |
|
135 |
|
120 |
</script> |
136 |
</script> |