158 lines
6.0 KiB
Twig
158 lines
6.0 KiB
Twig
{% extends 'admin/base.html.twig' %}
|
|
|
|
{% block title %}Neue Dokumentversion{% endblock %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-4 flex-wrap gap-2">
|
|
<div>
|
|
<h1 class="h3 mb-1">Neue Version</h1>
|
|
<div class="small text-muted">
|
|
Neue unveränderliche Version für ein bestehendes Dokument hochladen.
|
|
</div>
|
|
</div>
|
|
|
|
<a href="{{ path('admin_document_show', {id: document.id}) }}"
|
|
class="btn btn-sm btn-outline-secondary">
|
|
Zurück zum Dokument
|
|
</a>
|
|
</div>
|
|
|
|
{% for message in app.flashes('success') %}
|
|
<div class="alert alert-success shadow-sm">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% for message in app.flashes('danger') %}
|
|
<div class="alert alert-danger shadow-sm">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% for message in app.flashes('info') %}
|
|
<div class="alert alert-info shadow-sm">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<div class="card bg-dark border-secondary text-light mb-4 shadow-sm">
|
|
<div class="card-body row g-4">
|
|
<div class="col-lg-7">
|
|
<h5 class="text-info mb-3">Dokumentkontext</h5>
|
|
|
|
<div class="mb-2">
|
|
<strong>Dokument:</strong>
|
|
<span class="text-light">{{ document.title }}</span>
|
|
</div>
|
|
|
|
<div class="small text-secondary">
|
|
Eine neue Version erzeugt eine zusätzliche, unveränderliche Dokumentversion.
|
|
Die bestehende aktive Version bleibt zunächst unverändert.
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-5">
|
|
<h5 class="text-info mb-3">Aktueller Stand</h5>
|
|
|
|
<div class="small mb-2">
|
|
<strong>Aktive Version:</strong>
|
|
{% if document.currentVersion %}
|
|
<span class="badge bg-info text-dark">
|
|
v{{ document.currentVersion.versionNumber }}
|
|
</span>
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="small mb-2">
|
|
<strong>Vorhandene Versionen:</strong>
|
|
{{ document.versions|length }}
|
|
</div>
|
|
|
|
<div class="small">
|
|
<strong>Zugewiesene Tags:</strong>
|
|
{{ document.tags|length }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card bg-dark border-secondary text-light mb-4 shadow-sm">
|
|
<div class="card-body row g-4">
|
|
<div class="col-lg-7">
|
|
<h5 class="text-info mb-3">Wichtig für den Lifecycle</h5>
|
|
|
|
<ul class="small mb-0">
|
|
<li>Der Upload erzeugt nur eine <strong>neue Version</strong>, aber aktiviert sie nicht automatisch.</li>
|
|
<li>Erst die spätere <strong>Aktivierung</strong> löst den deterministischen Re-Ingest aus.</li>
|
|
<li>Tags bleiben auf <strong>Dokumentebene</strong> bestehen und gelten weiterhin für das Dokument als Ganzes.</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="col-lg-5">
|
|
<h5 class="text-info mb-3">Gute Praxis</h5>
|
|
|
|
<ul class="small mb-0">
|
|
<li>Nur fachlich wirklich passende Nachfolgeversionen hochladen.</li>
|
|
<li>Kein anderes Thema oder anderes Produkt in dieselbe Dokumentlinie mischen.</li>
|
|
<li>Bei stark verändertem Fachinhalt später Tagging mitprüfen.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card bg-black border-secondary text-light shadow-sm">
|
|
<div class="card-body">
|
|
|
|
<form method="post" enctype="multipart/form-data">
|
|
<input type="hidden"
|
|
name="_token"
|
|
value="{{ csrf_token('create_document_version_' ~ document.id) }}">
|
|
|
|
<div class="mb-4">
|
|
<label class="form-label">Datei auswählen</label>
|
|
|
|
<input type="file"
|
|
class="form-control bg-dark text-light border-secondary"
|
|
name="file"
|
|
required>
|
|
|
|
<div class="form-text text-secondary">
|
|
Unterstützte Formate: PDF, DOCX, TXT, MD.
|
|
Die Datei wird versioniert gespeichert und mit einer eindeutigen Checksum versehen.
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card bg-dark border-secondary mb-4">
|
|
<div class="card-body">
|
|
<h6 class="text-info mb-3">Was passiert nach dem Upload?</h6>
|
|
|
|
<ul class="small mb-0">
|
|
<li>Es wird eine neue, unveränderliche Dokumentversion angelegt.</li>
|
|
<li>Die aktive Version bleibt zunächst unverändert.</li>
|
|
<li>Ein Re-Ingest erfolgt erst nach späterer Aktivierung dieser Version.</li>
|
|
<li>Danach wird der Wissensindex deterministisch neu aufgebaut.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
{% if is_granted('ROLE_EDITOR') %}
|
|
<div class="d-flex justify-content-end">
|
|
<button class="btn btn-outline-info">
|
|
Version hochladen
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-4 small text-secondary">
|
|
Hinweis: Eine neue Version verbessert den Dokument-Lifecycle nur dann sauber, wenn sie fachlich wirklich zu diesem Dokument gehört.
|
|
Bei stark verändertem Inhalt sollten nach der späteren Aktivierung auch die Tags geprüft werden.
|
|
</div>
|
|
|
|
{% endblock %} |