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

Add i18n to substitution.html and reformat

parent 3b08daf4
No related branches found
No related tags found
1 merge request!31Biscuit merge. Closes #53.
{% extends 'core/base.html' %}
{% load i18n %}
<script type="text/javascript">
var dest = "/timetable/substitutions/";
var dest = "/timetable/substitutions/";
</script>
{% block content %}
<div class="row no-margin">
<div class="col s10 m6">
<h4>Vertretungen</h4>
</div>
<div class="col s2 m6 right align-right print-icon">
{# <a class="waves-effect waves-teal btn-flat btn-flat-medium right"#}
{# href="#}
{# {% if debug %}#}
{# {% url "timetable_substitutions_pdf_date" date|date:"Y-m-d" %}#}
{# {% else %}#}
{# {% url "timetable_substitutions_pdf" %}#}
{# {% endif %}#}
{# ">#}
{# <i class="material-icons center">print</i>#}
{# </a>#}
</div>
<div class="row no-margin">
<div class="col s10 m6">
<h4>{% trans "Substitutions" %}</h4>
</div>
<div class="col s2 m6 right align-right print-icon">
{# <a class="waves-effect waves-teal btn-flat btn-flat-medium right"#}
{# href="#}
{# {% if debug %}#}
{# {% url "timetable_substitutions_pdf_date" date|date:"Y-m-d" %}#}
{# {% else %}#}
{# {% url "timetable_substitutions_pdf" %}#}
{# {% endif %}#}
{# ">#}
{# <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 class="truncate">{{ row.0 }}</strong>
</div>
<div class="col s9">
{{ row.1 }}
</div>
</div>
{% endfor %}
</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 class="truncate">{{ row.0 }}</strong>
</div>
{% endif %}
{# {% include "chronos/hintsinsub.html" %}#}
</div>
<div class="col s12 m6 l4 xl3">
{% include "chronos/datepicker.html" %}
<div class="col s9">
{{ row.1 }}
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{# {% include "chronos/hintsinsub.html" %}#}
</div>
<div class="col s12 m6 l4 xl3">
{% include "chronos/datepicker.html" %}
</div>
</div>
<h5 class="hide-on-small-and-down">{{ day|date:"l, j. F Y" }}</h5>
<h5 class="hide-on-small-and-down">{{ day|date:"l, j. F Y" }}</h5>
<table class="substitutions striped responsive-table">
<thead>
<tr>
<th><i class="material-icons">people</i></th>
<th><i class="material-icons">access_time</i></th>
<th>Lehrer</th>
<th>Fach</th>
<th>Raum</th>
<th>Hinweis</th>
<th></th>
</tr>
</thead>
<tbody>
{% if not substitutions %}
<td colspan="7">
<p class="flow-text center">
Keine Vertretungen vorhanden
</p>
</td>
{% endif %}
{% for sub in substitutions %}
<tr class="{{ sub.color }}-text">
<td>
{{ sub.classes }}
</td>
<td>
<strong>
{{ sub.lesson }}
</strong>
</td>
<td>
{% include "chronos/subs/teacher.html" %}
</td>
<td>
{% include "chronos/subs/subject.html" %}
</td>
<td>
{% include "chronos/subs/room.html" %}
</td>
<td>
{% if sub.badge %}
<span class="badge new green hide-on-med-and-up">{{ sub.badge }}</span>
{% endif %}
<em>{{ sub.text|default:"" }}</em>
</td>
<td class="hide-on-small-and-down">
{% if sub.badge %}
<span class="badge new green darken-2">{{ sub.badge }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<table class="substitutions striped responsive-table">
<thead>
<tr>
<th><i class="material-icons">people</i></th>
<th><i class="material-icons">access_time</i></th>
<th>{% trans "Teacher" %}</th>
<th>{% trans "Subject" %}</th>
<th>{% trans "Room" %}</th>
<th>{% trans "Notes" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% if not substitutions %}
<td colspan="7">
<p class="flow-text center">
{% blocktrans %}No substitutions available.{% endblocktrans %}
</p>
</td>
{% endif %}
{% for sub in substitutions %}
<tr class="{{ sub.color }}-text">
<td>
{% for group in sub.lesson_period.get_groups.all %}
{# {{ sub.lesson_period.get_groups|join:"," }}#}
{{ group.short_name }}
{% endfor %}
</td>
<td>
<strong>
{{ sub.lesson }}
</strong>
</td>
<td>
{% include "chronos/subs/teacher.html" %}
</td>
<td>
{% include "chronos/subs/subject.html" %}
</td>
<td>
{% include "chronos/subs/room.html" %}
</td>
<td>
{% if sub.badge %}
<span class="badge new green hide-on-med-and-up">{{ sub.badge }}</span>
{% endif %}
<em>{{ sub.text|default:"" }}</em>
</td>
<td class="hide-on-small-and-down">
{% if sub.badge %}
<span class="badge new green darken-2">{{ sub.badge }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% 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