Skip to content
Snippets Groups Projects

Resolve "[Lesson view] Show summary (homework, etc.) of previous lessons"

6 files
+ 124
5
Compare changes
  • Side-by-side
  • Inline
Files
6
{# -*- engine:django -*- #}
{% extends "core/base.html" %}
{% load week_helpers %}
{% load material_form i18n static %}
{% block browser_title %}{% blocktrans %}Lesson{% endblocktrans %}{% endblock %}
@@ -58,6 +59,53 @@
<div class="row">
<div class="col s12 m12 l6 xl8">
{% with prev_lesson=lesson_period.prev prev_doc=prev_lesson.get_lesson_documentation %}
{% with prev_doc=prev_lesson.get_lesson_documentation absences=prev_lesson.get_absences tardinesses=prev_lesson.get_tardinesses %}
{% if prev_doc %}
{% weekday_to_date prev_lesson.week prev_lesson.period.weekday as prev_date %}
<div class="card">
<div class="card-content">
<span class="card-title">
{% blocktrans %}Overview: Previous lesson{% endblocktrans %} ({{ prev_date }},
{% blocktrans with period=prev_lesson.period.period %}{{ period }}. period{% endblocktrans %})
</span>
<table>
{% if prev_doc.topic %}
<tr>
<th class="collection-item">{% trans "Lesson topic of previous lesson:" %}</th>
<td>{{ prev_doc.topic }}</td>
</tr>
{% endif %}
{% if prev_doc.homework %}
<tr>
<th class="collection-item">{% trans "Homework for this lesson:" %}</th>
<td>{{ prev_doc.homework }}</td>
</tr>
{% endif %}
{% if absences %}
<tr>
<th>{% trans "Absent persons:" %}</th>
<td>{% include "alsijil/partials/absences.html" with notes=absences %}</td>
</tr>
{% endif %}
{% if tardinesses %}
<tr>
<th>{% trans "Late persons:" %}</th>
<td>{% include "alsijil/partials/tardinesses.html" with notes=tardinesses %}</td>
</tr>
{% endif %}
</table>
</div>
</div>
{% endif %}
{% endwith %}
{% endwith %}
<div class="card">
<div class="card-content">
<span class="card-title">
Loading