mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-27 16:04:29 +02:00

* Reformat Code Reformat Code - spaces + tabs * Code cleanup removed duplicated datatables code * Datatables replace spells, monsters tables with JavaScript Sortable Tables (DataTables?)
70 lines
1.9 KiB
Twig
70 lines
1.9 KiB
Twig
|
|
{% if canEdit %}
|
|
<form method="post" action="{{ getLink('spells') }}">
|
|
<input type="hidden" name="reload_spells" value="yes"/>
|
|
<input type="submit" value="(admin) Reload spells"/>
|
|
</form>
|
|
{% endif %}
|
|
|
|
<form action="{{ getLink('spells') }}" method="post">
|
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
|
<tr bgcolor="{{ config.vdarkborder }}">
|
|
<td class="white"><b>Spell Search</b></td>
|
|
</tr>
|
|
<tr bgcolor="{{ config.darkborder }}">
|
|
<td>
|
|
<table border="0" cellpadding="1">
|
|
<tr>
|
|
<td>Only for vocation: <select name="vocation_id">
|
|
<option value="all" {% if post_vocation_id == 'all' %} selected{% endif %}>All</option>
|
|
{% for id, vocation in config.vocations %}
|
|
<option value="{{ id }}"{% if id == post_vocation_id and post_vocation_id != "all" and post_vocation_id != '' %} selected{% endif %}>{{ vocation }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</td>
|
|
<td>
|
|
{{ include('buttons.submit.html.twig') }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<br/>
|
|
<table id="spellstb" class=""><thead>
|
|
<tr role="row"><th>Name</th><th>Words</th><th>Type<br/>(count)</th>
|
|
<th>Mana</th><th>Level</th><th>Magic Level</th><th>Soul</th><th>Premium</th><th>Vocations</th></tr>
|
|
</thead><tbody>
|
|
{% set i = 0 %}
|
|
{% for spell in spells %}
|
|
{% set i = i + 1 %}
|
|
<tr>
|
|
<td>{{ spell.name }}</td>
|
|
<td>{{ spell.words }}</td>
|
|
<td>
|
|
{% if spell.type == 1 %}
|
|
Instant
|
|
{% elseif spell.type == 2 %}
|
|
Conjure ({{ spell.conjure_count }})
|
|
{% else %}
|
|
Rune
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ spell.mana }}</td>
|
|
<td>{{ spell.level }}</td>
|
|
<td>{{ spell.maglevel }}</td>
|
|
<td>{{ spell.soul }}</td>
|
|
<td>{% if spell.premium == 1 %}yes{% else %}no{% endif %}</td>
|
|
<td>
|
|
{% if spell.vocations|length > 0 %}
|
|
<span style="font-size: 10px">
|
|
{{ spell.vocations|raw }}
|
|
</span>
|
|
{% else %}
|
|
{{ config.vocations[post_vocation_id] }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody></table> |