{% extends "detail.html" %}
{% load static %}
{% load boolicontag %}

{% block content %}
<table class="table table-hover">
  <tr>
    <th colspan="2" id="summary"><img src="{% static "svg/summary.svg" %}" width="30" height="30" alt="Summary">&nbsp;<a
        href="#">Summary</a></th>
  </tr>
  <tr>
    <td>Mount</td>
    <td>{{ object.mount }}</td>
  </tr>
  {% if object.shutter_in_lens is not None %}
  <tr>
    <td>Shutter in lens</td>
    <td>{{ object.shutter_in_lens|boolicontag }}</td>
  </tr>
  {% endif %}
  {% if object.type is not None %}
  <tr>
    <td>Type</td>
    <td>{{ object.type }}</td>
  </tr>
  {% endif %}
  {% if object.purpose is not None %}
  <tr>
    <td>Purpose</td>
    <td>{{ object.purpose }}</td>
  </tr>
  {% endif %}
  {% if object.notes is not None %}
  <tr>
    <td>Notes</td>
    <td>{{ object.notes|linebreaks }}</td>
  </tr>
  {% endif %}
  {% if object.manufacturer is not None %}
  <tr>
    <td>Manufacturer</td>
    <td>{% include "manufacturer.html" with manufacturer=object.manufacturer %}</td>
  </tr>
  {% endif %}
  <tr>
    <th colspan="2" id="meta"><img src="{% static "svg/tag.svg" %}" width="30" height="30" alt="Meta">&nbsp;<a
        href="#meta">Meta</a></th>
  </tr>
  {% if object.tags.all %}
  <tr>
    <td>Tags</td>
    <td>{% for tag in object.tags.all %}
      <a class="btn btn-outline-primary" href="{% url 'schema:tag-detail' tag|lower %}" role="button">{{ tag }}</a>
      {% endfor %}</td>
  </tr>
  {% endif %}
  {% if related %}
  <tr>
    <td>Similar mounts</td>
    <td>
      <ul class="list-inline">
        {% for relateditem in related %}
        <li class="list-inline-item"><a href="{% url 'schema:mount-detail' relateditem.slug %}">{{ relateditem }}</a></li>
        {% endfor %}
      </ul>
    </td>
  </tr>
  {% endif %}
  {% if history %}
  <tr>
    <td>Edit history</td>
    <td>{% include "history.html" %}</td>
  </tr>
  {% endif %}
  <tr>
    <td>Sharing</td>
    <td>{% include "sharing.html" %}</td>
  </tr>
</table>
{% endblock %}

{% block moreactions %}
<li><a class="btn btn-primary" href="{% url 'schema:cameramodel-list' %}?mount={{ mount.id }}" role="button">View camera models
    with this mount</a></li>
<li><a class="btn btn-primary" href="{% url 'schema:lensmodel-list' %}?mount={{ mount.id }}" role="button">View lens models
    with this mount</a></li>
{% endblock %}
