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 cfcfc6c7e10287b5751444e85de69ce1a6e6e575..0a4f681bf4946f69011ca7a87bf9a56f3d74b161 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 0000000000000000000000000000000000000000..ec17d8b811cfad34c1cad90d2a3302aa5752ba53 --- /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 136ccc175dae200d4c95984c1f4d04ec6b4a9787..7d25724d3b1f36036cd344ebb8e4d052029e0862 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 593ec79966d27157d49a047572deb0767318c63c..0000000000000000000000000000000000000000 --- 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 767318e7ddc69aa500dca7ef258a459d35f990d4..a93d83e9bb39cefeb9f832f46eba14e3454b1a86 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 %}