mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-06-30 11:11:11 +02:00
Ajoute la gestion des adhesions dans la bdd
This commit is contained in:
46
users/templates/users/aff_adhesion.html
Normal file
46
users/templates/users/aff_adhesion.html
Normal file
@ -0,0 +1,46 @@
|
||||
{% comment %}
|
||||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||
se veut agnostique au réseau considéré, de manière à être installable en
|
||||
quelques clics.
|
||||
|
||||
Copyright © 2017 Gabriel Détraz
|
||||
Copyright © 2017 Goulven Kermarec
|
||||
Copyright © 2017 Augustin Lemesle
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
{% endcomment %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Année début</th>
|
||||
<th>Année fin</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for adhesion in adhesion_list %}
|
||||
<tr>
|
||||
<td>{{ adhesion.annee_debut }}</td>
|
||||
<td>{{ adhesion.annee_fin }}</td>
|
||||
<td class="text-right">
|
||||
{% if is_bureau %}
|
||||
{% include 'buttons/edit.html' with href='users:edit-adhesion' id=adhesion.id %}
|
||||
{% include 'buttons/suppr.html' with href='users:del-adhesion' id=adhesion.id %}
|
||||
{% endif %}
|
||||
{% include 'buttons/history.html' with href='users:history' name='adhesion' id=adhesion.id %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
<th>Pseudo</th>
|
||||
<th>Mail</th>
|
||||
<th>Max emprunts</th>
|
||||
<th>Adhérent</th>
|
||||
<th>Profil</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -44,7 +45,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
<td>{{ user.pseudo }}</td>
|
||||
<td>{{ user.email }}</td>
|
||||
<td>{{ user.maxemprunt }}</td>
|
||||
</td>
|
||||
{% if user.is_adherent %}
|
||||
<td><font color="green">Oui</font></td>
|
||||
{% else %}
|
||||
<td><font color="red">Non</font></td>
|
||||
{% endif %}
|
||||
<td><a href="{% url "users:profil" user.id%}" class="btn btn-primary btn-sm" role="button"><i class="glyphicon glyphicon-user"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
39
users/templates/users/index_adhesion.html
Normal file
39
users/templates/users/index_adhesion.html
Normal file
@ -0,0 +1,39 @@
|
||||
{% extends "users/sidebar.html" %}
|
||||
{% comment %}
|
||||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||
se veut agnostique au réseau considéré, de manière à être installable en
|
||||
quelques clics.
|
||||
|
||||
Copyright © 2017 Gabriel Détraz
|
||||
Copyright © 2017 Goulven Kermarec
|
||||
Copyright © 2017 Augustin Lemesle
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block title %}Adhesion{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des adhesion</h2>
|
||||
{% if is_bureau %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-adhesion' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter une adhesion</a>
|
||||
{% endif %}
|
||||
{% include "users/aff_adhesion.html" with adhesion_list=adhesion_list %}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
@ -103,6 +103,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
<th>Dernière connexion</th>
|
||||
<td>{{ user.last_login }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Adherent pour l'année en cours</th>
|
||||
{% if user.is_adherent %}
|
||||
<td><font color="green">Oui</font></td>
|
||||
{% else %}
|
||||
<td><font color="red">Non</font></td>
|
||||
{% endif %}
|
||||
{% if not user.is_adherent and is_bureau %}
|
||||
<th></th>
|
||||
<td><a class="btn btn-primary btn-sm" role="button" href="{% url 'users:adherer' user.id %}"><i class="glyphicon glyphicon-flag"></i> Adhérer</a></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Emprunts</h2>
|
||||
{% if is_perm or is_bureau %}
|
||||
|
@ -33,9 +33,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
{% endif %}
|
||||
{% if is_perm %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "users:index" %}">
|
||||
<i class="glyphicon glyphicon-list"></i>
|
||||
Utilisateurs dans la base
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "users:index-ajour" %}">
|
||||
<i class="glyphicon glyphicon-list"></i>
|
||||
Adhérents
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "users:index-adhesion" %}">
|
||||
<i class="glyphicon glyphicon-list"></i>
|
||||
Adhesions
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "users:index-listright" %}">
|
||||
<i class="glyphicon glyphicon-list"></i>
|
||||
Droits
|
||||
|
Reference in New Issue
Block a user