user_detail.jinja 1.92 KB
Newer Older
1
{% extends "core/user_base.jinja" %}
Skia's avatar
Skia committed
2 3

{% block title %}
Skia's avatar
Skia committed
4
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %}
Skia's avatar
Skia committed
5 6
{% endblock %}

7
{% block infos %}
8

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
<div id="user_profile_container">
    <div id="user_profile">
        <div id="pictures">
            {% if profile.profile_pict %}
            <img src="{{ profile.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" />
            {% endif %}
            <p><em>{{ profile.quote }}</em></p>
        </div>
        <h4>{{ profile.get_full_name() }}</h4>
        {% if profile.nick_name %}
        <p id="nickname">&laquo; {{ profile.nick_name }} &raquo;</p>
        {% endif %}
        {% if profile.date_of_birth %}
        <p>{% trans %}Born: {% endtrans %}{{ profile.date_of_birth|date("d/m/Y") }}</p>
        {% endif %}
        {% if profile.department != "NA" %}
        <p>{{ profile.department }}{{ profile.semester }}
        {% endif %}
        {% if profile.dpt_option %}
        <br>{% trans %}Option: {% endtrans %}{{ profile.dpt_option }}
        {% endif %}
        </p>
        {% if profile.promo %}
        <p><img src="{{ static('core/img/promo_%02d.png' % profile.promo) }}" alt="Promo {{ profile.promo }}" class="promo_pict" />
        {% trans %}Promo: {% endtrans %}{{ profile.promo }}</p>
34 35
        {% endif %}
    </div>
36
</div>
Skia's avatar
Skia committed
37

Skia's avatar
Skia committed
38
{% if user.membership.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
39
{# if the user is member of a club, he can view the subscription state #}
Skia's avatar
Skia committed
40 41
<p>
{% if get_subscriber(profile).is_subscribed() %}
Skia's avatar
Skia committed
42
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}User is subscriber until {{ subscription_end }}{% endtrans %}
Skia's avatar
Skia committed
43
{% else %}
Skia's avatar
Skia committed
44 45
{% trans %}User is not subscribed. {% endtrans %}
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a>
Skia's avatar
Skia committed
46
{% endif %}
Skia's avatar
Skia committed
47
</p>
48
{% endif %}
Skia's avatar
Skia committed
49

Skia's avatar
Skia committed
50 51 52
{% endblock %}