Migrate permanencies and add user stats view

This commit is contained in:
Skia
2016-08-18 21:32:18 +02:00
parent b69c3a6792
commit 0689f864d2
6 changed files with 65 additions and 5 deletions

View File

@ -5,6 +5,7 @@
<div>{{ profile.get_display_name() }}</div>
<div class="tools">
<a href="{{ url('core:user_profile', user_id=profile.id) }}">{% trans %}Infos{% endtrans %}</a>
<a href="{{ url('core:user_stats', user_id=profile.id) }}">{% trans %}Stats{% endtrans %}</a>
{% if can_edit(profile, request.user) or user.id == profile.id %}
<a href="{{ url('core:user_edit', user_id=profile.id) }}">{% trans %}Edit{% endtrans %}</a>
{% endif %}

View File

@ -0,0 +1,18 @@
{% extends "core/user_base.jinja" %}
{% block title %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s stats{% endtrans %}
{% endblock %}
{% block infos %}
{% if profile.permanencies %}
<div>
<h3>Permanencies</h3>
<p>
{{ total_time }}
</p>
</div>
{% endif %}
{% endblock %}