user_tools.jinja 3.19 KB
Newer Older
1
{% extends "core/base.jinja" %}
Skia's avatar
Skia committed
2
3

{% block title %}
Skia's avatar
Skia committed
4
{% trans user_name=user.get_display_name() %}{{ user_name }}'s tools{% endtrans %}
Skia's avatar
Skia committed
5
6
{% endblock %}

7
{% block content %}
Skia's avatar
Skia committed
8
<h3>{% trans %}User Tools{% endtrans %}</h3>
Skia's avatar
Skia committed
9

Skia's avatar
Skia committed
10
<hr>
Skia's avatar
Skia committed
11
<h4>{% trans %}Sith management{% endtrans %}</h4>
Skia's avatar
Skia committed
12
<ul>
Skia's avatar
Skia committed
13
    {% if user.is_root %}
Skia's avatar
Skia committed
14
    <li><a href="{{ url('core:group_list') }}">{% trans %}Groups{% endtrans %}</a></li>
Skia's avatar
Skia committed
15
    <li><a href="{{ url('rootplace:merge') }}">{% trans %}Merge users{% endtrans %}</a></li>
Skia's avatar
Skia committed
16
    {% endif %}
Skia's avatar
Skia committed
17
    {% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user.is_root %}
Skia's avatar
Skia committed
18
    <li><a href="{{ url('subscription:subscription') }}">{% trans %}Subscriptions{% endtrans %}</a></li>
Sli's avatar
Sli committed
19
    <li><a href="{{ url('club:club_new') }}">{% trans %}New club{% endtrans %}</a></li>
Skia's avatar
Skia committed
20
    {% endif %}
Skia's avatar
Skia committed
21
</ul>
22

Skia's avatar
Skia committed
23
<hr>
Skia's avatar
Skia committed
24
<h4>{% trans %}Counters{% endtrans %}</h4>
25
<ul>
Skia's avatar
Skia committed
26
    {% if user.is_in_group(settings.SITH_GROUPS['counter-admin']['name']) or user.is_root %}
27
    <h5>{% trans %}General management{% endtrans %}</h5>
Skia's avatar
Skia committed
28
    <li><a href="{{ url('counter:admin_list') }}">{% trans %}General counters management{% endtrans %}</a></li>
Skia's avatar
Skia committed
29
    <li><a href="{{ url('counter:product_list') }}">{% trans %}Products management{% endtrans %}</a></li>
Skia's avatar
Skia committed
30
    <li><a href="{{ url('counter:producttype_list') }}">{% trans %}Product types management{% endtrans %}</a></li>
Skia's avatar
Skia committed
31
    <li><a href="{{ url('counter:cash_summary_list') }}">{% trans %}Cash register summaries{% endtrans %}</a></li>
Skia's avatar
Skia committed
32
    {% endif %}
Skia's avatar
Skia committed
33
    {% for b in settings.SITH_COUNTER_BARS %}
34
    {% if user.is_in_group(b[1]+" admin") %}
Skia's avatar
Skia committed
35
    <li><a href="{{ url('counter:details', counter_id=b[0]) }}">{{ b[1] }}</a> -
Skia's avatar
Skia committed
36
37
        <a href="{{ url('counter:admin', counter_id=b[0]) }}">{% trans %}Edit{% endtrans %}</a> -
        <a href="{{ url('counter:stats', counter_id=b[0]) }}">{% trans %}Stats{% endtrans %}</a></li>
38
    {% endif %}
Skia's avatar
Skia committed
39
    {% endfor %}
40
41
</ul>

Skia's avatar
Skia committed
42
43
44
<hr>
<h4>{% trans %}Accounting{% endtrans %}</h4>
<ul>
Skia's avatar
Skia committed
45
    {% if user.is_in_group(settings.SITH_GROUPS['accounting-admin']['name']) or user.is_root %}
Skia's avatar
Skia committed
46
47
    <li><a href="{{ url('accounting:bank_list') }}">{% trans %}General accounting{% endtrans %}</a></li>
    {% endif %}
Skia's avatar
Skia committed
48
    {% for m in user.memberships.filter(end_date=None).filter(role__gte=7).all() -%}
Skia's avatar
Skia committed
49
    {%- for b in m.club.bank_accounts.all() %}
Skia's avatar
Skia committed
50
    <li><strong>{% trans %}Bank account: {% endtrans %}</strong>
Skia's avatar
Skia committed
51
52
53
54
55
56
57
58
        <a href="{{ url('accounting:bank_details', b_account_id=b.id) }}">{{ b }}</a></li>
    {%- endfor %}
    {% if m.club.club_account.exists() -%}
        {% for ca in m.club.club_account.all() %}
        <li><strong>{% trans %}Club account: {% endtrans %}</strong> <a href="{{ url('accounting:club_details', c_account_id=ca.id) }}">{{ ca }}</a></li>
        {%- endfor %}
    {%- endif -%}
    {%- endfor %}
Skia's avatar
Skia committed
59
60
</ul>

Skia's avatar
Skia committed
61
62
63
64
65
66
67
68
69
{% if user.is_in_group(settings.SITH_GROUPS['communication-admin']['id']) %}
<hr>
<h4>{% trans %}Communication{% endtrans %}</h4>
<ul>
    <li><a href="{{ url('core:file_moderation') }}">{% trans %}Moderate files{% endtrans %}</a></li>
</ul>
{% endif %}


Skia's avatar
Skia committed
70
71
<hr>
<h4>{% trans %}Club tools{% endtrans %}</h4>
Skia's avatar
Skia committed
72
<ul>
Skia's avatar
Skia committed
73
    {% for m in user.memberships.filter(end_date=None).all() %}
Skia's avatar
Skia committed
74
75
76
    <li><a href="{{ url('club:tools', club_id=m.club.id) }}">{{ m.club }}</a></li>
    {% endfor %}
</ul>
Skia's avatar
Skia committed
77
78
79
80
81

{% endblock %}