Bug 20686: OPAC shows 'Login to OverDrive account' with 'OverDriveCirculation' syspre...
authorMason James <mtj@kohaaloha.com>
Tue, 1 May 2018 01:24:37 +0000 (13:24 +1200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 7 May 2018 14:55:32 +0000 (11:55 -0300)
ps: you will need an active and working overdrive account to test this patch

1/ prepare a koha with overdrive sysprefs set and working
    (OverDriveLibraryID,OverDriveClientKey,OverDriveClientSecret)

2/ set OverDriveCirculation syspref to 'disable'

3/ do an opac search, note the 'Login to OverDrive account' message is incorrectly displayed
    see pic 1

4/ apply patch

5/ do an opac search, note the 'Login to OverDrive account' message is no longer displayed (good)
    see pic 2

Can confirm that bug is replicable and patch applies and functions as described.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt

index 32d2734..a96715c 100644 (file)
@@ -187,7 +187,7 @@ $( document ).ready( function() {
     [% IF ( overdrive_error ) %]
     KOHA.OverDriveCirculation.display_error("#breadcrumbs", "[% overdrive_error.dquote %]");
     [% END %]
-    [% IF ( loggedinusername ) %]
+    [% IF ( loggedinusername and OverDriveCirculation ) %]
     KOHA.OverDriveCirculation.with_account_details("#breadcrumbs", function() {
         search( 0 );
     });