Bug 10634 - Use datatables for course details items table
We should make the course items table in the course details a datatable to enable searching or sorting. Test Plan: 1) Apply this patch 2) View the details page for a course with items 3) Verify the table displays and is now a datatable Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
4677fa9bd2
commit
52a6d2189d
1 changed files with 14 additions and 1 deletions
|
@ -5,9 +5,22 @@
|
||||||
<title>Koha › Course reserves › Course details for [% course.course_name %]</title>
|
<title>Koha › Course reserves › Course details for [% course.course_name %]</title>
|
||||||
[% INCLUDE 'doc-head-close.inc' %]
|
[% INCLUDE 'doc-head-close.inc' %]
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
||||||
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
|
||||||
|
[% INCLUDE 'datatables-strings.inc' %]
|
||||||
|
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
$("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||||
|
"sPaginationType": "four_button",
|
||||||
|
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
|
||||||
|
"iDisplayLength": 20,
|
||||||
|
"aoColumnDefs": [
|
||||||
|
{ 'bSortable': false, 'aTargets': [ 9, 10, 11 ] }
|
||||||
|
]
|
||||||
|
}));
|
||||||
|
|
||||||
$("a.delete_item").click(function(){
|
$("a.delete_item").click(function(){
|
||||||
return confirm( _("Are you sure you want to remove this item from the course?"));
|
return confirm( _("Are you sure you want to remove this item from the course?"));
|
||||||
});
|
});
|
||||||
|
@ -56,7 +69,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[% IF course_reserves %]
|
[% IF course_reserves %]
|
||||||
<table>
|
<table id="course_reserves_table">
|
||||||
<caption>Reserves</caption>
|
<caption>Reserves</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in a new issue