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

Work at hints

parent 9cd59f1d
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -3,7 +3,7 @@
{% for hint in hints %}
<div class="card">
<div class="card-content light-blue lighten-4">
<em class="right">Hinweis für {{ hint.from_date|date:"D, d.m." }},
<em class="right hide-on-small-and-down">Hinweis für {{ hint.from_date|date:"D, d.m." }},
{% if hint.from_date != hint.to_date %}
bis {{ hint.to_date|date:"D, d.m." }}
{% endif %} </em>
......@@ -11,6 +11,11 @@
<i class="material-icons left">announcement</i>
{{ hint.text|safe_markdown }}
<em class="hide-on-med-and-up">Hinweis für {{ hint.from_date|date:"D, d.m." }},
{% if hint.from_date != hint.to_date %}
bis {{ hint.to_date|date:"D, d.m." }}
{% endif %} </em>
{# {{ hint }}#}
</div>
</div>
......
{% load martortags %}
{% if hints %}
<ul class="collapsible">
<li>
<div class="collapsible-header"><i class="material-icons">announcement</i>Es gibt Hinweise für diesen Tag.
</div>
<div class="collapsible-body">
{% for hint in hints %}
{{ hint.text|safe_markdown }}
{% endfor %}
</div>
</li>
</ul>
{% endif %}
\ No newline at end of file
{% include 'partials/header.html' %}
<main>
<h3>Alle Pläne</h3>
<h4>Alle Pläne</h4>
<div class="row">
<div class="col s12 m4">
<h4>Lehrkräfte</h4>
<h5>Lehrkräfte</h5>
{% for teacher in teachers %}
<a class="waves-effect waves-light btn btn-timetable-quicklaunch"
href="{% url 'timetable_smart_plan' 'teacher' teacher.id %}">
......@@ -14,7 +14,7 @@
</div>
<div class="col s12 m4">
<h4>Klassen</h4>
<h5>Klassen</h5>
{% for class in classes %}
<a class="waves-effect waves-light btn btn-timetable-quicklaunch"
......@@ -26,7 +26,7 @@
</div>
<div class="col s12 m4">
<h4>Räume</h4>
<h5>Räume</h5>
{% for room in rooms %}
<a class="waves-effect waves-light btn btn-timetable-quicklaunch"
href="{% url 'timetable_smart_plan' 'room' room.id %}">
......
......@@ -6,21 +6,43 @@
</script>
<main>
<h3>Vertretungen</h3>
<div class="row no-print">
<div class="col s12 m6 l4 xl3">
{% include "timetable/datepicker.html" %}
<div class="row no-margin">
<div class="col s12 m10">
<h4>Vertretungen</h4>
</div>
<div class="col l4 xl6">
</div>
<div class="col s12 m6 l4 xl3 right align-right">
<div class="col s12 m2">
<a class="waves-effect waves-teal btn-flat btn-flat-medium right" id="print">
<i class="material-icons center">print</i>
</a>
</div>
</div>
<div class="row no-print">
<div class="col s12 m6 l8 xl9">
{% if header_info.is_box_needed %}
<div class="card">
<div class="card-content">
{% for row in header_info.rows %}
<div class="row no-margin">
<div class="col s3">
<strong>{{ row.0 }}</strong>
</div>
<div class="col s9">
{{ row.1 }}
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% include "timetable/hintsinsub.html" %}
</div>
<div class="col s12 m6 l4 xl3">
{% include "timetable/datepicker.html" %}
</div>
</div>
<h5>{{ date|date:"l, j. F Y" }}</h5>
<table class="substitutions striped">
......
......@@ -269,11 +269,17 @@ def substitutions(request, year=None, month=None, day=None):
subs = get_substitutions_by_date(date)
sub_table = generate_sub_table(subs)
# Get header information and hints
header_info = get_header_information(subs, date)
hints = list(get_all_hints_by_time_period(date, date))
context = {
"subs": subs,
"sub_table": sub_table,
"date": date,
"date_js": int(date.timestamp()) * 1000
"date_js": int(date.timestamp()) * 1000,
"header_info": header_info,
"hints": hints,
}
return render(request, 'timetable/substitution.html', context)
......
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