mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 11:04:20 +00:00
Added slots on user profile
This commit is contained in:
parent
a64b10776e
commit
c0296b9ada
@ -50,22 +50,33 @@
|
|||||||
{# if the user is member of a club, he can view the subscription state #}
|
{# if the user is member of a club, he can view the subscription state #}
|
||||||
<p>
|
<p>
|
||||||
{% if get_subscriber(profile).is_subscribed() %}
|
{% if get_subscriber(profile).is_subscribed() %}
|
||||||
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
||||||
{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}<br/>
|
{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}<br/>
|
||||||
{% if get_subscriber(profile).tokens.exists() %}
|
{# Shows tokens bought by the user #}
|
||||||
<ul>
|
{% if get_subscriber(profile).tokens.exists() %}
|
||||||
{% for i in get_subscriber(profile).tokens.all() %}
|
<h5>{% trans %}Tokens{% endtrans %}</h5>
|
||||||
|
<ul>
|
||||||
|
{% for i in get_subscriber(profile).tokens.all() %}
|
||||||
<li>{{ i }}</li>
|
<li>{{ i }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{# Shows slots took by the user #}
|
||||||
|
{% if get_subscriber(profile).slots.exists() %}
|
||||||
|
<h5>{% trans %}Slot{% endtrans %}</h5>
|
||||||
|
<ul>
|
||||||
|
{% for i in get_subscriber(profile).slots.all() %}
|
||||||
|
<li>{{ i.get_type_display() }} - {{i.machine.launderette }}, {{ i.start_date|localtime|date("l j") }} : {{ i.start_date|localtime|time(DATETIME_FORMAT) }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}Not subscribed{% endtrans %}
|
{% trans %}Not subscribed{% endtrans %}
|
||||||
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
|
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
|
||||||
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a>
|
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user