index.html 4.94 KB
Newer Older
1
{% extends "base.html" %}
2 3

{% load static %}
4
{% load i18n %}
5
{% load thumbnail %}
6

7
{% block title %}{% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
8 9

{% block body %}
10
<h1>{% trans "members"|capfirst %}</h1>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
11

12
<p class="text-center">
13 14
    {% blocktrans trimmed %}
    Ever wondered what the name of that person in the back row of the lecture room is? Or maybe you're
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
15
    just looking for a group member's email address? There is a high probability that this person is a member of Thalia,
16 17
    and thus you can use this directory to find him or her.
    {% endblocktrans %}
18
</p>
19

Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
20 21 22 23 24
<div class="portfolio member-directory">

    <form method="get" action="{% url 'members:index' %}">
        <input type="hidden" name="filter" value="{{ filter }}"/>
        <div class="row">
25 26 27
            <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" %}"/>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
28 29 30 31
            </div>

        </div>
    </form>
32

Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
33 34
    <div class="portfolio-filter tabs-wrapper tabs-centered clearfix">
        <ul class="link-tabs">
35
            <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>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
36
            {% for year in year_range %}
37
                <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>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
38
            {% endfor %}
39 40 41
            <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>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
42 43 44 45
        </ul>
    </div>

    {% if not members %}
46 47
    <div class="alert alert-success2">
	    {% trans "No members found" %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
48 49 50 51 52 53 54
	    <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">
55
			<a href="{% url 'members:profile' pk=member.pk %}">
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
56 57
				<div class="post-inner">
					<div class="inner-img">
58 59 60 61 62
                        {% 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 %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
63 64 65 66
                    </div>
					<div class="post-overlay">
						<div class="post-overlay-meta">
							<h2>{{ member.display_name }}</h2>
67
                            <p>{% trans "Cohort" %}: {{ member.starting_year }}</p>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
68 69 70 71 72 73 74 75 76 77 78 79 80
						</div>
					</div>
					<div class="post-body avatar-subtitle">
					    {{ member.display_name }}
					</div>
				</div>
			</a>
		</li>
        {% endfor %}
	</ul>
</div>

<div class='clearfix'></div>
81 82 83

<div class="pagination-wrapper row">
    <ul class="pagination">
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
84
        {% if members.has_previous %}
85 86 87
        <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>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
88 89
        {% endif %}

90 91 92 93 94 95 96 97 98 99 100
        {% 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 %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
101 102

        {% if members.has_next %}
103 104 105
        <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>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
106
        {% endif %}
107
    </ul>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
108 109
</div>

110
{% endblock %}