{% extends "core/base.jinja" %} {% from "core/macros.jinja" import show_slots, show_tokens, user_subscription %} {% block title %} {% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %} {% endblock %} {% block content %}

{{ profile.get_full_name() }}

{% if profile.nick_name %}
« {{ profile.nick_name }} »
{% endif %} {% if profile.quote %}
{{ profile.quote }}
{% endif %}
{% if profile.date_of_birth %}
{% endif %} {% if profile.department != "NA" %}
{% endif %} {% if profile.dpt_option %}
{% endif %} {% if profile.phone %}
{% endif %} {% if profile.address %}
{% endif %} {% if profile.parent_address %}
{% endif %}
{% if profile.promo %}
Promo {{ profile.promo }} {% trans %}Promo: {% endtrans %}{{ profile.promo }}
{% endif %}
{% if profile.profile_pict %} {% trans %}Profile{% endtrans %} {% else %} {% trans %}Profile{% endtrans %} {% endif %}
{% if profile.profile_pict %} {% trans %}Profile{% endtrans %} {% else %} {% trans %}Profile{% endtrans %} {% endif %} {% if profile.avatar_pict %} {% trans %}Avatar{% endtrans %} {% else %} {% trans %}Avatar{% endtrans %} {% endif %} {% if profile.scrub_pict %} {% trans %}Scrub{% endtrans %} {% else %} {% trans %}Scrub{% endtrans %} {% endif %}
{% if user.memberships.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user == profile or user.is_in_group(settings.SITH_BAR_MANAGER_BOARD_GROUP) %} {# if the user is member of a club, he can view the subscription state #}
{% if profile.is_subscribed %} {% if user == profile or user.is_root or user.is_board_member %}
{{ user_subscription(profile) }}
{% endif %} {% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %}
{# Shows tokens bought by the user #} {{ show_tokens(profile) }} {# Shows slots took by the user #} {{ show_slots(profile) }}
{% endif %} {% else %}
{% trans %}Not subscribed{% endtrans %} {% if user.is_board_member %} {% trans %}New subscription{% endtrans %} {% endif %} {% endif %}
{% endif %} {% if profile.was_subscribed and (user == profile or user.is_root or user.is_board_member)%}
{% trans %}Subscription history{% endtrans %}
{% for sub in profile.subscriptions.all() %} {% endfor %}
{% trans %}Subscription start{% endtrans %} {% trans %}Subscription end{% endtrans %} {% trans %}Subscription type{% endtrans %} {% trans %}Payment method{% endtrans %}
{{ sub.subscription_start }} {{ sub.subscription_end }} {{ sub.subscription_type }} {{ sub.get_payment_method_display() }}
{% endif %} {% if user.is_root or user.is_board_member %}

{% csrf_token %} {{ gift_form.label }} {{ gift_form.user }}
{% if profile.gifts.exists() %}
{% trans %}Last given gift :{% endtrans %} {{ profile.gifts.order_by('-date').first() }}
{% else %} {% trans %}No gift given yet{% endtrans %} {% endif %}
{% endif %}
{% endblock %} {% block script %} {{ super() }} {% endblock %}