Owen Leonard
e0b13056b2
This patch modifies two course reserves templates to use the new DataTables include. This simplifies the inclusion of assets and updates to the latest DataTables version. Also included: - Adds a sorting filter on the course reserves detail table to excluding articles from sorting. - Corrects the styling of toolbar buttons (buttons should have btn and btn-small classes). To test you must have UseCourseReserves enabled and have multiple existing courses, at least one of which should have items on reserve. 1. View the list of courses. Table sorting should work correctly. The "new course" button should look consistent with other staff client toolbar buttons. 2. View the list of reserves on a course. - Toolbar buttons should look consistent with other staff client toolbar buttons. - Sorting should work correctly, excluding sorting on the Edit, Remove, and "Other course reserves" columns. - Titles on reserve which begin with an article should be sorted correctly with article excluded - Test sorting with item-level_itypes on and off. - Test sorting using a patron whose permissions include various combinations of add_reserves and delete_reserves Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
112 lines
5 KiB
Text
112 lines
5 KiB
Text
[% USE AuthorisedValues %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Course reserves</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript" id="js">
|
|
$(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
|
|
}));
|
|
});
|
|
</script>
|
|
|
|
</head>
|
|
<body id="lists_shelves" class="lists">
|
|
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></div>
|
|
|
|
<div id="doc2" class="yui-t7">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<div class="yui-g">
|
|
[% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
|
|
<div id="toolbar">
|
|
<ul class="toolbar">
|
|
[% IF ( CAN_user_coursereserves_manage_courses ) %]
|
|
<li><a class="btn btn-small" id="new_course" href="/cgi-bin/koha/course_reserves/course.pl"><i class="icon-plus"></i> New course</a></li>
|
|
[% END %]
|
|
</ul>
|
|
</div><!-- /toolbar -->
|
|
[% END %]
|
|
|
|
<!--
|
|
<div id="search-toolbar">
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
function submitSearchForm(p_oEvent){
|
|
$('#search_courses_form').submit();
|
|
}
|
|
|
|
$(document).ready(function(){
|
|
newCourseButton = new YAHOO.widget.Button("search_courses");
|
|
newCourseButton.on("click", submitSearchForm );
|
|
});
|
|
//]]>
|
|
</script>
|
|
<ul class="toolbar">
|
|
<li><form id="search_courses_form"><input type="text" name="search_on" id="search_on"></form></li>
|
|
<li><a id="search_courses">Search courses</a></li>
|
|
</ul>
|
|
</div>
|
|
-->
|
|
|
|
<h1>Courses</h1>
|
|
<table id="course_reserves_table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Dept.</th>
|
|
<th>Course #</th>
|
|
<th>Section</th>
|
|
<th>Term</th>
|
|
<th>Instructors</th>
|
|
<th>Staff note</th>
|
|
<th>Public note</th>
|
|
<th># of Students</th>
|
|
<th>Enabled</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
[% FOREACH c IN courses %]
|
|
<tr>
|
|
<td><a href="course-details.pl?course_id=[% c.course_id %]">[% c.course_name %]</a></td>
|
|
<td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department ) %]</td>
|
|
<td>[% c.course_number %]</td>
|
|
<td>[% c.section %]</td>
|
|
<td>[% AuthorisedValues.GetByCode( 'TERM' c.term ) %]</td>
|
|
<td>
|
|
[% FOREACH i IN c.instructors %]
|
|
<div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber %]">[% i.firstname %] [% i.surname %]</a></div>
|
|
[% END %]
|
|
</td>
|
|
<td>[% c.staff_note %]</td>
|
|
<td>[% c.public_note %]</td>
|
|
<td>[% c.students_count %]</td>
|
|
<td>
|
|
[% IF c.enabled == 'yes' %]
|
|
Yes
|
|
[% ELSE %]
|
|
No
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|