Bug 23261: Add notice for login/registering to RBdigital results

To test:
 1 - You will need a valid library RBDigital account
 2 - Fill in the RecordedBooks system preferences
 3 - Open the catalog, perform a search with RBDigtal resuls, 'love' often works
 4 - Click to the results
 5 - Note if not logged you don't see availability
 6 - Log in with a patron with no email, note you do not see any notice that you must register your email with RBDigital
 7 - Apply patch
 8 - Reload results, you now see a notice to register with rbdigital, do so unless you already have an account
 9 - Add your associated email to the koha account
10 - Reload results, note you see availability
11 - Log out, reload results
12 - Note you see a promp to login to see availability

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2019-07-03 19:11:54 +00:00 committed by Joy Nelson
parent e655c5f471
commit 8cb74d58d7
1 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,10 @@
<div class="span10">
<div id="recordedbooks-results-content" class="maincontent searchresults">
<h1>RecordedBooks search for '[% q | html %]'</h1>
[% UNLESS ( loggedinusername ) %]
<h3 class="rb_login">Sign in to view availability and checkout items or place holds</h3>
[% END %]
<div id="breadcrumbs">
<p></p>
</div>
@ -81,7 +85,6 @@ function search( page ) {
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">' );
@ -154,6 +157,9 @@ $( document ).ready( function() {
KOHA.RecordedBooks.with_account_details("#breadcrumbs", function() {
search( 1 );
});
if( KOHA.RecordedBooks.is_identified() == 'false' ){
$("#breadcrumbs").before('<h3 class="rb_register"><a href="https://[% Koha.Preference('RecordedBooksDomain') %]">To see availability you must register for RecordedBooks using your cardnumber and the email associated with your Koha account</a></h3>');
}
[% ELSE %]
search( 1 );
[% END %]