{% extends "layout.html" %}

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

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

  <li class="active">
    <span class="navbar-text">Institutes</span>
  </li>
{% endblock %}

{% block content_main %}
  {% for institute, case_count in institutes %}
    <div class="panel panel-default">
      <div class="panel-body">
        <div class="row">
          <div class="col-xs-8">
            <h3 class="panel-title">
              <a href="{{ url_for('cases.cases', institute_id=institute._id) }}">
                {{ institute.display_name }}
              </a>

              {% if current_user.is_admin %}
                <span class="text-muted">({{ institute._id }})</span>
              {% endif %}
            </h3>
          </div>
          <div class="col-xs-4">
            <span class="badge pull-right">{{ case_count }} cases</span>
          </div>
        </div>
      </div>
    </div>
  {% endfor %}
{% endblock %}
