$def with (user, loans, test=False)
$if len(loans) == 0:
$_("You've not checked out any books at this moment.")

Looking for a book to borrow? Check out our staff picks, or search for a book on a specific subject:
$:render_template("home/custom_ia_carousel", title=_('Books We Love'), key="staff_picks", query='languageSorter:("English")', subject="openlibrary_staff_picks", sorts=["lending___last_browse desc"], limit=18, test=test, compact_mode=True) $:render_template("home/categories", test=test) Or, check out our special collections. $else: $# Have current loans
$for loan in loans: $ book = get_document(loan['book']) $if book:
$ungettext("1 Current Loan", "%(count)d Current Loans", len(loans), count=len(loans)) $_("Loan Expires") $_("Loan actions")
$:render_template('covers/book_cover_small', book) $book.title $:macros.AuthorList(book.get_authors())
Borrowed $datestr(datetime_from_utc_timestamp(loan['loaned_at']))
$ wlsize = book.get_waitinglist_size() $if wlsize:
$ungettext("There is one person waiting for this book.", "There are %(n)d people waiting for this book.", wlsize, n=wlsize)
$if loan['expiry'] is None: $# Not yet fulfilled $_("Not yet downloaded.")
$_("Download Now") $else: $:macros.FormatExpiry(loan['expiry'])
$if loan['resource_type'] == 'bookreader': $:macros.LoanReadForm(loan['ocaid']) $:macros.ReturnForm(loan['ocaid']) $else: $:_("Return via
Adobe Digital Editions")