{% load i18n %}
<div class="panel panel-default">
  <div class="panel-heading">
    <div class="pull-right toolbar">
      <span class="btn btn-default btn-xs infobtn" data-container="body" title="{% trans "List of groups that you have access to." %}"><i class="fa fa-info-circle"></i></span>
    </div>
    <h3 class="no-margin"><i class="fa fa-group"></i> {% trans "Groups" %}</h3>
  </div>
  <div class="list-group" id="group-list-view">
    <div id="dashboard-group-list">
      {% for i in groups %}
      <a href="{% url "dashboard.views.group-detail" pk=i.pk %}" class="list-group-item real-link
      {% if forloop.last and groups|length < 5 %} list-group-item-last{% endif %}">
        <i class="fa fa-group"></i> {{ i.name }}
      </a>
      {% endfor %}
    </div>
    <div class="list-group-item list-group-footer text-right">
      <div class="row">
        <div class="col-xs-6">
          <form action="{% url "dashboard.views.group-list" %}" method="GET" id="dashboard-group-search-form">
            <div class="input-group input-group-sm">
              <input name="s" type="text" class="form-control" placeholder="{% trans "Search..." %}" />
              <div class="input-group-btn">
                <button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
              </div>
            </div>
          </form>
        </div>
        <div class="col-xs-6 text-right">
          <a class="btn btn-primary btn-xs" href="{% url "dashboard.views.group-list" %}">
            <i class="fa fa-chevron-circle-right"></i>
            {% if more_groups > 0 %}
              {% blocktrans count more=more_groups %}
                <strong>{{ more }}</strong>  more
              {% plural %}
                <strong>{{ more }}</strong>  more
              {% endblocktrans %}
            {% else %}
              {% trans "list" %}
            {% endif %}
          </a>
          <a class="btn btn-success btn-xs group-create" href="{% url "dashboard.views.group-create" %}"><i class="fa fa-plus-circle"></i> {% trans "new" %} </a>
        </div>
      </div>
    </div>
  </div>
</div>
