myaac/system/templates/commands.html.twig
slawkens 4685c7b868 * renamed twig templates to .twig, so IDE's can correctly render it
* moved news.add to twig template
* now twig templates will be loaded directly from template dir f.e. templates/kathrine/news.html.twig
2017-09-11 11:11:43 +02:00

40 lines
1.5 KiB
Twig

<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td bgcolor="{{ vdarkborder }}" class="white" width="150"><b>Words</b></td>
<td bgcolor="{{ vdarkborder }}" class="white"><b>Description</b></td>
{% if canEdit %}
<td bgcolor="{{ vdarkborder }}" class="white"><b>Options</b></td>
{% endif %}
</tr>
{% set i = 0 %}
{% for command in commands %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}">
<td>{{ command.words }}</td>
<td><i>{{ command.description }}</i></td>
{% if canEdit %}
<td>
<a href="?subtopic=commands&action=edit&id={{ command.id }}" title="Edit">
<img src="images/edit.png"/>Edit
</a>
<a id="delete" href="?subtopic=commands&action=delete&id={{ command.id }}" onclick="return confirm('Are you sure?');" title="Delete">
<img src="images/del.png"/>Delete
</a>
<a href="?subtopic=commands&action=hide&id={{ command.id }}" title="{% if command.hidden != 1 %}Hide{% else %}Show{% endif %}">
<img src="images/{% if command.hidden != 1 %}success{% else %}error{% endif %}.png"/>{% if command.hidden != 1 %}Hide{% else %}Show{% endif %}
</a>
{% if i != 1 %}
<a href="?subtopic=commands&action=moveup&id={{ command.id }}" title="Move up">
<img src="images/icons/arrow_up.gif"/>Move up
</a>
{% endif %}
{% if i != last %}
<a href="?subtopic=commands&action=movedown&id={{ command.id }}" title="Move down">
<img src="images/icons/arrow_down.gif"/>Move down
</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</table>