Files
django5-genial-daneben-archiv/intern/templates/intern/base.html
T
H4nSolo b8680f8e95 ● Add categories and question duration; intern UI for category management
- gd/models.py: added Kategorie (name, sort_order), Frage.kategorien M2M, Frage.dauer_sekunden and property dauer_minuten
   - intern/forms.py: FrageForm extended with kategorien + dauer_sekunden; save() handles M2M and duration
   - intern/views.py + intern/urls.py: category CRUD (list/create/edit/delete) and sort (▲/▼) actions; assign sort_order for new categories
   - intern/templates/*: forms and templates updated (folge_form, kategorie_list, kategorie_edit, sidebar)
   - gd/views.py + gd/templates/gd/folge_detail.html: prefetch categories and display badges + approx. duration (≈ N min)
2026-05-18 19:27:26 +02:00

114 lines
5.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}GD Intern - Management{% endblock %}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<style>
body { background-color: #f8f9fa; }
.sidebar { min-height: 100vh; background: #212529; color: white; position: sticky; top: 0; }
.nav-link { color: rgba(255,255,255,.75); border-radius: 5px; margin-bottom: 5px; }
.nav-link:hover { color: white; background: rgba(255,255,255,.1); }
.nav-link.active { color: white; background: #0d6efd; }
.top-navbar { background: white; border-bottom: 1px solid #dee2e6; padding: 10px 20px; }
/* Animation für sanftes Ausblenden der Nachrichten */
.alert { transition: opacity 0.5s ease-out; }
</style>
{% block extra_css %}{% endblock %}
</head>
<body>
<div class="container-fluid">
<div class="row">
<nav class="col-md-3 col-lg-2 d-none d-md-block sidebar p-3 text-center">
<h4 class="mb-4 py-3 border-bottom text-white">GD INTERN</h4>
<ul class="nav flex-column text-start">
<li class="nav-item">
<a class="nav-link {% if request.resolver_match.url_name == 'dashboard' %}active{% endif %}" href="{% url 'intern:dashboard' %}">
📊 Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.resolver_match.url_name == 'folge_neu' %}active{% endif %}" href="{% url 'intern:folge_neu' %}">
➕ Folge hinzufügen
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.resolver_match.url_name == 'folge_liste' %}active{% endif %}" href="{% url 'intern:folge_liste' %}">
📁 Folgen Übersicht
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.resolver_match.url_name == 'team_liste' %}active{% endif %}" href="{% url 'intern:team_liste' %}">
👥 Team bearbeiten
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.resolver_match.url_name == 'kategorie_liste' %}active{% endif %}" href="{% url 'intern:kategorie_liste' %}">
🏷️ Kategorien
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.resolver_match.url_name == 'analyse' %}active{% endif %}" href="{% url 'intern:analyse' %}">
🔍 Datenanalyse
</a>
</li>
</ul>
<div class="mt-5 pt-5 border-top small opacity-50">
Genial Daneben Archiv <br> Copyright 2026
</div>
</nav>
<div class="col-md-9 col-lg-10 p-0">
<header class="top-navbar d-flex justify-content-between align-items-center">
<span class="text-muted small text-uppercase fw-bold">Verwaltungspanel</span>
<div class="d-flex align-items-center">
{% if user.is_authenticated %}
<span class="me-3 text-dark small">Eingeloggt als: <strong>{{ user.username }}</strong></span>
<form action="{% url 'admin:logout' %}" method="post" class="d-inline">
{% csrf_token %}
<button type="submit" class="btn btn-outline-danger btn-sm">Abmelden</button>
</form>
{% else %}
<a href="{% url 'admin:login' %}?next={{ request.path }}" class="btn btn-primary btn-sm">Anmelden</a>
{% endif %}
</div>
</header>
<main class="p-4">
<div id="message-container">
{% if messages %}
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible fade show shadow-sm border-start border-4 {% if message.tags == 'success' %}border-success text-dark{% else %}border-warning text-dark{% endif %}" role="alert">
{% if message.tags == 'success' %}✅{% else %}⚠️{% endif %} {{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
</div>
{% block content %}{% endblock %}
</main>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
setTimeout(function() {
const alerts = document.querySelectorAll('.alert');
alerts.forEach(function(alert) {
const bsAlert = new bootstrap.Alert(alert);
alert.style.opacity = '0';
setTimeout(() => bsAlert.close(), 500);
});
}, 5000); // 5 Sekunden
});
</script>
{% block extra_js %}{% endblock %}
</body>
</html>