diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index f7c67d5f..94382e58 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -117,7 +117,7 @@ {% if user.notifications.filter(viewed=False).count() > 0 %} {% for n in user.notifications.filter(viewed=False).order_by('-date') %}
  • - +
    {{ n.date|localtime|date(DATE_FORMAT) }} diff --git a/core/templates/core/user_detail.jinja b/core/templates/core/user_detail.jinja index 158874dc..a48dde06 100644 --- a/core/templates/core/user_detail.jinja +++ b/core/templates/core/user_detail.jinja @@ -165,17 +165,62 @@ {% trans %}New subscription{% endtrans %} {% endif %} - {% endif %} -
    + {% endif %} - {% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%} + {% endif %} +
    + {% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%} +
    +
    + + {% 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() %} + {% set gifts = profile.gifts.order_by("-date")|list %} +
    +
    - {% trans %}Subscription history{% endtrans %} + {% trans %}Last given gift :{% endtrans %} {{ gifts[0] }} - +
    @@ -199,44 +244,10 @@
    - {% endif %} - -
    -
    - {% if user.is_root or user.is_board_member %} -
    - {% csrf_token %} - {{ gift_form.label }} - {{ gift_form.user }} - -
    - {% if profile.gifts.exists() %} - {% set gifts = profile.gifts.order_by("-date")|list %} -
    -
    -
    - - {% trans %}Last given gift :{% endtrans %} {{ gifts[0] }} - - - - -
    -
    -
      - {% for gift in gifts %} -
    • {{ gift }} - - - -
    • - {% endfor %} -
    -
    - {% else %} - {% trans %}No gift given yet{% endtrans %} - {% endif %} -
    + {% else %} + {% trans %}No gift given yet{% endtrans %} + {% endif %} +
    {% endif %}