$def with (page, include_rating=True, include_header=True, include_widget=True, include_showcase=True, read_status=None, exclude_own_lists=False, async_load=False)
$ edition = page if page.key.startswith("/books/") else None
$ work = (page.works and page.works[0]) if page.key.startswith("/books/") else page if page.key.startswith("/works/") else None
$ username = ctx.user and ctx.user.key.split('/')[-1]
$ users_work_read_status = read_status or work.get_users_read_status(username) if work and username else None
$if "lists" not in ctx.features:
$return
$code:
def get_page_lists(page, seed_info):
return [get_list_data(list, seed_info['seed']) for list in page.get_lists(sort=False)]
$ seed_info = get_seed_info(page)
$ user_lists = [] if async_load or not ctx.user else get_user_lists(seed_info)
$ page_lists = get_page_lists(page, seed_info)
$ user_key = ctx.user and ctx.user.key
$ page_url = page.url()
$var page_lists = page_lists
$def render_already_lists(lists, user_key):
$for list in lists:
$if list['active']:
$:render_template('lists/list_overview', list, user_key, seed_info)
$def render_widget_display(lists, limit, user_key, exclude_own_lists):
$ count = 0
$for i, list in enumerate(lists):
$if count < limit:
$if exclude_own_lists:
$if user_key != list.owner.key:
$:render_template('lists/list_overview', list, user_key, seed_info)
$ count = count + 1
$else:
$:render_template('lists/list_overview', list, user_key, seed_info)
$ count = count + 1
$def render_head(seed_type, page_lists, page_url):
$if seed_type == "subject":