Files
vergabe-teilnahme/vergabe_teilnahme/templates/aufgaben/partials/aufgabe_row.html
2026-05-08 17:43:23 +02:00

46 lines
1.9 KiB
HTML

{% load vergabe_tags %}
<tr class="hover:bg-slate-50{% if aufgabe.status == 'ueberfaellig' %} bg-red-50{% endif %}">
<td class="py-2 pr-4">
<a href="{% url 'ausschreibungen:aufgaben:detail' ausschreibung.pk aufgabe.pk %}"
class="font-medium text-slate-800 hover:text-blue-600 line-clamp-1">
{{ aufgabe.titel|truncatechars:60 }}
</a>
</td>
<td class="py-2 pr-4 text-xs">{% status_badge aufgabe.typ aufgabe.get_typ_display %}</td>
<td class="py-2 pr-4 text-xs">
{% if aufgabe.frist %}
<span class="{% if aufgabe.status == 'ueberfaellig' %}text-red-600 font-medium{% else %}text-slate-600{% endif %}">
{{ aufgabe.frist }}
</span>
{% else %}
<span class="text-slate-400"></span>
{% endif %}
</td>
<td class="py-2 pr-4 text-xs text-slate-600">{{ aufgabe.verantwortlicher|default:"—" }}</td>
<td class="py-2 pr-4">
<select name="status"
hx-post="{% url 'ausschreibungen:aufgaben:status' ausschreibung.pk aufgabe.pk %}"
hx-target="closest tr"
hx-swap="outerHTML"
class="form-input text-xs py-1">
{% for val, label in aufgabe.STATUS_CHOICES %}
<option value="{{ val }}"{% if val == aufgabe.status %} selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
</td>
{% if aufgabe.status == 'erledigt' %}
<td class="py-2">
<form hx-post="{% url 'ausschreibungen:aufgaben:ergebnis' ausschreibung.pk aufgabe.pk %}"
hx-target="closest tr" hx-swap="outerHTML"
class="flex gap-1 items-center">
{% csrf_token %}
<input type="text" name="ergebnis" value="{{ aufgabe.ergebnis }}"
placeholder="Ergebnis…" class="form-input text-xs py-1 w-40">
<button type="submit" class="btn-primary text-xs py-1 px-2">OK</button>
</form>
</td>
{% else %}
<td class="py-2 text-xs text-slate-500">{{ aufgabe.ergebnis|truncatechars:30 }}</td>
{% endif %}
</tr>