{% extends "admin/_base.html" %}
{% block content %}
<header class="rio-page-header">
<nav class="rio-breadcrumbs"><a href="/admin">Home</a> ยท <span>Users</span></nav>
<div class="rio-page-actions">
<h1>Users</h1>
<a class="rio-button rio-button--primary" href="/admin/users/new">{{ icon("plus", class="rio-icon") }} Add user</a>
</div>
</header>
<section class="rio-card">
{% if users %}
<table class="rio-table rio-table--striped">
<thead>
<tr>
<th>id</th>
<th>email</th>
<th>role</th>
<th>active</th>
<th>created</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for u in users %}
<tr>
<td><a href="/admin/users/{{ u.id }}">{{ u.id }}</a></td>
<td><a href="/admin/users/{{ u.id }}">{{ u.email }}</a></td>
<td>{{ u.role }}</td>
<td>{% if u.is_active %}Yes{% else %}No{% endif %}</td>
<td>{{ u.created_at }}</td>
<td>
<a class="rio-button rio-button--ghost" href="/admin/users/{{ u.id }}/edit">Edit</a>
<a class="rio-button rio-button--danger-ghost" href="/admin/users/{{ u.id }}/delete">Delete</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="rio-empty">No users yet.</p>
{% endif %}
</section>
{% endblock %}