Browse Source

moderation log

pull/40/head
Michael Save 12 years ago
parent
commit
e92ee2b487
  1. 1
      inc/lib/Twig/Extensions/Extension/Tinyboard.php
  2. 30
      templates/mod/log.html

1
inc/lib/Twig/Extensions/Extension/Tinyboard.php

@ -21,6 +21,7 @@ class Twig_Extensions_Extension_Tinyboard extends Twig_Extension
'poster_id' => new Twig_Filter_Function('poster_id', array('needs_environment' => false)), 'poster_id' => new Twig_Filter_Function('poster_id', array('needs_environment' => false)),
'remove_whitespace' => new Twig_Filter_Function('twig_remove_whitespace_filter', array('needs_environment' => false)), 'remove_whitespace' => new Twig_Filter_Function('twig_remove_whitespace_filter', array('needs_environment' => false)),
'count' => new Twig_Filter_Function('count', array('needs_environment' => false)), 'count' => new Twig_Filter_Function('count', array('needs_environment' => false)),
'ago' => new Twig_Filter_Function('ago', array('needs_environment' => false)),
'until' => new Twig_Filter_Function('until', array('needs_environment' => false)) 'until' => new Twig_Filter_Function('until', array('needs_environment' => false))
); );
} }

30
templates/mod/log.html

@ -1,11 +1,33 @@
<table class="modlog"> <table class="modlog">
<tr> <tr>
<th> <th>Staff</th>
<th>IP address</th>
</th> <th>Ago</th>
<th>Board</th>
<th>Action</th>
</tr> </tr>
{% for log in logs %} {% for log in logs %}
<tr>
<td class="minimal">
<a href="?/new_PM/{{ log.username }}">{{ log.username }}</a>
</td>
<td class="minimal">
<a href="?/IP/{{ log.ip }}">{{ log.ip }}</a>
</td>
<td class="minimal">
<span title="{{ log.time|date(config.post_date) }}">{{ log.time|ago }}</span>
</td>
<td class="minimal">
{% if log.board %}
<a href="?/{{ config.board_path|sprintf(log.board) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(log.board) }}</a>
{% else %}
-
{% endif %}
</td>
<td>
{{ log.text }}
</td>
</tr>
{% endfor %} {% endfor %}
</table> </table>

Loading…
Cancel
Save