+[% USE raw %]
+[% USE Asset %]
[% USE Koha %]
[% USE AuthorisedValues %]
+[% USE TablesSettings %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Courses</title>
+<title>Courses › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %]
- <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+ [% Asset.css("css/datatables.css") | $raw %]
[% END %]
</head>
-[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
+[% INCLUDE 'bodytag.inc' bodyid='opac-course-reserves' %]
[% 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>
+ <nav aria-label="breadcrumb">
+ <ul class="breadcrumb">
+ <li class="breadcrumb-item">
+ <a href="/cgi-bin/koha/opac-main.pl">Home</a>
+ </li>
+ <li class="breadcrumb-item" aria-current="page">
+ <a href="#">Course reserves</a>
+ </li>
+ </ul>
+ </nav>
<div class="container-fluid">
- <div class="row-fluid">
- <div class="span12">
-
+ <div class="row">
+ <div class="col order-first order-md-first order-lg-2">
+ <div id="courses" class="maincontent">
<h1>Courses</h1>
<table id="course_reserves_table" class="table table-bordered table-striped table-condensed">
<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><a href="opac-course-details.pl?course_id=[% c.course_id | uri %]">[% c.course_name | html %]</a></td>
+ <td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department, 1 ) | html %]</td>
+ <td>[% c.course_number | html %]</td>
+ <td>[% c.section | html %]</td>
+ <td>[% AuthorisedValues.GetByCode( 'TERM' c.term, 1 ) | html %]</td>
<td>
[% FOREACH i IN c.instructors %]
- <div class="instructor"><span class"inst_surname">[% i.surname %]</span>[% IF i.firstname %]<span class="instr_separator">, </span><span class="instr_firstname">[% i.firstname %]</span>[% END %]</div>
+ <div class="instructor"><span class="inst_surname">[% i.surname | html %]</span>[% IF i.firstname %]<span class="instr_separator">, </span><span class="instr_firstname">[% i.firstname | html %]</span>[% END %]</div>
[% END %]
</td>
- <td>[% c.public_note %]</td>
+ <td>[% c.public_note | $raw %]</td>
[% END %]
</tbody>
</table>
- </div> <!-- / .span12 -->
- </div> <!-- / .row-fluid -->
+ </div> <!-- / #courses -->
+ </div> <!-- / .col -->
+ </div> <!-- / .row -->
</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">',
- }));
- });
+ [% INCLUDE 'columns_settings.inc' %]
+ <script>
+ $(document).ready(function() {
+ columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %]
+ KohaTable("#course_reserves_table", {
+ "dom": '<"top"f>rt<"clear">',
+ "sorting": [[ 1, "asc" ]],
+ "autoWidth": false,
+ "asColumnDefs": [
+ { "aTargets": [ 1 ], "sType": "nsb-nse" },
+ ],
+ "language": {
+ "search": "_INPUT_",
+ "searchPlaceholder": _("Search courses")
+ }
+ }, columns_settings );
+ });
</script>
[% END %]