$def with (loans, action, pagecount=None, pageindex=None, stats=None) $ pdf_count = len([pdf for pdf in loans if pdf['resource_type'] == 'pdf']) $ epub_count = len([epub for epub in loans if epub['resource_type'] == 'epub']) $ bookreader_count = len([bookreader for bookreader in loans if bookreader['resource_type'] == 'bookreader']) $ total = pdf_count + epub_count + bookreader_count + 0.0 $ pdf_percent = "%d" % percentage(pdf_count, total) $ epub_percent = "%d" % percentage(epub_count, total) $ bookreader_percent = "%d" % percentage(bookreader_count, total)
$:render_template("admin/menu")

Outstanding eBook Loans

Note: ACS4 loan status for ePub and PDF is updated hourly and also on demand (when a user looks at a borrow page or their own loans). You can refresh the status of a loan (synchronize with ACS4 server) by clicking on "refresh". BookReader loan status is always current.

$# could do user checking here $if True:

$else: THIS PAGE ISN'T UPDATING LIVE.
We're currently collecting stats - bulk status update is disabled.
Please do not refresh loan status manually, thanks.

$if pagecount is not None:
$:render_template("lib/pagination", pagecount, pageindex, "/admin/loans?page=%(page)s")
$:render_template("admin/loans_table", loans, show_percent=True, stats=stats) $if pagecount is not None:
$:render_template("lib/pagination", pagecount, pageindex, "/admin/loans?page=%(page)s")