From c0296b9adacab52f6ff82a16e4020b3efc454959 Mon Sep 17 00:00:00 2001 From: klmp200 Date: Wed, 7 Sep 2016 01:51:34 +0200 Subject: [PATCH] Added slots on user profile --- core/templates/core/user_detail.jinja | 41 +++++++++++++++++---------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/core/templates/core/user_detail.jinja b/core/templates/core/user_detail.jinja index 55eb0870..6fa50cde 100644 --- a/core/templates/core/user_detail.jinja +++ b/core/templates/core/user_detail.jinja @@ -50,22 +50,33 @@ {# if the user is member of a club, he can view the subscription state #}

{% if get_subscriber(profile).is_subscribed() %} -{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
-{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}
-{% if get_subscriber(profile).tokens.exists() %} -

-{% endif %} + {% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
+ {% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}
+ {# Shows tokens bought by the user #} + {% if get_subscriber(profile).tokens.exists() %} +
{% trans %}Tokens{% endtrans %}
+ + {% endif %} + {# Shows slots took by the user #} + {% if get_subscriber(profile).slots.exists() %} +
{% trans %}Slot{% endtrans %}
+ + {% endif %} {% else %} -{% trans %}Not subscribed{% endtrans %} -{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %} -{% trans %}New subscription{% endtrans %} -{% endif %} -{% endif %} -

+ {% trans %}Not subscribed{% endtrans %} + {% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %} + {% trans %}New subscription{% endtrans %} + {% endif %} + {% endif %} +

{% endif %} {% endblock %}