66 lines
1.2 KiB
HTML

{include "admin/layout.html"}
{block "content"}
<h1>Monster Management</h1>
<div style="margin-bottom: 1rem;">
<a href="/admin/monsters/new" class="btn btn-primary">Add New Monster</a>
</div>
<p>
Total monsters: {#monsters} | Page {currentPage} of {totalPages}
</p>
{if #monsters > 0}
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Level</th>
<th>HP</th>
<th>Damage</th>
<th>Armor</th>
<th>Exp</th>
<th>Gold</th>
<th>Immunity</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{for monster in monsters}
<tr>
<td>{monster.ID}</td>
<td>{monster.Name}</td>
<td>{monster.Level}</td>
<td>{monster.MaxHP}</td>
<td>{monster.MaxDmg}</td>
<td>{monster.Armor}</td>
<td>{monster.MaxExp}</td>
<td>{monster.MaxGold}</td>
<td>{monster.ImmunityName}</td>
<td>
<a href="/admin/monsters/{monster.ID}">Edit</a>
</td>
</tr>
{/for}
</tbody>
</table>
{if totalPages > 1}
<div class="pagination">
{if hasPrev}
<a href="/admin/monsters?page={currentPage - 1}">← Previous</a>
{/if}
{if hasNext}
<a href="/admin/monsters?page={currentPage + 1}">Next →</a>
{/if}
</div>
{/if}
{else}
<div>
No monsters found.
</div>
{/if}
{/block}