mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-03 17:08:47 +01:00 
			
		
		
		
	Card for wei templates
This commit is contained in:
		@@ -8,11 +8,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
{% if started_activities %}
 | 
					{% if started_activities %}
 | 
				
			||||||
<div class="card bg-info mb-3">
 | 
					<div class="card bg-secondary text-white mb-3">
 | 
				
			||||||
    <h3 class="card-header text-center">
 | 
					    <h3 class="card-header text-center">
 | 
				
			||||||
        {% trans "Current activity" %}
 | 
					        {% trans "Current activity" %}
 | 
				
			||||||
    </h3>
 | 
					    </h3>
 | 
				
			||||||
    <div class="card-body">
 | 
					    <div class="card-body text-dark">
 | 
				
			||||||
        {% for activity in started_activities %}
 | 
					        {% for activity in started_activities %}
 | 
				
			||||||
        {% include "activity/includes/activity_info.html" %}
 | 
					        {% include "activity/includes/activity_info.html" %}
 | 
				
			||||||
        {% endfor %}
 | 
					        {% endfor %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,7 +37,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			|||||||
                {% elif club %}
 | 
					                {% elif club %}
 | 
				
			||||||
                {% include "member/includes/club_info.html" %}
 | 
					                {% include "member/includes/club_info.html" %}
 | 
				
			||||||
                {% endif %}
 | 
					                {% endif %}
 | 
				
			||||||
                {% endblock %}
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="card-footer">
 | 
					            <div class="card-footer">
 | 
				
			||||||
                {% if user_object %}
 | 
					                {% if user_object %}
 | 
				
			||||||
@@ -66,6 +65,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			|||||||
                {% endif %}
 | 
					                {% endif %}
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					        {% endblock %}
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="col-xl-8">
 | 
					    <div class="col-xl-8">
 | 
				
			||||||
        {% block profile_content %}{% endblock %}
 | 
					        {% block profile_content %}{% endblock %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1,110 @@
 | 
				
			|||||||
{% extends "member/base.html" %}
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					{% comment %}
 | 
				
			||||||
 | 
					SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			||||||
 | 
					{% endcomment %}
 | 
				
			||||||
 | 
					{% load i18n pretty_money perms %}
 | 
				
			||||||
 | 
					{% block contenttitle %}{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{# Use a fluid-width container #}
 | 
				
			||||||
 | 
					{% block containertype %}container-fluid{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block content %}
 | 
				
			||||||
 | 
					<div class="row mt-4">
 | 
				
			||||||
 | 
					    <div class="col-xl-4">
 | 
				
			||||||
 | 
					        {% block profile_info %}
 | 
				
			||||||
 | 
					        {% if club %}
 | 
				
			||||||
 | 
					        <div class="card bg-light">
 | 
				
			||||||
 | 
					            <h4 class="card-header text-center">
 | 
				
			||||||
 | 
					                {{ club.name }}
 | 
				
			||||||
 | 
					            </h4>
 | 
				
			||||||
 | 
					            <div class="card-top text-center">
 | 
				
			||||||
 | 
					                <a href="{% url 'member:club_update_pic' club.pk  %}">
 | 
				
			||||||
 | 
					                    <img src="{{ club.note.display_image.url }}" class="img-thumbnail mt-2">
 | 
				
			||||||
 | 
					                </a>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div class="card-body" id="profile_infos">
 | 
				
			||||||
 | 
					                <dl class="row">
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'name'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.name }}</dd>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    {% if club.require_memberships %}
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'date start'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.date_start }}</dd>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'date end'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.date_end }}</dd>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'year'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.year }}</dd>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    {% if club.membership_fee_paid == club.membership_fee_unpaid %}
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'membership fee'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.membership_fee_paid|pretty_money }}</dd>
 | 
				
			||||||
 | 
					                    {% else %}
 | 
				
			||||||
 | 
					                    {% with bde_kfet_fee=club.parent_club.membership_fee_paid|add:club.parent_club.parent_club.membership_fee_paid %}
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'WEI fee (paid students)'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.membership_fee_paid|add:bde_kfet_fee|pretty_money }}
 | 
				
			||||||
 | 
					                        <i class="fas fa-question-circle"
 | 
				
			||||||
 | 
					                            title="{% trans "The BDE membership is included in the WEI registration." %}"></i></dd>
 | 
				
			||||||
 | 
					                    {% endwith %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    {% with bde_kfet_fee=club.parent_club.membership_fee_unpaid|add:club.parent_club.parent_club.membership_fee_unpaid %}
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'WEI fee (unpaid students)'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.membership_fee_unpaid|add:bde_kfet_fee|pretty_money }}
 | 
				
			||||||
 | 
					                        <i class="fas fa-question-circle"
 | 
				
			||||||
 | 
					                            title="{% trans "The BDE membership is included in the WEI registration." %}"></i></dd>
 | 
				
			||||||
 | 
					                    {% endwith %}
 | 
				
			||||||
 | 
					                    {% endif %}
 | 
				
			||||||
 | 
					                    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    {% if "note.view_note"|has_perm:club.note %}
 | 
				
			||||||
 | 
					                    <dt class="col-xl-6">{% trans 'balance'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-6">{{ club.note.balance | pretty_money }}</dd>
 | 
				
			||||||
 | 
					                    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    {% if "note.change_alias"|has_perm:club.note.alias_set.first %}
 | 
				
			||||||
 | 
					                    <dt class="col-xl-4"><a
 | 
				
			||||||
 | 
					                            href="{% url 'member:club_alias' club.pk %}">{% trans 'aliases'|capfirst %}</a></dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-8 text-truncate">{{ club.note.alias_set.all|join:", " }}</dd>
 | 
				
			||||||
 | 
					                    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <dt class="col-xl-4">{% trans 'email'|capfirst %}</dt>
 | 
				
			||||||
 | 
					                    <dd class="col-xl-8"><a href="mailto:{{ club.email }}">{{ club.email }}</a></dd>
 | 
				
			||||||
 | 
					                </dl>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div class="card-footer text-center">
 | 
				
			||||||
 | 
					                {% if True %}
 | 
				
			||||||
 | 
					                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_list' %}"> {% trans "WEI list" %}</a>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					                {% if club.is_current_wei %}
 | 
				
			||||||
 | 
					                {% if can_add_first_year_member %}
 | 
				
			||||||
 | 
					                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_register_1A' wei_pk=club.pk %}"
 | 
				
			||||||
 | 
					                    data-turbolinks="false"> {% trans "Register 1A" %}</a>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					                {% if can_add_any_member %}
 | 
				
			||||||
 | 
					                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_register_2A' wei_pk=club.pk %}"
 | 
				
			||||||
 | 
					                    data-turbolinks="false"> {% trans "Register 2A+" %}</a>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					                {% if "wei.change_"|has_perm:club %}
 | 
				
			||||||
 | 
					                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_update' pk=club.pk %}"
 | 
				
			||||||
 | 
					                    data-turbolinks="false"> {% trans "Edit" %}</a>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					                {% if can_add_bus %}
 | 
				
			||||||
 | 
					                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_bus' pk=club.pk %}"
 | 
				
			||||||
 | 
					                    data-turbolinks="false"> {% trans "Add bus" %}</a>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					                {% url 'wei:wei_detail' club.pk as club_detail_url %}
 | 
				
			||||||
 | 
					                {%if request.path_info != club_detail_url %}
 | 
				
			||||||
 | 
					                <a class="btn btn-primary btn-sm my-1" href="{{ club_detail_url }}">{% trans 'View WEI' %}</a>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        {% endif %}
 | 
				
			||||||
 | 
					        {% endblock %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="col-xl-8">
 | 
				
			||||||
 | 
					        {% block profile_content %}{% endblock %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
@@ -1,9 +1,54 @@
 | 
				
			|||||||
{% extends "wei/base.html" %}
 | 
					{% extends "wei/base.html" %}
 | 
				
			||||||
 | 
					{% load render_table from django_tables2 %}
 | 
				
			||||||
{% block profile_info %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
{% include "wei/bus_tables.html" %}
 | 
					<div class="card">
 | 
				
			||||||
 | 
					    <div class="card-header text-center">
 | 
				
			||||||
 | 
					        <h4>{{ object.name }}</h4>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="card-body">
 | 
				
			||||||
 | 
					        {{ object.description }}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="card-footer text-center">
 | 
				
			||||||
 | 
					        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:update_bus' pk=object.pk %}"
 | 
				
			||||||
 | 
					            data-turbolinks="false">{% trans "Edit" %}</a>
 | 
				
			||||||
 | 
					        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_team' pk=object.pk %}"
 | 
				
			||||||
 | 
					            data-turbolinks="false">{% trans "Add team" %}</a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<hr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if teams.data %}
 | 
				
			||||||
 | 
					<div class="card">
 | 
				
			||||||
 | 
					    <div class="card-header position-relative" id="clubListHeading">
 | 
				
			||||||
 | 
					        <a class="font-weight-bold">
 | 
				
			||||||
 | 
					            <i class="fa fa-bus"></i> {% trans "Teams" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    {% render_table teams %}
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<hr>
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if memberships.data %}
 | 
				
			||||||
 | 
					<div class="card">
 | 
				
			||||||
 | 
					    <div class="card-header position-relative" id="clubListHeading">
 | 
				
			||||||
 | 
					        <a class="font-weight-bold">
 | 
				
			||||||
 | 
					            <i class="fa fa-bus"></i> {% trans "Members" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    {% render_table memberships %}
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<hr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<a href="{% url 'wei:wei_memberships_bus_pdf' wei_pk=club.pk bus_pk=object.pk %}" data-turbolinks="false">
 | 
				
			||||||
 | 
					    <button class="btn btn-block btn-danger"><i class="fa fa-file-pdf-o"></i> {% trans "View as PDF" %}</button>
 | 
				
			||||||
 | 
					</a>
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@@ -1,15 +1,21 @@
 | 
				
			|||||||
{% extends "wei/base.html" %}
 | 
					{% extends "wei/base.html" %}
 | 
				
			||||||
 | 
					{% comment %}
 | 
				
			||||||
 | 
					SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			||||||
 | 
					{% endcomment %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
    {% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
<form method="post">
 | 
					<div class="card bg-light mb-3">
 | 
				
			||||||
{% csrf_token %}
 | 
					    <h3 class="card-header text-center">
 | 
				
			||||||
{{ form|crispy }}
 | 
					        {{ title }}
 | 
				
			||||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
					    </h3>
 | 
				
			||||||
</form>
 | 
					    <div class="card-body">
 | 
				
			||||||
 | 
					        <form method="post">
 | 
				
			||||||
 | 
					            {% csrf_token %}
 | 
				
			||||||
 | 
					            {{ form|crispy }}
 | 
				
			||||||
 | 
					            <button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
				
			||||||
 | 
					        </form>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@@ -1,50 +0,0 @@
 | 
				
			|||||||
{% load render_table from django_tables2 %}
 | 
					 | 
				
			||||||
{% load i18n %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<div class="card">
 | 
					 | 
				
			||||||
    <div class="card-header text-center">
 | 
					 | 
				
			||||||
        <h4>{{ object.name }}</h4>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="card-body">
 | 
					 | 
				
			||||||
        {{ object.description }}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="card-footer text-center">
 | 
					 | 
				
			||||||
        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:update_bus' pk=object.pk %}" data-turbolinks="false">{% trans "Edit" %}</a>
 | 
					 | 
				
			||||||
        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_team' pk=object.pk %}" data-turbolinks="false">{% trans "Add team" %}</a>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<hr>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% if teams.data %}
 | 
					 | 
				
			||||||
    <div class="card">
 | 
					 | 
				
			||||||
        <div class="card-header position-relative" id="clubListHeading">
 | 
					 | 
				
			||||||
            <a class="font-weight-bold">
 | 
					 | 
				
			||||||
                <i class="fa fa-bus"></i> {% trans "Teams" %}
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        {% render_table teams %}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <hr>
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% if memberships.data %}
 | 
					 | 
				
			||||||
    <div class="card">
 | 
					 | 
				
			||||||
        <div class="card-header position-relative" id="clubListHeading">
 | 
					 | 
				
			||||||
            <a class="font-weight-bold">
 | 
					 | 
				
			||||||
                <i class="fa fa-bus"></i> {% trans "Members" %}
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        {% render_table memberships %}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <hr>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <a href="{% url 'wei:wei_memberships_bus_pdf' wei_pk=club.pk bus_pk=object.pk %}" data-turbolinks="false">
 | 
					 | 
				
			||||||
        <button class="btn btn-block btn-danger"><i class="fa fa-file-pdf-o"></i> {% trans "View as PDF" %}</button>
 | 
					 | 
				
			||||||
    </a>
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
@@ -1,9 +1,60 @@
 | 
				
			|||||||
{% extends "wei/base.html" %}
 | 
					{% extends "wei/base.html" %}
 | 
				
			||||||
 | 
					{% load render_table from django_tables2 %}
 | 
				
			||||||
{% block profile_info %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
{% include "wei/busteam_tables.html" %}
 | 
					<div class="card">
 | 
				
			||||||
 | 
					    <div class="card-header text-center">
 | 
				
			||||||
 | 
					        <h4>{{ bus.name }}</h4>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="card-body">
 | 
				
			||||||
 | 
					        {{ bus.description }}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="card-footer text-center">
 | 
				
			||||||
 | 
					        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:update_bus' pk=bus.pk %}"
 | 
				
			||||||
 | 
					            data-turbolinks="false">{% trans "Edit" %}</a>
 | 
				
			||||||
 | 
					        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_team' pk=bus.pk %}"
 | 
				
			||||||
 | 
					            data-turbolinks="false">{% trans "Add team" %}</a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<hr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="card">
 | 
				
			||||||
 | 
					    <div class="card-header text-center"
 | 
				
			||||||
 | 
					        style="background-color: #{{ object.color|stringformat:"06X" }}; color: #{{ -16777215|add:object.color|stringformat:"06X"|slice:"1:" }};">
 | 
				
			||||||
 | 
					        <h4>{{ object.name }}</h4>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="card-body">
 | 
				
			||||||
 | 
					        {{ object.description }}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="card-footer text-center">
 | 
				
			||||||
 | 
					        <a class="btn btn-primary btn-sm my-1"
 | 
				
			||||||
 | 
					            href="{% url 'wei:update_bus_team' pk=object.pk %}">{% trans "Edit" %}</a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<hr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if memberships.data or True %}
 | 
				
			||||||
 | 
					<div class="card">
 | 
				
			||||||
 | 
					    <div class="card-header position-relative" id="clubListHeading">
 | 
				
			||||||
 | 
					        <a class="font-weight-bold">
 | 
				
			||||||
 | 
					            <i class="fa fa-bus"></i> {% trans "Teams" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    {% render_table memberships %}
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<hr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<a href="{% url 'wei:wei_memberships_team_pdf' wei_pk=club.pk bus_pk=object.bus.pk team_pk=object.pk %}"
 | 
				
			||||||
 | 
					    data-turbolinks="false">
 | 
				
			||||||
 | 
					    <button class="btn btn-block btn-danger"><i class="fa fa-file-pdf-o"></i> {% trans "View as PDF" %}</button>
 | 
				
			||||||
 | 
					</a>
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@@ -1,15 +1,21 @@
 | 
				
			|||||||
{% extends "wei/base.html" %}
 | 
					{% extends "wei/base.html" %}
 | 
				
			||||||
 | 
					{% comment %}
 | 
				
			||||||
 | 
					SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			||||||
 | 
					{% endcomment %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
    {% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
<form method="post">
 | 
					<div class="card bg-light mb-3">
 | 
				
			||||||
{% csrf_token %}
 | 
					    <h3 class="card-header text-center">
 | 
				
			||||||
{{ form|crispy }}
 | 
					        {{ title }}
 | 
				
			||||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
					    </h3>
 | 
				
			||||||
</form>
 | 
					    <div class="card-body">
 | 
				
			||||||
 | 
					        <form method="post">
 | 
				
			||||||
 | 
					            {% csrf_token %}
 | 
				
			||||||
 | 
					            {{ form|crispy }}
 | 
				
			||||||
 | 
					            <button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
				
			||||||
 | 
					        </form>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@@ -1,54 +0,0 @@
 | 
				
			|||||||
{% load render_table from django_tables2 %}
 | 
					 | 
				
			||||||
{% load i18n %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<div class="card">
 | 
					 | 
				
			||||||
    <div class="card-header text-center">
 | 
					 | 
				
			||||||
        <h4>{{ bus.name }}</h4>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="card-body">
 | 
					 | 
				
			||||||
        {{ bus.description }}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="card-footer text-center">
 | 
					 | 
				
			||||||
        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:update_bus' pk=bus.pk %}" data-turbolinks="false">{% trans "Edit" %}</a>
 | 
					 | 
				
			||||||
        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_team' pk=bus.pk %}" data-turbolinks="false">{% trans "Add team" %}</a>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<hr>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<div class="card">
 | 
					 | 
				
			||||||
    <div class="card-header text-center" style="background-color: #{{ object.color|stringformat:"06X" }}; color: #{{ -16777215|add:object.color|stringformat:"06X"|slice:"1:" }};">
 | 
					 | 
				
			||||||
        <h4>{{ object.name }}</h4>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="card-body">
 | 
					 | 
				
			||||||
        {{ object.description }}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="card-footer text-center">
 | 
					 | 
				
			||||||
        <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:update_bus_team' pk=object.pk %}">{% trans "Edit" %}</a>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<hr>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% if memberships.data or True %}
 | 
					 | 
				
			||||||
    <div class="card">
 | 
					 | 
				
			||||||
        <div class="card-header position-relative" id="clubListHeading">
 | 
					 | 
				
			||||||
            <a class="font-weight-bold">
 | 
					 | 
				
			||||||
                <i class="fa fa-bus"></i> {% trans "Teams" %}
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        {% render_table memberships %}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <hr>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <a href="{% url 'wei:wei_memberships_team_pdf' wei_pk=club.pk bus_pk=object.bus.pk team_pk=object.pk %}" data-turbolinks="false">
 | 
					 | 
				
			||||||
        <button class="btn btn-block btn-danger"><i class="fa fa-file-pdf-o"></i> {% trans "View as PDF" %}</button>
 | 
					 | 
				
			||||||
    </a>
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
@@ -2,10 +2,6 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <div class="card">
 | 
					    <div class="card">
 | 
				
			||||||
        <div class="card-header text-center">
 | 
					        <div class="card-header text-center">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,10 +2,6 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <div class="card">
 | 
					    <div class="card">
 | 
				
			||||||
        <div class="card-header text-center">
 | 
					        <div class="card-header text-center">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,10 +2,6 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <div class="card">
 | 
					    <div class="card">
 | 
				
			||||||
        <div class="card-header text-center">
 | 
					        <div class="card-header text-center">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,30 +1,118 @@
 | 
				
			|||||||
{% extends "wei/base.html" %}
 | 
					{% extends "wei/base.html" %}
 | 
				
			||||||
 | 
					{% comment %}
 | 
				
			||||||
{% block profile_info %}
 | 
					SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					{% endcomment %}
 | 
				
			||||||
{% endblock %}
 | 
					{% load render_table from django_tables2 %}
 | 
				
			||||||
 | 
					{% load i18n perms %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
{% include "wei/weiclub_tables.html" %}
 | 
					<div class="card bg-white mb-3">
 | 
				
			||||||
 | 
					    <div class="card-header text-center">
 | 
				
			||||||
 | 
					        <h4>Week-End d'Intégration</h4>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="card-body">
 | 
				
			||||||
 | 
					        <p class="lead font-italic">
 | 
				
			||||||
 | 
					            Le WEI (Week-End d’Intégration), ou 3 jours d’immersion dans les profondeurs du
 | 
				
			||||||
 | 
					            monde post-préparatoire.
 | 
				
			||||||
 | 
					        </p>
 | 
				
			||||||
 | 
					        <p>
 | 
				
			||||||
 | 
					            Que serait une école sans son week-end d’intégration ? Quelques semaines après la
 | 
				
			||||||
 | 
					            rentrée, on embarque tous et toutes à bord de bus à thèmes pour quelques jours
 | 
				
			||||||
 | 
					            inoubliables dans une destination inconnue. L’objectif de ce week-end : permettre aux
 | 
				
			||||||
 | 
					            nouvel·les arrivant·es de se lâcher après 2 ans de dur labeur (voire 3 pour les plus
 | 
				
			||||||
 | 
					            chanceux), de découvrir l’ambiance familiale de l’ENS ainsi que de nouer des liens avec
 | 
				
			||||||
 | 
					            ceux·elles qu’ils côtoieront par la suite. Dose de chants et de fun garantie !
 | 
				
			||||||
 | 
					        </p>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    {% if club.is_current_wei %}
 | 
				
			||||||
 | 
					    <div class="card-footer text-center">
 | 
				
			||||||
 | 
					        {% if not my_registration %}
 | 
				
			||||||
 | 
					        {% if not not_first_year %}
 | 
				
			||||||
 | 
					        <a class="btn btn-success" href="{% url "wei:wei_register_1A_myself" wei_pk=club.pk %}" data-turbolinks="false">
 | 
				
			||||||
 | 
					            {% trans "Register to the WEI! – 1A" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					        {% endif %}
 | 
				
			||||||
 | 
					        <a class="btn btn-success" href="{% url "wei:wei_register_2A_myself" wei_pk=club.pk %}" data-turbolinks="false">
 | 
				
			||||||
 | 
					            {% trans "Register to the WEI! – 2A+" %}</a>
 | 
				
			||||||
 | 
					        {% else %}
 | 
				
			||||||
 | 
					        <a class="btn btn-warning" href="{% url "wei:wei_update_registration" pk=my_registration.pk %}"
 | 
				
			||||||
 | 
					            data-turbolinks="false">
 | 
				
			||||||
 | 
					            {% trans "Update my registration" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					        {% endif %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if buses.data %}
 | 
				
			||||||
 | 
					<div class="card bg-white mb-3">
 | 
				
			||||||
 | 
					    <div class="card-header position-relative" id="clubListHeading">
 | 
				
			||||||
 | 
					        <span class="font-weight-bold">
 | 
				
			||||||
 | 
					            <i class="fa fa-bus"></i> {% trans "Buses" %}
 | 
				
			||||||
 | 
					        </span>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    {% render_table buses %}
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if member_list.data %}
 | 
				
			||||||
 | 
					<div class="card bg-white mb-3">
 | 
				
			||||||
 | 
					    <div class="card-header position-relative" id="clubListHeading">
 | 
				
			||||||
 | 
					        <a class="stretched-link font-weight-bold text-decoration-none"
 | 
				
			||||||
 | 
					            href="{% url "wei:wei_memberships" pk=club.pk %}">
 | 
				
			||||||
 | 
					            <i class="fa fa-users"></i> {% trans "Members of the WEI" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    {% render_table member_list %}
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if history_list.data %}
 | 
				
			||||||
 | 
					<div class="card bg-white mb-3">
 | 
				
			||||||
 | 
					    <div class="card-header position-relative" id="historyListHeading">
 | 
				
			||||||
 | 
					        <a class="stretched-link font-weight-bold text-decoration-none" {% if "note.view_note"|has_perm:club.note %}
 | 
				
			||||||
 | 
					            href="{% url 'note:transactions' pk=club.note.pk %}" {% endif %}>
 | 
				
			||||||
 | 
					            <i class="fa fa-euro"></i> {% trans "Transaction history" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div id="history_list">
 | 
				
			||||||
 | 
					        {% render_table history_list %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if pre_registrations.data %}
 | 
				
			||||||
 | 
					<div class="card bg-white mb-3">
 | 
				
			||||||
 | 
					    <div class="card-header position-relative" id="historyListHeading">
 | 
				
			||||||
 | 
					        <a class="stretched-link font-weight-bold text-decoration-none"
 | 
				
			||||||
 | 
					            href="{% url 'wei:wei_registrations' pk=club.pk %}">
 | 
				
			||||||
 | 
					            <i class="fa fa-user-plus"></i> {% trans "Unvalidated registrations" %}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div id="history_list">
 | 
				
			||||||
 | 
					        {% render_table pre_registrations %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block extrajavascript %}
 | 
					{% block extrajavascript %}
 | 
				
			||||||
    <script>
 | 
					<script>
 | 
				
			||||||
        function refreshHistory() {
 | 
					    function refreshHistory() {
 | 
				
			||||||
            $("#history_list").load("{% url 'wei:wei_detail' pk=object.pk %} #history_list");
 | 
					        $("#history_list").load("{% url 'wei:wei_detail' pk=object.pk %} #history_list");
 | 
				
			||||||
            $("#profile_infos").load("{% url 'wei:wei_detail' pk=object.pk %} #profile_infos");
 | 
					        $("#profile_infos").load("{% url 'wei:wei_detail' pk=object.pk %} #profile_infos");
 | 
				
			||||||
        }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $(document).ready(function() {
 | 
					    $(document).ready(function () {
 | 
				
			||||||
            $(".no-perm").parent().addClass("d-none");
 | 
					        $(".no-perm").parent().addClass("d-none");
 | 
				
			||||||
            if ($("a[data-type='validate-membership']:not(.d-none)").length === 0) {
 | 
					        if ($("a[data-type='validate-membership']:not(.d-none)").length === 0) {
 | 
				
			||||||
                $("a[data-type='validate-membership']").parent().addClass("d-none");
 | 
					            $("a[data-type='validate-membership']").parent().addClass("d-none");
 | 
				
			||||||
                $("#validate-membership-header").addClass("d-none");
 | 
					            $("#validate-membership-header").addClass("d-none");
 | 
				
			||||||
            }
 | 
					        }
 | 
				
			||||||
            if ($("a[data-type='delete-membership']:not(.d-none)").length === 0) {
 | 
					        if ($("a[data-type='delete-membership']:not(.d-none)").length === 0) {
 | 
				
			||||||
                $("a[data-type='delete-membership']").parent().addClass("d-none");
 | 
					            $("a[data-type='delete-membership']").parent().addClass("d-none");
 | 
				
			||||||
                $("#delete-membership-header").addClass("d-none");
 | 
					            $("#delete-membership-header").addClass("d-none");
 | 
				
			||||||
            }
 | 
					        }
 | 
				
			||||||
        });
 | 
					    });
 | 
				
			||||||
    </script>
 | 
					</script>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@@ -1,17 +1,21 @@
 | 
				
			|||||||
{% extends "wei/base.html" %}
 | 
					{% extends "wei/base.html" %}
 | 
				
			||||||
 | 
					{% comment %}
 | 
				
			||||||
 | 
					SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			||||||
 | 
					{% endcomment %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
    {% if club %}
 | 
					 | 
				
			||||||
        {% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
    {% endif %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <form method="post">
 | 
					<div class="card bg-light mb-3">
 | 
				
			||||||
        {% csrf_token %}
 | 
					    <h3 class="card-header text-center">
 | 
				
			||||||
        {{ form|crispy }}
 | 
					        {{ title }}
 | 
				
			||||||
        <button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
					    </h3>
 | 
				
			||||||
    </form>
 | 
					    <div class="card-body">
 | 
				
			||||||
 | 
					        <form method="post">
 | 
				
			||||||
 | 
					            {% csrf_token %}
 | 
				
			||||||
 | 
					            {{ form|crispy }}
 | 
				
			||||||
 | 
					            <button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
				
			||||||
 | 
					        </form>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@@ -1,81 +0,0 @@
 | 
				
			|||||||
{% load i18n static pretty_money perms %}
 | 
					 | 
				
			||||||
<div class="card bg-light shadow">
 | 
					 | 
				
			||||||
    <div class="card-header text-center">
 | 
					 | 
				
			||||||
        <h4>{{ club.name }} </h4>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="card-top text-center">
 | 
					 | 
				
			||||||
        <a  href="{% url 'member:club_update_pic' club.pk  %}">
 | 
					 | 
				
			||||||
            <img src="{{ club.note.display_image.url }}" class="img-thumbnail mt-2" >
 | 
					 | 
				
			||||||
        </a>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="card-body" id="profile_infos">
 | 
					 | 
				
			||||||
        <dl class="row">
 | 
					 | 
				
			||||||
            <dt class="col-xl-6">{% trans 'name'|capfirst %}</dt>
 | 
					 | 
				
			||||||
            <dd class="col-xl-6">{{ club.name }}</dd>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            {% if club.require_memberships %}
 | 
					 | 
				
			||||||
                <dt class="col-xl-6">{% trans 'date start'|capfirst %}</dt>
 | 
					 | 
				
			||||||
                <dd class="col-xl-6">{{ club.date_start }}</dd>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                <dt class="col-xl-6">{% trans 'date end'|capfirst %}</dt>
 | 
					 | 
				
			||||||
                <dd class="col-xl-6">{{ club.date_end }}</dd>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                <dt class="col-xl-6">{% trans 'year'|capfirst %}</dt>
 | 
					 | 
				
			||||||
                <dd class="col-xl-6">{{ club.year }}</dd>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                {% if club.membership_fee_paid == club.membership_fee_unpaid %}
 | 
					 | 
				
			||||||
                    <dt class="col-xl-6">{% trans 'membership fee'|capfirst %}</dt>
 | 
					 | 
				
			||||||
                    <dd class="col-xl-6">{{ club.membership_fee_paid|pretty_money }}</dd>
 | 
					 | 
				
			||||||
                {% else %}
 | 
					 | 
				
			||||||
                    {% with bde_kfet_fee=club.parent_club.membership_fee_paid|add:club.parent_club.parent_club.membership_fee_paid %}
 | 
					 | 
				
			||||||
                        <dt class="col-xl-6">{% trans 'WEI fee (paid students)'|capfirst %}</dt>
 | 
					 | 
				
			||||||
                        <dd class="col-xl-6">{{ club.membership_fee_paid|add:bde_kfet_fee|pretty_money }}
 | 
					 | 
				
			||||||
                            <i class="fas fa-question-circle" title="{% trans "The BDE membership is included in the WEI registration." %}"></i></dd>
 | 
					 | 
				
			||||||
                    {% endwith %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    {% with bde_kfet_fee=club.parent_club.membership_fee_unpaid|add:club.parent_club.parent_club.membership_fee_unpaid %}
 | 
					 | 
				
			||||||
                        <dt class="col-xl-6">{% trans 'WEI fee (unpaid students)'|capfirst %}</dt>
 | 
					 | 
				
			||||||
                        <dd class="col-xl-6">{{ club.membership_fee_unpaid|add:bde_kfet_fee|pretty_money }}
 | 
					 | 
				
			||||||
                        <i class="fas fa-question-circle" title="{% trans "The BDE membership is included in the WEI registration." %}"></i></dd>
 | 
					 | 
				
			||||||
                    {% endwith %}
 | 
					 | 
				
			||||||
                {% endif %}
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            {% if "note.view_note"|has_perm:club.note %}
 | 
					 | 
				
			||||||
                <dt class="col-xl-6">{% trans 'balance'|capfirst %}</dt>
 | 
					 | 
				
			||||||
                <dd class="col-xl-6">{{ club.note.balance | pretty_money }}</dd>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            {% if "note.change_alias"|has_perm:club.note.alias_set.first %}
 | 
					 | 
				
			||||||
                <dt class="col-xl-4"><a href="{% url 'member:club_alias' club.pk %}">{% trans 'aliases'|capfirst %}</a></dt>
 | 
					 | 
				
			||||||
                <dd class="col-xl-8 text-truncate">{{ club.note.alias_set.all|join:", " }}</dd>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <dt class="col-xl-4">{% trans 'email'|capfirst %}</dt>
 | 
					 | 
				
			||||||
            <dd class="col-xl-8"><a href="mailto:{{ club.email }}">{{ club.email }}</a></dd>
 | 
					 | 
				
			||||||
        </dl>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="card-footer text-center">
 | 
					 | 
				
			||||||
        {% if True %}
 | 
					 | 
				
			||||||
            <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_list' %}"> {% trans "WEI list" %}</a>
 | 
					 | 
				
			||||||
        {% endif %}
 | 
					 | 
				
			||||||
        {% if club.is_current_wei %}
 | 
					 | 
				
			||||||
            {% if can_add_first_year_member %}
 | 
					 | 
				
			||||||
                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_register_1A' wei_pk=club.pk %}" data-turbolinks="false"> {% trans "Register 1A" %}</a>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
            {% if can_add_any_member %}
 | 
					 | 
				
			||||||
                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_register_2A' wei_pk=club.pk %}" data-turbolinks="false"> {% trans "Register 2A+" %}</a>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
            {% if "wei.change_"|has_perm:club %}
 | 
					 | 
				
			||||||
                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_update' pk=club.pk %}" data-turbolinks="false"> {% trans "Edit" %}</a>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
            {% if can_add_bus %}
 | 
					 | 
				
			||||||
                <a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_bus' pk=club.pk %}" data-turbolinks="false"> {% trans "Add bus" %}</a>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
            {% url 'wei:wei_detail' club.pk as club_detail_url %}
 | 
					 | 
				
			||||||
            {%if request.path_info != club_detail_url %}
 | 
					 | 
				
			||||||
                <a class="btn btn-primary btn-sm my-1" href="{{ club_detail_url }}">{% trans 'View WEI' %}</a>
 | 
					 | 
				
			||||||
        {% endif %}
 | 
					 | 
				
			||||||
        {% endif %}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
@@ -1,82 +0,0 @@
 | 
				
			|||||||
{% load render_table from django_tables2 %}
 | 
					 | 
				
			||||||
{% load i18n %}
 | 
					 | 
				
			||||||
{% load perms %}
 | 
					 | 
				
			||||||
<div class="card">
 | 
					 | 
				
			||||||
    <div class="card-header text-center">
 | 
					 | 
				
			||||||
        <h4>WEI</h4>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="card-body">
 | 
					 | 
				
			||||||
        <p>LE WEI, c'est cool !</p>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    {% if club.is_current_wei %}
 | 
					 | 
				
			||||||
        <div class="card-footer text-center">
 | 
					 | 
				
			||||||
            {% if not my_registration %}
 | 
					 | 
				
			||||||
                {% if not not_first_year %}
 | 
					 | 
				
			||||||
                    <a href="{% url "wei:wei_register_1A_myself" wei_pk=club.pk %}" data-turbolinks="false"><button class="btn btn-success">{% trans "Register to the WEI! – 1A" %}</button></a>
 | 
					 | 
				
			||||||
                {% endif %}
 | 
					 | 
				
			||||||
                <a href="{% url "wei:wei_register_2A_myself" wei_pk=club.pk %}" data-turbolinks="false"><button class="btn btn-success">{% trans "Register to the WEI! – 2A+" %}</button></a>
 | 
					 | 
				
			||||||
            {% else %}
 | 
					 | 
				
			||||||
                <a href="{% url "wei:wei_update_registration" pk=my_registration.pk %}" data-turbolinks="false"><button class="btn btn-warning">{% trans "Update my registration" %}</button></a>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
    {% endif %}
 | 
					 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<hr>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% if buses.data %}
 | 
					 | 
				
			||||||
    <div class="card">
 | 
					 | 
				
			||||||
        <div class="card-header position-relative" id="clubListHeading">
 | 
					 | 
				
			||||||
            <a class="font-weight-bold">
 | 
					 | 
				
			||||||
                <i class="fa fa-bus"></i> {% trans "Buses" %}
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        {% render_table buses %}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <hr>
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% if member_list.data %}
 | 
					 | 
				
			||||||
    <div class="card">
 | 
					 | 
				
			||||||
        <div class="card-header position-relative" id="clubListHeading">
 | 
					 | 
				
			||||||
            <a class="stretched-link font-weight-bold" href="{% url "wei:wei_memberships" pk=club.pk %}">
 | 
					 | 
				
			||||||
                <i class="fa fa-users"></i> {% trans "Members of the WEI" %}
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        {% render_table member_list %}
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <hr>
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% if history_list.data %}
 | 
					 | 
				
			||||||
    <div class="card">
 | 
					 | 
				
			||||||
        <div class="card-header position-relative" id="historyListHeading">
 | 
					 | 
				
			||||||
            <a class="stretched-link font-weight-bold" {% if "note.view_note"|has_perm:club.note %} href="{% url 'note:transactions' pk=club.note.pk %}" {% endif %}>
 | 
					 | 
				
			||||||
                <i class="fa fa-euro"></i> {% trans "Transaction history" %}
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div id="history_list">
 | 
					 | 
				
			||||||
            {% render_table history_list %}
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <hr>
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% if pre_registrations.data %}
 | 
					 | 
				
			||||||
    <div class="card">
 | 
					 | 
				
			||||||
        <div class="card-header position-relative" id="historyListHeading">
 | 
					 | 
				
			||||||
            <a class="stretched-link font-weight-bold" href="{% url 'wei:wei_registrations' pk=club.pk %}">
 | 
					 | 
				
			||||||
                <i class="fa fa-user-plus"></i> {% trans "Unvalidated registrations" %}
 | 
					 | 
				
			||||||
            </a>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div id="history_list">
 | 
					 | 
				
			||||||
            {% render_table pre_registrations %}
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <hr>
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
@@ -4,10 +4,6 @@
 | 
				
			|||||||
{% load pretty_money %}
 | 
					{% load pretty_money %}
 | 
				
			||||||
{% load perms %}
 | 
					{% load perms %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
    {% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <div class="card bg-light shadow">
 | 
					    <div class="card bg-light shadow">
 | 
				
			||||||
        <div class="card-header text-center">
 | 
					        <div class="card-header text-center">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,10 +2,6 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% load render_table from django_tables2 %}
 | 
					{% load render_table from django_tables2 %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/bus/équipe ...">
 | 
					    <input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/bus/équipe ...">
 | 
				
			||||||
    <hr>
 | 
					    <hr>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,10 +2,6 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <div class="card bg-light shadow">
 | 
					    <div class="card bg-light shadow">
 | 
				
			||||||
        <div class="card-header text-center">
 | 
					        <div class="card-header text-center">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,44 +1,50 @@
 | 
				
			|||||||
{% extends "wei/base.html" %}
 | 
					{% extends "wei/base.html" %}
 | 
				
			||||||
 | 
					{% comment %}
 | 
				
			||||||
 | 
					SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			||||||
 | 
					{% endcomment %}
 | 
				
			||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% load crispy_forms_tags %}
 | 
					{% load crispy_forms_tags %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <form method="post">
 | 
					<div class="card bg-light mb-3">
 | 
				
			||||||
        {% csrf_token %}
 | 
					    <h3 class="card-header text-center">
 | 
				
			||||||
        {{ form|crispy }}
 | 
					        {{ title }}
 | 
				
			||||||
        {{ membership_form|crispy }}
 | 
					    </h3>
 | 
				
			||||||
        <button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
					    <div class="card-body">
 | 
				
			||||||
    </form>
 | 
					        <form method="post">
 | 
				
			||||||
 | 
					            {% csrf_token %}
 | 
				
			||||||
 | 
					            {{ form|crispy }}
 | 
				
			||||||
 | 
					            {{ membership_form|crispy }}
 | 
				
			||||||
 | 
					            <button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
 | 
				
			||||||
 | 
					        </form>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block extrajavascript %}
 | 
					{% block extrajavascript %}
 | 
				
			||||||
    {% if not object.membership %}
 | 
					{% if not object.membership %}
 | 
				
			||||||
        <script>
 | 
					<script>
 | 
				
			||||||
        $(document).ready(function() {
 | 
					    $(document).ready(function () {
 | 
				
			||||||
            function refreshTeams() {
 | 
					        function refreshTeams() {
 | 
				
			||||||
                let buses = [];
 | 
					            let buses = [];
 | 
				
			||||||
                $("input[name='bus']:checked").each(function(ignored) {
 | 
					            $("input[name='bus']:checked").each(function (ignored) {
 | 
				
			||||||
                    buses.push($(this).parent().text().trim());
 | 
					                buses.push($(this).parent().text().trim());
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            console.log(buses);
 | 
				
			||||||
 | 
					            $("input[name='team']").each(function () {
 | 
				
			||||||
 | 
					                let label = $(this).parent();
 | 
				
			||||||
 | 
					                $(this).parent().addClass('d-none');
 | 
				
			||||||
 | 
					                buses.forEach(function (bus) {
 | 
				
			||||||
 | 
					                    if (label.text().includes(bus))
 | 
				
			||||||
 | 
					                        label.removeClass('d-none');
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
                console.log(buses);
 | 
					            });
 | 
				
			||||||
                $("input[name='team']").each(function() {
 | 
					        }
 | 
				
			||||||
                    let label = $(this).parent();
 | 
					 | 
				
			||||||
                    $(this).parent().addClass('d-none');
 | 
					 | 
				
			||||||
                    buses.forEach(function(bus) {
 | 
					 | 
				
			||||||
                        if (label.text().includes(bus))
 | 
					 | 
				
			||||||
                            label.removeClass('d-none');
 | 
					 | 
				
			||||||
                    });
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $("input[name='bus']").change(refreshTeams);
 | 
					        $("input[name='bus']").change(refreshTeams);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            refreshTeams();
 | 
					        refreshTeams();
 | 
				
			||||||
        });
 | 
					    });
 | 
				
			||||||
        </script>
 | 
					</script>
 | 
				
			||||||
    {% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@@ -2,10 +2,6 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
{% load render_table from django_tables2 %}
 | 
					{% load render_table from django_tables2 %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block profile_info %}
 | 
					 | 
				
			||||||
{% include "wei/weiclub_info.html" %}
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block profile_content %}
 | 
					{% block profile_content %}
 | 
				
			||||||
    <input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
 | 
					    <input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
 | 
				
			||||||
    <hr>
 | 
					    <hr>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user