user_tools.jinja 4.44 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_GROUP_COUNTER_ADMIN_ID) 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>
Sli's avatar
Sli committed
32
33
    <li><a href="{{ url('counter:invoices_call') }}">{% trans %}Invoices call{% endtrans %}</a></li>
    <li><a href="{{ url('counter:eticket_list') }}">{% trans %}Etickets{% endtrans %}</a></li>
Skia's avatar
Skia committed
34
    {% endif %}
Skia's avatar
Skia committed
35
    {% for b in settings.SITH_COUNTER_BARS %}
36
    {% if user.is_in_group(b[1]+" admin") %}
Skia's avatar
Skia committed
37
    <li><a href="{{ url('counter:details', counter_id=b[0]) }}">{{ b[1] }}</a> -
Skia's avatar
Skia committed
38
39
        <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>
40
    {% endif %}
Skia's avatar
Skia committed
41
    {% endfor %}
42
43
</ul>

Skia's avatar
Skia committed
44
45
46
<hr>
<h4>{% trans %}Accounting{% endtrans %}</h4>
<ul>
Skia's avatar
Skia committed
47
    {% if user.is_in_group(settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) or user.is_root %}
Sli's avatar
Sli committed
48
    <li><a href="{{ url('accounting:refound_account') }}">{% trans %}Refound Account{% endtrans %}</a></li>
Skia's avatar
Skia committed
49
    <li><a href="{{ url('accounting:bank_list') }}">{% trans %}General accounting{% endtrans %}</a></li>
Krophil's avatar
Krophil committed
50
    <li><a href="{{ url('accounting:co_list') }}">{% trans %}Company list{% endtrans %}</a></li>
Skia's avatar
Skia committed
51
    {% endif %}
Skia's avatar
Skia committed
52
    {% for m in user.memberships.filter(end_date=None).filter(role__gte=7).all() -%}
Skia's avatar
Skia committed
53
    {%- for b in m.club.bank_accounts.all() %}
Skia's avatar
Skia committed
54
    <li><strong>{% trans %}Bank account: {% endtrans %}</strong>
Skia's avatar
Skia committed
55
56
57
58
59
60
61
62
        <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
63
64
</ul>

Skia's avatar
Skia committed
65
66
67
<hr>
<h4>{% trans %}Communication{% endtrans %}</h4>
<ul>
Skia's avatar
Skia committed
68
    {% if user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) or user.is_root %}
Skia's avatar
Skia committed
69
    <li><a href="{{ url('com:news_admin_list') }}">{% trans %}Moderate news{% endtrans %}</a></li>
Skia's avatar
Skia committed
70
71
72
    <li><a href="{{ url('com:index_edit') }}">{% trans %}Edit index page{% endtrans %}</a></li>
    <li><a href="{{ url('com:alert_edit') }}">{% trans %}Edit alert message{% endtrans %}</a></li>
    <li><a href="{{ url('com:info_edit') }}">{% trans %}Edit information message{% endtrans %}</a></li>
Skia's avatar
Skia committed
73
    <li><a href="{{ url('core:file_moderation') }}">{% trans %}Moderate files{% endtrans %}</a></li>
Skia's avatar
Skia committed
74
    {% endif %}
Skia's avatar
Skia committed
75
    {% if user.is_in_group(settings.SITH_GROUP_SAS_ADMIN_ID) %}
Skia's avatar
Skia committed
76
77
    <li><a href="{{ url('sas:moderation') }}">{% trans %}Moderate pictures{% endtrans %}</a></li>
    {% endif %}
Skia's avatar
Skia committed
78
79
80
</ul>


Skia's avatar
Skia committed
81
82
<hr>
<h4>{% trans %}Club tools{% endtrans %}</h4>
Skia's avatar
Skia committed
83
<ul>
Skia's avatar
Skia committed
84
    {% for m in user.memberships.filter(end_date=None).all() %}
Skia's avatar
Skia committed
85
86
87
    <li><a href="{{ url('club:tools', club_id=m.club.id) }}">{{ m.club }}</a></li>
    {% endfor %}
</ul>
Sli's avatar
Sli committed
88
89
90
<hr>
<h4>{% trans %}Elections{% endtrans %}</h4>
<ul>
91
92
93
94
    <li><a href="{{ url('election:list') }}">{% trans %}See avaliable elections{% endtrans %}</a></li>
    {%- if user.is_subscribed() -%}
    <li><a href="{{ url('election:create') }}">{% trans %}Create a new election{% endtrans %}</a></li>
    {%- endif -%}
Sli's avatar
Sli committed
95
</ul>
Skia's avatar
Skia committed
96
97
98
99
100

{% endblock %}