Prototype implementation
This commit is contained in:
parent
315143a6fc
commit
14b0bc6d01
160 changed files with 5731 additions and 42 deletions
|
|
@ -0,0 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Übersicht{% endblock %}
|
||||
{% block content %}
|
||||
<h1 class="page-title mb-6">Übersicht</h1>
|
||||
<p class="text-slate-500">Dashboard wird in WP-0004 implementiert.</p>
|
||||
{% endblock %}
|
||||
29
vergabe_teilnahme/templates/base.html
Normal file
29
vergabe_teilnahme/templates/base.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" x-data="{ sidebarOpen: true }">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Vergabe Teilnahme{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{% static 'dist/main.css' %}">
|
||||
<script src="{% static 'vendor/alpinejs/alpine.min.js' %}" defer></script>
|
||||
</head>
|
||||
<body class="bg-slate-50 min-h-screen">
|
||||
{% include "partials/topbar.html" %}
|
||||
|
||||
<div class="flex h-[calc(100vh-56px)]">
|
||||
{% include "partials/sidebar.html" %}
|
||||
|
||||
<main class="flex-1 overflow-y-auto p-6">
|
||||
{% include "partials/breadcrumb.html" %}
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{% include "partials/feedback_button.html" %}
|
||||
<div id="modal-container"></div>
|
||||
|
||||
<script src="{% static 'vendor/htmx/htmx.min.js' %}"></script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
10
vergabe_teilnahme/templates/errors/404.html
Normal file
10
vergabe_teilnahme/templates/errors/404.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Seite nicht gefunden{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card text-center py-16">
|
||||
<p class="text-6xl font-bold text-slate-200 mb-4">404</p>
|
||||
<h1 class="page-title mb-2">Seite nicht gefunden</h1>
|
||||
<p class="text-slate-500 mb-6">Die angeforderte Seite existiert nicht oder wurde verschoben.</p>
|
||||
<a href="/" class="btn-primary">Zur Übersicht</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
10
vergabe_teilnahme/templates/errors/500.html
Normal file
10
vergabe_teilnahme/templates/errors/500.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Serverfehler{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card text-center py-16">
|
||||
<p class="text-6xl font-bold text-slate-200 mb-4">500</p>
|
||||
<h1 class="page-title mb-2">Interner Serverfehler</h1>
|
||||
<p class="text-slate-500 mb-6">Ein unerwarteter Fehler ist aufgetreten. Bitte versuche es später erneut.</p>
|
||||
<a href="/" class="btn-primary">Zur Übersicht</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
12
vergabe_teilnahme/templates/partials/breadcrumb.html
Normal file
12
vergabe_teilnahme/templates/partials/breadcrumb.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% if breadcrumbs %}
|
||||
<nav class="flex items-center gap-2 text-sm text-slate-500 mb-4">
|
||||
{% for crumb in breadcrumbs %}
|
||||
{% if not forloop.last %}
|
||||
<a href="{{ crumb.url }}" class="hover:text-slate-900 transition-colors">{{ crumb.label }}</a>
|
||||
<span class="text-slate-300">›</span>
|
||||
{% else %}
|
||||
<span class="text-slate-900 font-medium">{{ crumb.label }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<button hx-get="/feedback/modal/"
|
||||
hx-target="#modal-container"
|
||||
hx-swap="innerHTML"
|
||||
class="fixed bottom-6 right-6 bg-white border border-slate-300 shadow-lg
|
||||
rounded-full p-3 hover:bg-slate-50 z-40 transition-colors"
|
||||
title="Feedback geben">
|
||||
💬
|
||||
</button>
|
||||
46
vergabe_teilnahme/templates/partials/feedback_modal.html
Normal file
46
vergabe_teilnahme/templates/partials/feedback_modal.html
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<div x-data="{ open: true }" x-show="open" x-cloak
|
||||
class="fixed inset-0 bg-black/30 z-50 flex items-center justify-center">
|
||||
<div class="bg-white rounded-xl shadow-xl p-6 w-full max-w-md mx-4"
|
||||
@click.outside="open = false">
|
||||
<h2 class="page-title text-xl mb-4">Feedback</h2>
|
||||
<form hx-post="/feedback/" hx-target="#modal-container" hx-swap="innerHTML">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="seite_kontext" value="{{ request.path }}">
|
||||
{% if current_ausschreibung %}
|
||||
<input type="hidden" name="ausschreibung" value="{{ current_ausschreibung.pk }}">
|
||||
{% endif %}
|
||||
<div class="space-y-3">
|
||||
<div>
|
||||
<label class="form-label">Kategorie</label>
|
||||
<select name="kategorie" class="form-input">
|
||||
<option value="hinweis">Hinweis</option>
|
||||
<option value="verbesserung">Verbesserungsvorschlag</option>
|
||||
<option value="fehler">Fehler</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-label">Titel</label>
|
||||
<input type="text" name="titel" class="form-input" placeholder="Kurzbeschreibung">
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-label">Beschreibung *</label>
|
||||
<textarea name="beschreibung" rows="3" class="form-input" required
|
||||
placeholder="Was ist aufgefallen?"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-label">Dringlichkeit</label>
|
||||
<select name="dringlichkeit" class="form-input">
|
||||
<option value="niedrig">Niedrig</option>
|
||||
<option value="mittel" selected>Mittel</option>
|
||||
<option value="hoch">Hoch</option>
|
||||
<option value="kritisch">Kritisch</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end gap-2 mt-4">
|
||||
<button type="button" @click="open = false" class="btn-secondary">Abbrechen</button>
|
||||
<button type="submit" class="btn-primary">Senden</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
8
vergabe_teilnahme/templates/partials/field_row.html
Normal file
8
vergabe_teilnahme/templates/partials/field_row.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% if not hidden %}
|
||||
<div class="field-row">
|
||||
<dt class="field-label">{{ label }}</dt>
|
||||
<dd class="field-value">
|
||||
{% if value %}{{ value }}{% else %}<span class="text-slate-400">—</span>{% endif %}
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
21
vergabe_teilnahme/templates/partials/phase_nav.html
Normal file
21
vergabe_teilnahme/templates/partials/phase_nav.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{% load vergabe_tags %}
|
||||
<div class="border-t border-slate-200 p-3">
|
||||
<p class="text-xs font-semibold text-slate-500 uppercase tracking-wide mb-2 truncate"
|
||||
title="{{ current_ausschreibung.titel }}">
|
||||
{{ current_ausschreibung.titel|truncatechars:30 }}
|
||||
</p>
|
||||
{% for phase in phases %}
|
||||
<a href="{{ phase.url }}"
|
||||
class="flex items-center gap-2 px-2 py-1.5 rounded text-sm hover:bg-slate-100
|
||||
{% if phase.aktiv %}text-brand-700 font-medium{% else %}text-slate-600{% endif %}">
|
||||
<span class="{% if phase.erledigt %}phase-done{% elif phase.aktiv %}phase-active{% elif phase.warnung %}phase-warn{% else %}phase-todo{% endif %}
|
||||
shrink-0 text-xs">
|
||||
{{ phase.nummer }}
|
||||
</span>
|
||||
<span class="truncate">{{ phase.name }}</span>
|
||||
{% if phase.warnung %}
|
||||
<span class="ml-auto text-amber-500 text-xs shrink-0">⚠</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
59
vergabe_teilnahme/templates/partials/sidebar.html
Normal file
59
vergabe_teilnahme/templates/partials/sidebar.html
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<aside class="w-60 bg-white border-r border-slate-200 flex flex-col overflow-y-auto shrink-0"
|
||||
x-show="sidebarOpen"
|
||||
x-cloak>
|
||||
<nav class="p-3 space-y-1 flex-1">
|
||||
<a href="/"
|
||||
class="sidebar-link {% if request.resolver_match.url_name == 'dashboard' %}sidebar-link-active{% endif %}">
|
||||
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
|
||||
</svg>
|
||||
Übersicht
|
||||
</a>
|
||||
|
||||
<div x-data="{ open: true }">
|
||||
<button @click="open = !open" class="sidebar-section-btn">
|
||||
Ausschreibungen
|
||||
<span x-text="open ? '▾' : '▸'" class="text-slate-400"></span>
|
||||
</button>
|
||||
<div x-show="open" class="ml-3 space-y-1">
|
||||
<a href="/ausschreibungen/" class="sidebar-link">Alle Ausschreibungen</a>
|
||||
<a href="/ausschreibungen/neu/" class="sidebar-link text-brand-600 font-medium">+ Neu</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div x-data="{ open: false }">
|
||||
<button @click="open = !open" class="sidebar-section-btn">
|
||||
Bibliothek
|
||||
<span x-text="open ? '▾' : '▸'" class="text-slate-400"></span>
|
||||
</button>
|
||||
<div x-show="open" class="ml-3 space-y-1">
|
||||
<a href="/bibliothek/nachweise/" class="sidebar-link">Nachweise</a>
|
||||
<a href="/bibliothek/referenzen/" class="sidebar-link">Referenzen</a>
|
||||
<a href="/bibliothek/leistungsblaetter/" class="sidebar-link">Leistungsblätter</a>
|
||||
<a href="/bibliothek/entscheidungsregeln/" class="sidebar-link">Entscheidungsregeln</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div x-data="{ open: false }">
|
||||
<button @click="open = !open" class="sidebar-section-btn">
|
||||
Partner
|
||||
<span x-text="open ? '▾' : '▸'" class="text-slate-400"></span>
|
||||
</button>
|
||||
<div x-show="open" class="ml-3 space-y-1">
|
||||
<a href="/partner/subunternehmer/" class="sidebar-link">Subunternehmer</a>
|
||||
<a href="/partner/dienstleistertypen/" class="sidebar-link">Dienstleistertypen</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="/marktbegleiter/" class="sidebar-link">Marktbegleiter</a>
|
||||
<a href="/feedback/" class="sidebar-link">Feedback-Backlog</a>
|
||||
|
||||
{% if request.user.is_staff %}
|
||||
<a href="/admin/" class="sidebar-link text-slate-400">Administration</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
||||
{% if current_ausschreibung %}
|
||||
{% include "partials/phase_nav.html" %}
|
||||
{% endif %}
|
||||
</aside>
|
||||
1
vergabe_teilnahme/templates/partials/status_badge.html
Normal file
1
vergabe_teilnahme/templates/partials/status_badge.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium {{ css }}">{{ label }}</span>
|
||||
46
vergabe_teilnahme/templates/partials/topbar.html
Normal file
46
vergabe_teilnahme/templates/partials/topbar.html
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{% load static %}
|
||||
<header class="h-14 bg-white border-b border-slate-200 flex items-center px-4 gap-4 z-30 sticky top-0">
|
||||
<button @click="sidebarOpen = !sidebarOpen"
|
||||
class="p-1.5 rounded-lg text-slate-500 hover:bg-slate-100">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<a href="/" class="text-brand-700 font-semibold text-lg shrink-0">Vergabe Teilnahme</a>
|
||||
|
||||
<form hx-get="/suche/" hx-target="#search-results" hx-trigger="input changed delay:300ms"
|
||||
class="relative flex-1 max-w-lg mx-auto">
|
||||
<input name="q" type="search" placeholder="Ausschreibung, Aufgabe, Dokument suchen..."
|
||||
autocomplete="off"
|
||||
class="form-input w-full pl-9">
|
||||
<svg class="absolute left-2.5 top-2.5 w-4 h-4 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
|
||||
</svg>
|
||||
<div id="search-results"
|
||||
class="absolute top-full left-0 w-full bg-white rounded-b-lg shadow-lg z-50 hidden [&:not(:empty)]:block">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div x-data="{ open: false }" class="relative ml-auto shrink-0">
|
||||
<button @click="open = !open" @click.outside="open = false"
|
||||
class="flex items-center gap-2 px-3 py-1.5 rounded-lg hover:bg-slate-100 text-sm text-slate-700">
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-brand-100 text-brand-700 font-semibold text-xs">
|
||||
{{ request.user.first_name|first|default:"?" }}
|
||||
</span>
|
||||
<span>{{ request.user.get_full_name|default:request.user.username }}</span>
|
||||
<svg class="w-4 h-4 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div x-show="open" x-cloak
|
||||
class="absolute right-0 top-full mt-1 w-48 bg-white border border-slate-200 rounded-lg shadow-lg py-1 z-50">
|
||||
<div class="px-3 py-2 text-xs text-slate-500 border-b border-slate-100">
|
||||
{{ request.user.get_rolle_display|default:"Mitarbeiter" }}
|
||||
</div>
|
||||
<a href="/accounts/logout/"
|
||||
class="block px-3 py-2 text-sm text-slate-700 hover:bg-slate-50">Abmelden</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
Loading…
Add table
Add a link
Reference in a new issue