$def with (items, key, counts, lists=None, user=None, logged_in_user=None, public=False, sort_order='desc', owners_page=False) $# Displays a user's reading log $# :param list items: $# :param Literal['currently-reading', 'want-to-read', 'already-read', 'sponsorships', 'loans', 'notes', 'observations'] key: $# :param Dict[str: int] counts: $# :param list? lists: $# :param user: $# :param bool public: $ component_times = {} $ component_times['TotalTime'] = time() $ username = user.key.split('/')[-1] $ current_page = int(input(page=1).page) $ total_items = counts.get(key, None) $ userDisplayName = user.displayname or ctx.user.displayname $ userKey = user.key or ctx.user.key $ breadcrumb = _("Reading Log") $ header_title = "" $if key == 'currently-reading': $ header_title = _("Currently Reading") $elif key == 'want-to-read': $ header_title = _("Want To Read") $elif key == 'already-read': $ header_title = _("Already Read") $if not header_title: $if key == 'sponsorships': $ header_title = _("Sponsorships") $elif key == 'notes': $ header_title = _("Book Notes") $elif key == 'observations': $ header_title = _("Reviews") $elif key == 'loans': $ header_title = _("Loans") $elif key == 'imports': $ header_title = _("Imports and Exports") $elif key == 'lists': $ header_title = _('My Lists') $elif key == 'list': $ header_title = items.get('name', 'List') $else: $ header_title = key $ breadcrumb = header_title $var title: $header_title
$if key == 'notes': $_('Your book notes are private and cannot be viewed by other patrons.') $elif key == 'observations': $_('Your book reviews will be shared anonymously with other patrons.') $elif key in ['currently-reading', 'already-read', 'want-to-read']: $if public: $_('Your reading log is currently set to public') or $else: $_('Your reading log is currently set to private') — $_('Manage your privacy settings')