Skip to content
Snippets Groups Projects
Verified Commit 11e9b15d authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Delete old template files

parent d017403d
No related branches found
No related tags found
No related merge requests found
Pipeline #192185 failed
This commit is part of merge request !315. Comments created here will be created in the context of that merge request.
Showing
with 0 additions and 475 deletions
{% 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>
<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>
<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>
<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>
<span class="badge new blue center-align holiday-badge">{{ holiday.title }}</span>
{% 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>
{% 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 %}
{% 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>
{% 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 %}
{% 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 %}
{% 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>
{% load i18n %}
<span class="badge new orange center-align holiday-badge">{% trans "Today" %}</span>
{% 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>
{# 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
{% 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 %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment