profile.html 7.57 KB
Newer Older
1
{% extends "base.html" %}
2 3

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

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

{% block body %}
11 12 13 14 15
    <section id="members-profile" class="page-section">
        <div class="container">
            <h1 class="text-center section-title">
                {{ member.profile.display_name }}
            </h1>
16

17 18 19 20
            <div class="row">
                <div class="col-12 col-lg-7 text-center">
                    {% if not member.profile.photo %}
                        <img src="{% static "members/images/default-avatar.jpg" %}"
21
                             alt="{{ member.profile.display_name }}"/>
22 23
                    {% else %}
                        <img src="{{ member.profile.photo.url }}"
24
                             alt="{{ member.profile.display_name }}"/>
25 26 27 28
                    {% endif %}
                </div>
                <div class="col-12 col-lg-5">
                    <h4>{% trans "About" %} {{ member.profile.short_display_name }}</h4>
29

30 31 32 33 34 35 36
                    {% if not member.profile.profile_description %}
                        <p>
                            <i>{% trans "This member has not written a description yet." %}</i>
                        </p>
                    {% else %}
                        {{ member.profile.profile_description }}
                    {% endif %}
37

38
                    <hr class="separator">
39

40 41
                    <h4>{% trans "Personal information" %}</h4>
                    <ul class="list-unstyled">
42 43 44
                        <li>
                            <strong>{% trans "Membership type" %}: </strong> {{ membership_type }}<br>
                        </li>
45

46
                        {% if member.profile.starting_year %}
47 48 49
                            <li>
                                <strong>{% trans "Cohort" %}: </strong> {{ member.profile.starting_year }}<br>
                            </li>
50
                        {% endif %}
51

52 53 54 55 56
                        {% if member.profile.programme %}
                            <li>
                                <strong>{% trans "Study programme" %}: </strong> {{ member.profile.get_programme_display }}<br>
                            </li>
                        {% endif %}
57

58
                        {% if member.profile.website %}
59 60 61 62 63
                            <li>
                                <strong>{% trans "Website" %}: </strong>
                                <a rel="nofollow,noopener" href="{{ member.profile.website }}">
                                    {{ member.profile.website }}
                                </a>
64 65
                            </li>
                        {% endif %}
66

67 68 69 70
                        {% if member.profile.shoe_size %}
                        <li><span>{% trans "Shoe size" %}: </span> {{ member.profile.shoe_size }}</li>
                        {% endif %}

71
                        {% if member.profile.show_birthday and member.profile.birthday %}
72 73 74
                            <li><strong>{% trans "Birthday" %}: </strong> {{ member.profile.birthday }}</li>
                        {% endif %}
                    </ul>
75

76
                    {% if achievements %}
77 78 79 80 81 82 83 84 85 86 87
                        <hr class="separator">
                        <h4>{% trans "Achievements for Thalia" %}</h4>
                        <ul class="list-unstyled">
                            {% for achievement in achievements %}
                                <li class="mb-1">
                                    <strong>
                                        {% if achievement.url %}
                                            <a href="{{ achievement.url }}">
                                                {{ achievement.name }}
                                            </a>
                                        {% else %}
88
                                            {{ achievement.name }}
89 90
                                        {% endif %}
                                    </strong>
91
                                    <br>
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
                                    {% for period in achievement.periods %}
                                        {% if period.role %}
                                            <span>{{ period.role }}: </span>
                                        {% elif period.chair %}
                                            <span>{% trans "Chair" %}: </span>
                                        {% endif %}
                                        <i>
                                            {% if period.since|date:'Y m d' == '1970 01 01' %}
                                                ?
                                            {% else %}
                                                {{ period.since }}
                                            {% endif %}
                                            -
                                            {% if period.until %}
                                                {{ period.until }}
                                            {% else %}
                                                {% trans "today" %}
                                            {% endif %}
                                        </i>
                                        <br>
                                    {% endfor %}
                                </li>
                            {% endfor %}
                        </ul>
116
                    {% endif %}
117 118

                    {% if societies %}
119 120 121 122 123 124 125 126 127 128
                        <hr class="separator">
                        <h4>{% trans "Societies" %}</h4>
                        <ul class="list-unstyled">
                            {% for society in societies %}
                                <li class="mb-1">
                                    <strong>
                                        <a href="{{ society.url }}">
                                            {{ society.name }}
                                        </a>
                                    </strong>
129
                                    <br>
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
                                    {% for period in society.periods %}
                                        {% if period.role %}
                                            <span>{{ period.role }}: </span>
                                        {% elif period.chair %}
                                            <span>{% trans "Chair" %}: </span>
                                        {% endif %}
                                        <i>
                                            {% if period.since|date:'Y m d' == '1970 01 01' %}
                                                ?
                                            {% else %}
                                                {{ period.since }}
                                            {% endif %}
                                            -
                                            {% if period.until %}
                                                {{ period.until }}
                                            {% else %}
                                                {% trans "today" %}
                                            {% endif %}
                                        </i>
                                        <br>
                                    {% endfor %}
                                </li>
                            {% endfor %}
                        </ul>
154
                    {% endif %}
155 156 157
                </div>
            </div>
        </div>
158
        </div>
159
    </section>
160
{% endblock %}