diff --git a/aleksis/apps/chronos/templates/chronos/partials/datepicker.html b/aleksis/apps/chronos/templates/chronos/partials/datepicker.html deleted file mode 100644 index f7d49f34e44569009b9af35aec1b0f26571773f4..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/datepicker.html +++ /dev/null @@ -1,30 +0,0 @@ -{% load static %} - -{% if not display_date_only %} - <script type="text/javascript" src="{% static "js/helper.js" %}"></script> - {{ datepicker|json_script:"datepicker_data" }} - <script type="text/javascript" src="{% static "js/chronos/date_select.js" %}"></script> -{% endif %} - -<div class="col s2 no-padding"> - <a class="waves-effect waves-secondary btn-flat btn-flat-medium left" href="{{ url_prev }}"> - <i class="material-icons iconify center" data-icon="mdi:chevron-left"></i> - </a> -</div> - -{% if display_date_only %} - <div class="col s8"> - <span class="card-title center-block" id="date"> - {{ day|date:"l" }}, {{ day }} - </span> - </div> -{% else %} - <div class="col s8 no-padding"> - <input type="text" class="datepicker center-align" id="date"> - </div> -{% endif %} -<div class="col s2 no-padding"> - <a class="waves-effect waves-secondary btn-flat btn-flat-medium right" href="{{ url_next }}"> - <i class="material-icons iconify center" data-icon="mdi:chevron-right"></i> - </a> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/elements.html b/aleksis/apps/chronos/templates/chronos/partials/elements.html deleted file mode 100644 index a7df614d20a2bc7fb2c203d90b0473756294da0a..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/elements.html +++ /dev/null @@ -1,13 +0,0 @@ -<div class="card lesson-card {% if active_day and week_day == active_day %} z-depth-5 active {% endif %}"> - <div class="card-content"> - {% for element in elements %} - {% if element.label_ == "lesson_period" %} - {% include "chronos/partials/lesson.html" with lesson_period=element %} - {% elif element.label_ == "extra_lesson" and smart %} - {% include "chronos/partials/extra_lesson.html" with extra_lesson=element %} - {% elif element.label_ == "event" and smart %} - {% include "chronos/partials/event.html" with event=element %} - {% endif %} - {% endfor %} - </div> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/event.html b/aleksis/apps/chronos/templates/chronos/partials/event.html deleted file mode 100644 index 3aa6b797639598c0e24051053f040fcd3f1aead4..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/event.html +++ /dev/null @@ -1,33 +0,0 @@ -<div class="lesson-with-event"> - <p> - {# Teacher or room > Display groups #} - {% if type.value == "teacher" or type.value == "room" %} - {% include "chronos/partials/groups.html" with groups=event.groups.all %} - {% endif %} - - {# Class or room > Display teachers #} - {% if type.value == "room" or type.value == "group" %} - {% include "chronos/partials/teachers.html" with teachers=event.teachers.all %} - {% endif %} - - {# Teacher or class > Display rooms #} - {% if type.value == "teacher" or type.value == "group" %} - {% for room in event.rooms.all %} - {% include "chronos/partials/room.html" with room=room %}{% if not forloop.last %},{% endif %} - {% endfor %} - {% endif %} - - {% if type.value == "teacher" and not event.groups.all and not event.rooms.all and event.title %} - <em>{{ event.title }}</em> - {% elif type.value == "group" and not event.teachers.all and not event.groups.all and event.title %} - <em>{{ event.title }}</em> - {% elif type.value == "room" and not event.teachers.all and not event.groups.all and event.title %} - <em>{{ event.title }}</em> - {% elif event.title %} - <br/> - <small> - <em>{{ event.title }}</em> - </small> - {% endif %} - </p> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/extra_lesson.html b/aleksis/apps/chronos/templates/chronos/partials/extra_lesson.html deleted file mode 100644 index 1113f011f0164be5a92f1dbe7ef3b32e8db07ed5..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/extra_lesson.html +++ /dev/null @@ -1,28 +0,0 @@ -<div class="lesson-with-sub" - style="{% include "chronos/partials/subject_colour.html" with subject=extra_lesson.subject %}"> - <p> - {# Teacher or room > Display groups #} - {% if type.value == "teacher" or type.value == "room" %} - {% include "chronos/partials/groups.html" with groups=extra_lesson.groups.all %} - {% endif %} - - {# Class or room > Display teachers #} - {% if type.value == "room" or type.value == "group" %} - {% include "chronos/partials/teachers.html" with teachers=extra_lesson.teachers.all %} - {% endif %} - - {% include "chronos/partials/subject.html" with subject=extra_lesson.subject %} - - {# Teacher or class > Display rooms #} - {% if type.value == "teacher" or type.value == "group" %} - {% include "chronos/partials/room.html" with room=extra_lesson.room %} - {% endif %} - - {% if extra_lesson.comment %} - <br/> - <small> - <em>{{ extra_lesson.comment }}</em> - </small> - {% endif %} - </p> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/holiday.html b/aleksis/apps/chronos/templates/chronos/partials/holiday.html deleted file mode 100644 index 85fc42d4ffd50621da8fe04802b3c2d18a509b71..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/holiday.html +++ /dev/null @@ -1 +0,0 @@ -<span class="badge new blue center-align holiday-badge">{{ holiday.title }}</span> diff --git a/aleksis/apps/chronos/templates/chronos/partials/lesson.html b/aleksis/apps/chronos/templates/chronos/partials/lesson.html deleted file mode 100644 index 3fa1f75788ae6433bc1bf2ef9983a06df8fb59ff..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/lesson.html +++ /dev/null @@ -1,103 +0,0 @@ -{% load i18n %} - -<div style=" - {% with sub=lesson_period.get_substitution %} - {# Display background color only if lesson is not cancelled and it is not the old room #} - {% if not smart %} - {% include "chronos/partials/subject_colour.html" with subject=lesson_period.lesson.subject %} - {% elif not sub.cancelled and not lesson_period.get_substitution.cancelled_for_teachers and not lesson_period.replaced_by_event %} - {% if not type.value == "room" or lesson_period.room == lesson_period.get_room or lesson_period.get_room == el %} - {% if sub and sub.subject %} - {% include "chronos/partials/subject_colour.html" with subject=sub.subject %} - {% else %} - {% include "chronos/partials/subject_colour.html" with subject=lesson_period.lesson.subject %} - {% endif %} - {% endif %} - {% endif %} - {% endwith %} - " - {# Add CSS class for sub when it's a sub #} - class="{% if smart %}{% if lesson_period.get_substitution or lesson_period.replaced_by_event %}lesson-with-sub{% endif %}{% endif %}" -> - <p> - {% if lesson_period.replaced_by_event and smart %} - {% include "chronos/partials/groups.html" with groups=lesson_period.lesson.groups.all %} - {% include "chronos/partials/subject.html" with subject=lesson_period.lesson.subject %} - <br/> - <span class="badge new green">{% trans "Cancelled due to an event" %}</span> - {% elif lesson_period.get_substitution and smart %} - {% with sub=lesson_period.get_substitution %} - {# SUBSTITUTION #} - {% if type.value == "room" and lesson_period.room != lesson_period.get_room and lesson_period.get_room != el %} - {# When it's the old room, let it empty #} - - {% elif sub.cancelled or sub.cancelled_for_teachers %} - {# When a badge (cancellation, etc.) exists, then display it with the teacher#} - - {# Class or room > Display teacher #} - {% if type.value == "group" or type.value == "room" and lesson_period.lesson.teachers.all %} - {% include "chronos/partials/teachers.html" with teachers=lesson_period.lesson.teachers.all %}<br/> - {% endif %} - - {# Badge #} - {% include "chronos/partials/subs/badge.html" with sub=sub %} - - {% else %} - {# Display sub #} - - {# Teacher or room > display classes #} - {% if type.value == "teacher" or type.value == "room" %} - {% include "chronos/partials/groups.html" with groups=lesson_period.lesson.groups.all %} - {% endif %} - - {# Display teacher with tooltip #} - {% include "chronos/partials/subs/teachers.html" with type="substitution" el=sub %} - - {# Display subject #} - {% include "chronos/partials/subs/subject.html" with type="substitution" el=sub %} - - {# Teacher or class > display room #} - {% if type.value == "teacher" or type.value == "group" %} - {% include "chronos/partials/subs/room.html" with type="substitution" el=sub %} - {% endif %} - {% endif %} - - - {# Display the comment (e. g. work orders) #} - {% if sub.comment %} - <br> - <small> - <em>{{ sub.comment }}</em> - </small> - {% endif %} - {% endwith %} - - - {% else %} - {# Normal plan #} - - {# Teacher or room > Display classes #} - {% if type.value == "teacher" or type.value == "room" %} - {# {{ element_container.element.classes }}#} - {% if lesson_period.lesson.groups %} - {% include "chronos/partials/groups.html" with groups=lesson_period.lesson.groups.all %} - {% endif %} - {% endif %} - - {# Class or room > Display teacher #} - {% if type.value == "room" or type.value == "group" %} - {% include "chronos/partials/teachers.html" with teachers=lesson_period.lesson.teachers.all %} - {% endif %} - - {# Display subject #} - {% include "chronos/partials/subject.html" with subject=lesson_period.lesson.subject %} - - {# Teacher or class > Display room #} - {% if type.value == "teacher" or type.value == "group" %} - {% if lesson_period.room %} - {% include "chronos/partials/room.html" with room=lesson_period.room %} - {% endif %} - {% endif %} - {% endif %} - </p> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/lessons_col.html b/aleksis/apps/chronos/templates/chronos/partials/lessons_col.html deleted file mode 100644 index 25ddedc47f422916b2e44f5419151e1a36ce8332..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/lessons_col.html +++ /dev/null @@ -1,30 +0,0 @@ -{% if holiday %} - <div class="row"> - <div class="col s12"> - <div class="card col s12 holiday-card"> - <div class="card-content"> - <p> - {% include "chronos/partials/holiday.html" with holiday=holiday %}<br/> - </p> - </div> - </div> - </div> - </div> -{% else %} - {% for row in timetable %} - <div class="row"> - <div class="col s4"> - {% if row.type == "period" %} - {% include "chronos/partials/period_time.html" with period=row.period periods=periods %} - {% endif %} - </div> - <div class="col s8"> - {% if row.type == "period" %} - {% include "chronos/partials/elements.html" with elements=row.col %} - {% else %} - {% include "chronos/partials/supervision.html" with supervision=row.col %} - {% endif %} - </div> - </div> - {% endfor %} -{% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/period_time.html b/aleksis/apps/chronos/templates/chronos/partials/period_time.html deleted file mode 100644 index ebd76dab6393c83332e07c1b194248480846323f..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/period_time.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load data_helpers %} - -<div class="card timetable-title-card"> - <div class="card-content"> - - {# Lesson number #} - <span class="card-title left"> - {{ period }}. - </span> - - {# Time dimension of lesson #} - <div class="right timetable-time grey-text text-darken-2"> - {% with period_obj=periods|get_dict:period %} - <span>{{ period_obj.0|time }}</span> - <br/> - <span>{{ period_obj.1|time }}</span> - {% endwith %} - </div> - </div> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/room.html b/aleksis/apps/chronos/templates/chronos/partials/room.html deleted file mode 100644 index c96a7fd01975a86ac1bb66241a82872333d084bc..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/room.html +++ /dev/null @@ -1,7 +0,0 @@ -{% if room %} - <span class="tooltipped" data-position="bottom" data-tooltip="{{ room.name }}"> - <a href="{% url "timetable" "room" room.pk %}"> - {{ room.short_name }} - </a> - </span> -{% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/subject_colour.html b/aleksis/apps/chronos/templates/chronos/partials/subject_colour.html deleted file mode 100644 index 4cead55119b2c4b799c13018dc175c2fe414f059..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/subject_colour.html +++ /dev/null @@ -1,6 +0,0 @@ -{% if subject.colour_fg %} - color: {{ subject.colour_fg }}; -{% endif %} -{% if subject.colour_bg and subject.colour_bg != subject.colour_fg %} - background-color: {{ subject.colour_bg }}; -{% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/supervision.html b/aleksis/apps/chronos/templates/chronos/partials/supervision.html deleted file mode 100644 index 0fff8f5cfef6c5fa1e897c0705210ce3d1a3ca54..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/supervision.html +++ /dev/null @@ -1,29 +0,0 @@ -{% load i18n %} - -<div class="card lesson-card supervision-card {% if active_day and week_day == active_day %} z-depth-5 active {% endif %}"> - <div class="card-content"> - {% if supervision %} - <div style=" - {% if supervision.area.colour_fg %} - color: {{ supervision.area.colour_fg }}; - {% endif %} - {% if supervision.area.colour_bg and supervision.area.colour_bg != supervision.area.colour_fg %} - background-color: {{ supervision.area.colour_bg }}; - {% endif %} - " class="{% if supervision.get_substitution and smart %}lesson-with-sub{% endif %}"> - <p> - <strong>{% trans "Supervision" %}</strong> - <span data-position="bottom" class="tooltipped" - data-tooltip="{{ supervision.area.name }}" title="{{ supervision.area.name }}"> - {{ supervision.area.short_name }} - </span> - {% if supervision.get_substitution and smart %} - {% include "chronos/partials/subs/teachers.html" with type="supervision_substitution" el=supervision.get_substitution %} - {% elif type == "supervision_area" %} - {% include "chronos/partials/teachers.html" with teachers=supervision.teachers %} - {% endif %} - </p> - </div> - {% endif %} - </div> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/today.html b/aleksis/apps/chronos/templates/chronos/partials/today.html deleted file mode 100644 index 8f3897c26b5de1d4c69d825d828e8df6630cf682..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/today.html +++ /dev/null @@ -1,2 +0,0 @@ -{% load i18n %} -<span class="badge new orange center-align holiday-badge">{% trans "Today" %}</span> diff --git a/aleksis/apps/chronos/templates/chronos/partials/week_select.html b/aleksis/apps/chronos/templates/chronos/partials/week_select.html deleted file mode 100644 index e9b57b84ceb1ce5443676cb9e6711640bb7bebd9..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/week_select.html +++ /dev/null @@ -1,47 +0,0 @@ -{% load i18n %} - -<div class="col s12 m6 right"> - <div class="col s2 no-print"> - <a class="waves-effect waves-teal btn-flat btn-flat-medium right" href="{{ url_prev }}"> - <i class="material-icons iconify center" data-icon="mdi:chevron-left"></i> - </a> - </div> - - <div class="input-field col s8 no-margin hide-on-med-and-up"> - <select id="calendar-week-1"> - {% for week in weeks %} - <option value="{{ week.week }}" {% if week == wanted_week %} - selected {% endif %}>{% trans "CW" %} {{ week.week }} - ({{ week.0|date:"SHORT_DATE_FORMAT" }}–{{ week.6|date:"SHORT_DATE_FORMAT" }}) - </option> - {% endfor %} - </select> - </div> - - <div class="input-field col s8 no-margin hide-on-med-and-down"> - <select id="calendar-week-2"> - {% for week in weeks %} - <option value="{{ week.week }}" {% if week == wanted_week %} - selected {% endif %}>{% trans "CW" %} {{ week.week }} - ({{ week.0|date:"j.n." }}–{{ week.6|date:"SHORT_DATE_FORMAT" }}) - </option> - {% endfor %} - </select> - </div> - - <div class="input-field col s8 no-margin hide-on-small-and-down hide-on-large-only"> - <select id="calendar-week-3"> - {% for week in weeks %} - <option value="{{ week.week }}" {% if week == wanted_week %} - selected {% endif %}>{% trans "CW" %} {{ week.week }} ({{ week.0|date:"j.n." }}–{{ week.6|date:"j.n." }}) - </option> - {% endfor %} - </select> - </div> - - <div class="col s2 no-print"> - <a class="waves-effect waves-teal btn-flat btn-flat-medium left" href="{{ url_next }}"> - <i class="material-icons iconify center" data-icon="mdi:chevron-right"></i> - </a> - </div> -</div> diff --git a/aleksis/apps/chronos/templates/chronos/partials/week_timetable.html b/aleksis/apps/chronos/templates/chronos/partials/week_timetable.html deleted file mode 100644 index 22030da954fd3f96ccf324e4ef7b50ab76862835..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/partials/week_timetable.html +++ /dev/null @@ -1,71 +0,0 @@ -{# Week days #} -<div class="row"> - <div class="col {% if active_day %}s1{% else %}s2{% endif %}"> - - </div> - {# Show short weekdays on tablets #} - {% for weekday in weekdays_short %} - <div class="col s2 hide-on-large-only"> - <div class="card timetable-title-card {% if active_day and weekday.date == active_day %} z-depth-5 {% endif %}"> - <div class="card-content"> - <span class="card-title"> - {{ weekday.name }} - </span> - {% if smart %} - {{ weekday.date }} - {% if weekday.holiday %} - <br/>{% include "chronos/partials/holiday.html" with holiday=weekday.holiday %} - {% endif %} - {% if weekday.date == today %} - <br/> {% include "chronos/partials/today.html" %} - {% endif %} - {% endif %} - </div> - </div> - </div> - {% endfor %} - - {# Show long weekdays elsewere #} - {% for weekday in weekdays %} - <div class="col {% if weekday.date == active_day %} s3 {% else %} s2 {% endif %} hide-on-med-only"> - <div class="card timetable-title-card {% if active_day and weekday.date == active_day %} z-depth-5 {% endif %}"> - <div class="card-content"> - <span class="card-title"> - {{ weekday.name }} - </span> - {% if smart %} - {{ weekday.date }} - {% if weekday.holiday %} - <br/>{% include "chronos/partials/holiday.html" with holiday=weekday.holiday %} - {% endif %} - {% if weekday.date == today %} - <br/> {% include "chronos/partials/today.html" %} - {% endif %} - {% endif %} - </div> - </div> - </div> - {% endfor %} -</div> - -{# Lessons #} -{% for row in timetable %} -<div class="row"> - <div class="col {% if active_day %}s1{% else %}s2{% endif %}"> - {% if row.type == "period" %} - {% include "chronos/partials/period_time.html" with period=row.period periods=periods %} - {% endif %} - </div> - - {% for col in row.cols %} - {# A lesson #} - <div class="col {% if forloop.counter0 == active_day.weekday %} s3 {% else %} s2 {% endif %}"> - {% if row.type == "period" %} - {% include "chronos/partials/elements.html" with elements=col week_day=forloop.counter0 active_day=active_day.weekday %} - {% else %} - {% include "chronos/partials/supervision.html" with supervision=col %} - {% endif %} - </div> - {% endfor %} -</div> -{% endfor %} \ No newline at end of file diff --git a/aleksis/apps/chronos/templates/chronos/timetable_print.html b/aleksis/apps/chronos/templates/chronos/timetable_print.html deleted file mode 100644 index 4769673610019ad98538d11db579a9cbe6c4601c..0000000000000000000000000000000000000000 --- a/aleksis/apps/chronos/templates/chronos/timetable_print.html +++ /dev/null @@ -1,55 +0,0 @@ -{% extends 'core/base_print.html' %} - -{% load data_helpers static i18n %} - -{% block extra_head %} - <link rel="stylesheet" href="{% static 'css/chronos/timetable.css' %}"> - <link rel="stylesheet" href="{% static 'css/chronos/timetable_print.css' %}"> -{% endblock %} - -{% block page_title %} - {% trans "Timetable" %} <i>{{ el.short_name }}</i> -{% endblock %} -{% block content %} - <div class="timetable-plan"> - {# Week days #} - <div class="row"> - <div class="col s2"> - - </div> - {% for weekday in weekdays_short %} - <div class="col s2"> - <div class="card timetable-title-card"> - <div class="card-content"> - <span class="card-title"> - {{ weekday.name }} - </span> - </div> - </div> - </div> - {% endfor %} - </div> - - {% for row in timetable %} - <div class="row"> - <div class="col s2"> - {% if row.type == "period" %} - {% include "chronos/partials/period_time.html" with period=row.period periods=periods %} - {% endif %} - </div> - - {% for col in row.cols %} - {# A lesson #} - <div class="col s2"> - {% if row.type == "period" %} - {% include "chronos/partials/elements.html" with elements=col %} - {% else %} - {% include "chronos/partials/supervision.html" with supervision=col %} - {% endif %} - </div> - {% endfor %} - </div> - {% endfor %} - </div> - -{% endblock %}