Add support for subscription typed products in eboutic

This commit is contained in:
Skia
2016-08-29 03:02:13 +02:00
parent dfb13c37f2
commit 325da79e45
9 changed files with 175 additions and 133 deletions

View File

@ -41,13 +41,13 @@
</div>
</div>
{% if user.membership.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
{% if user.membership.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user == profile %}
{# if the user is member of a club, he can view the subscription state #}
<p>
{% if get_subscriber(profile).is_subscribed() %}
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}User is subscriber until {{ subscription_end }}{% endtrans %}
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
{% else %}
{% trans %}User is not subscribed. {% endtrans %}
{% trans %}Not subscribed{% endtrans %}
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a>
{% endif %}
</p>