{% extends "detail.html" %}

{% block content %}
<table class="table table-hover">
  <tr>
    <td>Accessory type</td>
    <td>{{ object.type }}</td>
  </tr>
  {% if object.manufacturer is not None %}
  <tr>
    <td>Manufacturer</td>
    <td><a href="{% url 'manufacturer-detail' object.manufacturer.slug %}">{{ object.manufacturer }}</a></td>
    {% endif %}
  </tr>
  <tr>
    <td>Model</td>
    <td>{{ object.model }}</td>
  </tr>
  {% if object.acquired is not None %}
  <tr>
    <td>Acquired</td>
    <td>{{ object.acquired }}</td>
  </tr>
  {% endif %}
  {% if object.cost is not None %}
  <tr>
    <td>Cost</td>
    <td>{{ object.cost }}</td>
  </tr>
  {% endif %}
  {% if object.lost is not None %}
  <tr>
    <td>Lost</td>
    <td>{{ object.lost }}</td>
  </tr>
  {% endif %}
  {% if object.lost_price is not None %}
  <tr>
    <td>Lost price</td>
    <td>{{ object.lost_price }}</td>
  </tr>
  {% endif %}
  {% if object.camera_model_compatibility is not None %}
  <tr>
    <td>Camera model compatibility</td>
    <td>
      <ul class="list-inline">{% for camera in object.camera_model_compatibility.all %}
        <li class="list-inline-item"><a href="{% url 'cameramodel-detail' camera.slug %}">{{ camera }}</a></li>
        {% endfor %}</ul>
    </td>
  </tr>
  {% endif %}
  {% if object.lens_model_compatibility is not None %}
  <tr>
    <td>Lens model compatibility</td>
    <td>
      <ul class="list-inline">
        {% for lens in object.lens_model_compatibility.all %}
        <li class="list-inline-item"><a href="{% url 'lensmodel-detail' lens.slug %}">{{ lens }}</a></li>
        {% endfor %}</ul>
    </td>
  </tr>
  {% endif %}
</table>
{% endblock %}