Skip to content

Replace "Not In Library" with Locate button when edition key is found #9952

@SivanC

Description

@SivanC

Proposal

When a book is not available on Open Library, the read/loan button changes to an unclickable "Not In Library" box, even if Open Library has data such as an edition's ISBN. In certain cases, this button can be replaced with a "Locate" button that redirects the user to the Worldcat page for the missing book.

Screenshots taken while OL is down, but the button is the important part.
In the books page read panel:
image
Editions table:
image
Ideally the button doesn't look much different than a regular read/loan button.

Justification

Users should run into as few "dead ends" as possible when searching for books. If Open Library has the ability to redirect the user to Worldcat instead of heading off their search, it should.

Impact: Users will be able to view the book they're searching for on Worldcat if it isn't on Open Library. Clicks of the button can be tracked/added to analytics to see usage statistics.

Breakdown

Requirements Checklist

  • Add action to /books/title/olid/borrow API endpoint to add ability to generate Worldcat URL directly based on ISBN/OCLC/Title (done by Add 'locate' endpoint to borrow API #9842)
  • Add LocateButton.html macro to be called by LoanStatus.html that is a button that redirects the user to the new endpoint
  • Integrate LocateButton.html into LoanStatus.html and make sure that the button works as expected/is styled correctly in all the places it can be found (search page, carousels, works page read panel + edition table)

Related files

Stakeholders


Instructions for Contributors

Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Metadata

Metadata

Assignees

Labels

Priority: 3Issues that we can consider at our leisure. [managed]Type: Feature RequestIssue describes a feature or enhancement we'd like to implement. [managed]

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions