forked from internetarchive/openlibrary
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make solr-updater take into account book providers for ebook_access
- Loading branch information
Showing
2 changed files
with
113 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
$def with(provider) | ||
|
||
$if provider.get('url') or provider.get('rel') == 'http://opds-spec.org/acquisition/open-access': | ||
$ url = provider.get('url') or provider.get('href') | ||
$if provider.access == 'open-access': | ||
<div class="cta-button-group"> | ||
<a | ||
href="$url" | ||
href="$(provider.url)" | ||
title="$_('Read free online')" | ||
class="cta-btn cta-btn--available cta-btn--read cta-btn--external cta-btn--direct" | ||
target="_blank" | ||
>$_('Read')</a> | ||
</div> | ||
|
||
$elif provider.get('rel') == 'http://opds-spec.org/acquisition/sample': | ||
$elif provider.access == 'sample': | ||
<div class="cta-button-group"> | ||
<a class="cta-btn cta-btn--shell cta-btn--external" | ||
data-ol-link-track="CTAClick|Preview" | ||
target="_blank" | ||
href="$provider.get('href')" | ||
href="$(provider.url)" | ||
>$_('Preview')</a> | ||
</div> |