Bug 28034: Make club enrollment tables in to DataTables
To test: -Add some clubs -Go to a patron record and enroll them in some clubs but not in others. -There should be two table under the clubs tab, Clubs currently enrolled in and Clubs not enrolled in -Neither are DataTables -Apply patch -With the same patron check the clubs tab, they should be datatables now -Make sure all the controls, pagination works good Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
ff60284b01
commit
ee84877a87
|
|
@ -3,13 +3,13 @@
|
|||
[% IF enrollments %]
|
||||
<h4>Clubs currently enrolled in</h4>
|
||||
|
||||
<table>
|
||||
<table id="table_clubenrollments">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Date enrolled</th>
|
||||
[% IF CAN_user_clubs_enroll %]<th> </th>[% END %]
|
||||
[% IF CAN_user_clubs_enroll %]<th class="NoSort">Actions</th>[% END %]
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
|
@ -36,12 +36,12 @@
|
|||
|
||||
<h4>Clubs not enrolled in</h4>
|
||||
|
||||
<table>
|
||||
<table id="table_clubnoenrollmemnts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
[% IF CAN_user_clubs_enroll %]<th> </th>[% END %]
|
||||
[% IF CAN_user_clubs_enroll %]<th class="NoSort">Actions</th>[% END %]
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
|
@ -63,8 +63,15 @@
|
|||
</table>
|
||||
[% END %]
|
||||
|
||||
[% IF CAN_user_clubs_enroll %]
|
||||
<script>
|
||||
$("#table_clubnoenrollmemnts, #table_clubenrollments").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||
"columnDefs": [
|
||||
{ 'sortable': false, 'targets': [ 'NoSort' ] }
|
||||
],
|
||||
paginate: true
|
||||
}));
|
||||
|
||||
[% IF CAN_user_clubs_enroll %]
|
||||
function loadEnrollmentForm( id ) {
|
||||
$("body").css("cursor", "progress");
|
||||
$('#clubs-tab').load('/cgi-bin/koha/clubs/patron-enroll.pl?borrowernumber=[% borrowernumber | html %]&id=' + id, function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue