{% extends "admin/_base.html" %}
{% block content %}
<header class="rio-page-header">
<nav class="rio-breadcrumbs"><a href="/admin">Home</a> ยท <span>Groups</span></nav>
<div class="rio-page-actions">
<h1>Groups</h1>
<a class="rio-button rio-button--primary" href="/admin/groups/new">{{ icon("plus", class="rio-icon") }} Add group</a>
</div>
</header>
<section class="rio-card rio-list">
{% if groups %}
<table class="rio-table rio-table--striped">
<thead>
<tr>
<th class="rio-th">ID</th>
<th class="rio-th">Name</th>
<th class="rio-th">Description</th>
<th class="rio-th rio-th--actions">Actions</th>
</tr>
</thead>
<tbody>
{% for g in groups %}
<tr>
<td class="rio-td rio-td--number">{{ g.id }}</td>
<td class="rio-td rio-td--text"><a href="/admin/groups/{{ g.id }}/edit">{{ g.name }}</a></td>
<td class="rio-td rio-td--text" title="{{ g.description }}">{{ g.description }}</td>
<td class="rio-td rio-td--actions">
<a class="rio-button rio-button--ghost rio-button--sm" href="/admin/groups/{{ g.id }}/edit">{{ icon("pencil", class="rio-icon") }} Edit</a>
<a class="rio-button rio-button--danger-ghost rio-button--sm" href="/admin/groups/{{ g.id }}/delete">{{ icon("trash", class="rio-icon") }} Delete</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="rio-empty">No groups yet. <a href="/admin/groups/new">Add the first one.</a></p>
{% endif %}
</section>
{% endblock %}