user_base.jinja 1.93 KB
Newer Older
1
2
3
4
{% extends "core/base.jinja" %}

{% block content %}
<div class="tool-bar">
Skia's avatar
Skia committed
5
    <div>{{ profile.get_display_name() }}</div>
Skia's avatar
Skia committed
6
    <div class="tools">
Skia's avatar
Skia committed
7
8
9
10
11
12
13

        <a href="{{ url('core:user_profile', user_id=profile.id) }}"
            {%- if tab == "infos" -%}
                class="selected_tab"
            {%- endif -%}
        >{% trans %}Infos{% endtrans %}</a>

Skia's avatar
Skia committed
14
        {% if profile == user %}
Skia's avatar
Skia committed
15
16
17
18
19
        <a href="{{ url('core:user_tools') }}"
            {%- if tab == "tools" -%}
                class="selected_tab"
            {%- endif -%}
        >{% trans %}Tools{% endtrans %}</a>
Skia's avatar
Skia committed
20
        {% endif %}
Skia's avatar
Skia committed
21
22
23
24
25
26
27

        <a href="{{ url('core:user_stats', user_id=profile.id) }}"
            {%- if tab == "stats" -%}
                class="selected_tab"
            {%- endif -%}
        >{% trans %}Stats{% endtrans %}</a>

Skia's avatar
Skia committed
28
        {% if can_edit(profile, request.user) or user.id == profile.id %}
Skia's avatar
Skia committed
29
30
31
32
33
        <a href="{{ url('core:user_edit', user_id=profile.id) }}"
            {%- if tab == "edit" -%}
                class="selected_tab"
            {%- endif -%}
        >{% trans %}Edit{% endtrans %}</a>
Skia's avatar
Skia committed
34
        {% endif %}
Skia's avatar
Skia committed
35

Skia's avatar
Skia committed
36
        {% if can_edit_prop(profile, request.user) %}
Skia's avatar
Skia committed
37
38
39
40
41
        <a href="{{ url('core:user_groups', user_id=profile.id) }}"
            {%- if tab == "groups" -%}
                class="selected_tab"
            {%- endif -%}
        >{% trans %}Groups{% endtrans %}</a>
Skia's avatar
Skia committed
42
        {% endif %}
Skia's avatar
Skia committed
43

Skia's avatar
Skia committed
44
        {% if profile.customer and (profile == request.user
Skia's avatar
Skia committed
45
        or request.user.is_in_group(settings.SITH_GROUPS['accounting-admin']['name'])
Skia's avatar
Skia committed
46
        or request.user.is_root) %}
Skia's avatar
Skia committed
47
48
49
50
51
        <a href="{{ url('core:user_account', user_id=profile.id) }}"
            {%- if tab == "account" -%}
                class="selected_tab"
            {%- endif -%}
        >{% trans %}Account{% endtrans %} ({{ profile.customer.amount }}€)</a>
Skia's avatar
Skia committed
52
53
        {% endif %}
    </div>
Skia's avatar
Skia committed
54
    <hr>
55
56
57
</div>

<div>
Skia's avatar
Skia committed
58
59
    {% block infos %}
    {% endblock %}
60
61
62
63
64
65
</div>

{% endblock %}