From 6e8621e430029b2298d05b1e23a9b63f85943d6f Mon Sep 17 00:00:00 2001
From: HanseGucker <joniweth@gmx.de>
Date: Thu, 24 Jan 2019 16:35:47 +0100
Subject: [PATCH] Fix design problems

---
 schoolapps/static/common/style.css            |  4 +--
 schoolapps/templates/partials/header.html     | 11 +++++--
 .../timetable/templates/timetable/all.html    |  2 +-
 .../timetable/templates/timetable/lesson.html | 12 +++++++-
 .../timetable/templates/timetable/myplan.html | 30 ++++++++-----------
 .../templates/timetable/quicklaunch.html      |  2 +-
 6 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/schoolapps/static/common/style.css b/schoolapps/static/common/style.css
index cb166d40c..4f44c4245 100755
--- a/schoolapps/static/common/style.css
+++ b/schoolapps/static/common/style.css
@@ -146,8 +146,8 @@ span.badge.new {
 }
 
 .lesson-card .card-content div {
-    padding: 5px;
-    height: 100%;
+    padding: 2px;
+    flex: auto;
     width: 100%;
     display: flex;
     align-items: center;
diff --git a/schoolapps/templates/partials/header.html b/schoolapps/templates/partials/header.html
index 19caae1f2..b34b03dab 100755
--- a/schoolapps/templates/partials/header.html
+++ b/schoolapps/templates/partials/header.html
@@ -173,6 +173,11 @@
         {% endif %}
     </ul>
 </header>
-<header class="alert-success"><p><i class="material-icons left">info</i> Du befindest dich in der Testversion von
-    SchoolApps. Dadurch kann es immer mal wieder zu unvorhergesehenen Problemen kommen. Es würde uns sehr helfen, wenn
-    du uns dann über <a href="mailto:support@katharineum.de">support@katharineum.de</a> schreibst. </p></header>
\ No newline at end of file
+<header class="alert-success">
+    <p>
+        <i class="material-icons left">info</i>
+        Du befindest dich in der Testversion von SchoolApps. Daher kann es immer mal wieder zu unvorhergesehenen
+        Problemen kommen. Es würde uns sehr helfen, wenn du uns dann über
+        <a href="mailto:support@katharineum.de">support@katharineum.de</a> schreibst.
+    </p>
+</header>
\ No newline at end of file
diff --git a/schoolapps/timetable/templates/timetable/all.html b/schoolapps/timetable/templates/timetable/all.html
index dd56f6d37..9a008dcea 100755
--- a/schoolapps/timetable/templates/timetable/all.html
+++ b/schoolapps/timetable/templates/timetable/all.html
@@ -1,7 +1,7 @@
 {% include 'partials/header.html' %}
 
 <main>
-    <h3>Übersicht</h3>
+    <h3>Alle Pläne</h3>
     <div class="row">
         <div class="col s12 m4">
             <h4>Lehrkräfte</h4>
diff --git a/schoolapps/timetable/templates/timetable/lesson.html b/schoolapps/timetable/templates/timetable/lesson.html
index 9c974cbe4..214477569 100644
--- a/schoolapps/timetable/templates/timetable/lesson.html
+++ b/schoolapps/timetable/templates/timetable/lesson.html
@@ -21,10 +21,20 @@
                             {# When it's the old room, let it empty #}
 
                         {% elif element_container.substitution.table.badge %}
-                            {# When a badge (cancellation, etc.) exists, then display it #}
+                            {# When a badge (cancellation, etc.) exists, then display it with the teacher#}
+
+                            {# Class or room > Display teacher #}
+                            {% if type == 2 or type == 1 %}
+                                <span data-position="bottom" class="tooltipped"
+                                      data-tooltip="{{ element_container.element.teacher }}">{{ element_container.element.teacher.shortcode }}</span>
+                                <br>
+                            {% endif %}
+
+                            {# Badge #}
                             <span class="badge new green darken-2">{{ element_container.substitution.table.badge }}</span>
 
 
+
                         {% else %}
                             {# Display sub #}
 
diff --git a/schoolapps/timetable/templates/timetable/myplan.html b/schoolapps/timetable/templates/timetable/myplan.html
index 521cf5cb8..109f797bb 100644
--- a/schoolapps/timetable/templates/timetable/myplan.html
+++ b/schoolapps/timetable/templates/timetable/myplan.html
@@ -8,7 +8,7 @@
                 Mein Plan
                 <span class="badge new primary-color ">SMART PLAN</span>
             </h4>
-            <h6>für <em>{{ el }}</em></h6>
+            <h6>{{ el }}</h6>
         </div>
     </div>
 
@@ -21,33 +21,27 @@
             {% include "timetable/datepicker.html" %}
         </div>
     </div>
-    {#    <h5>{{ date|date:"l, j. F Y" }}</h5>#}
     <div class="row">
         <div class="timetable-plan col s12 m12 l6">
 
-            {#  Week days #}
-            <div class="row">
-                <div class="col s6">
+            {#  Date #}
 
-                </div>
-                {% for week_daye in week_days %}
-                    {% if forloop.counter0 == week_day %}
-                        <div class="col s6">
-                            <div class="card timetable-title-card">
-                                <div class="card-content">
+            <div class="row">
+                <div class="col s12">
+                    <div class="card timetable-title-card">
+                        <div class="card-content">
                     <span class="card-title">
-                        {{ week_daye }}
+                        {{ date|date:"l, j.n.Y" }}
                     </span>
-                                </div>
-                            </div>
                         </div>
-                    {% endif %}
-                {% endfor %}
+                    </div>
+
+                </div>
             </div>
             {#  Lessons #}
             {% for row, time in plan %}
                 <div class="row">
-                    <div class="col s6">
+                    <div class="col s4">
                         <div class="card timetable-title-card">
                             <div class="card-content">
 
@@ -67,7 +61,7 @@
                     </div>
                     {% for col in row %}
                         {% if forloop.counter0 == week_day %}
-                            <div class="col s6">
+                            <div class="col s8">
                                 {# A lesson #}
                                 {% include "timetable/lesson.html" %}
                             </div>
diff --git a/schoolapps/timetable/templates/timetable/quicklaunch.html b/schoolapps/timetable/templates/timetable/quicklaunch.html
index ca213ff63..3775bc06e 100755
--- a/schoolapps/timetable/templates/timetable/quicklaunch.html
+++ b/schoolapps/timetable/templates/timetable/quicklaunch.html
@@ -1,7 +1,7 @@
 {% include 'partials/header.html' %}
 
 <main>
-    <h3>Übersicht</h3>
+    <h3>Alle Pläne</h3>
     <div class="row">
         <div class="col s12 m4">
             <h4>Lehrkräfte</h4>
-- 
GitLab