{% extends "library/base.html" %}{% load molly_maps %}{% load i18n %}

{% block content %}

<div class="section">
<div class="header">
    <h2>{{ item.title }}</h2>
</div>
    <div class="article"><div class="bubble pad-5">
    <table>
{% if item.author %}
        <tr>
            <th>{% trans "Author" %}:</th>
            <td>{{ item.author }}</td>
        </tr>
{% endif %}
{% if item.publisher %}
        <tr>
            <th>{% trans "Publisher" %}:</th>
            <td>{{ item.publisher }}</td>
        </tr>
{% endif %}
{% if item.edition %}
        <tr>
            <th>{% trans "Edition" %}:</th>
            <td>{{ item.edition }}</td>
        </tr>
{% endif %}
{% if item.description %}
        <tr>
            <th>{% trans "Description" %}:</th>
            <td>{{ item.description }}</td>
        </tr>
{% endif %}

{% if item.isbns %}
{% for isbn in item.isbns %}
        <tr>
{% if forloop.first %}
            <th{% ifnotequal item.isbns|length 1 %} rowspan="{{ item.isbns|length }}"{% endifnotequal %}>
                {% blocktrans count item.isbns|length as count %}ISBN{% plural %}ISBNs{% endblocktrans %}:</th>
{% endif %}
            <td>{{ isbn }}</td>
        </tr>
{% endfor %}
{% endif %}

{% if item.issns %}
{% for issn in item.issns %}
        <tr>
{% if forloop.first %}
            <th{% ifnotequal item.issns|length 1 %} rowspan="{{ item.issns|length }}"{% endifnotequal %}>
                {% blocktrans count item.issns|length as count %}ISSN{% plural %}ISSNs{% endblocktrans %}:</th>
{% endif %}
            <td>{{ issn }}</td>
        </tr>
{% endfor %}
{% endif %}
    </table>
    </div></div>

</div>

<div class="section">
<div class="header">
    <h2>{% if library.get_entity %}
            {{ library.get_entity.title }}
        {% else %}
            {{ library.location|join:"/" }}
        {% endif %}
    </h2>
</div>
{% if library.get_entity.location %}
    {% render_location_map library.get_entity.location %}
{% endif %}
  
    <ul class="content-list">
{% for book in books %}
    {# non-link-item #}
    <li>
      {% trans "Shelfmark" %}: <em>{{ book.shelfmark }}</em>, {% trans "availability" %}: <em>{{ book.availability_display }}</em>{% if book.materials_specified %}, {% trans "issue" %}: <em>{{ book.materials_specified }}</em>{% endif %}
    </li>
{% endfor %}
    </ul>

</div>

{% endblock %}
