From 9383b5ddf9f451a6c5bf658ed58f96bcc43ac2cd Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 17 Oct 2017 21:09:18 +0300 Subject: [PATCH] Add tooltip about kaehmys to statistics page --- static/css/footer.css | 1 + webapp/templates/kaehmy_statistics.html | 2 +- webapp/views.py | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/static/css/footer.css b/static/css/footer.css index 03b785c..2ebad99 100644 --- a/static/css/footer.css +++ b/static/css/footer.css @@ -5,6 +5,7 @@ .footer { text-align: center; margin-top: 2rem; + margin-bottom: 1rem; } #fi-button { diff --git a/webapp/templates/kaehmy_statistics.html b/webapp/templates/kaehmy_statistics.html index 8bceb20..7c999fe 100644 --- a/webapp/templates/kaehmy_statistics.html +++ b/webapp/templates/kaehmy_statistics.html @@ -20,7 +20,7 @@
{% for role in role_list %}
-

{{ role.0 }} ({{ role.1 }})

+

{{ role.0 }} ({{ role.1 }})

{% endfor %}
diff --git a/webapp/views.py b/webapp/views.py index 97f69e4..4b4c2c3 100644 --- a/webapp/views.py +++ b/webapp/views.py @@ -274,9 +274,11 @@ def kaehmy_statistics_view(request, *args, **kwargs): custom_roles = CustomKaehmyRole.objects.all() for preset in preset_roles: - role_list.append((preset.name, preset.forms.all().count())) + people = [form.name for form in preset.forms.all()] + role_list.append((preset.name, len(people), ', '.join(people))) for custom in custom_roles: - role_list.append((custom.name, custom.forms.all().count())) + people = [form.name for form in custom.forms.all()] + role_list.append((custom.name, len(people), ', '.join(people))) context = { 'applications': applications,