{% extends "detail.html" %}

{% block content %}
<table class="table table-hover">
  <tr>
    <td>Name</td>
    <td>{{ object.name }}</td>
  </tr>
</table>

<a data-toggle="collapse" href="#collapseCameras" role="button" aria-expanded="false" aria-controls="collapseCameras">
  Cameras</a>
<div class="collapse" id="collapseCameras">
  <table class="table table-hover">
    <tr>
      <th>Model</th>
    </tr>
    {% for cameramodel in series.cameramodel_set.all %}
    {% for camera in cameramodel.camera_set.all %}
    <tr>
      <td>{{ cameramodel }}</td>
    </tr>
    {% endfor %}
    {% endfor %}
  </table>
</div>

<a data-toggle="collapse" href="#collapseLenses" role="button" aria-expanded="false" aria-controls="collapseLenses">
  Lenses</a>
<div class="collapse" id="collapseLenses">
  <table class="table table-hover">
    <tr>
      <th>Model</th>
    </tr>
    {% for lensmodel in series.lensmodel_set.all %}
    {% for lens in lensmodel.lens_set.all %}
    <tr>
      <td>{{ lensmodel }}</td>
    </tr>
    {% endfor %}
    {% endfor %}
  </table>
</div>
{% endblock %}
