{% extends "members:base.html" %}

{% load static %}
{% load i18n %}
{% load django_tables2 %}

{% block content %}
<div>

    <div>
        <h2>{% trans "Member register" %}</h2>
    </div>

    {% if notification %}
    <div class="alert alert-success">
        {{ notification }}
    </div>
    {% endif %}

    <div class="member_count">
        <span>{% trans "Members in register:" %} {{ member_count }} ({{ paid_count }})</span>
    </div>

    <div>
      <form class="input-group" method="GET" action="/members/list">
        <input class="form-control" type="text" name="q" placeholder="Teemu Teekkari" />
        <span class="input-group-btn">
          <input type="submit" class="btn" value="{% trans "Search" %}" />
        </span>
      </form>
    </div>

    {% if request.GET.q %}
    <div>
      <div class="alert alert-info" role="alert">
        {% trans "Showing results for" %} "{{ request.GET.q }}"
      </div>
    </div>
    {% endif %}

    {{ table|safe }}

    <div>
        <a href="/members/export_members" class="btn btn-info">{% trans "Download Excel" %}</a>        
    </div>
</div>
{% endblock content %}
