diff --git a/biscuit/apps/alsijil/static/css/alsijil/full_register.css b/biscuit/apps/alsijil/static/css/alsijil/full_register.css index 0d771fd94dc3265b764c838e38ef3c5b5bea0256..cfcc3340618e9d0d994e41b6b36b2553d99bb800 100644 --- a/biscuit/apps/alsijil/static/css/alsijil/full_register.css +++ b/biscuit/apps/alsijil/static/css/alsijil/full_register.css @@ -120,6 +120,15 @@ tr:nth-child(even) { 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 { background-color: #ffc107; } diff --git a/biscuit/apps/alsijil/templates/alsijil/print/full_register.html b/biscuit/apps/alsijil/templates/alsijil/print/full_register.html index a95cc646ae465039ee396ac9857fbc3e9a95d97c..92221aa5ff914ea36e13ea3c472a33858cc69b9e 100644 --- a/biscuit/apps/alsijil/templates/alsijil/print/full_register.html +++ b/biscuit/apps/alsijil/templates/alsijil/print/full_register.html @@ -118,24 +118,23 @@ <section class="sheet padding-10mm smallprint"> <h2>{% trans 'Lesson documentation for calendar week' %} {{ week.week }}</h2> - {% for day in week %} - {% if periods_by_day|get_dict:day %} - <h3>{{ day }}</h3> - - <table> - <thead> - <tr> - <th>{% trans 'Pe.' %}</th> - <th>{% trans 'Subj.' %}</th> - <th>{% trans 'Subs.' %}</th> - <th>{% trans 'Lesson topic' %}</th> - <th>{% trans 'Homework' %}</th> - <th>{% trans 'Notes' %}</th> - <th>{% trans 'Te.' %}</th> - </tr> - </thead> - <tbody> - {% for period, documentations, notes, substitution in periods_by_day|get_dict:day %} + <table> + <thead> + <tr> + <th></th> + <th>{% trans 'Pe.' %}</th> + <th>{% trans 'Subj.' %}</th> + <th>{% trans 'Subs.' %}</th> + <th>{% trans 'Lesson topic' %}</th> + <th>{% trans 'Homework' %}</th> + <th>{% trans 'Notes' %}</th> + <th>{% trans 'Te.' %}</th> + </tr> + </thead> + <tbody> + {% for day in week %} + {% with periods_by_day|get_dict:day as periods %} + {% for period, documentations, notes, substitution in periods %} <tr class=" {% if substitution %} {% if substitution.cancelled %} @@ -144,7 +143,13 @@ lesson-substituted {% 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-subj">{{ period.lesson.subject.abbrev }}</td> <td class="lesson-subs">{{ substitution.subject.abbrev }}</td> @@ -186,10 +191,10 @@ </td> </tr> {% endfor %} - </tbody> - </table> - {% endif %} - {% endfor %} + {% endwith %} + {% endfor %} + </tbody> + </table> </section> {% endfor %} </body>