Files
MtoRagSystem/templates/admin/base.html.twig
2026-02-21 16:23:34 +01:00

130 lines
4.5 KiB
Twig

<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Admin{% endblock %}</title>
<link href="/assets/styles/bootstrap.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="/assets/styles/base.css">
</head>
<body class="bg-dark text-light">
{# ============================= #}
{# Top Navigation #}
{# ============================= #}
<nav class="navbar navbar-dark bg-black border-bottom border-secondary px-3">
<span class="navbar-brand fw-semibold text-info">
mitho Admin
</span>
<div class="ms-auto d-flex align-items-center gap-3">
{% if app.user %}
<span class="small text-light">
{{ app.user.userIdentifier }}
</span>
<a class="btn btn-sm btn-outline-light"
href="{{ path('admin_logout') }}">
Logout
</a>
{% endif %}
</div>
</nav>
{# ============================= #}
{# Layout Container #}
{# ============================= #}
<div class="container-fluid">
<div class="row flex-nowrap">
{# ============================= #}
{# Sidebar #}
{# ============================= #}
{% if app.user %}
<aside class="col-auto col-md-3 col-lg-2 bg-black border-end border-secondary min-vh-100 pt-3">
{% set route = app.request.attributes.get('_route') %}
<nav class="nav flex-column small">
<a class="nav-link text-light {% if route starts with 'admin_dashboard' %}active fw-bold{% endif %}"
href="{{ path('admin_dashboard') }}">
Dashboard
</a>
<hr class="border-secondary">
<div class="text-info text-uppercase small mb-2">
Dokumente & Wissen
</div>
<a class="nav-link text-light {% if route starts with 'admin_document' %}active fw-bold{% endif %}"
href="{{ path('admin_documents') }}">
Dokumente
</a>
{# ------------------------- #}
{# Tags (Document Routing) #}
{# ------------------------- #}
<a class="nav-link text-light {% if route starts with 'admin_tags' %}active fw-bold{% endif %}"
href="{{ path('admin_tags_index') }}">
Tags
</a>
<a class="nav-link text-light {% if route starts with 'admin_job' %}active fw-bold{% endif %}"
href="{{ path('admin_jobs') }}">
Ingest Jobs
</a>
<a class="nav-link text-light {% if route starts with 'admin_system_agent' %}active fw-bold{% endif %}"
href="{{ path('admin_system_agent') }}">
Chunk-Index
</a>
<hr class="border-secondary">
<div class="text-info text-uppercase small mb-2">
System-Profile
</div>
<a class="nav-link text-light {% if route starts with 'admin_system_prompt' %}active fw-bold{% endif %}"
href="{{ path('admin_system_prompt') }}">
System Prompt
</a>
<a class="nav-link text-light {% if route starts with 'admin_ingest_profile' %}active fw-bold{% endif %}"
href="{{ path('admin_ingest_profile_list') }}">
Ingest Profiles
</a>
<hr class="border-secondary">
<div class="text-info text-uppercase small mb-2">
KI-Endpunkte
</div>
<a class="nav-link text-light {% if route starts with 'admin_model_config' %}active fw-bold{% endif %}"
href="{{ path('admin_model_config_list') }}">
Modell-Generierung
</a>
</nav>
</aside>
{% endif %}
{# ============================= #}
{# Main Content #}
{# ============================= #}
<main class="col py-4 px-4">
{% block body %}{% endblock %}
</main>
</div>
</div>
</body>
</html>