Sith/core/templates/core/user_detail.jinja

39 lines
1010 B
Django/Jinja

{% extends "core/base.jinja" %}
{% block title %}
{{ profile.get_display_name() }}'s profile
{% endblock %}
{% block content %}
<div class="edit-bar">
{% if can_edit(profile, request.user) or user.id == profile.id %}
<a href="{{ url('core:user_edit', user_id=profile.id) }}">Edit</a>
{% endif %}
{% if can_edit_prop(profile, request.user) %}
<a href="{{ url('core:user_prop', user_id=profile.id) }}">Props</a>
{% endif %}
</div>
<h3>User Profile</h3>
<hr>
<div class="user_profile">
<h4>{{ profile.get_full_name() }}</h4>
<p>{{ profile.nick_name }}</p>
<p>Born: {{ profile.date_of_birth|date("d/m/Y") }}</p>
</div>
{% if user.membership.filter(end_date=None).exists() %}
<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>
{% endif %}
{% endblock %}