Translate most of the Sith

This commit is contained in:
Skia
2016-07-19 19:03:16 +02:00
parent 1b4324f38f
commit 97ff4341a7
55 changed files with 1238 additions and 475 deletions

View File

@ -2,7 +2,7 @@
{% block content %}
<h3>403, Forbidden</h3>
<h3>{% trans %}403, Forbidden{% endtrans %}</h3>
{% endblock %}

View File

@ -2,7 +2,7 @@
{% block content %}
<h3>404, Not Found</h3>
<h3>{% trans %}404, Not Found{% endtrans %}</h3>
{% endblock %}

View File

@ -1,52 +1,53 @@
<!DOCTYPE html>
<html lang="fr">
<head>
{% block head %}
<title>{% block title %}Bienvenue sur le Sith de l'AE!{% endblock %}</title>
<link rel="stylesheet" href="{{ static('core/base.css') }}">
<link rel="stylesheet" href="{{ static('core/form.css') }}">
<link rel="stylesheet" href="{{ static('core/style.css') }}">
<script src="{{ static('core/script.js') }}"></script>
<script src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
{% endblock %}
</head>
<body>
<div id="logo"><a href="{{ url('core:index') }}"><img src="{{ static('core/img/logo.png') }}" alt="Logo" /></a></div>
{% block header %}
<header>
{% if not user.is_authenticated() %}
<a href="{{ url('core:login') }}">Login</a> |
<a href="{{ url('core:register') }}">Register</a>
{% else %}
<a href="{{ url('core:user_profile', user_id=user.id) }}">{{ user.get_display_name() }}</a> |
<a href="{{ url('core:user_tools') }}">Tools</a> |
<a href="{{ url('core:logout') }}">Logout</a>
{% endif %}
</header>
{% endblock %}
<nav>
<a href="{{ url('core:user_list') }}">Users</a>
<a href="{{ url('core:page', page_name="Index") }}">Pages</a>
<a href="{{ url('club:club_list') }}">Clubs</a>
</nav>
<div id="content">
{% if error %}
{{ error }}
{% endif %}
{% block content %}{% endblock %}
</div>
<footer>
{% block footer %}
Site réalisé par des gens biens
<head>
{% block head %}
<title>{% block title %}{% trans %}Welcome!{% endtrans %}{% endblock %}</title>
<link rel="stylesheet" href="{{ static('core/base.css') }}">
<link rel="stylesheet" href="{{ static('core/form.css') }}">
<link rel="stylesheet" href="{{ static('core/style.css') }}">
<script src="{{ static('core/script.js') }}"></script>
{% endblock %}
</footer>
<!--
{% block tests %}
{{ tests }}
{% endblock %}
-->
</body>
</head>
<body>
<div id="logo"><a href="{{ url('core:index') }}"><img src="{{ static('core/img/logo.png') }}"
alt="{% trans %}Logo{% endtrans %}" /></a></div>
{% block header %}
<header>
{% if not user.is_authenticated() %}
<a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a> |
<a href="{{ url('core:register') }}">{% trans %}Register{% endtrans %}</a>
{% else %}
<a href="{{ url('core:user_profile', user_id=user.id) }}">{{ user.get_display_name() }}</a> |
<a href="{{ url('core:user_tools') }}">{% trans %}Tools{% endtrans %}</a> |
<a href="{{ url('core:logout') }}">{% trans %}Logout{% endtrans %}</a>
{% endif %}
</header>
{% endblock %}
<nav>
<a href="{{ url('core:user_list') }}">{% trans %}Users{% endtrans %}</a>
<a href="{{ url('core:page', page_name="Index") }}">{% trans %}Pages{% endtrans %}</a>
<a href="{{ url('club:club_list') }}">{% trans %}Clubs{% endtrans %}</a>
</nav>
<div id="content">
{% if error %}
{{ error }}
{% endif %}
{% block content %}
{% endblock %}
</div>
<footer>
{% block footer %}
{% trans %}Site made by good people{% endtrans %}
{% endblock %}
</footer>
<!--
{% block tests %}
{{ tests }}
{% endblock %}
-->
</body>
</html>

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Create</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Save!" /></p>
</form>
<h2>{% trans %}Create{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Delete confirmation</h2>
<form action="" method="post">{% csrf_token %}
<p>Are you sure you want to delete "{{ object }}"?</p>
<input type="submit" value="Confirm" />
<input type="submit" name="cancel" value="Cancel" />
</form>
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
<form action="" method="post">{% csrf_token %}
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
</form>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Edit {{ object }}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Save!" /></p>
</form>
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endblock %}

View File

@ -1,13 +1,13 @@
{% extends "core/base.jinja" %}
{% block content %}
<p><a href="{{ url('core:group_list') }}">Back to list</a></p>
<h2>Edit group</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Update" /></p>
</form>
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
<h2>{% trans %}Edit group{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
</form>
{% endblock %}

View File

@ -1,16 +1,16 @@
{% extends "core/base.jinja" %}
{% block title %}
Group list
{% trans %}Group list{% endtrans %}
{% endblock %}
{% block content %}
<h3>Group list</h3>
<p><a href="{{ url('core:group_new') }}">New group</a></p>
<h3>{% trans %}Group list{% endtrans %}</h3>
<p><a href="{{ url('core:group_new') }}">{% trans %}New group{% endtrans %}</a></p>
<ul>
{% for g in realgroup_list %}
<li><a href="{{ url('core:group_edit', group_id=g.id) }}">{{ g.name }}</a> - {{ g.description }} -
<a href="{{ url('core:group_delete', group_id=g.id) }}">Delete</a></li>
<a href="{{ url('core:group_delete', group_id=g.id) }}">{% trans %}Delete{% endtrans %}</a></li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -3,5 +3,5 @@
{% block title %}{{ title }}{% endblock %}
{% block content %}
Hello, world. You're at the core index using Jinja2.
{% trans %}Hello, world. You're at the core index using Jinja2.{% endtrans %}
{% endblock %}

View File

@ -3,15 +3,15 @@
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
<p>{% trans %}Your username and password didn't match. Please try again.{% endtrans %}</p>
{% endif %}
{% if next %}
{% if user.is_authenticated() %}
<p>Your account doesn't have access to this page. To proceed,
please login with an account that has access.</p>
<p>{% trans %}Your account doesn't have access to this page. To proceed,
please login with an account that has access.{% endtrans %}</p>
{% else %}
<p>Please login to see this page.</p>
<p>{% trans %}Please login to see this page.{% endtrans %}</p>
{% endif %}
{% endif %}
@ -28,11 +28,11 @@
</tr>
</table>
<input type="submit" value="login" />
<input type="submit" value="{% trans %}login{% endtrans %}" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
{# Assumes you setup the password_reset view in your URLconf #}
<p><a href="{{ url('core:password_reset') }}">Lost password?</a></p>
<p><a href="{{ url('core:password_reset') }}">{% trans %}Lost password?{% endtrans %}</a></p>
{% endblock %}

View File

@ -1,23 +1,24 @@
{% extends "core/base.jinja" %}
{% block title %}
{% if page %}
{{ page.get_display_name() }}
{% elif page_list %}
Page list
{% elif new_page %}
Create page
{% else %}
Not found
{% endif %}
{% if page %}
{{ page.get_display_name() }}
{% elif page_list %}
{% trans %}Page list{% endtrans %}
{% elif new_page %}
{% trans %}Create page{% endtrans %}
{% else %}
{% trans %}Not found{% endtrans %}
{% endif %}
{% endblock %}
{% block content %}
{% if page %}
{% block page %}
{% endblock %}
{% else %}
<h2>Page does not exist</h2>
<p><a href="{{ url('core:page_new') }}?page={{ request.resolver_match.kwargs['page_name'] }}">Create it?</a></p>
{% endif %}
{% if page %}
{% block page %}
{% endblock %}
{% else %}
<h2>{% trans %}Page does not exist{% endtrans %}</h2>
<p><a href="{{ url('core:page_new') }}?page={{ request.resolver_match.kwargs['page_name'] }}">
{% trans %}Create it?{% endtrans %}</a></p>
{% endif %}
{% endblock %}

View File

@ -1,25 +1,25 @@
{% extends "core/page.jinja" %}
{% block page %}
<h3>Page</h3>
<p><a href="{{ url('core:page_list') }}">Back to list</a></p>
{% if can_edit(page, user) %}
<p><a href="{{ url('core:page_edit', page_name=page.get_full_name()) }}">Edit</a></p>
{% endif %}
{% if can_edit_prop(page, user) %}
<p><a href="{{ url('core:page_prop', page_name=page.get_full_name()) }}">Prop</a></p>
{% endif %}
<p>You're seeing the page <strong>{{ page.get_display_name() }}</strong> -
<a href="{{ url('core:page_hist', page_name=page.get_full_name()) }}">History</a></p>
<hr>
{% if rev %}
<h4>This may not be the last update, you are seeing revision {{ rev.id }}!</h4>
<h3>{{ rev.title }}</h3>
<div class="page_content">{{ rev.content|markdown }}</div>
{% else %}
<h3>{{ page.revisions.last().title }}</h3>
<div class="page_content">{{ page.revisions.last().content|markdown }}</div>
{% endif %}
<h3>{% trans %}Page{% endtrans %}</h3>
<p><a href="{{ url('core:page_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
{% if can_edit(page, user) %}
<p><a href="{{ url('core:page_edit', page_name=page.get_full_name()) }}">{% trans %}Edit{% endtrans %}</a></p>
{% endif %}
{% if can_edit_prop(page, user) %}
<p><a href="{{ url('core:page_prop', page_name=page.get_full_name()) }}">{% trans %}Prop{% endtrans %}</a></p>
{% endif %}
<p>{% trans page_name=page.get_display_name() %}You're seeing the page {{ page_name }}{% endtrans %} -
<a href="{{ url('core:page_hist', page_name=page.get_full_name()) }}">{% trans %}History{% endtrans %}</a></p>
<hr>
{% if rev %}
<h4>{% trans rev_id=rev.id %}This may not be the last update, you are seeing revision {{ rev_id }}!{% endtrans %}</h4>
<h3>{{ rev.title }}</h3>
<div class="page_content">{{ rev.content|markdown }}</div>
{% else %}
<h3>{{ page.revisions.last().title }}</h3>
<div class="page_content">{{ page.revisions.last().content|markdown }}</div>
{% endif %}
{% endblock %}

View File

@ -1,17 +1,17 @@
{% extends "core/page.jinja" %}
{% block page %}
<h3>Page history</h3>
<p><a href="{{ url('core:page', page.get_full_name()) }}">Back to page</a></p>
<p>You're seeing the history of page <strong>{{ page.get_display_name() }}</strong></p>
<ul>
<li><a href="{{ url('core:page', page_name=page.get_full_name()) }}">
<h3>{% trans %}Page history{% endtrans %}</h3>
<p><a href="{{ url('core:page', page.get_full_name()) }}">{% trans %}Back to page{% endtrans %}</a></p>
<p>{% trans page_name=page.get_display_name() %}You're seeing the history of page {{ page_name }}{% endtrans %}</p>
<ul>
<li><a href="{{ url('core:page', page_name=page.get_full_name()) }}">
last - {{ page.revisions.last().author }} - {{ page.revisions.last().date|date('Y-m-d H:i') }}</a></li>
{% for r in (page.revisions.all()|sort(attribute='date', reverse=True))[1:] %}
<li><a href="{{ url('core:page_rev', page_name=page.get_full_name(), rev=r['id']) }}">
{% for r in (page.revisions.all()|sort(attribute='date', reverse=True))[1:] %}
<li><a href="{{ url('core:page_rev', page_name=page.get_full_name(), rev=r['id']) }}">
{{ r['author'] }} - {{ r['date']|date('Y-m-d H:i') }}</a></li>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% endblock %}

View File

@ -1,20 +1,20 @@
{% extends "core/base.jinja" %}
{% block title %}
Page list
{% trans %}Page list{% endtrans %}
{% endblock %}
{% block content %}
{% if page_list %}
<h3>Page list</h3>
<ul>
{% for p in page_list %}
<li><a href="{{ url('core:page', page_name=p.get_full_name()) }}">{{ p.get_display_name() }}</a></li>
{% endfor %}
</ul>
{% else %}
There is no page in this website.
{% endif %}
{% if page_list %}
<h3>{% trans %}Page list{% endtrans %}</h3>
<ul>
{% for p in page_list %}
<li><a href="{{ url('core:page', page_name=p.get_full_name()) }}">{{ p.get_display_name() }}</a></li>
{% endfor %}
</ul>
{% else %}
{% trans %}There is no page in this website.{% endtrans %}
{% endif %}
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/page.jinja" %}
{% block content %}
<h2>Page properties</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Save!" /></p>
</form>
<h2>{% trans %}Page properties{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endblock %}

View File

@ -16,15 +16,15 @@ function make_preview() {
{% endblock %}
{% block page %}
<h2>Edit page</h2>
<form action="{{ url('core:page_edit', page_name=page.get_full_name()) }}" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="button" value="Preview" onclick="javascript:make_preview();" /></p>
<p><input type="submit" value="Save!" /></p>
</form>
<div id="preview">
</div>
<h2>{% trans %}Edit page{% endtrans %}</h2>
<form action="{{ url('core:page_edit', page_name=page.get_full_name()) }}" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="button" value="{% trans %}Preview{% endtrans %}" onclick="javascript:make_preview();" /></p>
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
<div id="preview">
</div>
{% endblock %}

View File

@ -5,6 +5,6 @@
<form method="post" action="{{ url('core:password_change') }}">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="Change!" />
<input type="submit" value="{% trans %}Change{% endtrans %}" />
</form>
{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends "core/base.jinja" %}
{% block content %}
<p>You successfully changed your password!</p>
<p>{% trans %}You successfully changed your password!{% endtrans %}</p>
{% endblock %}

View File

@ -4,6 +4,6 @@
<form method="post" action="">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="Reset!" />
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
</form>
{% endblock %}

View File

@ -1,8 +1,8 @@
{% extends "core/base.jinja" %}
{% block content %}
<p>You successfully reset your password!</p>
<a href="{{ url('core:login') }}">Login</a>
<p>{% trans %}You successfully reset your password!{% endtrans %}</p>
<a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
{% endblock %}

View File

@ -4,7 +4,7 @@
<form method="post" action="">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="Reset" />
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
</form>
{% endblock %}

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Password reset sent</h2>
<h2>{% trans %}Password reset sent{% endtrans %}</h2>
<p>
We've emailed you instructions for setting your password, if an account exists with the email you entered. You should
receive them shortly.
{% trans %}We've emailed you instructions for setting your password, if an account exists with the email you entered. You should
receive them shortly.{% endtrans %}
</p>
<p>
If you don't receive an email, please make sure you've entered the address you registered with, and check your spam
folder.
{% trans %}If you don't receive an email, please make sure you've entered the address you registered with, and check your spam
folder.{% endtrans %}
</p>
{% endblock %}

View File

@ -1,20 +1,20 @@
{% extends "core/base.jinja" %}
{% block title %}{{ title }}{% endblock %}
{% block title %}{% trans %}Register a user{% endtrans %}{% endblock %}
{% block content %}
<h1>{{ title }}</h1>
<h1>{% trans %}Register a user{% endtrans %}</h1>
{% if user_registered %}
Welcome {{ user_registered.get_display_name() }}!
You successfully registred and you will soon receive a confirmation mail.
{% trans user_name=user_registered.get_display_name() %}Welcome {{ user_name }}!{% endtrans %}
{% trans %}You successfully registred and you will soon receive a confirmation mail.{% endtrans %}
Your username is {{ user_registered.username }}.
{% trans username=user_registered.username %}Your username is {{ username }}.{% endtrans %}
{% endif %}
<form action="{{ url('core:register') }}" method="post">
{% csrf_token %}
{{ form }}
<p><input type="submit" value="Register!" /></p>
<p><input type="submit" value="{% trans %}Register{% endtrans %}" /></p>
</form>
{% endblock %}

View File

@ -3,24 +3,24 @@
{% block content %}
<div>{{ profile.get_display_name() }}</div>
<div class="tool-bar">
<a href="{{ url('core:user_profile', user_id=profile.id) }}">Infos</a>
{% if can_edit(profile, request.user) or user.id == profile.id %}
<a href="{{ url('core:user_edit', user_id=profile.id) }}">Edit</a>
{% endif %}
{% if can_edit_prop(profile, request.user) %}
<a href="{{ url('core:user_groups', user_id=profile.id) }}">Groups</a>
{% endif %}
{% if (profile == request.user
or request.user.is_in_group(settings.SITH_GROUPS['accounting-admin']['name'])
or request.user.is_in_group(settings.SITH_GROUPS['root']['name'])) %}
<a href="{{ url('core:user_account', user_id=profile.id) }}">Account</a>
{% endif %}
<hr>
<a href="{{ url('core:user_profile', user_id=profile.id) }}">{% trans %}Infos{% endtrans %}</a>
{% if can_edit(profile, request.user) or user.id == profile.id %}
<a href="{{ url('core:user_edit', user_id=profile.id) }}">{% trans %}Edit{% endtrans %}</a>
{% endif %}
{% if can_edit_prop(profile, request.user) %}
<a href="{{ url('core:user_groups', user_id=profile.id) }}">{% trans %}Groups{% endtrans %}</a>
{% endif %}
{% if (profile == request.user
or request.user.is_in_group(settings.SITH_GROUPS['accounting-admin']['name'])
or request.user.is_in_group(settings.SITH_GROUPS['root']['name'])) %}
<a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Account{% endtrans %}</a>
{% endif %}
<hr>
</div>
<div>
{% block infos %}
{% endblock %}
{% block infos %}
{% endblock %}
</div>
{% endblock %}

View File

@ -1,25 +1,27 @@
{% extends "core/user_base.jinja" %}
{% block title %}
{{ profile.get_display_name() }}'s profile
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %}
{% endblock %}
{% block infos %}
<h3>User Profile</h3>
<h3>{% trans %}User Profile{% endtrans %}</h3>
<div class="user_profile">
<h4>{{ profile.get_full_name() }}</h4>
<p>{{ profile.nick_name }}</p>
<p>Born: {{ profile.date_of_birth|date("d/m/Y") }}</p>
<h4>{{ profile.get_full_name() }}</h4>
<p>{{ profile.nick_name }}</p>
<p>{% trans %}Born: {% endtrans %}{{ profile.date_of_birth|date("d/m/Y") }}</p>
</div>
{% if user.membership.filter(end_date=None).exists() %}
{# if the user is member of a club, he can view the subscription state #}
<p>
{% if get_subscriber(profile).is_subscribed() %}
User is subscriber until {{ get_subscriber(profile).subscriptions.last().subscription_end }}
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}
User is subscriber until {{ subscription_end }}{% endtrans %}
{% else %}
User is not subscribed. <a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">New subscription</a>
{% trans %}User is not subscribed. {% endtrans %}
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a>
{% endif %}
</p>
{% endif %}

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Edit user profile</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Update" /></p>
</form>
{% if form.instance == user %}
<p><a href="{{ url('core:password_change') }}">Change my password</a></p>
{% endif %}
<h2>{% trans %}Edit user profile{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
</form>
{% if form.instance == user %}
<p><a href="{{ url('core:password_change') }}">{% trans %}Change my password{% endtrans %}</a></p>
{% endif %}
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Edit user groups for {{ profile.get_full_name() }}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Update" /></p>
</form>
<h2>{% trans user_name=profile.get_full_name() %}Edit user groups for {{ user_name }}{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
</form>
{% endblock %}

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{% block title %}
User list
{% trans %}User list{% endtrans %}
{% endblock %}
{% block content %}
<h3>User list</h3>
<h3>{% trans %}User list{% endtrans %}</h3>
<ul>
{% for u in user_list %}
<li><a href="{{ url('core:user_profile', user_id=u.id) }}">{{ u.get_display_name() }}</a></li>

View File

@ -1,39 +1,39 @@
{% extends "core/base.jinja" %}
{% block title %}
{{ user.get_display_name() }}'s tools
{% trans user_name=user.get_display_name() %}{{ user_name }}'s tools{% endtrans %}
{% endblock %}
{% block content %}
<h3>User Tools</h3>
<h3>{% trans %}User Tools{% endtrans %}</h3>
<h4>Sith management</h4>
<h4>{% trans %}Sith management{% endtrans %}</h4>
<ul>
{% if user.is_in_group(settings.SITH_GROUPS['root']['name']) %}
<li><a href="{{ url('core:group_list') }}">Groups</a></li>
{% endif %}
{% if user.is_in_group(settings.SITH_GROUPS['counter-admin']['name']) %}
<li><a href="{{ url('counter:admin_list') }}">Counters management</a></li>
{% endif %}
{% if user.is_in_group(settings.SITH_GROUPS['accounting-admin']['name']) %}
<li><a href="{{ url('accounting:bank_list') }}">Accounting</a></li>
{% endif %}
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user.is_in_group(settings.SITH_GROUPS['root']['name']) %}
<li><a href="{{ url('subscription:subscription') }}">Subscriptions</a></li>
{% endif %}
</ul>
<h4>Counters</h4>
<ul>
{% 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]) }}">Edit</a></li>
{% if user.is_in_group(settings.SITH_GROUPS['root']['name']) %}
<li><a href="{{ url('core:group_list') }}">{% trans %}Groups{% endtrans %}</a></li>
{% endif %}
{% if user.is_in_group(settings.SITH_GROUPS['counter-admin']['name']) %}
<li><a href="{{ url('counter:admin_list') }}">{% trans %}Counters management{% endtrans %}</a></li>
{% endif %}
{% if user.is_in_group(settings.SITH_GROUPS['accounting-admin']['name']) %}
<li><a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a></li>
{% endif %}
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user.is_in_group(settings.SITH_GROUPS['root']['name']) %}
<li><a href="{{ url('subscription:subscription') }}">{% trans %}Subscriptions{% endtrans %}</a></li>
{% endif %}
{% endfor %}
</ul>
<h4>Clubs</h4>
<h4>{% trans %}Counters{% endtrans %}</h4>
<ul>
{% 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>
<h4>{% trans %}Clubs{% 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>

View File

@ -74,7 +74,7 @@ def password_reset_complete(request):
def register(request):
context = {'title': 'Register a user'}
context = {}
if request.method == 'POST':
form = RegisteringForm(request.POST)
if form.is_valid():