From 653804405c4c747463d8c499d3e8287703b722dc Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Sun, 12 Jan 2020 20:37:08 +0100
Subject: [PATCH] Resort templates

---
 .../chronos/{ => partials}/datepicker.html    |  0
 .../chronos/{ => partials}/groups.html        |  0
 .../{ => partials/hints}/hintsinplan.html     |  0
 .../{ => partials/hints}/hintsinsub.html      |  0
 .../{ => partials/hints}/hintsinsubprint.html |  0
 .../chronos/{ => partials}/lesson.html        | 14 +++++++-------
 .../chronos/{ => partials}/period_time.html   |  0
 .../chronos/{ => partials}/subs/room.html     |  0
 .../chronos/{ => partials}/subs/subject.html  |  0
 .../chronos/partials/subs/teachers.html       | 19 +++++++++++++++++++
 .../chronos/{ => partials}/teachers.html      |  0
 .../apps/chronos/templates/chronos/plan.html  |  8 ++++----
 .../templates/chronos/subs/teachers.html      | 19 -------------------
 .../templates/chronos/substitution.html       | 10 +++++-----
 14 files changed, 35 insertions(+), 35 deletions(-)
 rename aleksis/apps/chronos/templates/chronos/{ => partials}/datepicker.html (100%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials}/groups.html (100%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials/hints}/hintsinplan.html (100%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials/hints}/hintsinsub.html (100%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials/hints}/hintsinsubprint.html (100%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials}/lesson.html (89%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials}/period_time.html (100%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials}/subs/room.html (100%)
 rename aleksis/apps/chronos/templates/chronos/{ => partials}/subs/subject.html (100%)
 create mode 100644 aleksis/apps/chronos/templates/chronos/partials/subs/teachers.html
 rename aleksis/apps/chronos/templates/chronos/{ => partials}/teachers.html (100%)
 delete mode 100644 aleksis/apps/chronos/templates/chronos/subs/teachers.html

