mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-20 05:03:23 +00:00
69 lines
2.6 KiB
Django/Jinja
69 lines
2.6 KiB
Django/Jinja
{% extends "core/user_base.jinja" %}
|
|
|
|
{% block title %}
|
|
{% trans user_name=user.get_display_name() %}{{ user_name }}'s tools{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block infos %}
|
|
<h3>{% trans %}User Tools{% endtrans %}</h3>
|
|
|
|
<hr>
|
|
<h4>{% trans %}Sith management{% endtrans %}</h4>
|
|
<ul>
|
|
{% if user.is_root %}
|
|
<li><a href="{{ url('core:group_list') }}">{% trans %}Groups{% endtrans %}</a></li>
|
|
{% endif %}
|
|
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user.is_root %}
|
|
<li><a href="{{ url('subscription:subscription') }}">{% trans %}Subscriptions{% endtrans %}</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
<hr>
|
|
<h4>{% trans %}Counters{% endtrans %}</h4>
|
|
<ul>
|
|
{% if user.is_in_group(settings.SITH_GROUPS['counter-admin']['name']) or user.is_root %}
|
|
<h5>{% trans %}General management{% endtrans %}</h5>
|
|
<li><a href="{{ url('counter:admin_list') }}">{% trans %}General counters management{% endtrans %}</a></li>
|
|
<li><a href="{{ url('counter:product_list') }}">{% trans %}Products management{% endtrans %}</a></li>
|
|
<li><a href="{{ url('counter:producttype_list') }}">{% trans %}Product types management{% endtrans %}</a></li>
|
|
{% endif %}
|
|
{% for b in settings.SITH_COUNTER_BARS %}
|
|
{% if user.is_in_group(b[1]+" admin") %}
|
|
<li><a href="{{ url('counter:details', counter_id=b[0]) }}">{{ b[1] }}</a> -
|
|
<a href="{{ url('counter:admin', counter_id=b[0]) }}">{% trans %}Edit{% endtrans %}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
<hr>
|
|
<h4>{% trans %}Accounting{% endtrans %}</h4>
|
|
<ul>
|
|
{% if user.is_in_group(settings.SITH_GROUPS['accounting-admin']['name']) or user.is_root %}
|
|
<li><a href="{{ url('accounting:bank_list') }}">{% trans %}General accounting{% endtrans %}</a></li>
|
|
{% endif %}
|
|
{% for m in user.membership.filter(end_date=None).filter(role__gte=7).all() -%}
|
|
{%- for b in m.club.bank_accounts.all() %}
|
|
<li><strong>{% trans %}Bank account: {% endtrans %}</strong>
|
|
<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 %}
|
|
</ul>
|
|
|
|
<hr>
|
|
<h4>{% trans %}Club tools{% endtrans %}</h4>
|
|
<ul>
|
|
{% for m in user.membership.filter(end_date=None).all() %}
|
|
<li><a href="{{ url('club:tools', club_id=m.club.id) }}">{{ m.club }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|