From 6f480656638ad9a933c5df37b99a8a86cf70fe25 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Wed, 11 Dec 2019 18:06:16 +0100
Subject: [PATCH] Show class teacher and deputy class teacher on plan views

closes #331
---
 .../chronos/templates/timetable/plan.html     | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/biscuit/apps/chronos/templates/timetable/plan.html b/biscuit/apps/chronos/templates/timetable/plan.html
index 9874ea7b..a8f054df 100755
--- a/biscuit/apps/chronos/templates/timetable/plan.html
+++ b/biscuit/apps/chronos/templates/timetable/plan.html
@@ -43,6 +43,28 @@
             <h3>
                 Stundenplan <i>{{ el }}</i>
             </h3>
+
+            {# Show class teacher and deputy class teacher #}
+            {% if type == 2 and el.teachers %}
+                <h6>Klassenlehrkraft:
+                    <span data-position="bottom" class="tooltipped"
+                          data-tooltip="{{ el.teachers.0 }}">
+                        <a href="{% url "timetable_smart_plan" "teacher" el.teachers.0.id %}">
+                            {{ el.teachers.0.shortcode }}
+                        </a>
+                    </span>
+                    {#                    {{ el.teachers.0.shortcode }}#}
+                    {% if el.teachers.1 %}
+                        · Vertretung:
+                        <span data-position="bottom" class="tooltipped"
+                              data-tooltip="{{ el.teachers.1 }}">
+                            <a href="{% url "timetable_smart_plan" "teacher" el.teachers.1.id %}">
+                                {{ el.teachers.1.shortcode }}
+                            </a>
+                        </span>
+                    {% endif %}
+                </h6>
+            {% endif %}
         </div>
         {# Show print button only if not on mobile #}
         <div class="col s4 m6 l4 xl3 right align-right no-print">
-- 
GitLab