new layouts
This commit is contained in:
@@ -4,171 +4,186 @@
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="h3">System Prompt</h1>
|
||||
</div>
|
||||
|
||||
{# ============================= #}
|
||||
{# Flash Messages #}
|
||||
{# ============================= #}
|
||||
|
||||
{% for message in app.flashes('success') %}
|
||||
<div class="alert alert-success">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% for message in app.flashes('danger') %}
|
||||
<div class="alert alert-danger">{{ message }}</div>
|
||||
{% endfor %}
|
||||
|
||||
{# ============================= #}
|
||||
{# Versionen Übersicht #}
|
||||
{# ============================= #}
|
||||
|
||||
<div class="card bg-black border-secondary">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-info mb-3">Versionen</h5>
|
||||
|
||||
<table class="table table-dark table-striped table-hover align-middle">
|
||||
<thead class="table-secondary text-dark">
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<th>Status</th>
|
||||
<th>Kommentar</th>
|
||||
<th>Erstellt</th>
|
||||
<th class="text-end">Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for p in all %}
|
||||
<tr>
|
||||
<td>v{{ p.version }}</td>
|
||||
|
||||
<td>
|
||||
{% if p.active %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-dark border border-secondary">
|
||||
Inaktiv
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>{{ p.comment ?? '-' }}</td>
|
||||
|
||||
<td>{{ p.createdAt|date('d.m.Y H:i:s') }}</td>
|
||||
|
||||
<td class="text-end">
|
||||
|
||||
{% if not p.active and is_granted('ROLE_SUPER_ADMIN') %}
|
||||
|
||||
{# Aktivieren #}
|
||||
<form method="post"
|
||||
action="{{ path('admin_system_prompt_activate', {id: p.id}) }}"
|
||||
class="d-inline"
|
||||
onsubmit="return confirm('Diese Version aktivieren?');">
|
||||
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('activate_system_prompt_' ~ p.id) }}">
|
||||
|
||||
<button class="btn btn-sm btn-outline-success me-2">
|
||||
Aktivieren
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{# Löschen #}
|
||||
<form method="post"
|
||||
action="{{ path('admin_system_prompt_delete', {id: p.id}) }}"
|
||||
class="d-inline"
|
||||
onsubmit="return confirm('Version wirklich löschen?');">
|
||||
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('delete_system_prompt_' ~ p.id) }}">
|
||||
|
||||
<button class="btn btn-sm btn-outline-danger">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
<span class="text-secondary">—</span>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-secondary py-4">
|
||||
Keine Versionen vorhanden.
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- HEADER -->
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="h3">System Prompt Verwaltung</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 small text-secondary">
|
||||
Hinweis: Der aktive System Prompt beeinflusst das Antwortverhalten
|
||||
des LLM unmittelbar. Änderungen sollten dokumentiert und versioniert erfolgen.
|
||||
</div>
|
||||
<!-- Flash Messages -->
|
||||
{% for message in app.flashes('success') %}
|
||||
<div class="alert alert-success">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% for message in app.flashes('danger') %}
|
||||
<div class="alert alert-danger">{{ message }}</div>
|
||||
{% endfor %}
|
||||
|
||||
{# ============================= #}
|
||||
{# Neue Version erstellen #}
|
||||
{# ============================= #}
|
||||
<div class="row g-4">
|
||||
|
||||
<div class="card bg-black border-secondary mb-5 text-light">
|
||||
<div class="card-body">
|
||||
<!-- ===================================================== -->
|
||||
<!-- LEFT SIDE – Versionen (50%) -->
|
||||
<!-- ===================================================== -->
|
||||
|
||||
<h5 class="text-info mb-3">Neue Version erstellen</h5>
|
||||
<div class="col-lg-6">
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('create_system_prompt') }}">
|
||||
<div class="card bg-black border-secondary text-light h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-info mb-3">Versionen</h5>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped table-hover align-middle">
|
||||
<thead class="table-secondary text-dark">
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<th>Status</th>
|
||||
<th>Kommentar</th>
|
||||
<th>Erstellt</th>
|
||||
<th class="text-end">Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for p in all %}
|
||||
<tr>
|
||||
<td>v{{ p.version }}</td>
|
||||
|
||||
<td>
|
||||
{% if p.active %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-dark border border-secondary">
|
||||
Inaktiv
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>{{ p.comment ?? '-' }}</td>
|
||||
|
||||
<td>{{ p.createdAt|date('d.m.Y H:i:s') }}</td>
|
||||
|
||||
<td class="text-end">
|
||||
|
||||
{% if not p.active and is_granted('ROLE_SUPER_ADMIN') %}
|
||||
|
||||
<form method="post"
|
||||
action="{{ path('admin_system_prompt_activate', {id: p.id}) }}"
|
||||
class="d-inline"
|
||||
onsubmit="return confirm('Diese Version aktivieren?');">
|
||||
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('activate_system_prompt_' ~ p.id) }}">
|
||||
|
||||
<button class="btn btn-sm btn-outline-success me-2">
|
||||
Aktivieren
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form method="post"
|
||||
action="{{ path('admin_system_prompt_delete', {id: p.id}) }}"
|
||||
class="d-inline"
|
||||
onsubmit="return confirm('Version wirklich löschen?');">
|
||||
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('delete_system_prompt_' ~ p.id) }}">
|
||||
|
||||
<button class="btn btn-sm btn-outline-danger">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
<span class="text-secondary">—</span>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-secondary py-4">
|
||||
Keine Versionen vorhanden.
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary mt-4">
|
||||
|
||||
<div class="small text-secondary">
|
||||
<strong>Governance-Hinweis:</strong><br>
|
||||
Der aktive System Prompt beeinflusst das globale Antwortverhalten des LLM unmittelbar.
|
||||
Änderungen sollten dokumentiert, versioniert und nachvollziehbar erfolgen.
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Kommentar (optional)</label>
|
||||
<input type="text"
|
||||
name="comment"
|
||||
class="form-control bg-dark text-light border-secondary"
|
||||
placeholder="Warum wurde der Prompt geändert?">
|
||||
<div class="form-text text-secondary">
|
||||
Dokumentation der Änderung für spätere Nachvollziehbarkeit.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">
|
||||
Prompt-Inhalt
|
||||
</label>
|
||||
<div class="form-text text-secondary mb-2">
|
||||
Verfügbare Variable:
|
||||
<code>{% verbatim %}{% now %}{% endverbatim %}</code>
|
||||
(aktuelles Datum/Zeit)
|
||||
</div>
|
||||
|
||||
<!-- ===================================================== -->
|
||||
<!-- RIGHT SIDE – Neue Version (50%) -->
|
||||
<!-- ===================================================== -->
|
||||
|
||||
<div class="col-lg-6">
|
||||
|
||||
<div class="card bg-black border-secondary text-light h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-info mb-3">Neue Version erstellen</h5>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('create_system_prompt') }}">
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Kommentar (optional)</label>
|
||||
<input type="text"
|
||||
name="comment"
|
||||
class="form-control bg-dark text-light border-secondary"
|
||||
placeholder="Warum wurde der Prompt geändert?">
|
||||
<div class="form-text text-secondary">
|
||||
Dokumentation der Änderung für spätere Nachvollziehbarkeit.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Prompt-Inhalt</label>
|
||||
|
||||
<div class="form-text text-secondary mb-2">
|
||||
Verfügbare Variable:
|
||||
<code>{% verbatim %}{% now %}{% endverbatim %}</code>
|
||||
(aktuelles Datum / Zeit)
|
||||
</div>
|
||||
|
||||
<textarea name="content"
|
||||
rows="18"
|
||||
class="form-control bg-dark text-light border-secondary"
|
||||
required>{{ active ? active.content : '' }}</textarea>
|
||||
</div>
|
||||
|
||||
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-outline-info">
|
||||
Neue Version speichern
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<textarea name="content"
|
||||
rows="16"
|
||||
class="form-control bg-dark text-light border-secondary"
|
||||
required>{{ active ? active.content : '' }}</textarea>
|
||||
</div>
|
||||
|
||||
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-outline-info">
|
||||
Neue Version speichern
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user