Owen Leonard
43aea684f0
Modified breadcrumbs to be accessible, in particular for a screen-reader. Also ensured the breadcrumbs were all consistent. Made the block of breadcrumbs to be a <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs"> with an ordered list inside. The last breadcrumb also has aria-current="page" to specify that it is the current page. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) - Confirm that OPAC templates are updated consistently to use breadcrumbs markup beginning with '<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">' - Pages in the OPAC should look consistent, with the last breadcrumb styled as text and with the "aria-current" attribute "page." Sponsored-by: Catalyst IT Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
94 lines
4 KiB
Text
94 lines
4 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE TablesSettings %]
|
|
[% PROCESS 'i18n.inc' %]
|
|
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Courses › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
[% Asset.css("css/datatables.css") | $raw %]
|
|
[% END %]
|
|
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-course-reserves' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-main.pl">Home</a>
|
|
</li>
|
|
<li class="breadcrumb-item active">
|
|
<a href="#" aria-current="page">Course reserves</a>
|
|
</li>
|
|
</ol>
|
|
</nav> <!-- /#breadcrumbs -->
|
|
|
|
<div class="container-fluid">
|
|
<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">
|
|
<caption class="sr-only">Courses</caption>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Dept.</th>
|
|
<th>Course #</th>
|
|
<th>Section</th>
|
|
<th>[% tp('Semester', 'Term') | html %]</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 | 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 | 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 | $raw %]</td>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- / #courses -->
|
|
</div> <!-- / .col -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% 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 %]
|