fix: keep default pdf assets outside runtime media

This commit is contained in:
Md Bayazid Bostame
2026-03-29 03:05:54 +02:00
parent f67877875e
commit ca9e890b0b
9 changed files with 7 additions and 8 deletions

View File

@@ -0,0 +1,286 @@
<!DOCTYPE html>
<html lang="{{ PDF_LANG or T.lang or 'de' }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ T.offboarding_title }}</title>
<style>
body {
font-family: Helvetica, Arial, sans-serif;
color: #0f172a;
font-size: 10.2px;
line-height: 1.4;
margin: 0;
}
.hero {
background: #fff3f3;
border: 1px solid #f0dddd;
border-left: 4px solid #a32b2b;
padding: 8px 10px;
margin-bottom: 8px;
}
.title {
margin: 0;
font-size: 17px;
color: #7a1e1e;
font-weight: bold;
letter-spacing: 0.2px;
}
.section {
margin-top: 9px;
font-size: 11px;
color: #7a1e1e;
font-weight: bold;
border-bottom: 1px solid #efd8d8;
padding-bottom: 2px;
}
table {
width: 100%;
border-collapse: collapse;
margin: 6px 0;
}
th, td {
border: 1px solid #f0e1e1;
padding: 4px 6px;
vertical-align: top;
overflow-wrap: anywhere;
word-break: break-word;
}
th {
background: #fff8f8;
color: #651818;
font-weight: bold;
width: 31%;
text-align: left;
}
.mono {
font-weight: bold;
color: #111827;
word-break: break-word;
}
.opt-card {
border: 1px solid #f0e1e1;
margin-top: 6px;
margin-bottom: 6px;
}
.opt-title {
background: #7a1e1e;
color: #fff;
font-weight: bold;
padding: 5px 6px;
font-size: 9.5px;
}
.opt-grid {
width: 100%;
border-collapse: collapse;
margin: 0;
}
.opt-grid td {
border: 1px solid #f0e1e1;
padding: 3px 5px;
width: 33.33%;
font-size: 9.5px;
}
.sigbox {
border: 1px solid #e5e7eb;
padding: 7px;
margin-top: 8px;
background: #fafafa;
}
.sigline {
margin-top: 9px;
}
.line {
display: inline-block;
border-bottom: 1px solid #334155;
min-width: 165px;
height: 12px;
vertical-align: bottom;
margin: 0 6px;
}
.small {
color: #64748b;
font-size: 9px;
}
.cb {
width: 12px;
height: 12px;
margin-right: 10px;
display: inline-block;
vertical-align: middle;
min-width: 12px;
font-size: 12px;
line-height: 12px;
color: #b8b8b8;
font-weight: normal;
}
.manual-note {
margin: 6px 0 8px;
color: #5b6472;
font-size: 9.4px;
}
</style>
</head>
<body>
<div class="hero">
<h1 class="title">{{ T.offboarding_title }}</h1>
</div>
{% for section in PDF_SECTIONS %}
{% if section.has_content %}
<div class="section">{{ section.title }}</div>
{% if section.scalar_rows %}
<table>
{% for row in section.scalar_rows %}
<tr>
<th>{{ row[0].label }}</th>
<td{% if not row[1] %} colspan="3"{% endif %}{% if row[0].name in ['full_name', 'work_email'] %} class="mono"{% endif %}>{{ row[0].display_value }}</td>
{% if row[1] %}
<th>{{ row[1].label }}</th>
<td>{{ row[1].display_value }}</td>
{% endif %}
</tr>
{% endfor %}
</table>
{% endif %}
{% endif %}
{% endfor %}
<div class="section">{{ T.offboarding_requester }}</div>
<table>
<tr>
<th>{{ T.requested_by_name }}</th>
<td>{{ REQUESTED_BY_NAME }}</td>
<th>{{ T.requested_by_email }}</th>
<td>{{ REQUESTED_BY }}</td>
</tr>
</table>
{% if HAS_ONBOARDING_DATA %}
<div class="section">{{ T.it_hardware_status }}</div>
<div class="opt-card">
<div class="opt-title">{{ T.hardware_check }}</div>
<table class="opt-grid">
{% if HARDWARE_CHECKLIST %}
{% for item in HARDWARE_CHECKLIST %}
{% if loop.index0 % 3 == 0 %}<tr>{% endif %}
<td><span class="cb">&#9633;</span>&#160;{{ item.label }}</td>
{% if loop.index0 % 3 == 2 or loop.last %}</tr>{% endif %}
{% endfor %}
{% else %}
<tr><td colspan="3">{{ T.no_onboarding_hardware }}</td></tr>
{% endif %}
</table>
</div>
{% else %}
<div class="section">{{ T.manual_return_overview }}</div>
<p class="manual-note">{{ T.manual_return_note }}</p>
<div class="opt-card">
<div class="opt-title">{{ T.returned_devices }}</div>
<table class="opt-grid">
{% for row in MANUAL_DEVICES %}
<tr>
{% for cell in row %}<td><span class="cb">&#9633;</span>&#160;{{ cell }}</td>{% endfor %}
{% if row|length < 3 %}
{% for _ in range(3 - row|length) %}<td></td>{% endfor %}
{% endif %}
</tr>
{% endfor %}
</table>
</div>
<div class="opt-card">
<div class="opt-title">{{ T.returned_software }}</div>
<table class="opt-grid">
{% for row in MANUAL_SOFTWARE %}
<tr>
{% for cell in row %}<td><span class="cb">&#9633;</span>&#160;{{ cell }}</td>{% endfor %}
{% if row|length < 3 %}
{% for _ in range(3 - row|length) %}<td></td>{% endfor %}
{% endif %}
</tr>
{% endfor %}
</table>
</div>
<div class="opt-card">
<div class="opt-title">{{ T.removed_workspace_groups }}</div>
<table class="opt-grid">
{% for row in MANUAL_WORKSPACE_GROUPS %}
<tr>
{% for cell in row %}<td><span class="cb">&#9633;</span>&#160;{{ cell }}</td>{% endfor %}
{% if row|length < 3 %}
{% for _ in range(3 - row|length) %}<td></td>{% endfor %}
{% endif %}
</tr>
{% endfor %}
</table>
</div>
<div class="opt-card">
<div class="opt-title">{{ T.removed_accesses }}</div>
<table class="opt-grid">
{% for row in MANUAL_ACCESSES %}
<tr>
{% for cell in row %}<td><span class="cb">&#9633;</span>&#160;{{ cell }}</td>{% endfor %}
{% if row|length < 3 %}
{% for _ in range(3 - row|length) %}<td></td>{% endfor %}
{% endif %}
</tr>
{% endfor %}
</table>
</div>
<div class="opt-card">
<div class="opt-title">{{ T.returned_extra_it }}</div>
<table class="opt-grid">
{% for row in MANUAL_EXTRA_HARDWARE %}
<tr>
{% for cell in row %}<td><span class="cb">&#9633;</span>&#160;{{ cell }}</td>{% endfor %}
{% if row|length < 3 %}
{% for _ in range(3 - row|length) %}<td></td>{% endfor %}
{% endif %}
</tr>
{% endfor %}
{% for row in MANUAL_EXTRA_SOFTWARE %}
<tr>
{% for cell in row %}<td><span class="cb">&#9633;</span>&#160;{{ cell }}</td>{% endfor %}
{% if row|length < 3 %}
{% for _ in range(3 - row|length) %}<td></td>{% endfor %}
{% endif %}
</tr>
{% endfor %}
</table>
</div>
{% endif %}
<div class="section">{{ T.it_signatures }}</div>
<div class="sigbox">
<div class="sigline">{{ T.it_checked_by }} <span class="line"></span></div>
<div class="sigline">{{ T.it_signature }} <span class="line"></span></div>
<div class="sigline">{{ T.return_complete }} <span class="cb">&#9633;</span>&#160;{{ T.yes }} &#160;&#160;&#160; <span class="cb">&#9633;</span>&#160;{{ T.no }}</div>
</div>
<p class="small">{{ T.offboarding_note }}</p>
</body>
</html>