Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
593d3d1e
Commit
593d3d1e
authored
3 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Move statistics to a real extra tab
parent
c8771f09
No related branches found
No related tags found
1 merge request
!111
Resolve "[Person overview] Implement multiple selection for marking absences as excused or for deleting"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/templates/alsijil/class_register/person.html
+48
-107
48 additions, 107 deletions
...apps/alsijil/templates/alsijil/class_register/person.html
with
48 additions
and
107 deletions
aleksis/apps/alsijil/templates/alsijil/class_register/person.html
+
48
−
107
View file @
593d3d1e
...
@@ -36,10 +36,10 @@
...
@@ -36,10 +36,10 @@
<a
href=
"#personal-notes"
>
{% trans "Personal notes" %}
</a>
<a
href=
"#personal-notes"
>
{% trans "Personal notes" %}
</a>
</li>
</li>
{% if stats %}
{% if stats %}
<li
class=
"tab col s6"
><a
href=
"#overview"
class=
"active"
>
{% trans "Overview" %}
</a></li>
<li
class=
"tab"
><a
href=
"#statistics"
>
{% trans "Statistics" %}
</a></li>
<li
class=
"tab col s6"
><a
href=
"#statistics"
>
{% trans "Statistics" %}
</a></li>
{% endif %}
{% endif %}
</ul>
</ul>
</div>
{% if register_object_table %}
{% if register_object_table %}
<div
class=
"col s12"
id=
"lesson-documentations"
>
<div
class=
"col s12"
id=
"lesson-documentations"
>
{% include "alsijil/partials/objects_table.html" with table=register_object_table filter_form=filter_form %}
{% include "alsijil/partials/objects_table.html" with table=register_object_table filter_form=filter_form %}
...
@@ -56,111 +56,8 @@
...
@@ -56,111 +56,8 @@
{% endif %}
{% endif %}
{% if stats %}
<div
class=
"col s12"
>
<ul
class=
"tabs"
>
<li
class=
"tab col s6"
><a
href=
"#overview"
class=
"active"
>
{% trans "Overview" %}
</a></li>
<li
class=
"tab col s6"
><a
href=
"#statistics"
>
{% trans "Statistics" %}
</a></li>
</ul>
</div>
{% endif %}
<div
class=
"col s12"
id=
"statistics"
>
<h5>
{% trans "Unexcused absences" %}
</h5>
{# {% for note in unexcused_absences %}#}
<div
class=
"col s12"
id=
"overview"
>
{# {% weekday_to_date note.calendar_week note.lesson_period.period.weekday as note_date %}#}
{#
<li
class=
"collection-item"
>
#}
{# {% has_perm "alsijil.edit_personalnote" user note as can_edit_personal_note %}#}
{# {% if can_edit_personal_note %}#}
{#
<label
class=
"left"
>
#}
{#
<input
type=
"checkbox"
name=
"selected_notes"
value=
"{{ note.pk }}"
#
}
{
#
form=
"excuse-multiple-form"
class=
"filled-in"
/>
#}
{#
<span></span>
#}
{#
</label>
#}
{#
<form
action=
""
method=
"post"
class=
"right hide-on-small-only"
>
#}
{# {% csrf_token %}#}
{# {% trans "Mark as" %}#}
{#
<input
type=
"hidden"
value=
"{{ note.pk }}"
name=
"personal_note"
>
#}
{# {% include "alsijil/partials/mark_as_buttons.html" %}#}
{#
<a
class=
"btn-flat red-text"
title=
"{% trans "
Delete
note
"
%}"
#
}
{
#
href=
"{% url "
delete_personal_note
"
note.pk
%}"
>
#}
{#
<i
class=
"material-icons center"
>
cancel
</i>
#}
{#
</a>
#}
{#
</form>
#}
{# {% endif %}#}
{#
<i
class=
"material-icons left red-text"
>
warning
</i>
#}
{#
<p
class=
"no-margin"
>
#}
{#
<a
href=
"{% url note.register_object.alsijil_url note.year note.week note.lesson_period.pk %}"
>
{{ note_date }}, {{ note.lesson_period }}
</a>
#}
{#
</p>
#}
{# {% if note.remarks %}#}
{#
<p
class=
"no-margin"
><em>
{{ note.remarks }}
</em></p>
#}
{# {% endif %}#}
{# {% if can_edit_personal_note %}#}
{#
<form
action=
""
method=
"post"
class=
"hide-on-med-and-up"
>
#}
{# {% csrf_token %}#}
{# {% trans "Mark as" %}#}
{#
<input
type=
"hidden"
value=
"{{ note.pk }}"
name=
"personal_note"
>
#}
{# {% include "alsijil/partials/mark_as_buttons.html" %}#}
{#
<a
class=
"btn-flat red-text"
title=
"{% trans "
Delete
note
"
%}"
#
}
{
#
href=
"{% url "
delete_personal_note
"
note.pk
%}"
>
#}
{#
<i
class=
"material-icons center"
>
cancel
</i>
#}
{#
</a>
#}
{#
</form>
#}
{# {% endif %}#}
{#
</li>
#}
{# {% empty %}#}
{#
<li
class=
"collection-item avatar valign-wrapper"
>
#}
{#
<i
class=
"material-icons left circle green white-text"
>
check
</i>
#}
{#
<span
class=
"title"
>
{% trans "There are no unexcused lessons." %}
</span>
#}
{#
</li>
#}
{# {% endfor %}#}
</ul>
{% if stats %}
<h5>
{% trans "Statistics on absences, tardiness and remarks" %}
</h5>
<ul
class=
"collapsible"
>
{% for school_term, stat in stats %}
<li
{%
if
forloop.first
%}
class=
"active"
{%
endif
%}
>
<div
class=
"collapsible-header"
>
<i
class=
"material-icons"
>
date_range
</i>
{{ school_term }}
</div>
<div
class=
"collapsible-body"
>
<table>
<tr>
<th
colspan=
"2"
>
{% trans 'Absences' %}
</th>
<td>
{{ stat.absences_count }}
</td>
</tr>
<tr>
<td
rowspan=
"{{ excuse_types.count|add:2 }}"
class=
"hide-on-small-only"
>
{% trans "thereof" %}
</td>
<td
rowspan=
"{{ excuse_types.count|add:2 }}"
class=
"hide-on-med-and-up"
></td>
<th
class=
"truncate"
>
{% trans 'Excused' %}
</th>
<td>
{{ stat.excused }}
</td>
</tr>
{% for excuse_type in excuse_types %}
<th>
{{ excuse_type.name }}
</th>
<td>
{{ stat|get_dict:excuse_type.count_label }}
</td>
{% endfor %}
<tr>
<th>
{% trans 'Unexcused' %}
</th>
<td>
{{ stat.unexcused }}
</td>
</tr>
<tr>
<th
colspan=
"2"
>
{% trans 'Tardiness' %}
</th>
<td>
{{ stat.tardiness }}'/{{ stat.tardiness_count }}
×
</td>
</tr>
{% for extra_mark in extra_marks %}
<tr>
<th
colspan=
"2"
>
{{ extra_mark.name }}
</th>
<td>
{{ stat|get_dict:extra_mark.count_label }}
</td>
</tr>
{% endfor %}
</table>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div
class=
"col s12"
id=
"overview"
>
<h5>
{% trans "Relevant personal notes" %}
</h5>
<h5>
{% trans "Relevant personal notes" %}
</h5>
<form
action=
""
method=
"post"
>
<form
action=
""
method=
"post"
>
{% csrf_token %}
{% csrf_token %}
...
@@ -311,6 +208,50 @@
...
@@ -311,6 +208,50 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% if stats %}
<div
class=
"col s12"
id=
"statistics"
>
<h5>
{% trans "Statistics on absences, tardiness and remarks" %}
</h5>
<ul
class=
"collapsible"
>
{% for school_term, stat in stats %}
<li
{%
if
forloop.first
%}
class=
"active"
{%
endif
%}
>
<div
class=
"collapsible-header"
>
<i
class=
"material-icons"
>
date_range
</i>
{{ school_term }}
</div>
<div
class=
"collapsible-body"
>
<table>
<tr>
<th
colspan=
"2"
>
{% trans 'Absences' %}
</th>
<td>
{{ stat.absences_count }}
</td>
</tr>
<tr>
<td
rowspan=
"{{ excuse_types.count|add:2 }}"
class=
"hide-on-small-only"
>
{% trans "thereof" %}
</td>
<td
rowspan=
"{{ excuse_types.count|add:2 }}"
class=
"hide-on-med-and-up"
></td>
<th
class=
"truncate"
>
{% trans 'Excused' %}
</th>
<td>
{{ stat.excused }}
</td>
</tr>
{% for excuse_type in excuse_types %}
<th>
{{ excuse_type.name }}
</th>
<td>
{{ stat|get_dict:excuse_type.count_label }}
</td>
{% endfor %}
<tr>
<th>
{% trans 'Unexcused' %}
</th>
<td>
{{ stat.unexcused }}
</td>
</tr>
<tr>
<th
colspan=
"2"
>
{% trans 'Tardiness' %}
</th>
<td>
{{ stat.tardiness }}'/{{ stat.tardiness_count }}
×
</td>
</tr>
{% for extra_mark in extra_marks %}
<tr>
<th
colspan=
"2"
>
{{ extra_mark.name }}
</th>
<td>
{{ stat|get_dict:extra_mark.count_label }}
</td>
</tr>
{% endfor %}
</table>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment