diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2570ecf954b5d8d6c941778ce79a0aaa50cb252b..b096c66cc5d69eaf1f3d180ea82fe617c01ff165 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,10 +11,10 @@ Unreleased Fixed ~~~~~ - * In some cases, pages showing the count of extra marks and lessons with custom excuse types of persons threw an error. * The redirection to generated class register PDF printouts did not work. +* Some columns in the table showing statistics for the members of a group were labled wrongly. * Absences with custom excuse types were not counted correctly. `3.0b0`_ - 2022-02-28 diff --git a/aleksis/apps/alsijil/templates/alsijil/partials/persons_with_stats.html b/aleksis/apps/alsijil/templates/alsijil/partials/persons_with_stats.html index bb60dbbd0984d1dab0130ada052cb423288aee2e..69ce9c6c9a011744eb2b3bed80228fe3147ff01b 100644 --- a/aleksis/apps/alsijil/templates/alsijil/partials/persons_with_stats.html +++ b/aleksis/apps/alsijil/templates/alsijil/partials/persons_with_stats.html @@ -12,11 +12,13 @@ <th rowspan="2">{% trans "Name" %}</th> <th rowspan="2">{% trans "Primary group" %}</th> <th colspan="{{ excuse_types.count|add:4 }}">{% trans "Absences" %}</th> - <th colspan="{{ excuse_types_not_absent.count }}">{% trans "Uncounted Absences" %}</th> - <th rowspan="2">{% trans "Tardiness" %}</th> + {% if excuse_types_not_absent %} + <th colspan="{{ excuse_types_not_absent.count }}">{% trans "Uncounted Absences" %}</th> + {% endif %} {% if extra_marks %} <th colspan="{{ extra_marks.count }}">{% trans "Extra marks" %}</th> {% endif %} + <th rowspan="2">{% trans "Tardiness" %}</th> <th rowspan="2"></th> </tr> <tr class="hide-on-large-only"> @@ -36,12 +38,12 @@ ({{ excuse_type.short_name }}) </th> {% endfor %} - <th class="truncate chip-height">{% trans "Tardiness" %}</th> {% for extra_mark in extra_marks %} <th class="chip-height"> {{ extra_mark.short_name }} </th> {% endfor %} + <th class="truncate chip-height">{% trans "Tardiness" %}</th> <th rowspan="2"></th> </tr> <tr class="hide-on-med-and-down"> @@ -110,12 +112,6 @@ </span> </td> {% endfor %} - <td> - <span class="chip orange white-text" title="{% trans "Tardiness" %}"> - {% firstof person.tardiness|to_time|time:"H\h i\m" "–" %} - </span> - <span class="chip orange white-text" title="{% trans "Count of tardiness" %}">{{ person.tardiness_count }} ×</span> - </td> {% for extra_mark in extra_marks %} <td> <span class="chip grey white-text" title="{{ extra_mark.name }}"> @@ -123,6 +119,12 @@ </span> </td> {% endfor %} + <td> + <span class="chip orange white-text" title="{% trans "Tardiness" %}"> + {% firstof person.tardiness|to_time|time:"H\h i\m" "–" %} + </span> + <span class="chip orange white-text" title="{% trans "Count of tardiness" %}">{{ person.tardiness_count }} ×</span> + </td> <td> <a class="btn primary waves-effect waves-light" href="{% url "overview_person" person.pk %}">