2024-02-11 17:43:23 +00:00
|
|
|
{% load i18n static %}
|
2020-12-27 10:49:54 +00:00
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
2024-02-11 17:43:23 +00:00
|
|
|
<html lang="{{ LANGUAGE_CODE|default:"fr" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %} class="position-relative h-100">
|
2020-12-27 10:49:54 +00:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<title>
|
|
|
|
{% block title %}{{ title }}{% endblock title %} - Plateforme du TFJM²
|
|
|
|
</title>
|
2024-02-11 17:43:23 +00:00
|
|
|
<meta name="description" content="Plateforme d'inscription au TFJM².">
|
2020-12-27 10:49:54 +00:00
|
|
|
|
|
|
|
{# Favicon #}
|
|
|
|
<link rel="shortcut icon" href="{% static "favicon.ico" %}">
|
|
|
|
<meta name="theme-color" content="#ffffff">
|
|
|
|
|
|
|
|
{# Bootstrap CSS #}
|
2021-04-12 20:41:50 +00:00
|
|
|
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
|
2021-04-12 20:47:30 +00:00
|
|
|
<link rel="stylesheet" href="{% static 'fontawasome/css/all.css' %}">
|
|
|
|
<link rel="stylesheet" href="{% static 'fontawasome/css/v4-shims.css' %}">
|
2020-12-27 10:49:54 +00:00
|
|
|
|
2023-02-20 15:55:30 +00:00
|
|
|
<link rel="stylesheet" href="{% static 'bootstrap-select/css/bootstrap-select.min.css' %}">
|
2023-02-20 00:32:02 +00:00
|
|
|
|
2023-02-20 15:55:30 +00:00
|
|
|
{# Bootstrap JavaScript #}
|
2021-04-12 20:41:50 +00:00
|
|
|
<script src="{% static 'bootstrap/js/bootstrap.bundle.min.js' %}"></script>
|
2020-12-27 10:49:54 +00:00
|
|
|
|
2024-02-11 17:43:23 +00:00
|
|
|
{# bootstrap-select for beautiful selects and JQuery dependency #}
|
2023-02-20 15:55:30 +00:00
|
|
|
<script src="{% static 'jquery/jquery.min.js' %}"></script>
|
|
|
|
<script src="{% static 'bootstrap-select/js/bootstrap-select.min.js' %}"></script>
|
|
|
|
<script src="{% static 'bootstrap-select/js/defaults-fr_FR.min.js' %}"></script>
|
2023-02-20 00:32:02 +00:00
|
|
|
|
2020-12-27 10:49:54 +00:00
|
|
|
{# Si un formulaire requiert des données supplémentaires (notamment JS), les données sont chargées #}
|
|
|
|
{% if form.media %}
|
|
|
|
{{ form.media }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% block extracss %}{% endblock %}
|
|
|
|
</head>
|
|
|
|
<body class="d-flex w-100 h-100 flex-column">
|
2024-02-11 17:43:23 +00:00
|
|
|
{% include "navbar.html" %}
|
2023-02-20 13:52:25 +00:00
|
|
|
|
2024-02-11 17:43:23 +00:00
|
|
|
<div id="body-wrapper" class="row w-100 my-3">
|
|
|
|
<aside class="col-lg-2 px-2">
|
|
|
|
{% include "sidebar.html" %}
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
<main class="col d-flex flex-column">
|
|
|
|
<div class="container">
|
|
|
|
{% block content-title %}<h1 id="content-title">{{ title }}</h1>{% endblock %}
|
|
|
|
|
|
|
|
{% include "messages.html" %}
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
{% block content %}
|
|
|
|
<p>Default content...</p>
|
|
|
|
{% endblock content %}
|
2020-12-27 10:49:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-11 17:43:23 +00:00
|
|
|
</main>
|
|
|
|
|
|
|
|
<aside class="col-lg-2"></aside>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% include "footer.html" %}
|
2020-12-27 10:49:54 +00:00
|
|
|
|
2020-12-30 11:13:05 +00:00
|
|
|
{% trans "All tournaments" as modal_title %}
|
|
|
|
{% include "base_modal.html" with modal_id="tournamentList" modal_additional_class="modal-lg" %}
|
2020-12-27 10:49:54 +00:00
|
|
|
|
|
|
|
{% if user.is_authenticated %}
|
|
|
|
{% trans "All teams" as modal_title %}
|
|
|
|
{% include "base_modal.html" with modal_id="teams" modal_additional_class="modal-lg" %}
|
|
|
|
|
|
|
|
{% trans "Search results" as modal_title %}
|
|
|
|
{% include "base_modal.html" with modal_id="search" modal_form_method="get" modal_additional_class="modal-lg" %}
|
|
|
|
|
|
|
|
{% trans "Join team" as modal_title %}
|
|
|
|
{% trans "Join" as modal_button %}
|
|
|
|
{% url "participation:join_team" as modal_action %}
|
|
|
|
|
|
|
|
{% include "base_modal.html" with modal_id="joinTeam" %}
|
|
|
|
{% trans "Create team" as modal_title %}
|
|
|
|
{% trans "Create" as modal_button %}
|
|
|
|
{% url "participation:create_team" as modal_action %}
|
|
|
|
{% include "base_modal.html" with modal_id="createTeam" modal_button_type="success" %}
|
|
|
|
{% else %}
|
|
|
|
{% trans "Log in" as modal_title %}
|
|
|
|
{% trans "Log in" as modal_button %}
|
|
|
|
{% url "login" as modal_action %}
|
|
|
|
{% include "base_modal.html" with modal_id="login" %}
|
|
|
|
{% endif %}
|
|
|
|
|
2023-02-20 22:02:09 +00:00
|
|
|
<script src="{% static 'main.js' %}"></script>
|
|
|
|
<script src="{% static 'theme.js' %}"></script>
|
|
|
|
|
2020-12-27 10:49:54 +00:00
|
|
|
<script>
|
|
|
|
CSRF_TOKEN = "{{ csrf_token }}";
|
2023-02-20 15:55:30 +00:00
|
|
|
document.querySelectorAll(".invalid-feedback").forEach(elem => elem.classList.add('d-block'))
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
initModal("tournamentList", "{% url "participation:tournament_list" %}")
|
2020-12-30 11:13:05 +00:00
|
|
|
|
2020-12-27 10:49:54 +00:00
|
|
|
{% if user.is_authenticated and user.registration.is_admin %}
|
2023-02-20 15:55:30 +00:00
|
|
|
initModal("teams", "{% url "participation:team_list" %}")
|
|
|
|
initModal("search",
|
|
|
|
() => "{% url "haystack_search" %}?q=" + encodeURI(document.getElementById("search-term").value),
|
|
|
|
"search-results")
|
2020-12-27 10:49:54 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if not user.is_authenticated %}
|
2023-02-20 15:55:30 +00:00
|
|
|
initModal("login", "{% url 'login' %}")
|
2020-12-27 10:49:54 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if user.is_authenticated and user.registration.participates and not user.registration.team %}
|
2023-02-20 15:55:30 +00:00
|
|
|
initModal("createTeam", "{% url 'participation:create_team' %}")
|
|
|
|
initModal("joinTeam", "{% url 'participation:join_team' %}")
|
2020-12-27 10:49:54 +00:00
|
|
|
{% endif %}
|
2023-02-20 15:55:30 +00:00
|
|
|
})
|
2020-12-27 10:49:54 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{% block extrajavascript %}{% endblock %}
|
|
|
|
</body>
|
|
|
|
</html>
|