2016-02-02 15:34:36 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2024-07-23 22:16:31 +00:00
|
|
|
{% trans %}Club list{% endtrans %}
|
2016-02-02 15:34:36 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% macro display_club(club) -%}
|
2017-09-27 12:42:04 +00:00
|
|
|
|
2024-07-23 22:16:31 +00:00
|
|
|
{% if club.is_active or user.is_root %}
|
|
|
|
|
|
|
|
<li><a href="{{ url('club:club_view', club_id=club.id) }}">{{ club.name }}</a>
|
|
|
|
|
|
|
|
{% if not club.is_active %}
|
|
|
|
({% trans %}inactive{% endtrans %})
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if club.president %} - <a href="{{ url('core:user_profile', user_id=club.president.user.id) }}">{{ club.president.user }}</a>{% endif %}
|
|
|
|
{% if club.short_description %}<p>{{ club.short_description|markdown }}</p>{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{%- if club.children.all()|length != 0 %}
|
|
|
|
<ul>
|
|
|
|
{%- for c in club.children.order_by('name') %}
|
|
|
|
{{ display_club(c) }}
|
|
|
|
{%- endfor %}
|
|
|
|
</ul>
|
|
|
|
{%- endif -%}
|
|
|
|
</li>
|
2016-02-02 15:34:36 +00:00
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{% block content %}
|
2024-07-23 22:16:31 +00:00
|
|
|
{% if user.is_root %}
|
2016-07-19 17:03:16 +00:00
|
|
|
<p><a href="{{ url('club:club_new') }}">{% trans %}New club{% endtrans %}</a></p>
|
2024-07-23 22:16:31 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if club_list %}
|
2016-07-19 17:03:16 +00:00
|
|
|
<h3>{% trans %}Club list{% endtrans %}</h3>
|
|
|
|
<ul>
|
2024-07-23 22:16:31 +00:00
|
|
|
{%- for c in club_list.all().order_by('name') if c.parent is none %}
|
2016-07-19 17:03:16 +00:00
|
|
|
{{ display_club(c) }}
|
2024-07-23 22:16:31 +00:00
|
|
|
{%- endfor %}
|
2016-07-19 17:03:16 +00:00
|
|
|
</ul>
|
2024-07-23 22:16:31 +00:00
|
|
|
{% else %}
|
2016-07-19 17:03:16 +00:00
|
|
|
{% trans %}There is no club in this website.{% endtrans %}
|
2024-07-23 22:16:31 +00:00
|
|
|
{% endif %}
|
2016-02-02 15:34:36 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|