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>
137 lines
7.3 KiB
Text
137 lines
7.3 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE ItemTypes %]
|
|
[% USE Branches %]
|
|
[% USE TablesSettings %]
|
|
[% PROCESS 'i18n.inc' %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Course reserves for [% course.course_name | html %] › [% 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-details' %]
|
|
[% 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">
|
|
<a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a>
|
|
</li>
|
|
<li class="breadcrumb-item active">
|
|
<a href="#" aria-current="page">Course reserves for <em>[% course.course_name | html %]</em></a>
|
|
</li>
|
|
</ol>
|
|
</nav> <!-- /#breadcrumbs -->
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col">
|
|
<div id="course_reserves" class="maincontent">
|
|
|
|
<h1>Course reserves for <em>[% course.course_name | html %]</em></h1>
|
|
<div class="rows">
|
|
<ol>
|
|
[% IF ( course.term ) %]<li><span class="label">[% tp('Semester', 'Term:') | html %]</span> [% AuthorisedValues.GetByCode( 'TERM', course.term, 1 ) | html %]</li>[% END %]
|
|
<li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department, 1 ) | html %]</li>
|
|
[% IF ( course.course_number ) %]<li><span class="label">Course number:</span> [% course.course_number | html %]</li>[% END %]
|
|
[% IF ( course.section ) %]<li><span class="label">Section:</span> [% course.section | html %]</li>[% END %]
|
|
[% IF ( course.instructors ) %]
|
|
<li><span class="label">Instructors:</span>
|
|
<ul>
|
|
[% FOREACH i IN course.instructors %]
|
|
<li><div class="instructor">[% i.firstname | html %] [% i.surname | html %]</div></li>
|
|
[% END %]
|
|
</ul>
|
|
</li>
|
|
[% END %]
|
|
[% IF ( course.public_note ) %]<li><span class="label">Notes:</span> [% course.public_note | $raw %]</li>[% END %]
|
|
</ol>
|
|
</div>
|
|
|
|
[% IF ( course_reserves ) %]
|
|
<table id="course-items-table" class="table table-bordered table-striped table-condensed">
|
|
<caption class="sr-only">Courses</caption>
|
|
<thead>
|
|
<tr>
|
|
<th class="anti-the">Title</th>
|
|
<th>Author</th>
|
|
<th>Item type</th>
|
|
<th>Location</th>
|
|
<th>Collection</th>
|
|
<th>Call number</th>
|
|
<th>Copy number</th>
|
|
<th>Status</th>
|
|
<th>Date due</th>
|
|
<th>Notes</th>
|
|
<th>Link</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
[% FOREACH cr IN course_reserves %]
|
|
<tr>
|
|
<td><a href="opac-detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title-head.inc' biblio=cr.biblio %]</a></td>
|
|
<td>[% cr.biblio.author | html %]</td>
|
|
<td>[% ItemTypes.GetDescription( cr.item.itype ) | html %]</td>
|
|
<td>[% Branches.GetName( cr.item.holdingbranch ) | html %] <br/> <em>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => cr.item.location, opac => 1 ) | html %]</em></td>
|
|
<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode, opac => 1 ) | html %]</td>
|
|
<td>[% cr.item.itemcallnumber | html %]</td>
|
|
<td>[% cr.item.copynumber | html %]</td>
|
|
<td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
|
|
<td data-order="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</td>
|
|
<td>[% IF ( cr.public_note ) %]
|
|
[% cr.public_note | $raw %]
|
|
[% ELSIF ( cr.item.itemnotes ) %]
|
|
[% cr.item.itemnotes | $raw %]
|
|
[% END %]
|
|
</td>
|
|
<td>[% IF (cr.item.uri) %]
|
|
<a href="[% cr.item.uri | url %]">Item URI</a>
|
|
[% ELSIF (cr.biblioitem.url) %]
|
|
<a href="[% cr.biblioitem.url | url %]">Record URL</a>
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<br style="clear:both;" />
|
|
<div class="alert alert-info">
|
|
<p>No reserves have been selected for this course.</p>
|
|
</div>
|
|
[% END %]
|
|
</div> <!-- / #course_reserves -->
|
|
</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-items-table', 'json' ) | $raw %];
|
|
KohaTable("#course-items-table", {
|
|
"dom": '<"top"<"table_controls"f>>t',
|
|
"sorting": [[ 1, "asc" ]],
|
|
"autoWidth": false,
|
|
"language": {
|
|
"search": "_INPUT_",
|
|
"searchPlaceholder": _("Search course reserves")
|
|
}
|
|
}, columns_settings );
|
|
});
|
|
</script>
|
|
[% END %]
|