Skip to content

Commit

Permalink
Merge pull request #8685 from cdrini/revert/check-options
Browse files Browse the repository at this point in the history
Revert blue "Check Options" but keep click behaviour
  • Loading branch information
mekarpeles committed Jan 4, 2024
2 parents 2ad32a9 + 77a644c commit bf28a89
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
6 changes: 0 additions & 6 deletions openlibrary/macros/CheckOptions.html

This file was deleted.

6 changes: 3 additions & 3 deletions openlibrary/macros/LoanStatus.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@
$:macros.BookSearchInside(ocaid)

$else:
$# Only render NotInLibrary on an edition's page, for that specific edition.
$# Only render clickable NotInLibrary when not on an edition's page, for that specific edition.
$# secondary_action means we're on a book page and it's the button under the cover image.
$ key = doc.key if is_edition else work_key
$if (is_edition and is_book_page) or secondary_action:
$:macros.NotInLibrary()
$:macros.NotInLibrary(link=None)
$else:
$:macros.CheckOptions(key)
$:macros.NotInLibrary(link=key)

$:post

Expand Down
17 changes: 13 additions & 4 deletions openlibrary/macros/NotInLibrary.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
$def with()
$def with(link)

<div class="cta-button-group">
<a class="cta-btn cta-btn--no-pointer">$_('Not in Library')</a>
</div>
$if link:
<div class="cta-button-group">
<a
class="cta-btn"
href="$link"
data-ol-link-track="CTAClick|NotInLibrary"
>$_('Not in Library')</a>
</div>
$else:
<div class="cta-button-group">
<span class="cta-btn cta-btn--no-pointer">$_('Not in Library')</span>
</div>
2 changes: 1 addition & 1 deletion static/css/components/buttonCta.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ a.cta-btn {
}

&--no-pointer {
cursor: not-allowed;
cursor: default;
}

&--available, &--preview, &--primary {
Expand Down

0 comments on commit bf28a89

Please sign in to comment.