myaac/system/templates/changelog.html.twig
Lee bb3602073c AdminPanel updates - changelog
-Admin menu updates
-Moved getchangelogtype/where to functions file and added to twig
-Added changelog editor to admin panel and updated changelog page
-Renamed the changelog md reader to clmd and edited the version file.
2021-01-04 12:23:36 +00:00

57 lines
2.4 KiB
Twig

{% if canEdit %}
<a href="{{ constant('ADMIN_URL') }}?p=changelog&action=new" class="btn btn-success btn-sm" title="Add New" target="_blank">Add New</a>
{% endif %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td width="22"><span class="white"><b>Type</b></span></td>
<td width="22"><span class="white"><b>Where</b></span></td>
<td width="50"><span class="white"><b>Date</b></span></td>
<td><span class="white"><b>Description</b></span></td>
{% if canEdit %}
<td></td>
{% endif %}
</tr>
{% if changelogs|length > 0%}
{% set i = 0 %}
{% for log in changelogs %}
<tr bgcolor="{{ getStyle(i) }}">
<td align="center">
<img src="{{ constant('BASE_URL') }}images/changelog/{{ log.type }}.png" title="{{ log.type|capitalize }}"/>
</td>
<td align="center">
<img src="{{ constant('BASE_URL') }}images/changelog/{{ log.where }}.png" title="{{ log.where|capitalize }}"/>
</td>
<td>{{ log.date|date("j.m.Y") }}</td>
<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>
</td>
{% endif %}
</tr>
{% set i = i + 1 %}
{% endfor %}
{% else %}
<tr>
<td colspan="4" bgcolor="{{ config.darkborder }}">There are no changelogs for the moment.</td>
</tr>
{% endif %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
{% if page > 0 %}
<tr><td width="100%" align="right" valign="bottom"><a href="{{ getLink('changelog/' ~ (page - 1)) }}" class="size_xxs">Previous Page</a></td></tr>
{% endif %}
{% if next_page %}
<tr><td width="100%" align="right" valign="bottom"><a href="{{ getLink('changelog/' ~ (page + 1)) }}" class="size_xxs">Next Page</a></td></tr>
{% endif %}
</table>
</table>