From 6ae3ff3276f6213f0e4297839da34be77b0c9f44 Mon Sep 17 00:00:00 2001
From: Dominik George <nik@naturalnet.de>
Date: Fri, 13 Sep 2019 10:22:34 +0200
Subject: [PATCH] Honour substituted lessons in group view. Closes #27.

---
 biscuit/apps/alsijil/templates/alsijil/group_week.html | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/biscuit/apps/alsijil/templates/alsijil/group_week.html b/biscuit/apps/alsijil/templates/alsijil/group_week.html
index 65f7e9b28..fd25a1da6 100644
--- a/biscuit/apps/alsijil/templates/alsijil/group_week.html
+++ b/biscuit/apps/alsijil/templates/alsijil/group_week.html
@@ -44,16 +44,20 @@
                         {% today as today %}
                         {% if current_date < today %}
                           table-danger
+                        {% else %}
+                          {% if period.get_substitution %}
+                            table-warning
+                          {% endif %}
                         {% endif %}
                       {% endif %}
                     ">
                       <td>{{ period.period.period }}</td>
                       <td>
                         <a href="{% url 'lesson_by_week_and_period' week period.id %}">
-                          {{ period.lesson.subject.name }}
+                          {{ period.get_subject.name }}
                         </a>
                       </td>
-                      <td>{{ period.lesson.teacher_names }}</td>
+                      <td>{{ period.get_teacher_names }}</td>
                     </tr>
                   {% endfor %}
                 </tbody>
-- 
GitLab