{% extends "layout_bs4.html" %}

{% block title %}
  {{ super() }} - Institutes
{% endblock %}

{% block top_nav %}
  {{ super() }}

  <li class="nav-item active">
    <a class="nav-link" href="#">Institutes</a>
  </li>

{% endblock %}

{% block content_main %}
  <div class="container-fluid" style="margin-top:20px">
    <ul class="list-group">
      {% for institute, case_count in institutes %}
        <li class="list-group-item align-items-center">
          <a href="{{ url_for('overview.cases', institute_id=institute._id) }}">
            {{ institute.display_name }}
          </a>
          {% if current_user.is_admin %}
            <span class="text-muted">({{ institute._id }})</span>
          {% endif %}
            <span class="badge badge-secondary badge-pill float-right">{{ case_count }} cases </span>
        </li>
      {% endfor %}

    </ul>
  </div>
{% endblock %}
