<commit_before>{% load static %}
<header class="item-header" id="book-header">
  {% include "components/book-header.html" with book=instance %}
</header>

<section class="item-section">
  {% include "components/navigation-tabs.html" with book=instance is_biblio=True %}
  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Place{{ book.pub_place.count|pluralize }} of Publication</h3>
    <p class="item-term__value">
      {% for place in book.pub_place.all %}
        {% if not forloop.last %}
          {{ place }};&nbsp;
        {% else %}
          {{ place }}
        {% endif %}
      {% endfor %}
    </p>
  </div>

  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Publisher</h3>
    <p class="item-term__value">{{ book.publisher.name }}</p>
  </div>

  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Publication Year</h3>
    <p class="item-term__value">{{ book.copyright_year }}</p>
  </div>

  {% if book.languages.count %}
  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Language{{ book.languages.count|pluralize }}</h3>
    <p class="item-term__value">
      {% for language in book.languages.all %}
        {% if not forloop.last %}
          {{ language }};&nbsp;
        {% else %}
          {{ language }}
        {% endif %}
      {% endfor %}
    </p>
  </div>
  {% endif %}

  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Location</h3>
    <p class="item-term__value">{{ book.location }}</p>
  </div>

  {% if book.uri %}
  <div class="item-term item-term--inline item-term--callout">
    <h3 class="item-term__label">Where to find it</h3>
    <p class="item-term__value"><a class="item-term__link" href="{{ book.uri }}">{{ book.uri }}</a></p>
  </div>
  {% endif %}

  {% if book.collected_in %}
  <div class="item-term">
    <h3 class="item-term__label">Book Sections</h3>
    {% for section in book.collected_in %}
    <p class="item-term__value">{{ section.display_title }}</p>
    <p class="item-term__value item-term__value--aside">
      {% for author in book.work.authors.all %}
        {% if not forloop.last %}
          {{ author.authorized_name }};
        {% else %}
          {{ author.authorized_name }}
        {% endif %}
      {% endfor %}
    </p>
    {% endfor %}
  </div>
  {% endif %}

    {% if book.related_instances %}
    <div class="item-term">
      <h3 class="item-term__label">Related Books</h3>
      <div class="collection collection--condensed item-term_value">
        {% for instance in book.related_instances %}
          {% include 'components/books-list-item.html' with book=instance %}
        {% endfor %}
      </div>
    </div>
    {% endif %}

  {% if book.cited_in.count %}
  <div class="item-term">
    <h3 class="item-term__label">Other Copies and Editions</h3>
    <div class="collection collection--condensed item-term__value">
      {% for cited in book.cited_in.all %}
        {% include 'components/books-list-item.html' with book=cited %}
      {% endfor %}
    </div>
  </div>
  {% endif %}
</section><commit_msg>Add both related and copies to detail view Applies to #95, #96 and fixes a typo that broke template<commit_after>{% load static %}
<header class="item-header" id="book-header">
  {% include "components/book-header.html" with book=instance %}
</header>

<section class="item-section">
  {% include "components/navigation-tabs.html" with book=instance is_biblio=True %}
  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Place{{ book.pub_place.count|pluralize }} of Publication</h3>
    <p class="item-term__value">
      {% for place in book.pub_place.all %}
        {% if not forloop.last %}
          {{ place }};&nbsp;
        {% else %}
          {{ place }}
        {% endif %}
      {% endfor %}
    </p>
  </div>

  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Publisher</h3>
    <p class="item-term__value">{{ book.publisher.name }}</p>
  </div>

  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Publication Year</h3>
    <p class="item-term__value">{{ book.copyright_year }}</p>
  </div>

  {% if book.languages.count %}
  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Language{{ book.languages.count|pluralize }}</h3>
    <p class="item-term__value">
      {% for language in book.languages.all %}
        {% if not forloop.last %}
          {{ language }};&nbsp;
        {% else %}
          {{ language }}
        {% endif %}
      {% endfor %}
    </p>
  </div>
  {% endif %}

  <div class="item-term item-term--inline">
    <h3 class="item-term__label">Location</h3>
    <p class="item-term__value">{{ book.location }}</p>
  </div>

  {% if book.uri %}
  <div class="item-term item-term--inline item-term--callout">
    <h3 class="item-term__label">Where to find it</h3>
    <p class="item-term__value"><a class="item-term__link" href="{{ book.uri }}">{{ book.uri }}</a></p>
  </div>
  {% endif %}

  {% if book.collected_in %}
  <div class="item-term">
    <h3 class="item-term__label">Book Sections</h3>
    {% for section in book.collected_in %}
    <p class="item-term__value">{{ section.display_title }}</p>
    <p class="item-term__value item-term__value--aside">
      {% for author in book.work.authors.all %}
        {% if not forloop.last %}
          {{ author.authorized_name }};
        {% else %}
          {{ author.authorized_name }}
        {% endif %}
      {% endfor %}
    </p>
    {% endfor %}
  </div>
  {% endif %}

    {% if book.related_instances %}
    <div class="item-term">
      <h3 class="item-term__label">Related Books</h3>
      <div class="collection collection--condensed item-term__value">
        {% for instance in book.related_instances %}
          {% include 'components/books-list-item.html' with book=instance %}
        {% endfor %}
      </div>
    </div>
    {% endif %}

  {% if book.work.instance_set.all|length > 1 %}
  <div class="item-term">
    <h3 class="item-term__label">Other Copies and Editions</h3>
    <div class="collection collection--condensed item-term__value">
      {% for instance in book.work.instance_set.all %}
        {% if instance.id != book.id  %}
          {% include 'components/books-list-item.html' with book=instance %}
        {% endif %}
      {% endfor %}
    </div>
  </div>
  {% endif %}
</section>
{'fraction_non_alphanumeric': 0.1854500233172703, 'fraction_numerical': 0.006373387222135862, 'mean_word_length': 2.773607038123167, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 128, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2397827', 'n_tokens_mistral': 2307, 'n_tokens_neox': 2104, 'n_words': 430}