107 lines
3.1 KiB
HTML
107 lines
3.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="page-header">
|
|
<h1>Dokumente</h1>
|
|
<p class="intro-text">Checkliste der hochzuladenden Zertifizierungsdokumente.</p>
|
|
</div>
|
|
|
|
<div class="progress-box">
|
|
<div class="progress-header">
|
|
<strong>Fortschritt</strong>
|
|
<span>{{ completed_items }} / {{ total_items }} Dokumenten</span>
|
|
</div>
|
|
|
|
<div class="progress-fill
|
|
{% if progress_percent < 40 %}progress-red
|
|
{% elif progress_percent < 80 %}progress-yellow
|
|
{% else %}progress-green
|
|
{% endif %}"
|
|
style="width: {{ progress_percent }}%;">
|
|
</div>
|
|
</div>
|
|
|
|
<section class="admin-section">
|
|
<div class="admin-panel">
|
|
<div class="table-wrap">
|
|
<table class="mandanten-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Titel</th>
|
|
<th>Kurzbeschreibung</th>
|
|
<th>Datei</th>
|
|
<th>Status</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in items %}
|
|
<tr>
|
|
<td class="col-id">{{ item.id }}</td>
|
|
<td>{{ item.title }}</td>
|
|
<td>{{ item.short_description or "-" }}</td>
|
|
|
|
<td>
|
|
{% if item.stored_filename %}
|
|
<div class="file-block">
|
|
<a href="/dokumente/file/{{ item.id }}" class="file-name" target="_new">
|
|
{{ item.original_filename or item.stored_filename }}
|
|
</a>
|
|
|
|
<div class="file-meta">
|
|
{{ item.uploaded_at.strftime("%d.%m.%Y %H:%M") if item.uploaded_at else "-" }}
|
|
• {{ item.uploaded_by_name or "-" }}
|
|
•
|
|
{% if item.filesize %}
|
|
{% if item.filesize < 1024 %}
|
|
{{ item.filesize }} B
|
|
{% elif item.filesize < 1024*1024 %}
|
|
{{ (item.filesize / 1024)|round(1) }} KB
|
|
{% else %}
|
|
{{ (item.filesize / (1024*1024))|round(2) }} MB
|
|
{% endif %}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td>
|
|
{% if item.stored_filename %}
|
|
<span class="status-ok">✔ OK</span>
|
|
{% else %}
|
|
<span class="status-missing">Fehlt</span>
|
|
{% endif %}
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
|
<div class="table-actions">
|
|
{% if not item.stored_filename %}
|
|
<form method="post" action="/dokumente/upload/{{ item.id }}" enctype="multipart/form-data">
|
|
<input type="file" name="file" required>
|
|
<button type="submit" class="btn-primary btn-small">Upload</button>
|
|
</form>
|
|
{% else %}
|
|
<form method="post" action="/dokumente/delete/{{ item.id }}">
|
|
<button type="submit" class="btn-danger btn-small">Delete</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{% endblock %} |