Forum boards admin links: csrf + refactor

This commit is contained in:
slawkens
2025-05-24 11:28:56 +02:00
parent 6e793390c6
commit e776bd52be
3 changed files with 58 additions and 29 deletions

View File

@@ -39,25 +39,7 @@
</td>
{% if canEdit %}
<td>
<a href="{{ getLink('forum') }}?action=edit_board&id={{ board.id }}" title="Edit">
<img src="images/edit.png"/>Edit
</a>
<a id="delete" href="{{ getLink('forum') }}?action=delete_board&id={{ board.id }}" onclick="return confirm('Are you sure?');" title="Delete">
<img src="images/del.png"/>Delete
</a>
<a href="{{ getLink('forum') }}?action=hide_board&id={{ board.id }}" title="{% if board.hide != 1 %}Hide{% else %}Show{% endif %}">
<img src="images/{% if board.hide != 1 %}success{% else %}error{% endif %}.png"/>{% if board.hide != 1 %}Hide{% else %}Show{% endif %}
</a>
{% if i != 1 %}
<a href="{{ getLink('forum') }}?action=moveup_board&id={{ board.id }}" title="Move up">
<img src="images/icons/arrow_up.gif"/>Move up
</a>
{% endif %}
{% if i != last %}
<a href="{{ getLink('forum') }}?action=movedown_board&id={{ board.id }}" title="Move down">
<img src="images/icons/arrow_down.gif"/>Move down
</a>
{% endif %}
{{ include('forum.admin.links.html.twig', {id: board.id, hide: board.hide, i: i }) }}
</td>
{% endif %}
</tr>