Skip to content
Snippets Groups Projects
Commit a7e1f3a6 authored by Julian's avatar Julian
Browse files

Make substitution table horizontal scrollable

parent a58eb02e
No related branches found
No related tags found
1 merge request!241Resolve "Improve mobile design of substitution table"
Pipeline #54357 canceled
......@@ -37,56 +37,58 @@
<h2 class="hide-on-small-and-down">{{ day|date:"l" }}, {{ day }}</h2>
<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 item in substitutions %}
<tr class="{% include "chronos/partials/subs/colour.html" with item=item %}">
{# TODO: Extend support for purple (events) #}
<td>
{% include "chronos/partials/subs/groups.html" with type=item.type el=item.el %}
</td>
<td>
{% include "chronos/partials/subs/period.html" with type=item.type el=item.el item=item %}
</td>
<td>
{% include "chronos/partials/subs/teachers.html" with type=item.type el=item.el %}
</td>
<td>
{% include "chronos/partials/subs/subject.html" with type=item.type el=item.el %}
</td>
<td>
{% include "chronos/partials/subs/room.html" with type=item.type el=item.el %}
<div class="table-container">
<table class="substitutions striped">
<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>
<td>
<span class="hide-on-med-and-up">
{% endif %}
{% for item in substitutions %}
<tr class="{% include "chronos/partials/subs/colour.html" with item=item %}">
{# TODO: Extend support for purple (events) #}
<td>
{% include "chronos/partials/subs/groups.html" with type=item.type el=item.el %}
</td>
<td>
{% include "chronos/partials/subs/period.html" with type=item.type el=item.el item=item %}
</td>
<td>
{% include "chronos/partials/subs/teachers.html" with type=item.type el=item.el %}
</td>
<td>
{% include "chronos/partials/subs/subject.html" with type=item.type el=item.el %}
</td>
<td>
{% include "chronos/partials/subs/room.html" with type=item.type el=item.el %}
</td>
<td>
<span class="hide-on-med-and-up">
{% include "chronos/partials/subs/badge.html" with sub=item.el %}
</span>
{% include "chronos/partials/subs/comment.html" with el=item.el %}
</td>
<td class="hide-on-small-and-down">
{% include "chronos/partials/subs/badge.html" with sub=item.el %}
</span>
{% include "chronos/partials/subs/comment.html" with el=item.el %}
</td>
<td class="hide-on-small-and-down">
{% include "chronos/partials/subs/badge.html" with sub=item.el %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</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