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

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

Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
6
{% block title %}{% trans "Members" %} - {{ block.super }}{% endblock %}
7
8

{% block body %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
9
10
<h1>{% trans "Members" %}</h1>

11
<p>
12
13
    {% 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
14
    just looking for a group member's email address? There is a high probability that this person is a member of Thalia,
15
16
    and thus you can use this directory to find him or her.
    {% endblocktrans %}
17
</p>
18

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

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

        </div>
    </form>
31

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

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

<div class='clearfix'></div>
76
77
78

<div class="pagination-wrapper row">
    <ul class="pagination">
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
79
        {% if members.has_previous %}
80
81
82
        <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
83
84
        {% endif %}

85
86
87
88
89
90
91
92
93
94
95
        {% 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
96
97

        {% if members.has_next %}
98
99
100
        <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
101
        {% endif %}
102
    </ul>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
103
104
105
</div>

{% endblock %}