From 4d3ff3e9dc4396640404190766a8b3060820b737 Mon Sep 17 00:00:00 2001 From: Bartuccio Antoine Date: Tue, 16 Oct 2018 15:28:45 +0200 Subject: [PATCH] user: allow subscription history to be visible when subscription is expired --- core/templates/core/user_detail.jinja | 37 ++++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/core/templates/core/user_detail.jinja b/core/templates/core/user_detail.jinja index 0870369c..25a31c20 100644 --- a/core/templates/core/user_detail.jinja +++ b/core/templates/core/user_detail.jinja @@ -119,7 +119,25 @@
{{ 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 %}
@@ -139,23 +157,6 @@ {% endfor %}
- {% 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 user.is_root or user.is_board_member %}