diff --git a/aleksis/apps/chronos/templates/chronos/datepicker.html b/aleksis/apps/chronos/templates/chronos/partials/datepicker.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/datepicker.html
rename to aleksis/apps/chronos/templates/chronos/partials/datepicker.html
diff --git a/aleksis/apps/chronos/templates/chronos/groups.html b/aleksis/apps/chronos/templates/chronos/partials/groups.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/groups.html
rename to aleksis/apps/chronos/templates/chronos/partials/groups.html
diff --git a/aleksis/apps/chronos/templates/chronos/hintsinplan.html b/aleksis/apps/chronos/templates/chronos/partials/hints/hintsinplan.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/hintsinplan.html
rename to aleksis/apps/chronos/templates/chronos/partials/hints/hintsinplan.html
diff --git a/aleksis/apps/chronos/templates/chronos/hintsinsub.html b/aleksis/apps/chronos/templates/chronos/partials/hints/hintsinsub.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/hintsinsub.html
rename to aleksis/apps/chronos/templates/chronos/partials/hints/hintsinsub.html
diff --git a/aleksis/apps/chronos/templates/chronos/hintsinsubprint.html b/aleksis/apps/chronos/templates/chronos/partials/hints/hintsinsubprint.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/hintsinsubprint.html
rename to aleksis/apps/chronos/templates/chronos/partials/hints/hintsinsubprint.html
diff --git a/aleksis/apps/chronos/templates/chronos/lesson.html b/aleksis/apps/chronos/templates/chronos/partials/lesson.html
similarity index 89%
rename from aleksis/apps/chronos/templates/chronos/lesson.html
rename to aleksis/apps/chronos/templates/chronos/partials/lesson.html
index cfcfc6c7..0a4f681b 100644
--- a/aleksis/apps/chronos/templates/chronos/lesson.html
+++ b/aleksis/apps/chronos/templates/chronos/partials/lesson.html
@@ -35,7 +35,7 @@
 
                 {# Class or room > Display teacher #}
                 {% if type == "group" or type == "room" %}
-                  {% include "chronos/teachers.html" with teachers=lesson_period.lesson.teachers.all %}
+                  {% include "chronos/partials/teachers.html" with teachers=lesson_period.lesson.teachers.all %}
                 {% endif %}
 
                 {# Badge #}
@@ -46,18 +46,18 @@
 
                 {# Teacher or room > display classes #}
                 {% if type == "teacher" or type == "room" %}
-                  {% include "chronos/groups.html" with groups=lesson_period.lesson.groups.all %}
+                  {% include "chronos/partials/groups.html" with groups=lesson_period.lesson.groups.all %}
                 {% endif %}
 
                 {# Display teacher with tooltip #}
-                {% include "chronos/subs/teachers.html" %}
+                {% include "chronos/partials/subs/teachers.html" %}
 
                 {# Display subject #}
-                {% include "chronos/subs/subject.html" %}
+                {% include "chronos/partials/subs/subject.html" %}
 
                 {# Teacher or class > display room #}
                 {% if type == "teacher" or type == "group" %}
-                  {% include "chronos/subs/room.html" %}
+                  {% include "chronos/partials/subs/room.html" %}
                 {% endif %}
               {% endif %}
 
@@ -96,13 +96,13 @@
             {% if type == "teacher" or type == "room" %}
               {#                            {{ element_container.element.classes }}#}
               {% if lesson_period.lesson.groups %}
-                {% include "chronos/groups.html" with groups=lesson_period.lesson.groups.all %}
+                {% include "chronos/partials/groups.html" with groups=lesson_period.lesson.groups.all %}
               {% endif %}
             {% endif %}
 
             {# Class or room > Display teacher #}
             {% if type == "room" or type == "group" %}
-              {% include "chronos/teachers.html" with teachers=lesson_period.lesson.teachers.all %}
+              {% include "chronos/partials/teachers.html" with teachers=lesson_period.lesson.teachers.all %}
             {% endif %}
 
             {# Display subject #}
diff --git a/aleksis/apps/chronos/templates/chronos/period_time.html b/aleksis/apps/chronos/templates/chronos/partials/period_time.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/period_time.html
rename to aleksis/apps/chronos/templates/chronos/partials/period_time.html
diff --git a/aleksis/apps/chronos/templates/chronos/subs/room.html b/aleksis/apps/chronos/templates/chronos/partials/subs/room.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/subs/room.html
rename to aleksis/apps/chronos/templates/chronos/partials/subs/room.html
diff --git a/aleksis/apps/chronos/templates/chronos/subs/subject.html b/aleksis/apps/chronos/templates/chronos/partials/subs/subject.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/subs/subject.html
rename to aleksis/apps/chronos/templates/chronos/partials/subs/subject.html
diff --git a/aleksis/apps/chronos/templates/chronos/partials/subs/teachers.html b/aleksis/apps/chronos/templates/chronos/partials/subs/teachers.html
new file mode 100644
index 00000000..ec17d8b8
--- /dev/null
+++ b/aleksis/apps/chronos/templates/chronos/partials/subs/teachers.html
@@ -0,0 +1,19 @@
+{% if not sub.is_event %}
+  {% if sub.sub.type == 1 and sub.lesson_period.lesson.teachers.all %}
+    {% include "chronos/partials/teachers.html" with teachers=sub.lesson_period.lesson.teachers.all %}
+  {% elif sub.teachers.all and sub.lesson_period.lesson.teachers.all %}
+    <s>
+      {% include "chronos/partials/teachers.html" with teachers=sub.lesson_period.lesson.teachers.all %}
+    </s>
+    →
+    <strong>
+      {% include "chronos/partials/teachers.html" with teachers=sub.teachers.all %}
+    </strong>
+  {% elif sub.teachers.all and not sub.lesson_period.lesson.teachers.all %}
+    {% include "chronos/partials/teachers.html" with teachers=sub.teachers.all %}
+  {% elif sub.lesson_period.lesson.teachers.all %}
+    {% include "chronos/partials/teachers.html" with teachers=sub.lesson_period.lesson.teachers.all %}
+  {% endif %}
+{% else %}
+  {% include "chronos/partials/teachers.html" with teachers=sub.teachers.all %}
+{% endif %}
diff --git a/aleksis/apps/chronos/templates/chronos/teachers.html b/aleksis/apps/chronos/templates/chronos/partials/teachers.html
similarity index 100%
rename from aleksis/apps/chronos/templates/chronos/teachers.html
rename to aleksis/apps/chronos/templates/chronos/partials/teachers.html
diff --git a/aleksis/apps/chronos/templates/chronos/plan.html b/aleksis/apps/chronos/templates/chronos/plan.html
index 136ccc17..7d25724d 100644
--- a/aleksis/apps/chronos/templates/chronos/plan.html
+++ b/aleksis/apps/chronos/templates/chronos/plan.html
@@ -178,13 +178,13 @@
 
       <div class="row">
         <div class="col s2">
-          {% include "chronos/period_time.html" with period=period periods=periods %}
+          {% include "chronos/partials/period_time.html" with period=period periods=periods %}
         </div>
 
         {% for weekday, lessons in lesson_periods_period.items %}
           {# A lesson #}
           <div class="col s2">
-            {% include "chronos/lesson.html" with lessons=lessons %}
+            {% include "chronos/partials/lesson.html" with lessons=lessons %}
           </div>
         {% endfor %}
       </div>
@@ -208,14 +208,14 @@
       {% for period, lesson_periods_period in lesson_periods.items %}
         <div class="row">
           <div class="col s4">
-            {% include "chronos/period_time.html" with period=period periods=periods %}
+            {% include "chronos/partials/period_time.html" with period=period periods=periods %}
           </div>
 
           {% for weekday, lessons in lesson_periods_period.items %}
             {% if forloop.counter0|add:"1" == day.0 %}
               <div class="col s8">
                 {# A lesson #}
-                {% include "chronos/lesson.html" with lessons=lessons %}
+                {% include "chronos/partials/lesson.html" with lessons=lessons %}
               </div>
             {% endif %}
           {% endfor %}
diff --git a/aleksis/apps/chronos/templates/chronos/subs/teachers.html b/aleksis/apps/chronos/templates/chronos/subs/teachers.html
deleted file mode 100644
index 593ec799..00000000
--- a/aleksis/apps/chronos/templates/chronos/subs/teachers.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{% if not sub.is_event %}
-  {% if sub.sub.type == 1 and sub.lesson_period.lesson.teachers.all %}
-    {% include "chronos/teachers.html" with teachers=sub.lesson_period.lesson.teachers.all %}
-  {% elif sub.teachers.all and sub.lesson_period.lesson.teachers.all %}
-    <s>
-      {% include "chronos/teachers.html" with teachers=sub.lesson_period.lesson.teachers.all %}
-    </s>
-    →
-    <strong>
-      {% include "chronos/teachers.html" with teachers=sub.teachers.all %}
-    </strong>
-  {% elif sub.teachers.all and not sub.lesson_period.lesson.teachers.all %}
-    {% include "chronos/teachers.html" with teachers=sub.teachers.all %}
-  {% elif sub.lesson_period.lesson.teachers.all %}
-    {% include "chronos/teachers.html" with teachers=sub.lesson_period.lesson.teachers.all %}
-  {% endif %}
-{% else %}
-  {% include "chronos/teachers.html" with teachers=sub.teachers.all %}
-{% endif %}
diff --git a/aleksis/apps/chronos/templates/chronos/substitution.html b/aleksis/apps/chronos/templates/chronos/substitution.html
index 767318e7..a93d83e9 100644
--- a/aleksis/apps/chronos/templates/chronos/substitution.html
+++ b/aleksis/apps/chronos/templates/chronos/substitution.html
@@ -51,7 +51,7 @@
       {#            {% include "chronos/hintsinsub.html" %}#}
     </div>
     <div class="col s12 m6 l4 xl3">
-      {% include "chronos/datepicker.html" %}
+      {% include "chronos/partials/datepicker.html" %}
     </div>
   </div>
 
@@ -80,7 +80,7 @@
     {% for sub in substitutions %}
       <tr class="{{ sub.color }}-text">
         <td>
-          {% include "chronos/groups.html" with groups=sub.lesson_period.lesson.groups.all %}
+          {% include "chronos/partials/groups.html" with groups=sub.lesson_period.lesson.groups.all %}
         </td>
         <td>
           <strong>
@@ -88,13 +88,13 @@
           </strong>
         </td>
         <td>
-          {% include "chronos/subs/teachers.html" %}
+          {% include "chronos/partials/subs/teachers.html" %}
         </td>
         <td>
-          {% include "chronos/subs/subject.html" %}
+          {% include "chronos/partials/subs/subject.html" %}
         </td>
         <td>
-          {% include "chronos/subs/room.html" %}
+          {% include "chronos/partials/subs/room.html" %}
         </td>
         <td>
           {% if sub.badge %}
-- 
GitLab