{% extends "schema/detail.html" %}

{% block content %}
<table class="table">
  <tr>
    <th>Disambiguation</th>
    <td>{{ object.disambiguation }}</td>
  </tr>
  <tr>
    <th>Mount</th>
    <td>{% if object.mount %}<a href="{% url 'mount-detail' object.mount.id %}">{{ object.mount }}</a>{% endif %}</td>
  </tr>
  <tr>
    <th>Format</th>
    <td>{% if object.format %}<a href="{% url 'format-detail' object.format.id %}">{{ object.format }}</a>{% endif %}
    </td>
  </tr>
  <tr>
    <th>Focus type</th>
    <td>{{ object.focus_type }}</td>
  </tr>
  <tr>
    <th>Metering</th>
    <td>{{ object.metering }}</td>
  </tr>
  <tr>
    <th>Coupled metering</th>
    <td>{{ object.coupled_metering }}</td>
  </tr>
  <tr>
    <th>Metering type</th>
    <td>{{ object.metering_type }}</td>
  </tr>
  <tr>
    <th>Introduced</th>
    <td>{{ object.introduced }}</td>
  </tr>
  <tr>
    <th>Discontinued</th>
    <td>{{ object.discontinued }}</td>
  </tr>
  <tr>
    <th>Body type</th>
    <td>{{ object.body_type }}</td>
  </tr>
  <tr>
    <th>Weight</th>
    <td>{{ object.weight }}</td>
  </tr>
  <tr>
    <th>Negative size</th>
    <td>{% if object.negative_size %}<a
        href="{% url 'negativesize-detail' object.negative_size.id %}">{{ object.negative_size }}</a>{% endif %}</td>
  </tr>
  <tr>
    <th>Shutter type</th>
    <td>{{ object.shutter_type }}</td>
  </tr>
  <tr>
    <th>Shutter model</th>
    <td>{{ object.shutter_model }}</td>
  </tr>
  <tr>
    <th>Cable release</th>
    <td>{{ object.cable_release }}</td>
  </tr>
  <tr>
    <th>Viewfinder coverage</th>
    <td>{{ object.viewfinder_coverage }}</td>
  </tr>
  <tr>
    <th>Power drive</th>
    <td>{{ object.power_drive }}</td>
  </tr>
  <tr>
    <th>Continuous fps</th>
    <td>{{ object.continuous_fps }}</td>
  </tr>
  <tr>
    <th>Fixed mount</th>
    <td>{{ object.fixed_mount }}</td>
  </tr>
  <tr>
    <th>Lens model</th>
    <td>{% if object.lensmodel %}<a
        href="{% url 'lensmodel-detail' object.lensmodel.id %}">{{ object.lensmodel }}</a>{% endif %}</td>
  </tr>
  <tr>
    <th>Battery quantity</th>
    <td>{{ object.battery_qty }}</td>
  </tr>
  <tr>
    <th>Battery type</th>
    <td>{{ object.battery_type }}</td>
  </tr>
  <tr>
    <th>Notes</th>
    <td>{{ object.notes }}</td>
  </tr>
  <tr>
    <th>Bulb</th>
    <td>{{ object.bulb }}</td>
  </tr>
  <tr>
    <th>Time</th>
    <td>{{ object.time }}</td>
  </tr>
  <tr>
    <th>Min ISO</th>
    <td>{{ object.min_iso }}</td>
  </tr>
  <tr>
    <th>Max ISO</th>
    <td>{{ object.max_iso }}</td>
  </tr>
  <tr>
    <th>Autofocus points</th>
    <td>{{ object.af_points }}</td>
  </tr>
  <tr>
    <th>Internal flash</th>
    <td>{{ object.int_flash }}</td>
  </tr>
  <tr>
    <th>Internal flash guide number</th>
    <td>{{ object.int_flash_gn }}</td>
  </tr>
  <tr>
    <th>External flash</th>
    <td>{{ object.ext_flash }}</td>
  </tr>
  <tr>
    <th>Flash metering</th>
    <td>{{ object.flash_metering }}</td>
  </tr>
  <tr>
    <th>PC sync</th>
    <td>{{ object.pc_sync }}</td>
  </tr>
  <tr>
    <th>Hotshoe</th>
    <td>{{ object.hotshoe }}</td>
  </tr>
  <tr>
    <th>Coldshoe</th>
    <td>{{ object.coldshoe }}</td>
  </tr>
  <tr>
    <th>Meter min EV</th>
    <td>{{ object.meter_min_ev }}</td>
  </tr>
  <tr>
    <th>Meter max EV</th>
    <td>{{ object.meter_max_ev }}</td>
  </tr>
  <tr>
    <th>DoF preview</th>
    <td>{{ object.dof_preview }}</td>
  </tr>
  <tr>
    <th>Tripod</th>
    <td>{{ object.tripod }}</td>
  </tr>
  <tr>
    <th>Shutter speeds</th>
    <td>
      {{ object.shutter_speeds.all|dictsort:"shutter_speed"|join:", " }}
    </td>
  </tr>
  <tr>
    <th>Metering modes</th>
    <td>
      {{ object.metering_modes.all|join:", " }}
    </td>
  </tr>
  <tr>
    <th>Exposure programs</th>
    <td>
      {{ object.exposure_programs.all|join:", " }}
    </td>
  </tr>
  <tr>
    <th>Series</th>
    <td>
      {% if object.series %}
      <ul>
        {% for series in object.series.all %}
        <li>{{ series.name }}</li>
        {% endfor %}
      </ul>
      {% endif %}
    </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">
    <tr>
      <th>Serial</th>
      <th>Acquired</th>
      <th>cost</th>
      <th>serial</th>
      <th>datecode</th>
      <th>manufactured</th>
      <th>own</th>
      <th>lens</th>
      <th>notes</th>
      <th>lost</th>
      <th>lost_price</th>
      <th>source</th>
      <th>condition</th>
      <th>condition_notes</th>
      <th>display_lens</th>
    </tr>
    {% for camera in cameramodel.camera_set.all %}
    <tr>
      <td>{{ camera.serial }}</td>
      <td>{{ camera.acquired }}</td>
      <td>{{ camera.cost }}</td>
      <td>{{ camera.serial }}</td>
      <td>{{ camera.datecode }}</td>
      <td>{{ camera.manufactured }}</td>
      <td>{{ camera.own }}</td>
      <td>{{ camera.lens }}</td>
      <td>{{ camera.notes }}</td>
      <td>{{ camera.lost }}</td>
      <td>{{ camera.lost_price }}</td>
      <td>{{ camera.source }}</td>
      <td>{{ camera.condition }}</td>
      <td>{{ camera.condition_notes }}</td>
      <td>{{ camera.display_lens }}</td>
    </tr>
    {% endfor %}
  </table>
</div>
{% endblock %}
