$ share_url = request.home + (edition or work).key
$ component_times['databarWork: Modal Links'] = time()
$ modal_links = render_template("type/edition/modal_links", work, edition, share_url)
$ component_times['databarWork: Modal Links'] = time() - component_times['databarWork: Modal Links']
$:macros.databarWork(edition or work, editions_page=True, render_times=component_times,summary=render_summary, modal_links=modal_links)
$ component_times['EditTopbar'] = time()
$:macros.databarView(page, edition)
$ component_times['EditTopbar'] = time() - component_times['EditTopbar']
$:render_template("type/edition/compact_title", book_title, edit_url)
$ component_times['get_observation_metrics'] = time()
$ reader_observations = get_observation_metrics(work['key']) if show_observations else {}
$ component_times['get_observation_metrics'] = time() - component_times['get_observation_metrics']
$:macros.EditionNavBar(reader_observations, work.edition_count, show_observations)
$if edition:
$if edition.publish_date:
$_("Publish Date")
$edition.publish_date
$if edition.publishers:
$_("Publisher")
$for p in edition.publishers:
$if "publishers" in ctx.features:
$p$cond(loop.last, "", ", ")
$else:
$p$cond(loop.last, "", ", ")
$if edition.languages:
$_("Language")
$:thingrepr(edition.languages)
$if edition.number_of_pages:
$_("Pages")
$edition.number_of_pages
$if is_librarian:
$if ocaid:
$ edition_identifiers = edition.get_identifiers()
$ isbns = []
$for name, values in edition_identifiers.multi_items():
$if name in ["isbn_10", "isbn_13"]:
$for value in values:
$isbns.append(value['value'])
$if isbns:
ISBNs
$for isbn in isbns:
$isbn
$ prices = page.key.startswith('/books/')
$ oclc_numbers = (page.oclc_numbers and page.oclc_numbers[0]) or ""
$ isbn_13 = page.get_isbn13()
$ isbn_10 = page.get_isbn10()
$ asin = None
$if page.get('identifiers'):
$if page.identifiers.get('amazon'):
$ asin = page.identifiers.amazon[0]
$if isbn_10 and not asin:
$ asin = isbn_10
$ seen = set()
$if previews and any([len(e.languages) for e in previews]):
Previews available in:
$for e in previews:
$if e.languages[0].name not in seen:
$ seen.add(e.languages[0].name)
$get_language_name(e.languages[0].key)
$if work and work.description or edition and edition.description:
$if edition and edition.description:
$ overview_desc = edition.description
$else:
$ overview_desc = work.description
$:sanitize(format(overview_desc))
$:macros.ReadMore("book-description")
$elif edition:
$:_("This edition doesn't have a description yet. Can you add one?", url=edition.url('/edit')+"#about/about")
$ component_times['SubjectsTags'] = time()
$:macros.SubjectTags(work, ["Subjects", "People", "Places", "Times"])
$ component_times['SubjectsTags'] = time() - component_times['SubjectsTags']
$ component_times['EditionsTable'] = time()
$:render_template("type/work/editions_datatable", work, editions=editions, edition=edition, editions_limit=editions_limit)
$ component_times['EditionsTable'] = time() - component_times['EditionsTable']
$if edition:
$_("Book Details")
$if edition.publish_places:
$for p in edition.publish_places:
$(p)$cond(loop.last, "", ", ")
$if edition.first_sentence:
"$(edition.first_sentence)"
$ component_times['TableOfContents'] = time()
$:macros.TableOfContents(edition, ocaid)
$ component_times['TableOfContents'] = time() - component_times['TableOfContents']
$if edition.notes or edition.series or edition.volume or edition.genres or edition.other_titles or edition.copyright_date or edition.translation_of or edition.translated_from:
$if edition.notes:
$:format(edition.notes)
$:display_value(_("Series"), edition.series)
$:display_value(_("Volume"), edition.volume)
$:display_value(_("Genre"), edition.genres)
$:display_value(_("Other Titles"), edition.other_titles)
$:display_value(_("Copyright Date"), edition.copyright_date)
$:display_value(_("Translation Of"), edition.translation_of)
$:display_value(_("Translated From"), edition.translated_from)
$ classifications = edition.get_classifications().multi_items()
$if classifications:
$for name, values in classifications:
$:display_identifiers(values[0].label, values)
$ links = page.get_links()
$if links:
$ contributors = edition.get('contributors', [])
$if contributors:
$for c in contributors:
$:display_value(c.role, c.name)
$if has_any("physical_format", "pagination", "physical_dimensions", "weight"):
$:display_value(_("Format"), edition.physical_format)
$:display_value(_("Pagination"), edition.pagination)
$:display_value(_("Number of pages"), edition.number_of_pages, itemprop="numberOfPages")
$:display_value(_("Dimensions"), edition.physical_dimensions)
$:display_value(_("Weight"), edition.weight)
$:display_identifiers("Open Library", [storage(url=None, value=edition.key.split("/")[-1])])
$ no_index = edition.get_ia_meta_fields().get('noindex', False)
$for name, values in edition.get_identifiers().multi_items():
$ identifier_label = values[0].label
$if not (edition.is_in_private_collection() and identifier_label == 'Internet Archive'):
$if is_privileged_user or not (no_index and identifier_label == 'Internet Archive'):
$:display_identifiers(identifier_label, values, itemprop=cond(name in ["isbn_10", "isbn_13"], "isbn", None))
$:display_goodreads("Open Library", [storage(url=None, value=edition.key.split("/")[-1])])
$for name, values in edition.get_identifiers().multi_items():
$:display_goodreads(values[0].label, values)
$if work:
$if not work.excerpts and work.first_sentence:
$_("First Sentence")
"$work.first_sentence"
$if work.description and work.description != overview_desc:
$_("Work Description")
$:sanitize(format(work.description))
$:macros.ReadMore('work-description')
$if work.original_languages:
$_("Original languages")
$', '.join(lang.name for lang in work.original_languages)
$if work.excerpts:
$_("Excerpts")
$for excerpt in work.excerpts:
$for line in excerpt.excerpt.split('\n'):
$line
$if excerpt.pages:
$_("Page %(page)s", page=excerpt.pages),
$if excerpt.author:
$def excerpt_author_link():
$excerpt.author.displayname
$:_("added by %(authorlink)s.", authorlink=str(excerpt_author_link()).strip())
$else:
$_("added anonymously.")
$if excerpt.comment:
"
$excerpt.comment"
$if work.links or (work.wikipedia and work.wikipedia.startswith("http")):
$:_('Links outside Open Library')
$if show_observations:
$ component_times['Review component'] = time()
$:render_template("observations/review_component", work, reader_observations, page.key)
$ component_times['Review component'] = time() - component_times['Review component']