user_tools.jinja 6.49 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>
16
    <li><a href="{{ url('rootplace:delete_forum_messages') }}">{% trans %}Delete user's forum messages{% endtrans %}</a></li>
Skia's avatar
Skia committed
17
    {% endif %}
18
    {% if user.can_create_subscription or user.is_root %}
Skia's avatar
Skia committed
19
    <li><a href="{{ url('subscription:subscription') }}">{% trans %}Subscriptions{% endtrans %}</a></li>
20 21
    {% endif %}
    {% if user.is_board_member or user.is_root %}
22
    <li><a href="{{ url('subscription:stats') }}">{% trans %}Subscription stats{% endtrans %}</a></li>
Sli's avatar
Sli committed
23
    <li><a href="{{ url('club:club_new') }}">{% trans %}New club{% endtrans %}</a></li>
Skia's avatar
Skia committed
24
    {% endif %}
Skia's avatar
Skia committed
25
</ul>
26

Skia's avatar
Skia committed
27
<hr>
Skia's avatar
Skia committed
28
<h4>{% trans %}Counters{% endtrans %}</h4>
29
<ul>
Skia's avatar
Skia committed
30
    {% if user.is_in_group(settings.SITH_GROUP_COUNTER_ADMIN_ID) or user.is_root %}
Skia's avatar
Skia committed
31
    <li><a href="{{ url('counter:admin_list') }}">{% trans %}General counters management{% endtrans %}</a></li>
Skia's avatar
Skia committed
32
    <li><a href="{{ url('counter:product_list') }}">{% trans %}Products management{% endtrans %}</a></li>
33
    <li><a href="{{ url('counter:producttype_list') }}">{% trans %}Product types management{% endtrans %}</a></li>
Skia's avatar
Skia committed
34
    <li><a href="{{ url('counter:cash_summary_list') }}">{% trans %}Cash register summaries{% endtrans %}</a></li>
35 36
    <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
37
    {% endif %}
Skia's avatar
Skia committed
38
    {% for b in settings.SITH_COUNTER_BARS %}
39
    {% if user.is_in_group(b[1]+" admin") %}
40
    <li>
41
        <a href="{{ url('counter:details', counter_id=b[0]) }}">{{ b[1] }}</a> -
Skia's avatar
Skia committed
42
        <a href="{{ url('counter:admin', counter_id=b[0]) }}">{% trans %}Edit{% endtrans %}</a> -
43 44 45
        <a href="{{ url('counter:stats', counter_id=b[0]) }}">{% trans %}Stats{% endtrans %}</a> -
        {% set c = Counter.objects.filter(id=b[0]).first() %}
        {% if c.stock %}
46
        <a href="{{ url('stock:items_list', stock_id=c.stock.id)}}">Stock</a> -
47 48 49 50 51
        <a href="{{ url('stock:shoppinglist_list', stock_id=c.stock.id)}}">{% trans %}Shopping lists{% endtrans %}</a>
        {% else %}
        <a href="{{url('stock:new', counter_id=c.id)}}">{% trans %}Create new stock{% endtrans%}</a>
        {% endif %}
    </li>
52
    {% endif %}
Skia's avatar
Skia committed
53
    {% endfor %}
54 55
</ul>

Skia's avatar
Skia committed
56 57 58
<hr>
<h4>{% trans %}Accounting{% endtrans %}</h4>
<ul>
Skia's avatar
Skia committed
59
    {% if user.is_in_group(settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) or user.is_root %}
Sli's avatar
Sli committed
60
    <li><a href="{{ url('accounting:refound_account') }}">{% trans %}Refound Account{% endtrans %}</a></li>
Skia's avatar
Skia committed
61
    <li><a href="{{ url('accounting:bank_list') }}">{% trans %}General accounting{% endtrans %}</a></li>
Krophil's avatar
Krophil committed
62
    <li><a href="{{ url('accounting:co_list') }}">{% trans %}Company list{% endtrans %}</a></li>
Skia's avatar
Skia committed
63
    {% endif %}
Skia's avatar
Skia committed
64
    {% for m in user.memberships.filter(end_date=None).filter(role__gte=7).all() -%}
Skia's avatar
Skia committed
65
    {%- for b in m.club.bank_accounts.all() %}
Skia's avatar
Skia committed
66
    <li><strong>{% trans %}Bank account: {% endtrans %}</strong>
