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

Group weekdays in mobile in collections

parent ec938f02
No related branches found
No related tags found
1 merge request!88Resolve "Check (responsive) design"
......@@ -45,7 +45,7 @@
<div class="col s12 m7">
{% regroup lesson_periods by period.get_weekday_display as periods_by_day %}
{% for weekday, periods in periods_by_day %}
<div class="card">
<div class="card hide-on-med-and-down">
<div class="card-content">
{% weekday_to_date week periods.0.period.weekday as current_date %}
<span class="card-title">
......@@ -103,6 +103,46 @@
</table>
</div>
</div>
<div class="card hide-on-large-only">
<div class="card-content">
{% weekday_to_date week periods.0.period.weekday as current_date %}
<span class="card-title">
{{ weekday }}, {{ current_date }}
</span>
<div class="collection">
<!--<thead>
<tr>
<th></th>
<th>{% blocktrans %}Period{% endblocktrans %}</th>
{% if not group %}
<th>{% blocktrans %}Groups{% endblocktrans %}</th>
{% endif %}
<th>{% blocktrans %}Subject{% endblocktrans %}</th>
<th>{% blocktrans %}Teachers{% endblocktrans %}</th>
<th>{% blocktrans %}Lesson topic{% endblocktrans %}</th>
</tr>
</thead>
<tbody>-->
{% for period in periods %}
<a class="collection-item avatar"
href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}">
<p class="title">
{% include "alsijil/partials/lesson_status_icon.html" with period=period css_class="circle" color_suffix=" " %}
{{ period.period.period }}. {{ period.get_subject.name }}
</p>
<p>
{% if not group %}
{{ period.lesson.group_names }}
{% endif %}
{{ period.get_teacher_names }}
</p>
<p>{{ period.get_lesson_documentation.topic }}</p>
</a>
{% endfor %}
<!--</tbody>-->
</div>
</div>
</div>
{% endfor %}
</div>
<div class="col s12 m5">
......
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