60 lines
1.0 KiB
HTML
60 lines
1.0 KiB
HTML
{include "admin/layout.html"}
|
|
|
|
{block "content"}
|
|
<h1>Spell Management</h1>
|
|
|
|
<div style="margin-bottom: 1rem;">
|
|
<a href="/admin/spells/new" class="btn btn-primary">Add New Spell</a>
|
|
</div>
|
|
|
|
<p>
|
|
Total spells: {#spells} | Page {currentPage} of {totalPages}
|
|
</p>
|
|
|
|
{if #spells > 0}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>MP Cost</th>
|
|
<th>Power</th>
|
|
<th>Icon</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{for spell in spells}
|
|
<tr>
|
|
<td>{spell.ID}</td>
|
|
<td>{spell.Name}</td>
|
|
<td>{spell.TypeName}</td>
|
|
<td>{spell.MP}</td>
|
|
<td>{spell.Power}</td>
|
|
<td>{if spell.Icon}{spell.Icon}{else}-{/if}</td>
|
|
<td>
|
|
<a href="/admin/spells/{spell.ID}">Edit</a>
|
|
</td>
|
|
</tr>
|
|
{/for}
|
|
</tbody>
|
|
</table>
|
|
|
|
{if totalPages > 1}
|
|
<div class="pagination">
|
|
{if hasPrev}
|
|
<a href="/admin/spells?page={currentPage - 1}">← Previous</a>
|
|
{/if}
|
|
{if hasNext}
|
|
<a href="/admin/spells?page={currentPage + 1}">Next →</a>
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
|
|
{else}
|
|
<div>
|
|
No spells found.
|
|
</div>
|
|
{/if}
|
|
{/block} |