Fix subscription and improve views

This commit is contained in:
Skia
2016-03-22 11:42:00 +01:00
parent 0dba76e02e
commit 2e84ee7d4f
9 changed files with 46 additions and 33 deletions

View File

@ -24,8 +24,16 @@
You're seeing the profile of <strong>{{ profile.get_full_name() }}</strong><br/>
<strong>{{ profile.nick_name }}</strong><br/>
<em>{{ profile.date_of_birth|date("d/m/Y") }}</em>
</p>
<p>
{% if get_subscriber(profile).is_subscribed() %}
User is subscriber until {{ get_subscriber(profile).subscriptions.last().subscription_end }}
{% else %}
User is not subscribed. <a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">New subscription</a>
{% endif %}
</p>
{% endblock %}

View File

@ -9,9 +9,12 @@
<p><a href="{{ url('core:user_profile', user_id=request.user.id) }}">Back to profile</a></p>
<ul>
{% if user.has_perms('core.add_group') %}
{% if user.is_in_group(settings.AE_GROUPS['root']['name']) %}
<li><a href="{{ url('core:group_list') }}">Groups</a></li>
{% endif %}
{% if user.is_in_group(settings.AE_GROUPS['root']['name']) or user.is_in_group(settings.AE_GROUPS['board']['name']) %}
<li><a href="{{ url('subscription:subscription') }}">Subscriptions</a></li>
{% endif %}
</ul>
{% endblock %}