{% load helpers %}
{# renders panel for device type with all compatible BIOS #}

<div class="card">
  <h5 class="card-header d-flex justify-content-between align-items-center">
    <span>Compatible BIOS</span>
    <a href="{% url 'plugins:netbox_firmware:bios_list' %}?device_type_id={{ object.pk }}" 
       class="btn btn-sm btn-primary">
      View All info
    </a>
  </h5>
  <div class="card-body table-responsive">
    {% if bios %}
    <table class="table table-hover">
      <thead>
        <tr>
          <th>Name</th>
          <th>Description</th>
          <th>Status</th>
        </tr>
      </thead>
      <tbody>
        {% for b in bios %}
        <tr>
          <td><a href="{{ b.get_absolute_url }}">{{ b.name }}</a></td>
          <td>{{ b.description }}</td>
          <td>{{ b.status }}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
    {% else %}
      <p class="text-muted mb-0">No BIOS available for this type.</p>
    {% endif %}
  </div>
</div>