mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-24 19:20:29 +02:00
Merge branch 'master' into 'tranfer_front'
# Conflicts: # apps/activity/views.py # apps/permission/backends.py # locale/de/LC_MESSAGES/django.po # locale/fr/LC_MESSAGES/django.po # static/js/base.js # templates/base.html # templates/member/user_list.html
This commit is contained in:
8
templates/400.html
Normal file
8
templates/400.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Bad request" %}</h1>
|
||||
{% blocktrans %}Sorry, your request was bad. Don't know what could be wrong. An email has been sent to webmasters with the details of the error. You can now drink a coke.{% endblocktrans %}
|
||||
{% endblock %}
|
13
templates/403.html
Normal file
13
templates/403.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Permission denied" %}</h1>
|
||||
{% blocktrans %}You don't have the right to perform this request.{% endblocktrans %}
|
||||
{% if exception %}
|
||||
<div>
|
||||
{% trans "Exception message:" %} {{ exception }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
13
templates/404.html
Normal file
13
templates/404.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Page not found" %}</h1>
|
||||
{% blocktrans %}The requested path <code>{{ request_path }}</code> was not found on the server.{% endblocktrans %}
|
||||
{% if exception != "Resolver404" %}
|
||||
<div>
|
||||
{% trans "Exception message:" %} {{ exception }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
8
templates/500.html
Normal file
8
templates/500.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Server error" %}</h1>
|
||||
{% blocktrans %}Sorry, an error occurred when processing your request. An email has been sent to webmasters with the detail of the error, and this will be fixed soon. You can now drink a beer.{% endblocktrans %}
|
||||
{% endblock %}
|
@ -31,9 +31,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/all.css">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/v4-shims.css">
|
||||
|
||||
{# JQuery, Bootstrap and Turbolinks JavaScript #}
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
|
||||
@ -91,39 +90,52 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<ul class="navbar-nav">
|
||||
{% if "note.transactiontemplate"|not_empty_model_list %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'note:consos' %}"><i class="fa fa-coffee"></i> {% trans 'Consumptions' %}</a>
|
||||
<a class="nav-link" href="{% url 'note:consos' %}"><i class="fas fa-coffee"></i> {% trans 'Consumptions' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if "note.transaction"|not_empty_model_list %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'note:transfer' %}"><i class="fa fa-exchange"></i>{% trans 'Transfer' %} </a>
|
||||
<a class="nav-link" href="{% url 'note:transfer' %}"><i class="fas fa-exchange-alt"></i>{% trans 'Transfer' %} </a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if "auth.user"|model_list|length >= 2 %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'member:user_list' %}"><i class="fa fa-user"></i> {% trans 'Users' %}</a>
|
||||
<a class="nav-link" href="{% url 'member:user_list' %}"><i class="fas fa-user"></i> {% trans 'Users' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if "member.club"|not_empty_model_list %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'member:club_list' %}"><i class="fa fa-users"></i> {% trans 'Clubs' %}</a>
|
||||
<a class="nav-link" href="{% url 'member:club_list' %}"><i class="fas fa-users"></i> {% trans 'Clubs' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if "member.change_profile_registration_valid"|has_perm:user %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'registration:future_user_list' %}">
|
||||
<i class="fa fa-user-plus"></i> {% trans "Registrations" %}
|
||||
<i class="fas fa-user-plus"></i> {% trans "Registrations" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if "activity.activity"|not_empty_model_list %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'activity:activity_list' %}"><i class="fa fa-calendar"></i> {% trans 'Activities' %}</a>
|
||||
<a class="nav-link" href="{% url 'activity:activity_list' %}"><i class="fas fa-calendar"></i> {% trans 'Activities' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if "treasury.invoice"|not_empty_model_change_list %}
|
||||
{% if "treasury.invoice"|not_empty_model_list %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'treasury:invoice_list' %}"><i class="fa fa-money"></i>{% trans 'Treasury' %} </a>
|
||||
<a class="nav-link" href="{% url 'treasury:invoice_list' %}"><i class="fas fa-credit-card"></i> {% trans 'Treasury' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if "wei.weiclub"|not_empty_model_list %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'wei:current_wei_detail' %}"><i class="fas fa-bus"></i> {% trans 'WEI' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'permission:rights' %}"><i class="fas fa-balance-scale"></i> {% trans 'Rights' %}</a>
|
||||
</li>
|
||||
{% if user.is_staff %}
|
||||
<li class="nav-item active">
|
||||
<a data-turbolinks="false" class="nav-link" href="{% url 'admin:index' %}"><i class="fas fa-user-cog"></i> {% trans 'Administration' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -131,28 +143,28 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-user"></i>
|
||||
<i class="fas fa-user"></i>
|
||||
<span id="user_balance">{{ user.username }} ({{ user.note.balance | pretty_money }})</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right"
|
||||
aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="{% url 'member:user_detail' pk=user.pk %}">
|
||||
<i class="fa fa-user"></i> Mon compte
|
||||
<i class="fas fa-user"></i> Mon compte
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url 'logout' %}">
|
||||
<i class="fa fa-sign-out"></i> Se déconnecter
|
||||
<i class="fas fa-sign-out-alt"></i> Se déconnecter
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'registration:signup' %}">
|
||||
<i class="fa fa-user-plus"></i> S'inscrire
|
||||
<i class="fas fa-user-plus"></i> S'inscrire
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'login' %}">
|
||||
<i class="fa fa-sign-in"></i> Se connecter
|
||||
<i class="fas fa-sign-in-alt"></i> Se connecter
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@ -1,26 +0,0 @@
|
||||
{% load cas_server %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{error}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for field in form %}{% if not field|is_hidden %}
|
||||
<div class="form-group
|
||||
{% if not form.non_field_errors %}
|
||||
{% if field.errors %} has-error
|
||||
{% elif form.cleaned_data %} has-success
|
||||
{% endif %}
|
||||
{% endif %}"
|
||||
>{% spaceless %}
|
||||
{% if field|is_checkbox %}
|
||||
<div class="checkbox"><label for="{{field.auto_id}}">{{field}}{{field.label}}</label></div>
|
||||
{% else %}
|
||||
<label class="control-label" for="{{field.auto_id}}">{{field.label}}</label>
|
||||
{{field}}
|
||||
{% endif %}
|
||||
{% for error in field.errors %}
|
||||
<span class="help-block">{{error}}</span>
|
||||
{% endfor %}
|
||||
{% endspaceless %}</div>
|
||||
{% else %}{{field}}{% endif %}{% endfor %}
|
@ -1,21 +0,0 @@
|
||||
{% extends "cas_server/base.html" %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="alert alert-success" role="alert">{% blocktrans %}<h3>Log In Successful</h3>You have successfully logged into the Central Authentication Service.<br/>For security reasons, please Log Out and Exit your web browser when you are done accessing services that require authentication!{% endblocktrans %}</div>
|
||||
<form class="form-signin" method="get" action="logout">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="all" value="1">{% trans "Log me out from all my sessions" %}
|
||||
</label>
|
||||
</div>
|
||||
{% if settings.CAS_FEDERATE and request.COOKIES.remember_provider %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="forget_provider" value="1">{% trans "Forget the identity provider" %}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<button class="btn btn-danger btn-block btn-lg" type="submit">{% trans "Logout" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
@ -1,33 +0,0 @@
|
||||
{% extends "cas_server/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block ante_messages %}
|
||||
{% if auto_submit %}<noscript>{% endif %}
|
||||
<h2 class="form-signin-heading">{% trans "Please log in" %}</h2>
|
||||
{% if auto_submit %}</noscript>{% endif %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "If you don't have any Note Kfet account, please follow <a href='/accounts/signup'>this link to sign up</a>." %}
|
||||
</div>
|
||||
<form class="form-signin" method="post" id="login_form"{% if post_url %} action="{{post_url}}"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{% include "cas_server/form.html" %}
|
||||
{% if auto_submit %}<noscript>{% endif %}
|
||||
<button class="btn btn-primary btn-block btn-lg" type="submit">{% trans "Login" %}</button>
|
||||
{% if auto_submit %}</noscript>{% endif %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block javascript_inline %}
|
||||
jQuery(function( $ ){
|
||||
$("#id_warn").click(function(e){
|
||||
if($("#id_warn").is(':checked')){
|
||||
createCookie("warn", "on", 10 * 365);
|
||||
} else {
|
||||
eraseCookie("warn");
|
||||
}
|
||||
});
|
||||
});{% if auto_submit %}
|
||||
document.getElementById('login_form').submit(); // SUBMIT FORM{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -1,7 +0,0 @@
|
||||
{% extends "cas_server/base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="alert alert-success" role="alert">{{logout_msg}}</div>
|
||||
{% endblock %}
|
||||
|
@ -1,5 +0,0 @@
|
||||
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
|
||||
<cas:proxySuccess>
|
||||
<cas:proxyTicket>{{ticket}}</cas:proxyTicket>
|
||||
</cas:proxySuccess>
|
||||
</cas:serviceResponse>
|
@ -1,59 +0,0 @@
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<SOAP-ENV:Header />
|
||||
<SOAP-ENV:Body>
|
||||
<Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol"
|
||||
xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
|
||||
IssueInstant="{{ IssueInstant }}"
|
||||
MajorVersion="1" MinorVersion="1" Recipient="{{ Recipient }}"
|
||||
ResponseID="{{ ResponseID }}">
|
||||
<Status>
|
||||
<StatusCode Value="samlp:Success">
|
||||
</StatusCode>
|
||||
</Status>
|
||||
<Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion" AssertionID="{{ResponseID}}"
|
||||
IssueInstant="{{IssueInstant}}" Issuer="localhost" MajorVersion="1"
|
||||
MinorVersion="1">
|
||||
<Conditions NotBefore="{{IssueInstant}}" NotOnOrAfter="{{expireInstant}}">
|
||||
<AudienceRestrictionCondition>
|
||||
<Audience>
|
||||
{{Recipient}}
|
||||
</Audience>
|
||||
</AudienceRestrictionCondition>
|
||||
</Conditions>
|
||||
<AttributeStatement>
|
||||
<Subject>
|
||||
<NameIdentifier>{{username}}</NameIdentifier>
|
||||
<SubjectConfirmation>
|
||||
<ConfirmationMethod>
|
||||
urn:oasis:names:tc:SAML:1.0:cm:artifact
|
||||
</ConfirmationMethod>
|
||||
</SubjectConfirmation>
|
||||
</Subject>
|
||||
<Attribute AttributeName="authenticationDate" AttributeNamespace="http://www.ja-sig.org/products/cas/">
|
||||
<AttributeValue>{{auth_date}}</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute AttributeName="longTermAuthenticationRequestTokenUsed" AttributeNamespace="http://www.ja-sig.org/products/cas/">
|
||||
<AttributeValue>false</AttributeValue>{# we do not support long-term (Remember-Me) auth #}
|
||||
</Attribute>
|
||||
<Attribute AttributeName="isFromNewLogin" AttributeNamespace="http://www.ja-sig.org/products/cas/">
|
||||
<AttributeValue>{{is_new_login}}</AttributeValue>
|
||||
</Attribute>
|
||||
{% for name, value in attributes %} <Attribute AttributeName="{{name}}" AttributeNamespace="http://www.ja-sig.org/products/cas/">
|
||||
<AttributeValue>{{value}}</AttributeValue>
|
||||
</Attribute>
|
||||
{% endfor %} </AttributeStatement>
|
||||
<AuthenticationStatement AuthenticationInstant="{{IssueInstant}}"
|
||||
AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
|
||||
<Subject>
|
||||
<NameIdentifier>{{username}}</NameIdentifier>
|
||||
<SubjectConfirmation>
|
||||
<ConfirmationMethod>
|
||||
urn:oasis:names:tc:SAML:1.0:cm:artifact
|
||||
</ConfirmationMethod>
|
||||
</SubjectConfirmation>
|
||||
</Subject>
|
||||
</AuthenticationStatement>
|
||||
</Assertion>
|
||||
</Response>
|
||||
</SOAP-ENV:Body>
|
||||
</SOAP-ENV:Envelope>
|
@ -1,14 +0,0 @@
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<SOAP-ENV:Header />
|
||||
<SOAP-ENV:Body>
|
||||
<Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol"
|
||||
xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
|
||||
IssueInstant="{{ IssueInstant }}"
|
||||
MajorVersion="1" MinorVersion="1" Recipient="{{ Recipient }}"
|
||||
ResponseID="{{ ResponseID }}">
|
||||
<Status>
|
||||
<StatusCode Value="samlp:{{code}}">{{msg}}</StatusCode>
|
||||
</Status>
|
||||
</Response>
|
||||
</SOAP-ENV:Body>
|
||||
</SOAP-ENV:Envelope>
|
@ -1,19 +0,0 @@
|
||||
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
|
||||
<cas:authenticationSuccess>
|
||||
<cas:user>{{username}}</cas:user>
|
||||
<cas:attributes>
|
||||
<cas:authenticationDate>{{auth_date}}</cas:authenticationDate>
|
||||
<cas:longTermAuthenticationRequestTokenUsed>false</cas:longTermAuthenticationRequestTokenUsed>{# we do not support long-term (Remember-Me) auth #}
|
||||
<cas:isFromNewLogin>{{is_new_login}}</cas:isFromNewLogin>
|
||||
{% for key, value in attributes %} <cas:{{key}}>{{value}}</cas:{{key}}>
|
||||
{% endfor %} </cas:attributes>
|
||||
<cas:attribute name="authenticationDate" value="{{auth_date}}"/>
|
||||
<cas:attribute name="longTermAuthenticationRequestTokenUsed" value="false"/>
|
||||
<cas:attribute name="isFromNewLogin" value="{{is_new_login}}"/>
|
||||
{% for key, value in attributes %} <cas:attribute name="{{key}}" value="{{value}}"/>
|
||||
{% endfor %}{% if proxyGrantingTicket %} <cas:proxyGrantingTicket>{{proxyGrantingTicket}}</cas:proxyGrantingTicket>
|
||||
{% endif %}{% if proxies %} <cas:proxies>
|
||||
{% for proxy in proxies %} <cas:proxy>{{proxy}}</cas:proxy>
|
||||
{% endfor %} </cas:proxies>
|
||||
{% endif %} </cas:authenticationSuccess>
|
||||
</cas:serviceResponse>
|
@ -1,3 +0,0 @@
|
||||
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
|
||||
<cas:authenticationFailure code="{{code}}">{{msg}}</cas:authenticationFailure>
|
||||
</cas:serviceResponse>
|
@ -1,11 +0,0 @@
|
||||
{% extends "cas_server/base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form class="form-signin" method="post">
|
||||
{% csrf_token %}
|
||||
{% include "cas_server/form.html" %}
|
||||
<button class="btn btn-primary btn-block btn-lg" type="submit">{% trans "Connect to the service" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
8
templates/colorfield/color.html
Executable file
8
templates/colorfield/color.html
Executable file
@ -0,0 +1,8 @@
|
||||
<input type="text"
|
||||
id="{{ widget.attrs.id }}"
|
||||
class="form-control colorfield_field jscolor"
|
||||
name="{{ widget.name }}"
|
||||
value="{% firstof widget.value widget.attrs.default '' %}"
|
||||
placeholder="{% firstof widget.value widget.attrs.default '' %}"
|
||||
data-jscolor="{hash:true,width:225,height:150,required:{% if widget.attrs.required %}true{% else %}false{% endif %}}"
|
||||
{% if widget.attrs.required %}required{% endif %} />
|
@ -15,18 +15,24 @@
|
||||
|
||||
{% if club.parent_club %}
|
||||
<dt class="col-xl-6"><a href="{% url 'member:club_detail' club.parent_club.pk %}">{% trans 'Club Parent'|capfirst %}</a></dt>
|
||||
<dd class="col-xl-6"> {{ club.parent_club.name}}</dd>
|
||||
<dd class="col-xl-6"> {{ club.parent_club.name }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if club.require_memberships %}
|
||||
<dt class="col-xl-6">{% trans 'membership start'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_start }}</dd>
|
||||
{% if club.membership_start %}
|
||||
<dt class="col-xl-6">{% trans 'membership start'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_start }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-xl-6">{% trans 'membership end'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_end }}</dd>
|
||||
{% if club.membership_end %}
|
||||
<dt class="col-xl-6">{% trans 'membership end'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_end }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-xl-6">{% trans 'membership duration'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_duration }} {% trans "days" %}</dd>
|
||||
{% if club.membership_duration %}
|
||||
<dt class="col-xl-6">{% trans 'membership duration'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_duration }} {% trans "days" %}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if club.membership_fee_paid == club.membership_fee_unpaid %}
|
||||
<dt class="col-xl-6">{% trans 'membership fee'|capfirst %}</dt>
|
||||
@ -39,23 +45,31 @@
|
||||
<dd class="col-xl-6">{{ club.membership_fee_unpaid|pretty_money }}</dd>
|
||||
{% 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 %}
|
||||
|
||||
<dt class="col-xl-6"><a href="{% url 'member:club_alias' club.pk %}">{% trans 'aliases'|capfirst %}</a></dt>
|
||||
<dd class="col-xl-6 text-truncate">{{ object.note.alias_set.all|join:", " }}</dd>
|
||||
<dd class="col-xl-6 text-truncate">{{ club.note.alias_set.all|join:", " }}</dd>
|
||||
|
||||
<dt class="col-xl-3">{% trans 'email'|capfirst %}</dt>
|
||||
<dd class="col-xl-9"><a href="mailto:{{ club.email }}">{{ club.email }}</a></dd>
|
||||
<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 can_add_members %}
|
||||
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_add_member' club_pk=club.pk %}"> {% trans "Add member" %}</a>
|
||||
{% endif %}
|
||||
{% if ".change_"|has_perm:club %}
|
||||
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_update' pk=club.pk %}"> {% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% url 'member:club_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 Profile' %}</a>
|
||||
{% endif %} </div>
|
||||
{% if not club.weiclub %}
|
||||
<div class="card-footer text-center">
|
||||
{% if can_add_members %}
|
||||
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_add_member' club_pk=club.pk %}"> {% trans "Add member" %}</a>
|
||||
{% endif %}
|
||||
{% if ".change_"|has_perm:club %}
|
||||
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_update' pk=club.pk %}"> {% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% url 'member:club_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 Profile' %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<div class="col-md-10">
|
||||
<div class="card card-border shadow">
|
||||
<div class="card-header text-center">
|
||||
<h5> {% trans "club listing "%}</h5>
|
||||
<h5> {% trans "Club listing" %}</h5>
|
||||
</div>
|
||||
<div class="card-body px-0 py-0" id="club_table">
|
||||
{% render_table table %}
|
||||
|
@ -1,23 +1,27 @@
|
||||
{% load render_table from django_tables2 %}
|
||||
{% load i18n %}
|
||||
<div class="card">
|
||||
<div class="card-header position-relative" id="clubListHeading">
|
||||
<a class="btn btn-link stretched-link font-weight-bold">
|
||||
<i class="fa fa-users"></i> {% trans "Member of the Club" %}
|
||||
</a>
|
||||
</div>
|
||||
{% if member_list.data %}
|
||||
<div class="card">
|
||||
<div class="card-header position-relative" id="clubListHeading">
|
||||
<a class="btn btn-link stretched-link font-weight-bold">
|
||||
<i class="fa fa-users"></i> {% trans "Member of the Club" %}
|
||||
</a>
|
||||
</div>
|
||||
{% render_table member_list %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header position-relative" id="historyListHeading">
|
||||
<a class="btn btn-link stretched-link font-weight-bold">
|
||||
<i class="fa fa-euro"></i> {% trans "Transaction history" %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
{% endif %}
|
||||
|
||||
{% if history_list.data %}
|
||||
<div class="card">
|
||||
<div class="card-header position-relative" id="historyListHeading">
|
||||
<a class="btn btn-link stretched-link font-weight-bold">
|
||||
<i class="fa fa-euro"></i> {% trans "Transaction history" %}
|
||||
</a>
|
||||
</div>
|
||||
<div id="history_list">
|
||||
{% render_table history_list %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-3 mb-4">
|
||||
<div class="col-xl-4">
|
||||
{% block profile_info %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="col-xl-8">
|
||||
{% block profile_content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
@ -19,9 +19,11 @@
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
function refreshHistory() {
|
||||
$("#history_list").load("{% url 'member:user_detail' pk=object.pk %} #history_list");
|
||||
$("#profile_infos").load("{% url 'member:user_detail' pk=object.pk %} #profile_infos");
|
||||
}
|
||||
{% if object %}
|
||||
function refreshHistory() {
|
||||
$("#history_list").load("{% url 'member:user_detail' pk=object.pk %} #history_list");
|
||||
$("#profile_infos").load("{% url 'member:user_detail' pk=object.pk %} #profile_infos");
|
||||
}
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -17,12 +17,14 @@
|
||||
<dt class="col-xl-6">{% trans 'username'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ object.username }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'password'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">
|
||||
<a class="small" href="{% url 'password_change' %}">
|
||||
{% trans 'Change password' %}
|
||||
</a>
|
||||
</dd>
|
||||
{% if object.pk == user.pk %}
|
||||
<dt class="col-xl-6">{% trans 'password'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">
|
||||
<a class="small" href="{% url 'password_change' %}">
|
||||
{% trans 'Change password' %}
|
||||
</a>
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-xl-6">{% trans 'section'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ object.profile.section }}</dd>
|
||||
|
@ -2,6 +2,7 @@
|
||||
{% load render_table from django_tables2 %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/section ...">
|
||||
|
||||
@ -12,7 +13,7 @@
|
||||
{% render_table table %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "There is no pending user with this pattern." %}
|
||||
{% trans "There is no user with this pattern." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
52
templates/permission/all_rights.html
Normal file
52
templates/permission/all_rights.html
Normal file
@ -0,0 +1,52 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
<div class="form-check">
|
||||
<label for="owned_only" class="form-check-label">
|
||||
<input id="owned_only" name="owned_only" type="checkbox" class="checkboxinput form-check-input">
|
||||
{% trans "Filter with roles that I have in at least one club" %}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% regroup active_memberships by roles as memberships_per_role %}
|
||||
{% for role in roles %}
|
||||
<li class="{% if not role.clubs %}no-club{% endif %}">
|
||||
{{ role }} {% if role.weirole %}(<em>Pour le WEI</em>){% endif %}
|
||||
{% if role.clubs %}
|
||||
<div class="alert alert-success">
|
||||
{% trans "Own this role in the clubs" %} {{ role.clubs|join:", " }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% for permission in role.permissions.permissions.all %}
|
||||
<li data-toggle="tooltip" title="{% trans "Query:" %} {{ permission.query }}">{{ permission }} ({{ permission.type }} {{ permission.model }})</li>
|
||||
{% empty %}
|
||||
<em>{% trans "No associated permission" %}</em>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
let checkbox = $("#owned_only");
|
||||
|
||||
function update() {
|
||||
if (checkbox.is(":checked"))
|
||||
$(".no-club").addClass('d-none');
|
||||
else
|
||||
$(".no-club").removeClass('d-none');
|
||||
}
|
||||
|
||||
checkbox.change(update);
|
||||
update();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -4,7 +4,7 @@
|
||||
{% block content %}
|
||||
{% if validlink %}
|
||||
{% trans "Your email have successfully been validated." %}
|
||||
{% if user.profile.registration_valid %}
|
||||
{% if user_object.profile.registration_valid %}
|
||||
{% blocktrans %}You can now <a href="{{ login_url }}">log in</a>.{% endblocktrans %}
|
||||
{% else %}
|
||||
{% trans "You must pay now your membership in the Kfet to complete your registration." %}
|
||||
|
@ -31,13 +31,6 @@
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-xl-6">{% trans 'password'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">
|
||||
<a class="small" href="{% url 'password_change' %}">
|
||||
{% trans 'Change password' %}
|
||||
</a>
|
||||
</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'section'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ object.profile.section }}</dd>
|
||||
|
||||
|
@ -16,13 +16,6 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{%url 'cas_login' as cas_url %}
|
||||
{% if cas_url %}
|
||||
<div class="alert alert-info">
|
||||
{% trans "You can also register via the central authentification server " %}
|
||||
<a href="{{ cas_url }}"> {% trans "using this link "%}</a>
|
||||
</div>
|
||||
{%endif%}
|
||||
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
|
||||
{{ form | crispy }}
|
||||
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary">
|
||||
|
@ -5,13 +5,18 @@
|
||||
{% block title %}{% trans "Sign up" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Sign up" %}</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ profile_form|crispy }}
|
||||
<button class="btn btn-success" type="submit">
|
||||
{% trans "Sign up" %}
|
||||
</button>
|
||||
</form>
|
||||
<h2>{% trans "Sign up" %}</h2>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
{% blocktrans %}If you already signed up, your registration is taken into account. The BDE must validate your account before your can log in. You have to go to the Kfet and pay the registration fee. You must also validate your email address by following the link you received.{% endblocktrans %}
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ profile_form|crispy }}
|
||||
<button class="btn btn-success" type="submit">
|
||||
{% trans "Sign up" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
2
templates/scripts/mail-error500.html
Normal file
2
templates/scripts/mail-error500.html
Normal file
@ -0,0 +1,2 @@
|
||||
{# The data is already sent as HTML, so we return only the HTML data. Devs don't need a pretty mail... #}
|
||||
{{ error }}
|
7
templates/scripts/mail-error500.txt
Normal file
7
templates/scripts/mail-error500.txt
Normal file
@ -0,0 +1,7 @@
|
||||
Une erreur est survenue dans la Note Kfet. Les détails sont ci-dessous.
|
||||
|
||||
Cordialement,
|
||||
|
||||
L'équipe de la Note Kfet.
|
||||
|
||||
{{ error }}
|
@ -12,6 +12,9 @@
|
||||
<a href="{% url "treasury:remittance_list" %}" class="btn btn-sm btn-outline-primary">
|
||||
{% trans "Remittance" %}s
|
||||
</a>
|
||||
<a href="{% url "treasury:soge_credits" %}" class="btn btn-sm btn-outline-primary">
|
||||
{% trans "Société générale credits" %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,6 +12,9 @@
|
||||
<a href="#" class="btn btn-sm btn-outline-primary active">
|
||||
{% trans "Remittance" %}s
|
||||
</a>
|
||||
<a href="{% url "treasury:soge_credits" %}" class="btn btn-sm btn-outline-primary">
|
||||
{% trans "Société générale credits" %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
67
templates/treasury/sogecredit_detail.html
Normal file
67
templates/treasury/sogecredit_detail.html
Normal file
@ -0,0 +1,67 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load pretty_money %}
|
||||
{% load perms %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Credit from the Société générale" %}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6 text-right">{% trans 'user'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="{% url 'member:user_detail' pk=object.user.pk %}">{{ object.user }}</a></dd>
|
||||
|
||||
{% if "note.view_note_balance"|has_perm:object.user.note %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'balance'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ object.user.note.balance|pretty_money }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'transactions'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">
|
||||
{% for transaction in object.transactions.all %}
|
||||
{{ transaction.membership.club }} ({{ transaction.amount|pretty_money }})<br>
|
||||
{% endfor %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'total amount'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ object.amount|pretty_money }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
{% trans 'Warning: Validating this credit implies that all membership transactions will be validated.' %}
|
||||
{% trans 'If you delete this credit, there all membership transactions will be also validated, but no credit will be operated.' %}
|
||||
{% trans "If this credit is validated, then the user won't be able to ask for a credit from the Société générale." %}
|
||||
{% trans 'If you think there is an error, please contact the "respos info".' %}
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-center" id="buttons_footer">
|
||||
{% if object.valid %}
|
||||
<div class="alert alert-danger">
|
||||
{% trans "This credit is already validated." %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% if object.user.note.balance < object.amount %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "Warning: if you don't validate this credit, the note of the user doesn't have enough money to pay its memberships." %}
|
||||
{% trans "Please ask the user to credit its note before deleting this credit." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="btn-group btn-block">
|
||||
<button name="validate" class="btn btn-success">{% trans "Validate" %}</button>
|
||||
{% if object.user.note.balance >= object.amount %}
|
||||
<button name="delete" class="btn btn-danger">{% trans "Delete" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
<a href="{% url 'treasury:soge_credits' %}"><button class="btn btn-primary btn-block">{% trans "Return to credit list" %}</button></a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
66
templates/treasury/sogecredit_list.html
Normal file
66
templates/treasury/sogecredit_list.html
Normal file
@ -0,0 +1,66 @@
|
||||
{% extends "base.html" %}
|
||||
{% load render_table from django_tables2 %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="btn-group btn-group-toggle" style="width: 100%; padding: 0 0 2em 0" data-toggle="buttons">
|
||||
<a href="{% url "treasury:invoice_list" %}" class="btn btn-sm btn-outline-primary">
|
||||
{% trans "Invoice" %}s
|
||||
</a>
|
||||
<a href="{% url "treasury:remittance_list" %}" class="btn btn-sm btn-outline-primary">
|
||||
{% trans "Remittance" %}s
|
||||
</a>
|
||||
<a href="#" class="btn btn-sm btn-outline-primary active">
|
||||
{% trans "Société générale credits" %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
|
||||
<div class="form-check">
|
||||
<label for="invalid_only" class="form-check-label">
|
||||
<input id="invalid_only" name="invalid_only" type="checkbox" class="checkboxinput form-check-input">
|
||||
{% trans "Filter with unvalidated credits only" %}
|
||||
</label>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div id="credits_table">
|
||||
{% if table.data %}
|
||||
{% render_table table %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "There is no matched user that have asked for a Société générale credit." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
let old_pattern = null;
|
||||
let searchbar_obj = $("#searchbar");
|
||||
let invalid_only_obj = $("#invalid_only");
|
||||
|
||||
function reloadTable() {
|
||||
let pattern = searchbar_obj.val();
|
||||
|
||||
if (pattern === old_pattern || pattern === "")
|
||||
return;
|
||||
|
||||
$("#credits_table").load(location.pathname + "?search=" + pattern.replace(" ", "%20") + (invalid_only_obj.is(':checked') ? "&valid=false" : "") + " #credits_table");
|
||||
|
||||
$(".table-row").click(function() {
|
||||
window.document.location = $(this).data("href");
|
||||
});
|
||||
}
|
||||
|
||||
searchbar_obj.keyup(reloadTable);
|
||||
invalid_only_obj.change(reloadTable);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
9
templates/wei/bus_detail.html
Normal file
9
templates/wei/bus_detail.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
{% include "wei/bus_tables.html" %}
|
||||
{% endblock %}
|
15
templates/wei/bus_form.html
Normal file
15
templates/wei/bus_form.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
50
templates/wei/bus_tables.html
Normal file
50
templates/wei/bus_tables.html
Normal file
@ -0,0 +1,50 @@
|
||||
{% 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 %}">{% trans "Edit" %}</a>
|
||||
<a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_team' pk=object.pk %}">{% trans "Add team" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{% if teams.data %}
|
||||
<div class="card">
|
||||
<div class="card-header position-relative" id="clubListHeading">
|
||||
<a class="btn btn-link stretched-link 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="btn btn-link stretched-link 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 %}
|
9
templates/wei/busteam_detail.html
Normal file
9
templates/wei/busteam_detail.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
{% include "wei/busteam_tables.html" %}
|
||||
{% endblock %}
|
15
templates/wei/busteam_form.html
Normal file
15
templates/wei/busteam_form.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
54
templates/wei/busteam_tables.html
Normal file
54
templates/wei/busteam_tables.html
Normal file
@ -0,0 +1,54 @@
|
||||
{% 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 %}">{% trans "Edit" %}</a>
|
||||
<a class="btn btn-primary btn-sm my-1" href="{% url 'wei:add_team' pk=bus.pk %}">{% 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="btn btn-link stretched-link 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 %}
|
29
templates/wei/survey.html
Normal file
29
templates/wei/survey.html
Normal file
@ -0,0 +1,29 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Survey WEI" %}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6">{% trans 'user'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ object.user }}</dd>
|
||||
</dl>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<div class="card-footer text-center">
|
||||
<input class="btn btn-success" type="submit" value="{% trans "Next" %}"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
23
templates/wei/survey_closed.html
Normal file
23
templates/wei/survey_closed.html
Normal file
@ -0,0 +1,23 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Survey WEI" %}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>
|
||||
{% trans "The inscription for this WEI are now closed." %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<a class="btn btn-primary btn-sm my-1" href="{% url 'wei:wei_detail' pk=club.pk %}">{% trans "Return to WEI detail" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
20
templates/wei/survey_end.html
Normal file
20
templates/wei/survey_end.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Survey WEI" %}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>
|
||||
{% trans "The survey is now ended. Your answers have been saved." %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
20
templates/wei/weiclub_detail.html
Normal file
20
templates/wei/weiclub_detail.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
{% include "wei/weiclub_tables.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
function refreshHistory() {
|
||||
$("#history_list").load("{% url 'wei:wei_detail' pk=object.pk %} #history_list");
|
||||
$("#profile_infos").load("{% url 'wei:wei_detail' pk=object.pk %} #profile_infos");
|
||||
}
|
||||
|
||||
window.history.replaceState({}, document.title, location.pathname);
|
||||
</script>
|
||||
{% endblock %}
|
17
templates/wei/weiclub_form.html
Normal file
17
templates/wei/weiclub_form.html
Normal file
@ -0,0 +1,17 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% if club %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
79
templates/wei/weiclub_info.html
Normal file
79
templates/wei/weiclub_info.html
Normal file
@ -0,0 +1,79 @@
|
||||
{% 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 / including BDE and Kfet fee (paid students)'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_fee_paid|pretty_money }} / {{ club.membership_fee_paid|add:bde_kfet_fee|pretty_money }}</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 / including BDE and Kfet fee (unpaid students)'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ club.membership_fee_unpaid|pretty_money }} / {{ club.membership_fee_unpaid|add:bde_kfet_fee|pretty_money }}</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 %}"> {% 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 %}"> {% 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 %}"> {% 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 %}"> {% 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>
|
70
templates/wei/weiclub_list.html
Normal file
70
templates/wei/weiclub_list.html
Normal file
@ -0,0 +1,70 @@
|
||||
{% extends "base.html" %}
|
||||
{% load render_table from django_tables2 %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col-md-10 text-center">
|
||||
<h4>
|
||||
{% trans "search WEI" %}
|
||||
</h4>
|
||||
<input class="form-control mx-auto w-25" type="text" onkeyup="search_field_moved()" id="search_field"/>
|
||||
<hr>
|
||||
<a class="btn btn-primary text-center my-4" href="{% url 'wei:wei_create' %}">{% trans "Create WEI" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10">
|
||||
<div class="card card-border shadow">
|
||||
<div class="card-header text-center">
|
||||
<h5> {% trans "WEI listing" %}</h5>
|
||||
</div>
|
||||
<div class="card-body px-0 py-0" id="club_table">
|
||||
{% render_table table %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block extrajavascript %}
|
||||
<script type="text/javascript">
|
||||
|
||||
function getInfo() {
|
||||
var asked = $("#search_field").val();
|
||||
/* on ne fait la requête que si on a au moins un caractère pour chercher */
|
||||
var sel = $(".table-row");
|
||||
if (asked.length >= 1) {
|
||||
$.getJSON("/api/wei/club/?format=json&search="+asked, function(buttons){
|
||||
let selected_id = buttons.results.map((a => "#row-"+a.id));
|
||||
$(".table-row,"+selected_id.join()).show();
|
||||
$(".table-row").not(selected_id.join()).hide();
|
||||
|
||||
});
|
||||
}else{
|
||||
// show everything
|
||||
$('table tr').show();
|
||||
}
|
||||
}
|
||||
var timer;
|
||||
var timer_on;
|
||||
/* Fontion appelée quand le texte change (délenche le timer) */
|
||||
function search_field_moved(secondfield) {
|
||||
if (timer_on) { // Si le timer a déjà été lancé, on réinitialise le compteur.
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout("getInfo(" + secondfield + ")", 300);
|
||||
}
|
||||
else { // Sinon, on le lance et on enregistre le fait qu'il tourne.
|
||||
timer = setTimeout("getInfo(" + secondfield + ")", 300);
|
||||
timer_on = true;
|
||||
}
|
||||
}
|
||||
|
||||
// clickable row
|
||||
$(document).ready(function($) {
|
||||
$(".table-row").click(function() {
|
||||
window.document.location = $(this).data("href");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
129
templates/wei/weiclub_tables.html
Normal file
129
templates/wei/weiclub_tables.html
Normal file
@ -0,0 +1,129 @@
|
||||
{% load render_table from django_tables2 %}
|
||||
{% load i18n %}
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<h4>WEI</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>LE WEI, c'est cool !</p>
|
||||
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
||||
magna aliqua. Dapibus ultrices in iaculis nunc sed augue. In hendrerit gravida rutrum quisque non tellus orci
|
||||
ac. Massa vitae tortor condimentum lacinia quis vel eros. Elit ut aliquam purus sit amet. Aliquam faucibus
|
||||
purus in massa tempor. Quisque id diam vel quam elementum pulvinar etiam non. Condimentum id venenatis a
|
||||
condimentum vitae sapien pellentesque habitant. Egestas congue quisque egestas diam in. Vestibulum rhoncus
|
||||
est pellentesque elit ullamcorper. Massa sed elementum tempus egestas sed sed. Sapien pellentesque habitant
|
||||
morbi tristique. Lectus vestibulum mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare. Sed
|
||||
adipiscing diam donec adipiscing. Leo integer malesuada nunc vel risus commodo viverra maecenas.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Fusce id velit ut tortor pretium viverra suspendisse. Urna condimentum mattis pellentesque id nibh tortor id
|
||||
aliquet. Vel facilisis volutpat est velit egestas dui. Turpis egestas sed tempus urna et pharetra pharetra
|
||||
massa massa. Eget nunc scelerisque viverra mauris in. Etiam dignissim diam quis enim. Urna cursus eget nunc
|
||||
scelerisque viverra mauris in aliquam sem. Amet porttitor eget dolor morbi non arcu risus quis. Ullamcorper
|
||||
sit amet risus nullam eget felis. Ullamcorper eget nulla facilisi etiam dignissim diam quis. Enim nulla
|
||||
aliquet porttitor lacus luctus accumsan tortor. Urna condimentum mattis pellentesque id nibh tortor id.
|
||||
Feugiat in fermentum posuere urna nec. Risus nec feugiat in fermentum posuere urna nec tincidunt. Porttitor
|
||||
massa id neque aliquam vestibulum morbi. Diam quis enim lobortis scelerisque. Ornare massa eget egestas
|
||||
purus. Ut tortor pretium viverra suspendisse. Purus in mollis nunc sed. Tristique magna sit amet purus
|
||||
gravida.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Ut porttitor leo a diam sollicitudin tempor. Viverra nam libero justo laoreet sit amet cursus sit amet.
|
||||
Lectus arcu bibendum at varius vel pharetra vel turpis nunc. Vivamus arcu felis bibendum ut tristique et
|
||||
egestas quis ipsum. Parturient montes nascetur ridiculus mus mauris. A cras semper auctor neque vitae
|
||||
tempus quam pellentesque. Netus et malesuada fames ac. Mauris in aliquam sem fringilla ut. Sapien
|
||||
pellentesque habitant morbi tristique. Mauris sit amet massa vitae tortor condimentum. Sagittis
|
||||
aliquam malesuada bibendum arcu vitae elementum curabitur vitae nunc. Amet consectetur adipiscing elit
|
||||
duis tristique sollicitudin nibh sit. Nunc mattis enim ut tellus elementum. Sapien eget mi proin sed libero
|
||||
enim. Pulvinar sapien et ligula ullamcorper. Nibh mauris cursus mattis molestie a iaculis at erat
|
||||
pellentesque. Molestie at elementum eu facilisis. Velit sed ullamcorper morbi tincidunt. Quam vulputate
|
||||
dignissim suspendisse in est ante.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Id cursus metus aliquam eleifend mi. Eu turpis egestas pretium aenean pharetra magna ac. Faucibus ornare
|
||||
suspendisse sed nisi lacus sed viverra tellus. Sed vulputate mi sit amet mauris commodo. Lacus laoreet non
|
||||
curabitur gravida arcu ac. At ultrices mi tempus imperdiet nulla malesuada pellentesque elit eget. Fusce ut
|
||||
placerat orci nulla pellentesque dignissim. Quis blandit turpis cursus in hac habitasse platea dictumst
|
||||
quisque. Tellus id interdum velit laoreet id donec ultrices. Risus feugiat in ante metus dictum. Velit ut
|
||||
tortor pretium viverra suspendisse. Lacus vel facilisis volutpat est velit egestas dui id. Nunc eget lorem
|
||||
dolor sed viverra ipsum nunc aliquet bibendum. Varius quam quisque id diam vel quam. Orci dapibus ultrices
|
||||
in iaculis. Neque gravida in fermentum et sollicitudin ac orci.
|
||||
</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 %}"><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 %}"><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 %}"><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="btn btn-link stretched-link 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="btn btn-link 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="btn btn-link stretched-link font-weight-bold">
|
||||
<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="btn btn-link 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 %}
|
51
templates/wei/weilist_sample.tex
Normal file
51
templates/wei/weilist_sample.tex
Normal file
@ -0,0 +1,51 @@
|
||||
\documentclass[landscape,10pt]{article}
|
||||
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[french]{babel}
|
||||
|
||||
\usepackage[margin=1.5cm]{geometry}
|
||||
\usepackage{ltablex}
|
||||
\usepackage{tabularx}
|
||||
|
||||
\begin{document}
|
||||
\begin{center}
|
||||
\huge{Liste des inscrits \og {{ wei.name }} \fg{}}
|
||||
|
||||
{% if bus %}
|
||||
\LARGE{Bus {{ bus.name }}}
|
||||
|
||||
|
||||
{% if team %}
|
||||
\Large{Équipe {{ team.name }}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
\end{center}
|
||||
|
||||
\begin{center}
|
||||
\footnotesize
|
||||
\begin{tabularx}{\textwidth}{ccccccccc}
|
||||
\textbf{Nom} & \textbf{Prénom} & \textbf{Date de naissance} & \textbf{Genre} & \textbf{Section}
|
||||
& \textbf{Bus} & \textbf{Équipe} & \textbf{Rôles} \\
|
||||
{% for membership in memberships %}
|
||||
{{ membership.user.last_name|safe }} & {{ membership.user.first_name|safe }} & {{ membership.registration.birth_date|safe }}
|
||||
& {{ membership.registration.get_gender_display|safe }} & {{ membership.user.profile.section_generated|safe }} & {{ membership.bus.name|safe }}
|
||||
& {% if membership.team %}{{ membership.team.name|safe }}{% else %}--{% endif %} & {{ membership.roles.first|safe }} \\
|
||||
{% endfor %}
|
||||
\end{tabularx}
|
||||
\end{center}
|
||||
|
||||
\footnotesize
|
||||
Section = Année à l'ENS + code du département
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{ccccccccc}
|
||||
\textbf{Code} & A0 & A1 & A2 & A'2 & A''2 & A3 & B1234 & B1 \\
|
||||
\textbf{Département} & Informatique & Maths & Physique & Physique appliquée & Chimie & Biologie & SAPHIRE & Mécanique \\
|
||||
\hline
|
||||
\textbf{Code} & B2 & B3 & B4 & C & D2 & D3 & E & EXT \\
|
||||
\textbf{Département} & Génie civil & Génie mécanique & EEA & Design & Éco-gestion & Sciences sociales & Anglais & Extérieur
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
\end{document}
|
209
templates/wei/weimembership_form.html
Normal file
209
templates/wei/weimembership_form.html
Normal file
@ -0,0 +1,209 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
{% load pretty_money %}
|
||||
{% load perms %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Review registration" %}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6">{% trans 'name'|capfirst %}, {% trans 'first name' %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.last_name }} {{ registration.user.first_name }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'username'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.username }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'email'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="mailto:{{ registration.user.email }}">{{ registration.user.email }}</a></dd>
|
||||
|
||||
{% if not registration.user.profile.email_confirmed and "member.change_profile_email_confirmed"|has_perm:registration.user.profile %}
|
||||
<dd class="col-xl-12">
|
||||
<div class="alert alert-warning">
|
||||
{% trans "This user doesn't have confirmed his/her e-mail address." %}
|
||||
<a href="{% url "registration:email_validation_resend" pk=registration.user.pk %}">{% trans "Click here to resend a validation link." %}</a>
|
||||
</div>
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-xl-6">{% trans 'department'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.profile.department }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'ENS year'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.profile.ens_year }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'section'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.profile.section }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'address'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.profile.address }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'phone number'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.profile.phone_number }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'paid'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.profile.paid|yesno }}</dd>
|
||||
|
||||
<hr>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'first year'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.first_year|yesno }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'gender'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.gender }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'birth date'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.birth_date }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'health issues'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.health_issues }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'emergency contact name'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.emergency_contact_name }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'emergency contact phone'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.emergency_contact_phone }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'Register on the mailing list to stay informed of the events of the campus (1 mail/week)' %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.ml_events_registration|yesno }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'Register on the mailing list to stay informed of the sport events of the campus (1 mail/week)' %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.ml_sport_registration|yesno }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'Register on the mailing list to stay informed of the art events of the campus (1 mail/week)' %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.ml_art_registration|yesno }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'Payment from Société générale' %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.soge_credit|yesno }}</dd>
|
||||
|
||||
{% if registration.first_year %}
|
||||
<dt class="col-xl-6">{% trans 'Suggested bus from the survey:' %}</dt>
|
||||
{% if registration.information.valid or True %}
|
||||
<dd class="col-xl-6">{{ suggested_bus }}</dd>
|
||||
|
||||
<div class="card-header text-center col-xl-12">
|
||||
<h5>{% trans 'Raw survey information' %}</h5>
|
||||
</div>
|
||||
|
||||
{% with information=registration.information %}
|
||||
{% for key, value in information.items %}
|
||||
<dt class="col-xl-6">{{ key }}</dt>
|
||||
<dd class="col-xl-6">{{ value }}</dd>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<dd class="col-xl-6"><em>{% trans "The algorithm didn't run." %}</em></dd>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<dt class="col-xl-6">{% trans 'caution check given'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.caution_check|yesno }}</dd>
|
||||
|
||||
{% with information=registration.information %}
|
||||
<dt class="col-xl-6">{% trans 'preferred bus'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ information.preferred_bus_name|join:', ' }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'preferred team'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ information.preferred_team_name|join:', ' }}</dd>
|
||||
|
||||
<dt class="col-xl-6">{% trans 'preferred roles'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ information.preferred_roles_name|join:', ' }}</dd>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<a class="btn btn-primary btn-sm" href="{% url 'wei:wei_update_registration' registration.pk %}">{% trans 'Update registration' %}</a>
|
||||
{% if "auth.change_user"|has_perm:registration.user %}
|
||||
<a class="btn btn-primary btn-sm" href="{% url 'member:user_update_profile' registration.user.pk %}">{% trans 'Update Profile' %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="card bg-light shadow">
|
||||
<form method="post">
|
||||
<div class="card-header text-center" >
|
||||
<h4> {% trans "Validate registration" %}</h4>
|
||||
</div>
|
||||
{% if registration.is_validated %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "The registration is already validated and can't be unvalidated." %}
|
||||
{% trans "The user joined the bus" %} {{ registration.membership.bus }}
|
||||
{% if registration.membership.team %}{% trans "in the team" %} {{ registration.membership.team }},
|
||||
{% else %}{% trans "in no team (staff)" %},{% endif %} {% trans "with the following roles:" %} {{ registration.membership.roles.all|join:", " }}
|
||||
</div>
|
||||
{% else %}
|
||||
{% if registration.soge_credit %}
|
||||
<div class="alert alert-warning">
|
||||
{% blocktrans %}
|
||||
The WEI will be paid by Société générale. The membership will be created even if the bank didn't pay the BDE yet.
|
||||
The membership transaction will be created but will be invalid. You will have to validate it once the bank
|
||||
validated the creation of the account, or to change the payment method.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% if registration.user.note.balance < fee %}
|
||||
<div class="alert alert-danger">
|
||||
{% with pretty_fee=fee|pretty_money %}
|
||||
{% blocktrans with balance=registration.user.note.balance|pretty_money %}
|
||||
The note don't have enough money ({{ balance }}, {{ pretty_fee }} required). The registration may fail.
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-success">
|
||||
{% trans "The note has enough money, the registration is possible." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not registration.caution_check and not registration.first_year %}
|
||||
<div class="alert alert-danger">
|
||||
{% trans "The user didn't give her/his caution check." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not kfet_member %}
|
||||
<div class="alert alert-danger">
|
||||
{% url 'registration:future_user_detail' pk=registration.user.pk as future_user_detail %}
|
||||
{% url 'member:club_detail' pk=club.parent_club.parent_club.pk as club_detail %}
|
||||
{% blocktrans %}
|
||||
This user is not a member of the Kfet club. Please adhere
|
||||
<a href="{{ future_user_detail }}">here if he/she is in her/his first year</a>
|
||||
or <a href="{{ club_detail }}">here if he/she was an old member</a> before you validate
|
||||
the registration of the WEI.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="card-body" id="profile_infos">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<button class="btn btn-success btn-sm">{% trans 'Validate registration' %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
function autocompleted(obj, prefix) {
|
||||
console.log(prefix);
|
||||
if (prefix === "id_bus") {
|
||||
console.log(obj);
|
||||
$("#id_team").attr('api_url', '/api/wei/team/?bus=' + obj.id);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
52
templates/wei/weimembership_list.html
Normal file
52
templates/wei/weimembership_list.html
Normal file
@ -0,0 +1,52 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load render_table from django_tables2 %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/bus/équipe ...">
|
||||
<hr>
|
||||
|
||||
<div id="memberships_table">
|
||||
{% if table.data %}
|
||||
{% render_table table %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "There is no membership found with this pattern." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<a href="{% url 'wei:wei_registrations' pk=club.pk %}">
|
||||
<button class="btn btn-block btn-info">{% trans "View unvalidated registrations..." %}</button>
|
||||
</a>
|
||||
|
||||
<hr>
|
||||
|
||||
<a href="{% url 'wei:wei_memberships_pdf' wei_pk=club.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>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
let old_pattern = null;
|
||||
let searchbar_obj = $("#searchbar");
|
||||
|
||||
function reloadTable() {
|
||||
let pattern = searchbar_obj.val();
|
||||
|
||||
if (pattern === old_pattern)
|
||||
return;
|
||||
|
||||
$("#memberships_table").load(location.pathname + "?search=" + pattern.replace(" ", "%20") + " #memberships_table");
|
||||
}
|
||||
|
||||
searchbar_obj.keyup(reloadTable);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
37
templates/wei/weiregistration_confirm_delete.html
Normal file
37
templates/wei/weiregistration_confirm_delete.html
Normal file
@ -0,0 +1,37 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Delete registration" %}</h4>
|
||||
</div>
|
||||
{% if object.is_validated %}
|
||||
<div class="card-body">
|
||||
<div class="alert alert-danger">
|
||||
{% blocktrans %}This registration is already validated and can't be deleted.{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card-body">
|
||||
<div class="alert alert-warning">
|
||||
{% with user=object.user wei_name=object.wei.name %}
|
||||
{% blocktrans %}Are you sure you want to delete the registration of {{ user }} for the WEI {{ wei_name }}? This action can't be undone.{% endblocktrans %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<a class="btn btn-warning" href="{% url 'wei:wei_update_registration' object.pk %}">{% trans "Update registration" %}</a>
|
||||
<button class="btn btn-danger" type="submit">{% trans "Delete" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
16
templates/wei/weiregistration_form.html
Normal file
16
templates/wei/weiregistration_form.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ membership_form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
46
templates/wei/weiregistration_list.html
Normal file
46
templates/wei/weiregistration_list.html
Normal file
@ -0,0 +1,46 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load render_table from django_tables2 %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
|
||||
<hr>
|
||||
|
||||
<div id="registrations_table">
|
||||
{% if table.data %}
|
||||
{% render_table table %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "There is no pre-registration found with this pattern." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<a href="{% url 'wei:wei_memberships' pk=club.pk %}">
|
||||
<button class="btn btn-block btn-info">{% trans "View validated memberships..." %}</button>
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
let old_pattern = null;
|
||||
let searchbar_obj = $("#searchbar");
|
||||
|
||||
function reloadTable() {
|
||||
let pattern = searchbar_obj.val();
|
||||
|
||||
if (pattern === old_pattern)
|
||||
return;
|
||||
|
||||
$("#registrations_table").load(location.pathname + "?search=" + pattern.replace(" ", "%20") + " #registrations_table");
|
||||
}
|
||||
|
||||
searchbar_obj.keyup(reloadTable);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user