mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Migrate permanencies and add user stats view
This commit is contained in:
@ -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 %}
|
||||
|
18
core/templates/core/user_stats.jinja
Normal file
18
core/templates/core/user_stats.jinja
Normal 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 %}
|
||||
|
||||
|
Reference in New Issue
Block a user