{% extends 'base.html' %}

{% block body %}
<div class="row">
	<div class="col">
		<p class="text-right">
			<a class="btn btn-primary" href="{{ url_for("role.new") }}">
				<i class="fa fa-plus" aria-hidden="true"></i> {{_("New")}}
			</a>
		</p>
		<table class="table table-striped table-sm">
			<thead>
				<tr>
					<th scope="col">{{_("Name")}}</th>
					<th scope="col">{{_("Description")}}</th>
				</tr>
			</thead>
			<tbody>
				{% for role in roles|sort(attribute="name") %}
				<tr id="role-{{ role.id }}">
					<th scope="row">
						<a href="{{ url_for("role.show", roleid=role.id) }}">
							{{ role.name or _('<empty name>') }}
						</a>
					</th>
					<td>
						{{ role.description }}
					</td>
				</tr>
				{% endfor %}
			</tbody>
		</table>
	</div>
</div>
{% endblock %}
