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

{% 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>Name</td>
    <td>{{ object.name }}</td>
  </tr>
  {% if object.width is not None and object.height is not None %}
  <tr>
    <td>Size</td>
    <td>{{ object.width }} &times; {{ object.height }}mm</td>
  </tr>
  {% endif %}
  {% if object.diagonal is not None %}
  <tr>
    <td>Diagonal</td>
    <td>{{ object.diagonal }}mm</td>
  </tr>
  {% endif %}
  {% if object.crop_factor is not None %}
  <tr>
    <td>Crop factor</td>
    <td>{{ object.crop_factor }}&times;</td>
  </tr>
  {% endif %}
  {% if object.area is not None %}
  <tr>
    <td>Area</td>
    <td>{{ object.area }}mm&sup2;</td>
  </tr>
  {% endif %}
  {% if object.aspect_ratio is not None %}
  <tr>
    <td>Aspect ratio</td>
    <td>{{ object.aspect_ratio }}</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 history %}
  <tr>
    <td>Edit history</td>
    <td>{% include "history.html" %}</td>
  </tr>
  {% endif %}
</table>
{% endblock %}

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