54 lines
2.1 KiB
HTML
54 lines
2.1 KiB
HTML
|
|
{% extends "base.html" %}
|
||
|
|
{% load vergabe_tags %}
|
||
|
|
{% block title %}Freigaben — {{ ausschreibung.titel }}{% endblock %}
|
||
|
|
{% block content %}
|
||
|
|
<div class="flex items-center justify-between mb-5">
|
||
|
|
<h1 class="page-title">Freigaben: {{ ausschreibung.titel }}</h1>
|
||
|
|
<button hx-get="/freigaben/modal/?ct={{ ct_id }}&oid={{ ausschreibung.pk }}"
|
||
|
|
hx-target="#modal-container"
|
||
|
|
class="btn-primary">Freigabe erteilen</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
{% if fehlende_typen %}
|
||
|
|
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mb-5 text-sm text-red-700">
|
||
|
|
<strong>Fehlende Pflichtfreigaben:</strong>
|
||
|
|
{% for typ in fehlende_typen %}
|
||
|
|
<span class="inline-block bg-red-100 rounded px-2 py-0.5 ml-1">{{ typ }}</span>
|
||
|
|
{% endfor %}
|
||
|
|
</div>
|
||
|
|
{% else %}
|
||
|
|
<div class="bg-green-50 border border-green-200 rounded-lg p-4 mb-5 text-sm text-green-700">
|
||
|
|
Alle Pflichtfreigaben erteilt.
|
||
|
|
</div>
|
||
|
|
{% endif %}
|
||
|
|
|
||
|
|
<div class="card">
|
||
|
|
{% if freigaben %}
|
||
|
|
<table class="w-full text-sm">
|
||
|
|
<thead>
|
||
|
|
<tr class="text-left border-b border-slate-200">
|
||
|
|
<th class="pb-2 font-medium text-slate-600">Typ</th>
|
||
|
|
<th class="pb-2 font-medium text-slate-600">Status</th>
|
||
|
|
<th class="pb-2 font-medium text-slate-600">Erteilt von</th>
|
||
|
|
<th class="pb-2 font-medium text-slate-600">Kommentar</th>
|
||
|
|
<th class="pb-2 font-medium text-slate-600">Datum</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for fg in freigaben %}
|
||
|
|
<tr class="border-b border-slate-100 hover:bg-slate-50">
|
||
|
|
<td class="py-2 font-medium">{{ fg.get_freigabe_typ_display }}</td>
|
||
|
|
<td class="py-2">{% status_badge fg.status fg.get_status_display %}</td>
|
||
|
|
<td class="py-2">{{ fg.freigebende_person.get_full_name|default:fg.freigebende_person.username }}</td>
|
||
|
|
<td class="py-2 text-slate-500 max-w-xs">{{ fg.kommentar|default:"—"|truncatechars:80 }}</td>
|
||
|
|
<td class="py-2 text-slate-500 text-xs">{{ fg.timestamp|date:"d.m.Y H:i" }}</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
{% else %}
|
||
|
|
<p class="text-slate-500 text-sm">Noch keine Freigaben erteilt.</p>
|
||
|
|
{% endif %}
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|