Skip to content
Snippets Groups Projects
Verified Commit 641ec995 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix templates for coursebook export

parent 34d510f9
No related branches found
No related tags found
1 merge request!422Resolve "Add export functionality to course book"
{% load static i18n data_helpers %}
<h4>{% blocktrans with full_name=person.full_name %}Personal Overview: {{ person.full_name }}{% endblocktrans %}</h4>
<h4>{% blocktrans with full_name=person.full_name %}Personal Overview: {{ full_name }}{% endblocktrans %}</h4>
<h5>{% blocktrans %}Contact Details{% endblocktrans %}</h5>
<table class="person-info">
......@@ -86,17 +86,17 @@
<thead>
<tr>
<th>{% trans 'Date' %}</th>
<th>{% trans 'Subj.' %}</th>
<th>{% trans 'Te.' %}</th>
<th>{% trans 'Subject' %}</th>
<th>{% trans 'Teachers' %}</th>
<th>{% trans 'Absent' %}</th>
<th>{% trans 'Tard.' %}</th>
<th>{% trans 'Tardiness' %}</th>
</tr>
</thead>
<tbody>
{% for participation in person.notable_participations %}
<tr>
<td>{{ participation.related_documentation.datetime_start.date }}</td>
<td>{{ participation.related_documentation.datetime_start }}</td>
<td>
{{ participation.related_documentation.subject.short_name }}
</td>
......@@ -115,8 +115,8 @@
<thead>
<tr>
<th>{% trans 'Date' %}</th>
<th>{% trans 'Subj.' %}</th>
<th>{% trans 'Te.' %}</th>
<th>{% trans 'Subject' %}</th>
<th>{% trans 'Teacher' %}</th>
<th colspan="2">{% trans 'Remarks' %}</th>
</tr>
</thead>
......@@ -124,7 +124,7 @@
<tbody>
{% for note in person.new_personal_notes.all %}
<tr>
<td>{{ note.documentation.datetime_start.date }}</td>
<td>{{ note.documentation.datetime_start }}</td>
<td>
{{ note.documentation.subject.short_name }}
</td>
......
......@@ -5,7 +5,6 @@
<table class="small-print">
<thead>
<tr>
<th></th>
<th>{% trans 'Time' %}</th>
<th>{% trans 'Subj.' %}</th>
<th>{% trans 'Topic' %}</th>
......@@ -15,9 +14,9 @@
</tr>
</thead>
<tbody>
{% for documentation in group.documentations_by_day %}
{% ifchanged documentation.datetime_start.date %}
<tr><th colspan="6">{{ documentation.datetime_start.date|date:"D" }}</th></tr>
{% for doc in group.documentations_by_day %}
{% ifchanged doc.datetime_start.date %}
<tr><th colspan="6">{{ doc.datetime_start.date|date }}</th></tr>
{% endifchanged %}
<tr class="
{% if doc.amends %}
......@@ -27,6 +26,7 @@
{% if forloop.first %}
lessons-day-first
{% endif %}
{% endif %}
">
<td class="lesson-pe">
{% if doc.amends %}
......@@ -40,7 +40,9 @@
{% endif %}
</td>
<td class="lesson-subj">
{% include "chronos/partials/subject.html" with subject=doc.subject %}
{% if doc.subject %}
{{ doc.subject.short_name|default:doc.subject.name }}
{% endif %}
</td>
<td class="lesson-topic">
{{ doc.topic }}
......@@ -51,7 +53,7 @@
{% for participation in doc.notable_participations %}
{% if participation.absence_reason %}
<span class="lesson-note-absent">
{{ participation.person.short_name }}
{{ participation.person.full_name }}
<span style="color: {{ participation.absence_reason.colour }};">
({{ participation.absence_reason.short_name }})
</span>
......@@ -59,34 +61,32 @@
{% endif %}
{% if participation.tardiness %}
<span class="lesson-note-late">
{{ participation.person.short_name }}
{{ participation.person.full_name }}
({{ participation.tardiness }}′)
</span>
{% endif %}
{% for personal_note in doc.personal_notes.all %}
{% endfor %}
{% for personal_note in doc.personal_notes.all %}
{% if personal_note.extra_mark %}
<span>
{{ personal_note.person.short_name }}
<span>
{{ personal_note.person .full_name }}
({{ personal_note.extra_mark.short_name }})
</span>
</span>
{% endif %}
{% if personal_note.note %}
<span>
{{ personal_note.person.short_name }}
<span>
{{ personal_note.person.full_name }}
({{ personal_note.note }})
</span>
</span>
{% endif %}
{% endfor %}
{% endfor %}
</td>
<td class="lesson-te">
<!-- TODO: Why only with topic? Was already like this. But does it have to be with the new data-model? -->
{% if doc.topic %}
{{ doc.get_teachers_short_names|join:', ' }}
{% endif %}
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
......@@ -3,7 +3,7 @@
{% load static i18n %}
{% block page_title %}
{% trans "Class Register:" %} {{ group.name }}
{% trans "Class Register" %}
{% endblock %}
{% block extra_head %}
......@@ -13,17 +13,17 @@
{% block content %}
{% for group in groups %}
{% if include_cover %}
{% include "alsijil/partials/register_cover.html" %}
{% include "alsijil/partials/register_cover.html" with group=group %}
<div class="page-break">&nbsp;</div>
{% endif %}
{% if include_abbreviations %}
{% include "alsijil/partials/register_abbreviations.html" %}
{% include "alsijil/partials/register_abbreviations.html" with group=group %}
<div class="page-break">&nbsp;</div>
{% endif %}
{% if include_members_table %}
{% include "alsijil/partials/register_members_table.html" %}
{% include "alsijil/partials/register_members_table.html" with group=group %}
<div class="page-break">&nbsp;</div>
{% endif %}
......@@ -42,13 +42,13 @@
{% if include_person_overviews %}
{% for person in group.members_with_stats %}
{% include "alsijil/partials/person_overview.html" with person=person %}
{% include "alsijil/partials/person_overview.html" with person=person group=group %}
<div class="page-break">&nbsp;</div>
{% endfor %}
{% endif %}
{% if include_coursebook %}
{% include "alsijil/partials/register_coursebook.html" %}
{% include "alsijil/partials/register_coursebook.html" with group=group %}
{% endif %}
{% endfor %}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment