Fix changelog + news.tickers buttons

This commit is contained in:
slawkens 2023-11-11 13:18:37 +01:00
parent ada1e391d4
commit c79a1d5f3a
3 changed files with 4 additions and 23 deletions

View File

@ -1,5 +1,3 @@
<br/><br/>
<form action="{{ constant('ADMIN_URL') }}?p={{ page }}" method="post" style="float: left">
{{ csrf() }}
<input type="hidden" name="action" value="edit" />

View File

@ -25,15 +25,7 @@
<td>{{ log.body|nl2br}}</td>
{% if canEdit %}
<td>
<a href="{{ constant('ADMIN_URL') }}?p=changelog&action=edit&id={{ log.id }}" title="Edit in Admin Panel" target="_blank">
<img src="images/edit.png"/>Edit
</a>
<a href="{{ constant('ADMIN_URL') }}?p=changelog&action=delete&id={{ log.id }}" onclick="return confirm('Are you sure?');" title="Delete in Admin Panel" target="_blank">
<img src="images/del.png"/>Delete
</a>
<a href="{{ constant('ADMIN_URL') }}?p=changelog&action=hide&id={{ log.id }}" title="{% if log.hidden != 1 %}Hide{% else %}Show{% endif %} in Admin Panel" target="_blank">
<img src="images/{{ (log.hidden != 1 ? 'success' : 'error') }}.png"/>{{ (log.hidden != 1) ? 'Hide' : 'Show' }}
</a>
{{ include('admin.links.html.twig', {page: 'changelog', id: log.id, hidden: log.hidden }) }}
</td>
{% endif %}
</tr>

View File

@ -20,18 +20,9 @@
<div id="TickerEntry-{{ i }}-ShortText" class="NewsTickerShortText">{{ ticker.body_short|raw }}</div>
<div id="TickerEntry-{{ i }}-FullText" class="NewsTickerFullText">{{ ticker.body|raw }}
{% if canEdit %}
<a href="{{ constant('ADMIN_URL') }}?p=news&action=edit&id={{ ticker.id }}" title="Edit">
<img src="images/edit.png"/>
Edit
</a>
<a id="delete" href="{{ constant('ADMIN_URL') }}?p=news&action=delete&id={{ ticker.id }}" onclick="return confirm('Are you sure?');" title="Delete">
<img src="images/del.png"/>
Delete
</a>
<a href="{{ constant('ADMIN_URL') }}?p=news&action=hide&id={{ ticker.id }}" title="{% if ticker.hidden != 1 %}Hide{% else %}Show{% endif %}">
<img src="images/{% if ticker.hidden != 1 %}success{% else %}error{% endif %}.png"/>
{% if ticker.hidden != 1 %}Hide{% else %}Show{% endif %}
</a>
<table>
{{ include('admin.links.html.twig', {page: 'news', id: ticker.id, hidden: ticker.hidden }) }}
</table>
{% endif %}
</div>
</div>