$def with (book)
$ status = book.waitlist_record.get('status', '')
$ ndays = book.waitlist_record.get_waiting_in_days()
$ungettext("Waiting for %d day", "Waiting for %d days", ndays, ndays)
$if status == "waiting":
$ wsize = book.waitlist_record.get_waitinglist_size()
$ pos = book.waitlist_record.get_position()
$if pos == 1:
You are the next person to receive this book.
$else:
$ungettext("There is one person ahead of you in the waiting list.", "There are %(count)s people ahead of you in the waiting list.", pos-1, count=pos-1)
$book.waitinglist_record['status'].title()
$if status == "available":
$ delta_hours = book.waitinglist_record.get_expiry_in_hours()
$if delta_hours == 0:
You have less than an hour to borrow it.
$elif delta_hours == 1:
You have one more hour to borrow it.
$else:
You have $delta_hours more hours to borrow it.
$if status == "available":