Skip to content
Snippets Groups Projects
Verified Commit f72dc7d2 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Save more space in week printout. Advances #26.

parent 238c8a54
No related branches found
No related tags found
No related merge requests found
...@@ -120,6 +120,15 @@ tr:nth-child(even) { ...@@ -120,6 +120,15 @@ tr:nth-child(even) {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
tr.lessons-day-first {
border-top: 2px solid;
}
th.lessons-day-head {
writing-mode: tb-rl;
transform: rotate(-180deg);
}
tr.lesson-substituted { tr.lesson-substituted {
background-color: #ffc107; background-color: #ffc107;
} }
......
...@@ -118,24 +118,23 @@ ...@@ -118,24 +118,23 @@
<section class="sheet padding-10mm smallprint"> <section class="sheet padding-10mm smallprint">
<h2>{% trans 'Lesson documentation for calendar week' %} {{ week.week }}</h2> <h2>{% trans 'Lesson documentation for calendar week' %} {{ week.week }}</h2>
{% for day in week %} <table>
{% if periods_by_day|get_dict:day %} <thead>
<h3>{{ day }}</h3> <tr>
<th></th>
<table> <th>{% trans 'Pe.' %}</th>
<thead> <th>{% trans 'Subj.' %}</th>
<tr> <th>{% trans 'Subs.' %}</th>
<th>{% trans 'Pe.' %}</th> <th>{% trans 'Lesson topic' %}</th>
<th>{% trans 'Subj.' %}</th> <th>{% trans 'Homework' %}</th>
<th>{% trans 'Subs.' %}</th> <th>{% trans 'Notes' %}</th>
<th>{% trans 'Lesson topic' %}</th> <th>{% trans 'Te.' %}</th>
<th>{% trans 'Homework' %}</th> </tr>
<th>{% trans 'Notes' %}</th> </thead>
<th>{% trans 'Te.' %}</th> <tbody>
</tr> {% for day in week %}
</thead> {% with periods_by_day|get_dict:day as periods %}
<tbody> {% for period, documentations, notes, substitution in periods %}
{% for period, documentations, notes, substitution in periods_by_day|get_dict:day %}
<tr class=" <tr class="
{% if substitution %} {% if substitution %}
{% if substitution.cancelled %} {% if substitution.cancelled %}
...@@ -144,7 +143,13 @@ ...@@ -144,7 +143,13 @@
lesson-substituted lesson-substituted
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if forloop.first %}
lessons-day-first
{% endif %}
"> ">
{% if forloop.first %}
<th rowspan="{{ periods|length }}" class="lessons-day-head">{{ day }}</th>
{% endif %}
<td class="lesson-pe">{{ period.period.period }}</td> <td class="lesson-pe">{{ period.period.period }}</td>
<td class="lesson-subj">{{ period.lesson.subject.abbrev }}</td> <td class="lesson-subj">{{ period.lesson.subject.abbrev }}</td>
<td class="lesson-subs">{{ substitution.subject.abbrev }}</td> <td class="lesson-subs">{{ substitution.subject.abbrev }}</td>
...@@ -186,10 +191,10 @@ ...@@ -186,10 +191,10 @@
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> {% endwith %}
</table> {% endfor %}
{% endif %} </tbody>
{% endfor %} </table>
</section> </section>
{% endfor %} {% endfor %}
</body> </body>
......
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