62 lines
1.1 KiB
HTML

{include "admin/layout.html"}
{block "content"}
<h1>Class Management</h1>
<div style="margin-bottom: 1rem;">
<a href="/admin/classes/new" class="btn btn-primary">Add New Class</a>
</div>
<p>
Total classes: {#classes} | Page {currentPage} of {totalPages}
</p>
{if #classes > 0}
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Base Stats</th>
<th>Growth Rates</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{for class in classes}
<tr>
<td>{class.ID}</td>
<td>{class.Name}</td>
<td>
HP: {class.BaseHP} | MP: {class.BaseMP}<br>
STR: {class.BaseSTR} | DEX: {class.BaseDEX}
</td>
<td>
HP: +{class.RateHP} | MP: +{class.RateMP}<br>
STR: +{class.RateSTR} | DEX: +{class.RateDEX}
</td>
<td>
<a href="/admin/classes/{class.ID}">Edit</a>
</td>
</tr>
{/for}
</tbody>
</table>
{if totalPages > 1}
<div class="pagination">
{if hasPrev}
<a href="/admin/classes?page={currentPage - 1}">← Previous</a>
{/if}
{if hasNext}
<a href="/admin/classes?page={currentPage + 1}">Next →</a>
{/if}
</div>
{/if}
{else}
<div>
No classes found.
</div>
{/if}
{/block}