Skip to content
Snippets Groups Projects

Resolve "Add export functionality to course book"

Merged permcu requested to merge 258-add-export-functionality-to-course-book into master
7 files
+ 490
498
Compare changes
  • Side-by-side
  • Inline
Files
7
<h4>{% trans 'Personal overview' %}: {{ person.last_name }}, {{ person.first_name }}</h4>
<h5>{% blocktrans %}Contact details{% endblocktrans %}</h5>
<table class="person-info">
<tr>
<td rowspan="6" class="person-img">
{% if person.photo %}
<img src="{{ person.photo.url }}" alt="{{ person.first_name }} {{ person.last_name }}"/>
{% else %}
<img src="{% static 'img/fallback.png' %}" alt="{{ person.first_name }} {{ person.last_name }}"/>
{% endif %}
</td>
<td><i class="material-icons iconify" data-icon="mdi:account-outline"></i></td>
<td colspan="2">{{ person.first_name }} {{ person.additional_name }} {{ person.last_name }}</td>
</tr>
<tr>
<td><i class="material-icons iconify" data-icon="mdi:human-non-binary"></i></td>
<td colspan="2">{{ person.get_sex_display }}</td>
</tr>
<tr>
<td><i class="material-icons iconify" data-icon="mdi:map-marker-outline"></i></td>
<td>{{ person.street }} {{ person.housenumber }}</td>
<td>{{ person.postal_code }} {{ person.place }}</td>
</tr>
<tr>
<td><i class="material-icons iconify" data-icon="mdi:phone-outline"></i></td>
<td>{{ person.phone_number }}</td>
<td>{{ person.mobile_number }}</td>
</tr>
<tr>
<td><i class="material-icons iconify" data-icon="mdi:email-outline"></i></td>
<td colspan="2">{{ person.email }}</td>
</tr>
<tr>
<td><i class="material-icons iconify" data-icon="mdi:cake"></i></td>
<td colspan="2">{{ person.date_of_birth|date }}</td>
</tr>
</table>
<div class="row">
<div class="col s6">
<h5>{% trans 'Absences and tardiness' %}</h5>
<table>
<tr>
<th colspan="3">{% trans 'Absences' %}</th>
<td>{{ person.absences_count }}</td>
</tr>
<tr>
<td rowspan="{{ excuse_types.count|add:3 }}" style="width: 16mm;"
class="rotate small-print">{% trans "thereof" %}</td>
<th colspan="2">{% trans 'Excused' %}</th>
<td>{{ person.excused }}</td>
</tr>
<tr>
<td rowspan="{{ excuse_types.count|add:1 }}" style="width: 16mm;"
class="rotate small-print">{% trans "thereof" %}</td>
<th>{% trans "Without excuse type" %}</th>
<td>{{ person.excused_without_excuse_type }}</td>
</tr>
{% for excuse_type in excuse_types %}
<tr>
<th>{{ excuse_type.name }}</th>
<td>{{ person|get_dict:excuse_type.count_label }}</td>
</tr>
{% endfor %}
<tr>
<th colspan="2">{% trans 'Unexcused' %}</th>
<td>{{ person.unexcused }}</td>
</tr>
{% for excuse_type in excuse_types_not_absent %}
<tr>
<th colspan="3">{{ excuse_type.name }}</th>
<td>{{ person|get_dict:excuse_type.count_label }}</td>
</tr>
{% endfor %}
<tr>
<th colspan="3">{% trans 'Tardiness' %}</th>
<td>{{ person.tardiness }}'/{{ person.tardiness_count }}&times;</td>
</tr>
</table>
</div>
<div class="col s6">
{% if extra_marks %}
<h5>{% trans 'Extra marks' %}</h5>
<table>
{% for extra_mark in extra_marks %}
<tr>
<th>{{ extra_mark.name }}</th>
<td>{{ person|get_dict:extra_mark.count_label }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div>
</div>
<h5>{% trans 'Relevant personal notes' %}</h5>
<table class="small-print">
<thead>
<tr>
<th>{% trans 'Date' %}</th>
<th>{% trans 'Pe.' %}</th>
<th>{% trans 'Subj.' %}</th>
<th>{% trans 'Te.' %}</th>
<th>{% trans 'Absent' %}</th>
<th>{% trans 'Tard.' %}</th>
<th colspan="2">{% trans 'Remarks' %}</th>
</tr>
</thead>
<tbody>
{% for note in person.filtered_notes %}
{% if note.absent or note.tardiness or note.remarks or note.extra_marks.all %}
<tr>
{% if note.date %}
<td>{{ note.date }}</td>
<td>{{ note.register_object.period.period }}</td>
{% else %}
<td colspan="2">
{{ note.register_object.date_start }} {{ note.register_object.period_from.period }}.–{{ note.register_object.date_end }}
{{ note.register_object.period_to.period }}.
</td>
{% endif %}
<td>
{% if note.register_object.label_ != "event" %}
{{ note.register_object.get_subject.short_name }}
{% else %}
{% trans "Event" %}
{% endif %}
</td>
<td>{{ note.register_object.teacher_short_names }}</td>
<td>
{% if note.absent %}
{% trans 'Yes' %}
{% if note.excused %}
{% if note.excuse_type %}
({{ note.excuse_type.short_name }})
{% else %}
({% trans 'e' %})
{% endif %}
{% endif %}
{% endif %}
</td>
<td>
{% if note.tardiness %}
{{ note.tardiness }}'
{% endif %}
</td>
<td>
{% for extra_mark in note.extra_marks.all %}
{{ extra_mark.short_name }}{% if not forloop.last %},{% endif %}
{% endfor %}
</td>
<td>{{ note.remarks }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
Loading