Add tooltip about kaehmys to statistics page

This commit is contained in:
Jan Tuomi
2017-10-17 21:09:18 +03:00
parent bfac4aba9b
commit 9383b5ddf9
3 changed files with 6 additions and 3 deletions
+1
View File
@@ -5,6 +5,7 @@
.footer {
text-align: center;
margin-top: 2rem;
margin-bottom: 1rem;
}
#fi-button {
+1 -1
View File
@@ -20,7 +20,7 @@
<div class="card-block">
{% for role in role_list %}
<div>
<p>{{ role.0 }} ({{ role.1 }})</p>
<p>{{ role.0 }} <strong data-toggle="tooltip" data-placement="right" title="{{ role.2 }}">({{ role.1 }})</strong></p>
</div>
{% endfor %}
</div>
+4 -2
View File
@@ -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,