{% load common %}
<table class="table table-striped table-bordered table-hover table-condensed table-responsive">
  <thead>
    <tr>
      <th class="col-sm-4">OS Name</th>
      <th class="col-sm-2">Hosts</th>
      <th class="col-sm-4">OS Group</th>
      <th class="col-sm-2">Repos (OS Group)</th>
    </tr>
  </thead>
  <tbody>
    {% for os in object_list %}
      <tr>
        <td><a href="{{ os.get_absolute_url }}">{{ os }}</a></td>
        <td>{{ os.host_set.count }}</td>
        <td>{% if os.osgroup != None %}<a href="{{ os.osgroup.get_absolute_url }}">{{ os.osgroup }}</a>{% endif %}</td>
        <td>{% if os.osgroup.repos.count != None %}{{ os.osgroup.repos.count }}{% else %}0{% endif %}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>
