Skip to content

Commit

Permalink
fixing loan status if no ocaid, was showing daisy download link
Browse files Browse the repository at this point in the history
  • Loading branch information
mekarpeles authored and root committed Jan 7, 2018
1 parent b8e32b8 commit a82a6ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions openlibrary/macros/LoanStatus.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@
$ viewbook = "//%s/stream/XXX?ref=ol" % bookreader_host()
<p class="primary-cta"><a href="$viewbook.replace('XXX', page.ocaid)" title="Use BookReader to read online" class="read-btn">Read eBook</a></p>

$elif page.is_access_restricted() and editions_page:
$elif (not page.get('ocaid') or page.is_access_restricted()) and editions_page:
<p class="smaller">No ebook available.</p>


$if editions_page:
$if editions_page and page.get('ocaid'):
$:macros.daisy(page)

$# If waitlisted, show other possible editions after daisy download link
Expand Down
15 changes: 8 additions & 7 deletions openlibrary/macros/daisy.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

$ daisy = page.get_ia_download_link("_daisy.zip")

<p class="print-disabled-download">
<a href="$page.url('/daisy')" title="Download Protected DAISY">
<meta itemprop="bookFormat" content="EBook/DAISY3"/>
Download ebook for print-disabled
<img src="/images/icons/icon-encrypto-sm.png" class="daisy-lock" width="8" height="12" alt="Download Protected DAISY"/>
</a>
</p>
$if daisy:
<p class="print-disabled-download">
<a href="$page.url('/daisy')" title="Download Protected DAISY">
<meta itemprop="bookFormat" content="EBook/DAISY3"/>
Download ebook for print-disabled
<img src="/images/icons/icon-encrypto-sm.png" class="daisy-lock" width="8" height="12" alt="Download Protected DAISY"/>
</a>
</p>

0 comments on commit a82a6ad

Please sign in to comment.