-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On books page, for borrowed book, show time remaining on loan #1110
Comments
This data is already available on the https://openlibrary.org/account/loans page, it should also show up on the book pages (i.e. work + edition page), e.g. https://openlibrary.org/works/OL14909099W/Debt / https://openlibrary.org/books/OL24088724M/Debt Preferably above/below/near the blue "Read eBook" button |
@mekarpeles maybe you could highlight some files to work on in this issue |
Hi ! I'm just beginning with open-source. Can you guide me how to work on this issue? |
Hi @swastikbanerjee07!
One thing which makes this task a bit hard is loans don't really work on local developer instances. We can help you mock them or, once you have something you think is working, we can run the code on https://dev.openlibrary.org so you can test against real data. |
I have a likely solution at https://github.com/Zacharius/openlibrary/tree/1110/feature/loan-timer-on-book-page. Can someone run it on the dev site to see if it works? I ran the docker image with the code and it didnt give any errors or look wonky on the books page so thats promising. Not sure how else to test it |
@mekarpeles any chance you can help me test this? |
^ ping @mekarpeles can you give @Zacharius some feedback? |
@mekarpeles I was trying to solve this issue.
I want this |
Still no seeing time remaining for a borrowed work. @Zacharius did @mekarpeles ever get back to you? |
https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/type/edition/view.html is the file that renders the books page.
The read buttons themselves are rendered using:
https://github.com/internetarchive/openlibrary/blob/master/openlibrary/macros/LoanStatus.html
The loan/lending logic can be found in:
https://github.com/internetarchive/openlibrary/blob/master/openlibrary/core/lending.py
The desired outcome is near the button, similar to the Loans page, we show the expiration date of the loan
The text was updated successfully, but these errors were encountered: