2016-02-02 15:34:36 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2016-07-19 17:03:16 +00:00
|
|
|
{% trans %}Club list{% endtrans %}
|
2016-02-02 15:34:36 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% macro display_club(club) -%}
|
|
|
|
<li><a href="{{ url('club:club_view', club_id=club.id) }}">{{ club.name }}</a>
|
|
|
|
{%- if club.children.all()|length != 0 %}
|
|
|
|
<ul>
|
|
|
|
{%- for c in club.children.all() %}
|
|
|
|
{{ display_club(c) }}
|
|
|
|
{%- endfor %}
|
|
|
|
</ul>
|
|
|
|
{%- endif -%}
|
|
|
|
</li>
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{% block content %}
|
2016-05-03 10:06:03 +00:00
|
|
|
{% if user.is_superuser or user.is_in_group(settings.SITH_GROUPS['root']['name']) %}
|
2016-07-19 17:03:16 +00:00
|
|
|
<p><a href="{{ url('club:club_new') }}">{% trans %}New club{% endtrans %}</a></p>
|
2016-05-03 10:06:03 +00:00
|
|
|
{% endif %}
|
2016-02-02 15:34:36 +00:00
|
|
|
{% if club_list %}
|
2016-07-19 17:03:16 +00:00
|
|
|
<h3>{% trans %}Club list{% endtrans %}</h3>
|
|
|
|
<ul>
|
|
|
|
{%- for c in club_list if c.parent is none %}
|
|
|
|
{{ display_club(c) }}
|
|
|
|
{%- endfor %}
|
|
|
|
</ul>
|
2016-02-02 15:34:36 +00:00
|
|
|
{% else %}
|
2016-07-19 17:03:16 +00:00
|
|
|
{% trans %}There is no club in this website.{% endtrans %}
|
2016-02-02 15:34:36 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|