From a82a6ad0342303e7dc38315079426db04c018fe7 Mon Sep 17 00:00:00 2001 From: "Michael E. Karpeles" Date: Sun, 7 Jan 2018 10:21:40 +0000 Subject: [PATCH] fixing loan status if no ocaid, was showing daisy download link --- openlibrary/macros/LoanStatus.html | 4 ++-- openlibrary/macros/daisy.html | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/openlibrary/macros/LoanStatus.html b/openlibrary/macros/LoanStatus.html index 2307db43be2..fa3772cc93a 100644 --- a/openlibrary/macros/LoanStatus.html +++ b/openlibrary/macros/LoanStatus.html @@ -76,11 +76,11 @@ $ viewbook = "//%s/stream/XXX?ref=ol" % bookreader_host()

Read eBook

-$elif page.is_access_restricted() and editions_page: +$elif (not page.get('ocaid') or page.is_access_restricted()) and editions_page:

No ebook available.

-$if editions_page: +$if editions_page and page.get('ocaid'): $:macros.daisy(page) $# If waitlisted, show other possible editions after daisy download link diff --git a/openlibrary/macros/daisy.html b/openlibrary/macros/daisy.html index c445a5848f5..f5cc630caa4 100644 --- a/openlibrary/macros/daisy.html +++ b/openlibrary/macros/daisy.html @@ -2,10 +2,11 @@ $ daisy = page.get_ia_download_link("_daisy.zip") - +$if daisy: +