[32788f42] Fix font encoding for PDF generation, compress empty slots in appointment list, adjust layout and checkbox positioning
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
margin: 0 0 10px 0;
|
||||
color: #34495e;
|
||||
}
|
||||
|
||||
.date-header {
|
||||
background-color: #ecf0f1;
|
||||
padding: 8px 12px;
|
||||
@@ -57,6 +58,10 @@
|
||||
font-weight: bold;
|
||||
font-size: 13pt;
|
||||
border-left: 4px solid #3498db;
|
||||
page-break-before: always;
|
||||
}
|
||||
.first-date-header {
|
||||
page-break-before: avoid;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
@@ -64,23 +69,25 @@
|
||||
margin-bottom: 20px;
|
||||
page-break-inside: auto;
|
||||
}
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
page-break-after: auto;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid #bdc3c7;
|
||||
padding: 8px;
|
||||
padding: 6px 8px; /* Narrower rows */
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
th {
|
||||
background-color: #f8f9fa;
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
.empty-row td {
|
||||
height: 25px; /* Narrower empty rows */
|
||||
color: transparent;
|
||||
}
|
||||
.time-col { width: 12%; white-space: nowrap; }
|
||||
.family-col { width: 35%; }
|
||||
.compressed-row td {
|
||||
background-color: #fcfcfc;
|
||||
color: #7f8c8d !important;
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
.time-col { width: 14%; white-space: nowrap; font-weight: bold; }
|
||||
.family-col { width: 33%; }
|
||||
|
||||
.children-col { width: 15%; text-align: center; }
|
||||
.consent-col { width: 20%; text-align: center; }
|
||||
.done-col { width: 18%; text-align: center; }
|
||||
@@ -102,7 +109,14 @@
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% for date, slots in grouped_slots.items() %}
|
||||
|
||||
{% if not loop.first %}
|
||||
<div style="page-break-before: always;"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="header">
|
||||
<div class="header-text">
|
||||
<h1>{{ job_name }}</h1>
|
||||
@@ -116,8 +130,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for date, slots in grouped_slots.items() %}
|
||||
<div class="date-header">{{ date }}</div>
|
||||
<div class="date-header first-date-header">{{ date }}</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -131,26 +144,36 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for slot in slots %}
|
||||
<tr class="{% if not slot.booked %}empty-row{% endif %}">
|
||||
<td class="time-col" style="color: #333;">{{ slot.time_str }}</td>
|
||||
<td class="family-col">{{ slot.name if slot.booked else '' }}</td>
|
||||
<td class="children-col">{{ slot.children if slot.booked else '' }}</td>
|
||||
<td class="consent-col">
|
||||
{% if slot.booked and slot.consent %}
|
||||
<span style="font-size: 16pt;">☑</span>
|
||||
{% elif slot.booked %}
|
||||
<!-- nein -->
|
||||
{% else %}
|
||||
<!-- leer -->
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="done-col">
|
||||
<span class="checkbox-square"></span>
|
||||
</td>
|
||||
</tr>
|
||||
{% if slot.is_compressed %}
|
||||
<tr class="compressed-row">
|
||||
<td class="time-col" style="color: #7f8c8d;">{{ slot.time_str }}</td>
|
||||
<td colspan="4">{{ slot.name }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="{% if not slot.booked %}empty-row{% endif %}">
|
||||
<td class="time-col" style="color: #333;">{{ slot.time_str }}</td>
|
||||
<td class="family-col">{{ slot.name if slot.booked else '' }}</td>
|
||||
<td class="children-col">{{ slot.children if slot.booked else '' }}</td>
|
||||
<td class="consent-col">
|
||||
{% if slot.booked and slot.consent %}
|
||||
<span style="font-size: 14pt;">☑</span>
|
||||
{% elif slot.booked %}
|
||||
<!-- nein -->
|
||||
{% else %}
|
||||
<!-- leer -->
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="done-col">
|
||||
{% if slot.booked %}
|
||||
<span class="checkbox-square"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user