mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 22:23:23 +00:00
Merge branch 'sli' into 'master'
Add account number and suscription on counter See merge request !15
This commit is contained in:
commit
31d62532be
@ -34,6 +34,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
{% macro user_subscription(user) %}
|
||||||
|
{% trans subscription_end=get_subscriber(user).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
||||||
|
{% trans %}Account number: {% endtrans %}{{ user.customer.account_id }}<br/>
|
||||||
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro show_slots(user) %}
|
{% macro show_slots(user) %}
|
||||||
{% if get_subscriber(user).slots.filter(start_date__gte=timezone.now()).exists() %}
|
{% if get_subscriber(user).slots.filter(start_date__gte=timezone.now()).exists() %}
|
||||||
<h5>{% trans %}Slot{% endtrans %}</h5>
|
<h5>{% trans %}Slot{% endtrans %}</h5>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
{% from "core/macros.jinja" import show_slots, show_tokens %}
|
{% from "core/macros.jinja" import show_slots, show_tokens, user_subscription %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %}
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %}
|
||||||
@ -56,8 +56,7 @@
|
|||||||
<p>
|
<p>
|
||||||
{% if get_subscriber(profile).is_subscribed() %}
|
{% if get_subscriber(profile).is_subscribed() %}
|
||||||
{% if user == profile or user.is_root or user.is_board_member %}
|
{% if user == profile or user.is_root or user.is_board_member %}
|
||||||
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
{{ user_subscription(profile) }}
|
||||||
{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}<br/>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %}
|
{% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %}
|
||||||
{# Shows tokens bought by the user #}
|
{# Shows tokens bought by the user #}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
{% from "core/macros.jinja" import user_mini_profile %}
|
{% from "core/macros.jinja" import user_mini_profile, user_subscription %}
|
||||||
|
|
||||||
|
|
||||||
{% macro add_product(id, content, class="") %}
|
{% macro add_product(id, content, class="") %}
|
||||||
@ -28,6 +28,7 @@
|
|||||||
<div id="user_info">
|
<div id="user_info">
|
||||||
<h5>{% trans %}Customer{% endtrans %}</h5>
|
<h5>{% trans %}Customer{% endtrans %}</h5>
|
||||||
{{ user_mini_profile(customer.user) }}
|
{{ user_mini_profile(customer.user) }}
|
||||||
|
{{ user_subscription(customer.user) }}
|
||||||
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="bar_ui">
|
<div id="bar_ui">
|
||||||
|
Loading…
Reference in New Issue
Block a user