Skip to content
Snippets Groups Projects
index.html 4.96 KiB
Newer Older
{% extends "base.html" %}
{% load i18n %}
{% load thumbnail %}
{% block title %}{% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
<h1>{% trans "members"|capfirst %}</h1>
<p class="text-center">
    {% blocktrans trimmed %}
    Ever wondered what the name of that person in the back row of the lecture room is? There is a high probability that this person is a member of Thalia, and thus you can use this directory to find him or her.
    {% endblocktrans %}
<div class="portfolio member-directory">

    <form method="get" action="{% url 'members:index' %}">
        <input type="hidden" name="filter" value="{{ filter }}"/>
        <div class="row">
            <div class="member-search">
                <input name="keywords" type="text" value="{{ keywords }}" placeholder="{% trans "Who are you looking for?" %}"/>
                <input class="btn-large btn-style1" name="submit" type="submit" value="{% trans "Search" %}"/>
            </div>

        </div>
    </form>
    <div class="portfolio-filter tabs-wrapper tabs-centered clearfix">
        <ul class="link-tabs">
            <li {% if not filter or filter == "all" %} class="current"{% endif %}><a href="{% url 'members:index' %}?filter=all{% if keywords %}&keywords={{ keywords }}{% endif %}{% if page %}&page={{ page }}{% endif %}">{% trans "All members" %}</a></li>
            {% for year in year_range %}
                <li {% if filter == year|stringformat:"i" %} class="current"{% endif %}><a href="{% url 'members:index' %}?filter={{ year }}{% if keywords %}&keywords={{ keywords }}{% endif %}{% if page %}&page={{ page }}{% endif %}">{{ year }}</a></li>
            {% endfor %}
            <li {% if filter == "old" %} class="current"{% endif %}><a href="{% url 'members:index' %}?filter=old{% if keywords %}&keywords={{ keywords }}{% endif %}{% if page %}&page={{ page }}{% endif %}">{% trans "Older" %}</a></li>
            <li {% if filter == "honor" %} class="current"{% endif %}><a href="{% url 'members:index' %}?filter=honor{% if keywords %}&keywords={{ keywords }}{% endif %}{% if page %}&page={{ page }}{% endif %}">{% trans "Honorary Members" %}</a></li>
            <li {% if filter == "ex" %} class="current"{% endif %}><a href="{% url 'members:index' %}?filter=ex{% if keywords %}&keywords={{ keywords }}{% endif %}{% if page %}&page={{ page }}{% endif %}">{% trans "Former Members" %}</a></li>
        </ul>
    </div>

    {% if not members %}
    <div class="alert alert-success2">
	    {% trans "No members found" %}
	    <button class="close" type="button"><span class="alert-icon-close"></span></button>
    </div>
    {% endif %}

    <ul class="member-directory portfolio-posts row">
		{% for member in members %}
		<li class="post member-item span3 has-overlay">
				<div class="post-inner">
					<div class="inner-img">
                        {% if not member.photo %}
                        <img alt="{{ member.display_name }}" src="{% static 'members/images/default-avatar.jpg' %}" height="220" width="220" />
                        {% else %}
                        <img alt="{{ member.display_name }}" src="{% thumbnail member.photo '220x220' %}" width="220" height="220" />
                        {% endif %}
                    </div>
					<div class="post-overlay">
						<div class="post-overlay-meta">
							<h2>{{ member.display_name }}</h2>
                            <p>{% trans "Cohort" %}: {{ member.starting_year }}</p>
						</div>
					</div>
					<div class="post-body avatar-subtitle">
					    {{ member.display_name }}
					</div>
				</div>
			</a>
		</li>
        {% endfor %}
	</ul>
</div>

<div class='clearfix'></div>

<div class="pagination-wrapper row">
    <ul class="pagination">
        {% if members.has_previous %}
        <li>
            <a class="page-prev" href="{% url 'members:index' %}?page={{ members.previous_page_number }}{% if filter %}&filter={{ filter }}{% endif %}{% if keywords %}&keywords={{ keywords }}{% endif %}">Previous</a>
        </li>
        {% endif %}

        {% for page in page_range %}
            {% if page == members.number %}
            <li class="current">
                <span class="page-number">
                    {{ page }}
                </span>
            </li>
            {% else %}
            <li><a href="{% url 'members:index' %}?page={{ page }}{% if filter %}&filter={{ filter }}{% endif %}{% if keywords %}&keywords={{ keywords }}{% endif %}" class="page-number button">{{ page }}</a></li>
            {% endif %}
        {% endfor %}

        {% if members.has_next %}
        <li>
            <a class="page-next" href="{% url 'members:index' %}?page={{ members.next_page_number }}{% if filter %}&filter={{ filter }}{% endif %}{% if keywords %}&keywords={{ keywords }}{% endif %}">{% trans "Next" %}</a>
        </li>
        {% endif %}