{% extends "memberships/base-wide.html" %}
{% load pagination_tags %}
{% load membership_tags %}
{% load base_tags %}
{% load base_filters %}
{% load perm_tags %}
{% load i18n %}

{% block title %}Membership Search{% endblock %}
{% block meta_description %}{{ block.super }}{% endblock %}
{% block meta_keywords %}{{ block.super }}{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/memberships.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/memberships-search.css">
{% endblock %}

{% block body %}

<div class="t">
    {% membership_nav request.user %}

    <h1>{{ SITE_GLOBAL_SITEPRIMARYKEYWORDS }} Membership Search</h1>

    {% membership_search %}

    {% autopaginate members 10 %}

    <div class="memberships-wrap">

    {% for member in members %}
        {% with member|get_object as membership %}
            {% include 'memberships/search-result.html' %}
        {% endwith %}
    {% empty %}
        <div>{% trans "0 Members Found" %}</div>
    {% endfor %}
    </div>

    <div class="membership-side-panel">
        <div class="type-set">
            <div>{% trans "Membership Types" %}</div>
            <ul>
                {% for type in types %}
                <li><a href="?type={{ type.pk }}">{{ type.name }}</a></li>
                {% endfor %}
            </ul>
        </div>
    </div>

    <div style="clear:both;"></div>
    {% paginate %}
</div>
{% endblock %}
