{% extends "detail.html" %}

{% block content %}
<table class="table table-hover">
  <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.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">Misc</th>
  </tr>
  {% if object.created_at is not None %}
  <tr>
    <td>Created</td>
    <td>{{ object.created_at }}{% if object.created_by is not None %} by {{ object.created_by }}{% endif %}</td>
  </tr>
  {% endif %}
  {% if object.updated_at is not None %}
  <tr>
    <td>Last updated</td>
    <td>{{ object.updated_at }}{% if object.updated_by is not None %} by {{ object.updated_by }}{% endif %}</td>
  </tr>
  {% endif %}
</table>
{% endblock %}
