Skip to content

Commit

Permalink
Hide download options when book is unavailable. (#9647)
Browse files Browse the repository at this point in the history
* Hide download options when book is unavailable.
  • Loading branch information
shubhiscoding authored Aug 2, 2024
1 parent 3420218 commit 04fb777
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openlibrary/macros/databarWork.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ <h3 class="header">
$if editions_page:
$ render_times['databarWork: Book provider'] = time()
$ book_provider = get_book_provider(page)
$if book_provider:
$ availability = (page.availability or {}) if hasattr(page, 'availability') else {}
$if book_provider and ((availability.get('is_readable') or availability.get('status') == 'open') or book_provider.get_access(page).to_solr_str() == "public"):
$:book_provider.render_download_options(page)
$ render_times['databarWork: Book provider'] = time() - render_times['databarWork: Book provider']
</div>
Expand Down

0 comments on commit 04fb777

Please sign in to comment.