{% extends "base.html" %}
{% block title %}Stadträt:innen – FragDenRat{% endblock %}
{% block content %}
<h2 class="mb-3">Stadträt:innen</h2>
<div class="table-responsive">
	<table class="table table-striped align-middle">
		<thead>
			<tr>
				<th>Name</th>
				<th>Gemeinde</th>
				<th>Partei</th>
			</tr>
		</thead>
		<tbody>
			{% for m in items %}
			<tr>
				<td><a href="{% url 'member_detail' pk=m.id %}">{{ m.first_name }} {{ m.last_name }}</a></td>
				<td>
					{% if m.public_body %}
						<a href="{% url 'public_body_detail' slug=m.public_body.slug %}">{{ m.public_body.name }}</a>
					{% else %}–{% endif %}
				</td>
				<td>
					{% if m.party %}
						<a href="{% url 'party_detail' pk=m.party.id %}">{{ m.party }}</a>
					{% else %}–{% endif %}
				</td>
			</tr>
			{% empty %}
			<tr><td colspan="3">Keine Einträge.</td></tr>
			{% endfor %}
		</tbody>
	</table>
</div>
{% endblock %} 