mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-24 06:24:30 +02:00
56 lines
2.5 KiB
Twig
56 lines
2.5 KiB
Twig
<div class="box">
|
|
<div class="box-header">
|
|
<h3 class="box-title">Users active within last {{ config_visitors_counter_ttl }} minutes.</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div id="visitors_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table id="visitors" class="table table-bordered table-striped dataTable" role="grid"
|
|
aria-describedby="visitors_info">
|
|
<thead>
|
|
<tr role="row">
|
|
<th class="sorting_asc" tabindex="0" aria-controls="visitors" rowspan="1" colspan="1"
|
|
aria-sort="ascending" aria-label="IP: activate to sort column descending"
|
|
style="width: 297px;">IP
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="visitors" rowspan="1" colspan="1"
|
|
aria-label="Last visit: activate to sort column ascending" style="width: 361px;">Last
|
|
visit
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="visitors" rowspan="1" colspan="1"
|
|
aria-label="Page: activate to sort column ascending" style="width: 322px;">Page
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% set i = 0 %}
|
|
{% for visitor in visitors %}
|
|
{% set i = i + 1 %}
|
|
<tr role="row" class="odd">
|
|
<td>{{ visitor.ip }}</td>
|
|
<td>{{ visitor.lastvisit|date("H:i:s") }}</td>
|
|
<td>
|
|
<a href="{{ visitor.page }}">{{ visitor.page|slice(0, 50) }}</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th>IP</th>
|
|
<th>Last visit</th>
|
|
<th>Page</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
$('#visitors').DataTable()
|
|
})
|
|
</script> |