47 lines
1.8 KiB
Twig
47 lines
1.8 KiB
Twig
{% extends "::base.html.twig" %}
|
|
|
|
{% block content %}
|
|
{# TODO classes #}
|
|
<div class="last-subscriptions-log">
|
|
{% if last_events|length > 0 %}
|
|
<h3>{{ 'Last events'|trans }}</h3>
|
|
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<td>{{ 'Subscriber'|trans }}</td>
|
|
<td>{{ 'Author'|trans }}</td>
|
|
<td>{{ 'Action'|trans }}</td>
|
|
<td>{{ 'Date'|trans }}</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for event in last_events %}
|
|
<tr>
|
|
<td>
|
|
<a href="{{ url('user_show', {login: event.subscriber.login}) }}">@{{ event.subscriber.login }}</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ url('user_show', {login: event.author.login}) }}">@{{ event.author.login }}</a>
|
|
</td>
|
|
<td>
|
|
<span class="glyphicon {% if event.action == 'subscribe' %}glyphicon-plus{% elseif event.action == 'unsubscribe' %}glyphicon-minus{% endif %}"></span>
|
|
</td>
|
|
<td>
|
|
{# Use DateTime helper: https://sonata-project.org/bundles/intl/master/doc/reference/datetime.html #}
|
|
{{ event.date|date('d F Y H:i:s') }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<div class="alert alert-warning" role="alert">{{ 'No subscribers log data found'|trans }}</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="navigation">
|
|
{{ knp_pagination_render(last_events) }}
|
|
</div>
|
|
{% endblock %}
|