Owen Leonard
9042ce4ea5
This follow-up adds some style improvements and corrects some errors in the previous patch: - The path to datatables.css has been corrected - Unused CSS has been removed from datatables.css (particularly related to pagination controls, which are currently unused in the OPAC). - Style has been added to datatables.css to make the table search form look better. - The configuration of the course details table has been enhanced to include a title sort which ignores articles and date sorting according to the "title-string" method for date format agnostic sorting. - Unrelated: A message <div> has been modified to have the correct style for the Bootstrap theme. To test you should have multiple courses and at least one course with multiple reserves. Clear your browser cache if necessary and view the list of courses in the OPAC. All table sorting should work correctly, as should the table search form. View the details of a course which has multiple reserves. All sorting should work correctly, including title sort excluding articles. Sorting by date due should work correctly for any dateformat system preference setting. View the details of a course which has no reserves. You should see a "No reserves" message box with a style consistent with similar messages in the Bootstrap OPAC. View other sorted tables in the OPAC to confirm that the CSS changes have not negatively affected their appearance: opac-user.pl for instance, or opac-detail.pl. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
71 lines
2.8 KiB
Text
71 lines
2.8 KiB
Text
[% USE Koha %]
|
|
[% USE AuthorisedValues %]
|
|
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Courses
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
|
|
[% END %]
|
|
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<ul class="breadcrumb">
|
|
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
|
|
<li><a href="#">Course reserves</a></li>
|
|
</ul>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
|
|
<h1>Courses</h1>
|
|
|
|
<table id="course_reserves_table" class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Dept.</th>
|
|
<th>Course #</th>
|
|
<th>Section</th>
|
|
<th>Term</th>
|
|
<th>Instructors</th>
|
|
<th>Notes</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
[% FOREACH c IN courses %]
|
|
<tr>
|
|
<td><a href="opac-course-details.pl?course_id=[% c.course_id %]">[% c.course_name %]</a></td>
|
|
<td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department, 1 ) %]</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">[% i.firstname %] [% i.surname %]</div>
|
|
[% END %]
|
|
</td>
|
|
<td>[% c.public_note %]</td>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- / .span12 -->
|
|
</div> <!-- / .row-fluid -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sDom": '<"top"flp>rt<"clear">',
|
|
}));
|
|
});
|
|
</script>
|
|
[% END %]
|