diff --git a/logs/templates/logs/aff_stats_droits.html b/logs/templates/logs/aff_stats_droits.html
new file mode 100644
index 00000000..dcd7a4db
--- /dev/null
+++ b/logs/templates/logs/aff_stats_droits.html
@@ -0,0 +1,110 @@
+{% 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 %}
+{% load acl %}
+
+
+ {% for droit in stats_list %}
+
+
+
+
+ {{droit}}
+ {{droit.user_set.all.count}}
+
+
+
+
+
+
+
+
+
+
+ Pseudo |
+ Adhésion |
+ Derniere connection |
+ Nombre d'actions |
+ Supprimer |
+
+
+ {% for user in droit.user_set.all %}
+
+ {{ user.pseudo }} |
+ {% if user.is_adherent %}
+ Adhérent |
+ {% elif not user.end_adhesion %}
+ On ne s'en souvient plus... |
+ {% else %}
+ Plus depuis {{ user.end_adhesion }} |
+ {% endif %}
+ {{ user.last_login }} |
+ {{ user.name }} |
+
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+ {% endfor %}
+
diff --git a/logs/templates/logs/sidebar.html b/logs/templates/logs/sidebar.html
index 0e3048e3..03a4bd73 100644
--- a/logs/templates/logs/sidebar.html
+++ b/logs/templates/logs/sidebar.html
@@ -51,5 +51,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Utilisateurs
+
+
+ Groupes de droit
+
{% acl_end %}
{% endblock %}
diff --git a/logs/templates/logs/stats_droits.html b/logs/templates/logs/stats_droits.html
new file mode 100644
index 00000000..76c20331
--- /dev/null
+++ b/logs/templates/logs/stats_droits.html
@@ -0,0 +1,36 @@
+{% extends "logs/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 %}Statistiques des droits{% endblock %}
+
+{% block content %}
+ Statistiques des droits
+ {% include "logs/aff_stats_droits.html" with stats_list=stats_list %}
+
+
+
+ {% endblock %}
diff --git a/logs/urls.py b/logs/urls.py
index 11009835..98dec281 100644
--- a/logs/urls.py
+++ b/logs/urls.py
@@ -39,4 +39,5 @@ urlpatterns = [
url(r'^stats_models/$', views.stats_models, name='stats-models'),
url(r'^stats_users/$', views.stats_users, name='stats-users'),
url(r'^stats_actions/$', views.stats_actions, name='stats-actions'),
+ url(r'^stats_droits/$', views.stats_droits, name='stats-droits'),
]
diff --git a/logs/views.py b/logs/views.py
index 48e52fe0..5b117f2f 100644
--- a/logs/views.py
+++ b/logs/views.py
@@ -446,3 +446,10 @@ def stats_actions(request):
},
}
return render(request, 'logs/stats_users.html', {'stats_list': stats})
+
+@login_required
+@can_view_app('users')
+def stats_droits(request):
+ """Affiche la liste des droits disponibles"""
+ droits=ListRight.objects.all().prefetch_related('user_set')
+ return render(request, 'logs/stats_droits.html', {'stats_list': droits})