Wainui Witika-Park
e5811fd398
Bug 27610 corrected the <h1> tags in each of the OPAC files. This patch corrects the hierarchy of the rest of the headings on each of the pages. To test: 1) Go to the OPAC 2) Apply Bug 27610 patch 3) Apply patch (Bug 27740) 4) Go to each of the pages and check that the headings under <h1> are in the correct order and hierarchy Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
175 lines
7.9 KiB
Text
175 lines
7.9 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>RecordedBooks search for '[% q | html %]' › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
[% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='recordedbooks-results-page' bodyclass='scrollto' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<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 active" aria-current="page">
|
|
<a href="#">RecordedBooks search for '[% q | html %]'</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-lg-2">
|
|
[% IF ( OpacNav || OpacNavBottom ) %]
|
|
[% INCLUDE 'navigation.inc' %]
|
|
[% END %]
|
|
</div>
|
|
<div class="col-lg-10 order-first order-md-first order-lg-2">
|
|
<div id="recordedbooks-results-content" class="maincontent searchresults">
|
|
<h1>RecordedBooks search for '[% q | html %]'</h1>
|
|
[% UNLESS ( logged_in_user ) %]
|
|
<h2 class="rb_login">Sign in to view availability and checkout items or place holds</h2>
|
|
[% END %]
|
|
|
|
<div id="breadcrumbs">
|
|
<p></p>
|
|
</div>
|
|
|
|
<div id="top-pages">
|
|
<nav class="pagination pagination-sm noprint" aria-label="Search results pagination">
|
|
</nav>
|
|
</div>
|
|
|
|
<table id="recordedbooks-results-list" class="table table-striped">
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="bottom-pages">
|
|
<nav class="pagination pagination-sm noprint" aria-label="Search results pagination">
|
|
</nav>
|
|
</div>
|
|
|
|
</div> <!-- / #recordedbooks-results-content -->
|
|
</div> <!-- / .col-lg-10 -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'recordedbooks-checkout.inc' %]
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% Asset.js("js/recordedbooks.js") | $raw %]
|
|
<script>
|
|
var querystring = "[% q |replace( "'", "\'" ) |replace( '\n', '\\n' ) |replace( '\r', '\\r' ) |html %]";
|
|
var results_per_page = [% OPACnumSearchResults || 20 | html %];
|
|
|
|
function search( page ) {
|
|
$( '#recordedbooks-status' ).html( MSG_SEARCHING.format("RecordedBooks") + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></span>' );
|
|
|
|
KOHA.RecordedBooks.search( querystring, results_per_page, page, function( data ) {
|
|
if ( data.error ) {
|
|
$( '#recordedbooks-status' ).html( '<strong class="unavailable">' + MSG_ERROR_SEARCHING_COLLECTION.format("RecordedBooks") + ': ' + data.error + '</strong>' );
|
|
return;
|
|
}
|
|
|
|
if ( !data.total ) {
|
|
$( '#recordedbooks-status' ).html( '<strong>' + MSG_NO_RESULTS_FOUND_IN_COLLECTION.format("RecordedBooks") + '</strong>' );
|
|
return;
|
|
}
|
|
|
|
$( '#recordedbooks-results-list tbody' ).empty();
|
|
|
|
$( '#recordedbooks-status' ).html( '<strong>' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.total, "RecordedBooks") + '</strong>' );
|
|
|
|
for ( var i = 0; data.items[i]; i++ ) {
|
|
var prod = data.items[i];
|
|
var results = [];
|
|
results.push( '<tr>' );
|
|
|
|
results.push( '<td class="info"><span class="title">' );
|
|
if (prod.url) results.push( '<a href="', prod.url, '" target="recordedbooks">' );
|
|
results.push( prod.title );
|
|
if (prod.url) results.push( '</a>' );
|
|
results.push( '</span>' );
|
|
results.push( '<p>' + MSG_BY + ' ', prod.author, '</p>' );
|
|
if (prod.description) results.push( '<p>' + prod.description, '</p>' );
|
|
results.push( '<span class="results_summary mediatype"><span class="label">' + MSG_TYPE + ': </span>', prod.media, '</span>' );
|
|
|
|
results.push( '</td>' );
|
|
|
|
results.push( '<td>' );
|
|
if ( prod.images && prod.images.medium ) {
|
|
if (prod.url) results.push( '<a href="', prod.url, '" target="recordedbooks">' );
|
|
results.push( '<img class="thumbnail" src="', prod.images.medium, '" />' );
|
|
if (prod.url) results.push( '</a>' );
|
|
}
|
|
results.push( '</td>' );
|
|
|
|
results.push( '</tr>' );
|
|
var $tr = $( results.join( '' ));
|
|
$( '#recordedbooks-results-list tbody' ).append( $tr );
|
|
|
|
$tr.find( '.info' ).each(function() {
|
|
KOHA.RecordedBooks.add_actions(this, prod.isbn);
|
|
});
|
|
}
|
|
|
|
$( '#recordedbooks-results-list tr:odd' ).addClass( 'highlight' );
|
|
|
|
var pages = [];
|
|
|
|
var max_page = Math.floor( data.total / results_per_page );
|
|
if (data.total == page*results_per_page) max_page++;
|
|
|
|
if ( page != 1 ) {
|
|
pages.push( '<li class="page-item"><a class="page-link od-nav" href="#" data-page="' + (page - 1) + '">« ' + MSG_PREVIOUS + '</a></li>' );
|
|
}
|
|
|
|
for ( var p = Math.max( 0, page - 9 ); p <= Math.min( max_page, p + 9 ); p++ ) {
|
|
if ( p == page ) {
|
|
pages.push( ' <li class="page-item disabled"><a class="page-link" href="#">' + ( p + 1 ) + '</a></li>' );
|
|
} else {
|
|
pages.push( ' <li class="page-item"><a class="page-link od-nav" href="#" data-page="' + p + '">' + p + '</a></li>' );
|
|
}
|
|
}
|
|
|
|
if ( page < max_page ) {
|
|
pages.push( ' <li class="page-item"><a class="page-link od-nav" href="#" data-page="' + (page + 1) + '">' + MSG_NEXT + ' »</a></li>' );
|
|
}
|
|
|
|
if ( pages.length > 1 ) $( '#top-pages, #bottom-pages' ).find( '.pagination' ).html( '<ul class="pagination">' + pages.join( '' ) + '</ul>');
|
|
|
|
if( KOHA.RecordedBooks.is_identified() == false ){
|
|
$("#breadcrumbs").before('<h3 class="rb_register"><a href="https://[% Koha.Preference('RecordedBooksDomain') | uri %]">To see availability you must register for RecordedBooks using your cardnumber and the email associated with your Koha account</a></h3>');
|
|
}
|
|
|
|
} );
|
|
}
|
|
|
|
$( document ).ready( function() {
|
|
$( '#breadcrumbs p' )
|
|
.append( ' ' )
|
|
.append( '<span id="recordedbooks-status"></span>' );
|
|
|
|
$( document ).on( 'click', 'a.od-nav', function() {
|
|
search( $( this ).data( 'page' ) );
|
|
return false;
|
|
});
|
|
|
|
[% IF ( logged_in_user ) %]
|
|
KOHA.RecordedBooks.with_account_details("#breadcrumbs", function() {
|
|
search( 1 );
|
|
});
|
|
[% ELSE %]
|
|
search( 1 );
|
|
[% END %]
|
|
} );
|
|
</script>
|
|
[% END %]
|