Skia's avatar
Skia committed
67 68 69 70 71 72 73 74
        <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
75 76
</ul>

Skia's avatar
Skia committed
77 78 79
<hr>
<h4>{% trans %}Communication{% endtrans %}</h4>
<ul>
80
    {% if user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) or user.is_root %}
81
    <li><a href="{{ url('com:weekmail_article') }}">{% trans %}Create weekmail article{% endtrans %}</a></li>
Skia's avatar
Skia committed
82
    <li><a href="{{ url('com:weekmail') }}">{% trans %}Weekmail{% endtrans %}</a></li>
Skia's avatar
Skia committed
83
    <li><a href="{{ url('com:weekmail_destinations') }}">{% trans %}Weekmail destinations{% endtrans %}</a></li>
84
    <li><a href="{{ url('com:news_new') }}">{% trans %}Create news{% endtrans %}</a></li>
Skia's avatar
Skia committed
85
    <li><a href="{{ url('com:news_admin_list') }}">{% trans %}Moderate news{% endtrans %}</a></li>
86 87 88
    <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
89
    <li><a href="{{ url('core:file_moderation') }}">{% trans %}Moderate files{% endtrans %}</a></li>
Sli's avatar
Sli committed
90
    <li><a href="{{ url('com:mailing_admin') }}">{% trans %}Mailing lists administration{% endtrans %}</a></li>
91 92
    <li><a href="{{ url('com:poster_list') }}">{% trans %}Posters{% endtrans %}</a></li>
    <li><a href="{{ url('com:screen_list') }}">{% trans %}Screens{% endtrans %}</a></li>
Skia's avatar
Skia committed
93
    {% endif %}
Skia's avatar
Skia committed
94
    {% if user.is_in_group(settings.SITH_GROUP_SAS_ADMIN_ID) %}
Skia's avatar
Skia committed
95 96
    <li><a href="{{ url('sas:moderation') }}">{% trans %}Moderate pictures{% endtrans %}</a></li>
    {% endif %}
Skia's avatar
Skia committed
97 98 99
</ul>


Skia's avatar
Skia committed
100 101
<hr>
<h4>{% trans %}Club tools{% endtrans %}</h4>
Skia's avatar
Skia committed
102
<ul>
Skia's avatar
Skia committed
103
    {% for m in user.memberships.filter(end_date=None).all() %}
Skia's avatar
Skia committed
104 105 106
    <li><a href="{{ url('club:tools', club_id=m.club.id) }}">{{ m.club }}</a></li>
    {% endfor %}
</ul>
Sli's avatar
Sli committed
107 108 109 110 111 112 113 114 115 116

<hr>
<h4>{% trans %}Pedagogy{% endtrans %}</h4>
<ul>
    {% if user.is_in_group(settings.SITH_GROUP_PEDAGOGY_ADMIN_ID) or user.is_root %}
    <li><a href="{{ url('pedagogy:uv_create') }}">{% trans %}Create UV{% endtrans %}</a></li>
    <li><a href="{{ url('pedagogy:moderation') }}">{% trans %}Moderate comments{% endtrans %}</a></li>
    {% endif %}
</ul>

Sli's avatar
Sli committed
117 118 119
<hr>
<h4>{% trans %}Elections{% endtrans %}</h4>
<ul>
Sli's avatar
Sli committed
120
    <li><a href="{{ url('election:list') }}">{% trans %}See available elections{% endtrans %}</a></li>
121
    <li><a href="{{ url('election:list_archived') }}">{% trans %}See archived elections{% endtrans %}</a></li>
122
    {%- if user.is_subscribed -%}
123 124
    <li><a href="{{ url('election:create') }}">{% trans %}Create a new election{% endtrans %}</a></li>
    {%- endif -%}
Sli's avatar
Sli committed
125
</ul>
Sli's avatar
Sli committed
126 127

<hr>
128 129
<h4>{% trans %}Other tools{% endtrans %}</h4>
<ul>
Skia's avatar
Skia committed
130
    <li><a href="{{ url('core:to_markdown') }}">{% trans %}Convert dokuwiki/BBcode syntax to Markdown{% endtrans %}</a></li>
131 132
    <li><a href="{{ url('trombi:user_tools') }}">{% trans %}Trombi tools{% endtrans %}</a></li>
</ul>
Skia's avatar
Skia committed
133 134 135 136 137

{% endblock %}