2020-03-19 01:26:06 +00:00
|
|
|
{% load static i18n pretty_money static getenv perms %}
|
2019-08-14 13:17:14 +00:00
|
|
|
{% comment %}
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
{% endcomment %}
|
2019-08-10 17:00:16 +00:00
|
|
|
<!DOCTYPE html>
|
2020-08-10 11:50:23 +00:00
|
|
|
<html lang="{{ LANGUAGE_CODE|default:"en" }}" class="position-relative h-100">
|
2019-08-10 17:00:16 +00:00
|
|
|
<head>
|
2019-08-14 13:17:14 +00:00
|
|
|
<meta charset="utf-8">
|
2020-02-21 10:02:29 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
2019-08-14 13:17:14 +00:00
|
|
|
<title>
|
|
|
|
{% block title %}{{ title }}{% endblock title %} - {{ request.site.name }}
|
|
|
|
</title>
|
|
|
|
<meta name="description" content="{% trans "The ENS Paris-Saclay BDE note." %}">
|
2019-08-10 17:00:16 +00:00
|
|
|
|
2019-08-14 13:17:14 +00:00
|
|
|
{# Favicon #}
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{% static "favicon/apple-touch-icon.png" %}">
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{% static "favicon/favicon-32x32.png" %}">
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{% static "favicon/favicon-16x16.png" %}">
|
|
|
|
<link rel="manifest" href="{% static "favicon/site.webmanifest" %}">
|
|
|
|
<link rel="mask-icon" href="{% static "favicon/safari-pinned-tab.svg" %}" color="#5bbad5">
|
|
|
|
<link rel="shortcut icon" href="{% static "favicon/favicon.ico" %}">
|
|
|
|
<meta name="msapplication-TileColor" content="#da532c">
|
|
|
|
<meta name="msapplication-config" content="{% static "favicon/browserconfig.xml" %}">
|
|
|
|
<meta name="theme-color" content="#ffffff">
|
2020-08-21 12:33:43 +00:00
|
|
|
|
|
|
|
{# Bootstrap, Font Awesome and custom CSS #}
|
2020-09-01 12:28:11 +00:00
|
|
|
<link rel="stylesheet" href="{% static "bootstrap4/css/bootstrap.min.css" %}">
|
|
|
|
<link rel="stylesheet" href="{% static "font-awesome/css/font-awesome.min.css" %}">
|
2020-08-21 11:24:04 +00:00
|
|
|
<link rel="stylesheet" href="{% static "css/custom.css" %}">
|
2020-02-08 19:27:22 +00:00
|
|
|
|
2020-02-21 20:15:49 +00:00
|
|
|
{# JQuery, Bootstrap and Turbolinks JavaScript #}
|
2020-09-01 12:28:11 +00:00
|
|
|
<script src="{% static "jquery/jquery.min.js" %}"></script>
|
|
|
|
<script src="{% static "popper.js/umd/popper.min.js" %}"></script>
|
|
|
|
<script src="{% static "bootstrap4/js/bootstrap.min.js" %}"></script>
|
2020-02-21 20:15:49 +00:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js"
|
|
|
|
crossorigin="anonymous"></script>
|
2020-08-21 11:24:04 +00:00
|
|
|
<script src="{% static "js/base.js" %}"></script>
|
2020-09-02 22:35:25 +00:00
|
|
|
<script src="{% static "js/konami.js" %}"></script>
|
2020-02-21 16:07:28 +00:00
|
|
|
|
2020-02-21 16:51:00 +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 %}
|
|
|
|
|
2019-08-14 13:17:14 +00:00
|
|
|
{% block extracss %}{% endblock %}
|
|
|
|
</head>
|
2020-02-21 10:02:29 +00:00
|
|
|
<body class="d-flex w-100 h-100 flex-column">
|
|
|
|
<main class="mb-auto">
|
2020-08-21 11:24:04 +00:00
|
|
|
<nav class="navbar navbar-expand-md navbar-dark bg-primary fixed-navbar shadow-sm">
|
2020-08-21 12:38:07 +00:00
|
|
|
<div class="container-fluid">
|
|
|
|
<a class="navbar-brand" href="/">{{ request.site.name }}</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
|
|
|
data-target="#navbarNavDropdown"
|
|
|
|
aria-controls="navbarNavDropdown" aria-expanded="false"
|
|
|
|
aria-label="Toggle navigation">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
|
|
<ul class="navbar-nav">
|
|
|
|
{% if "note.transactiontemplate"|not_empty_model_list %}
|
2020-08-21 12:33:43 +00:00
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'note:consos' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-coffee"></i> {% trans 'Consumptions' %}</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if "note.transaction"|not_empty_model_list %}
|
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'note:transfer' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-exchange"></i> {% trans 'Transfer' %} </a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if "auth.user"|model_list_length >= 2 %}
|
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'member:user_list' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-user"></i> {% trans 'Users' %}</a>
|
2020-08-21 12:33:43 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-08-21 12:38:07 +00:00
|
|
|
{% if "member.club"|not_empty_model_list %}
|
2020-08-21 12:33:43 +00:00
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'member:club_list' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-users"></i> {% trans 'Clubs' %}</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if "activity.activity"|not_empty_model_list %}
|
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'activity:activity_list' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-calendar"></i> {% trans 'Activities' %}</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if "treasury.invoice"|not_empty_model_list %}
|
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'treasury:invoice_list' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-credit-card"></i> {% trans 'Treasury' %}</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if "wei.weiclub"|not_empty_model_list %}
|
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'wei:current_wei_detail' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-bus"></i> {% trans 'WEI' %}</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<li class="nav-item">
|
2020-08-31 20:11:46 +00:00
|
|
|
{% url 'permission:rights' as url %}
|
2020-09-01 12:33:38 +00:00
|
|
|
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-balance-scale"></i> {% trans 'Rights' %}</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if request.user.is_staff and ""|has_perm:user %}
|
|
|
|
<li class="nav-item">
|
2020-09-01 12:33:38 +00:00
|
|
|
<a data-turbolinks="false" class="nav-link" href="{% url 'admin:index' %}"><i class="fa fa-cogs"></i> {% trans 'Admin' %}</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
<ul class="navbar-nav ml-auto">
|
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<li class="dropdown">
|
|
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
2020-09-01 12:33:38 +00:00
|
|
|
<i class="fa fa-user"></i>
|
2020-08-21 12:38:07 +00:00
|
|
|
<span id="user_balance">{{ request.user.username }} ({{ request.user.note.balance | pretty_money }})</span>
|
2020-08-21 12:33:43 +00:00
|
|
|
</a>
|
2020-08-21 12:38:07 +00:00
|
|
|
<div class="dropdown-menu dropdown-menu-right"
|
|
|
|
aria-labelledby="navbarDropdownMenuLink">
|
|
|
|
<a class="dropdown-item" href="{% url 'member:user_detail' pk=request.user.pk %}">
|
2020-09-01 12:33:38 +00:00
|
|
|
<i class="fa fa-user"></i> Mon compte
|
2020-08-21 12:38:07 +00:00
|
|
|
</a>
|
|
|
|
<a class="dropdown-item" href="{% url 'logout' %}">
|
2020-09-01 12:33:38 +00:00
|
|
|
<i class="fa fa-sign-out"></i> Se déconnecter
|
2020-08-21 12:38:07 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
2020-08-21 12:33:43 +00:00
|
|
|
</li>
|
2020-08-21 12:38:07 +00:00
|
|
|
{% else %}
|
|
|
|
{% if request.path != "/registration/signup/" %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{% url 'registration:signup' %}">
|
2020-09-01 12:33:38 +00:00
|
|
|
<i class="fa fa-user-plus"></i> S'inscrire
|
2020-08-21 12:38:07 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if request.path != "/accounts/login/" %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{% url 'login' %}">
|
2020-09-01 12:33:38 +00:00
|
|
|
<i class="fa fa-sign-in"></i> Se connecter
|
2020-08-21 12:38:07 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-08-21 12:33:43 +00:00
|
|
|
{% endif %}
|
2020-08-21 12:38:07 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2019-08-14 13:17:14 +00:00
|
|
|
</div>
|
|
|
|
</nav>
|
2020-08-10 10:08:47 +00:00
|
|
|
<div class="{% block containertype %}container{% endblock %} my-3">
|
2020-08-04 18:04:41 +00:00
|
|
|
{% if request.user.is_authenticated and not request.user.profile.email_confirmed %}
|
2020-04-05 02:37:29 +00:00
|
|
|
<div class="alert alert-warning">
|
|
|
|
{% trans "Your e-mail address is not validated. Please check your mail inbox and click on the validation link." %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-07-29 09:42:27 +00:00
|
|
|
<div class="alert alert-warning alert-dismissible">
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
2020-07-28 16:27:25 +00:00
|
|
|
Attention : la Note Kfet 2020 est en phase de beta. Des fonctionnalités pourront être rajoutées d'ici à la version
|
|
|
|
finale, et des bugs peuvent survenir. Pour tout problème, merci d'envoyer un mail à l'adresse
|
|
|
|
<a href="mailto:notekfet2020@lists.crans.org">
|
|
|
|
notekfet2020@lists.crans.org</a>,
|
|
|
|
ou bien levez une issue sur le dépôt <a href="https://gitlab.crans.org/bde/nk20/-/issues">Gitlab</a>,
|
|
|
|
ou encore posez un commentaire sur le <a href="https://pad.crans.org/p/todoNK20">pad</a>.<br><br>
|
|
|
|
|
|
|
|
Certaines données ont été anonymisées afin de limiter les fuites de données, et peuvent ne pas correspondre avec vos données réelles.
|
|
|
|
</div>
|
2020-03-12 22:12:49 +00:00
|
|
|
<div id="messages"></div>
|
2020-02-21 12:50:35 +00:00
|
|
|
{% block content %}
|
|
|
|
<p>Default content...</p>
|
2020-08-21 16:08:32 +00:00
|
|
|
{% endblock %}
|
2019-08-14 13:17:14 +00:00
|
|
|
</div>
|
|
|
|
</main>
|
2020-08-21 11:24:04 +00:00
|
|
|
<footer class="bg-dark text-white mt-auto py-2">
|
2019-08-14 13:17:14 +00:00
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
2020-08-21 16:08:32 +00:00
|
|
|
<div class="col-10">
|
2019-08-14 13:17:14 +00:00
|
|
|
<form action="{% url 'set_language' %}" method="post"
|
|
|
|
class="form-inline">
|
|
|
|
<span class="text-muted mr-1">
|
2020-03-11 16:51:42 +00:00
|
|
|
<a href="mailto:{{ "CONTACT_EMAIL" | getenv }}"
|
2020-02-21 12:50:35 +00:00
|
|
|
class="text-muted">Nous contacter</a> —
|
2019-08-14 13:17:14 +00:00
|
|
|
</span>
|
|
|
|
{% csrf_token %}
|
|
|
|
<select title="language" name="language"
|
2020-08-21 11:24:04 +00:00
|
|
|
class="form-control form-control-sm language"
|
2019-08-14 13:17:14 +00:00
|
|
|
onchange="this.form.submit()">
|
|
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
|
|
{% get_available_languages as LANGUAGES %}
|
|
|
|
{% get_language_info_list for LANGUAGES as languages %}
|
|
|
|
{% for language in languages %}
|
|
|
|
<option value="{{ language.code }}"
|
|
|
|
{% if language.code == LANGUAGE_CODE %}
|
|
|
|
selected{% endif %}>
|
|
|
|
{{ language.name_local }} ({{ language.code }})
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<noscript>
|
|
|
|
<input type="submit">
|
|
|
|
</noscript>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-08-21 16:08:32 +00:00
|
|
|
<div class="col text-right">
|
|
|
|
<a href="#" data-turbolinks="false" class="text-muted">
|
|
|
|
<i class="fa fa-arrow-up" aria-hidden="true"></i>
|
|
|
|
</a>
|
2019-08-14 13:17:14 +00:00
|
|
|
</div>
|
2019-08-10 17:00:16 +00:00
|
|
|
</div>
|
2019-08-14 13:17:14 +00:00
|
|
|
</div>
|
|
|
|
</footer>
|
2019-08-10 17:00:16 +00:00
|
|
|
|
2020-03-13 08:26:39 +00:00
|
|
|
<script>
|
|
|
|
CSRF_TOKEN = "{{ csrf_token }}";
|
2020-08-07 18:11:28 +00:00
|
|
|
$(".invalid-feedback").addClass("d-block");
|
2020-03-13 08:26:39 +00:00
|
|
|
</script>
|
|
|
|
|
2020-08-21 16:08:32 +00:00
|
|
|
{% block extrajavascript %}{% endblock %}
|
2019-08-10 17:00:16 +00:00
|
|
|
</body>
|
|
|
|
</html>
|