<style>
    .overview_table {
        font-size: 14px;
        border-collapse: collapse;
        min-width: 150mm;
    }
    .overview_table th, .overview_table td {
        border: 1px solid black;
        padding-right: 10px;
        padding-left: 10px;
    }
    .exam_sheet_info {
        font-size: 12px;
        margin-bottom: 5mm;
    }
    .exam_sheet_info td {
        padding-right: 5mm;
    }
</style>

{% if language == 'de' %}
  {% set labels = {
    'supervision_list': 'Aufsichtsliste für',
    'module': 'Modulprüfung',
    'signature_line': 'Ort, Datum, Unterschrift Aufsichtsperson',
    'signature': 'Unterschrift',
    'first_name': 'Vorname',
    'room_seat': 'Raum / Platz',
    'date': 'Datum',
    'examiner': 'Prüfer'
  } %}
{% else %}
  {% set labels = {
    'supervision_list': 'Supervision List for',
    'module': 'Exam',
    'signature_line': 'Place, Date, Signature of Supervisor',
    'signature': 'Signature',
    'first_name': 'First Name',
    'room_seat': 'Room / Seat',
    'date': 'Date',
    'examiner': 'Examiner'
  } %}
{% endif %}

{% set students_sorted_by_name = students | sort(attribute='last_name') %}

<h2 style="text-align:center;">{{ exam_info.exam_name }}</h1>
<h3 style="text-align:center;">{{ labels.supervision_list }} {{ room }}.</h3>

<table class="exam_sheet_info">
    <tr><td colspan="2">{{ exam_info.university_name }}</td></tr>
    <tr><td colspan="2">{{ exam_info.department_name }}</td></tr>
    <tr><td colspan="2">{{ exam_info.degree_program }}</td></tr>
    <tr><td colspan="2">&nbsp;</td></tr>
    <tr><td>{{ labels.module }}:</td><td>{{ exam_info.exam_name }}&nbsp;&nbsp;{{ exam_info.semester }}</td></tr>
    {% for  examiner in exam_info.examiners %}
    <tr><td>{{ labels.examiner }} {{ loop.index }}:</td><td>{{ examiner }}</td></tr>
    {% endfor %}
    <tr><td>{{ labels.date }}:</td><td>{{ exam_info.date }}</td></tr>
</table>
<table border="1" class="overview_table">
    <thead><tr><th>Name</th><th>{{ labels.first_name }}</th><th>{{ labels.room_seat }}</th><th>{{ labels.signature }}</th><th>Info</th></tr></thead>
    <tbody>
        {% for student in students_sorted_by_name %}
          {% if not student.get('is_backup', False) %}
          <tr><td>{{student.last_name}}</td><td>{{student.first_name}}</td><td>{{student.room}} / {{student.seat}}</td><td style="min-width:30mm;"></td><td style="min-width: 15mm;"></td></tr>
          {% endif %}
        {% endfor %}
    </tbody>
</table>
<table style="margin-top: 15mm;">
    <tr>
        <th></th><td style="border-bottom: 1px solid black;min-width: 50mm;"></td>
    </tr>
    <tr>
        <th></th><td class="signature-name">{{ labels.signature_line }}</td>
    </tr>
</table>

