point-tools/templates/Web/Events/last.html.twig

47 lines
1.8 KiB
Twig
Raw Normal View History

2015-06-23 11:20:21 +00:00
{% extends "::base.html.twig" %}
{% block content %}
{# TODO classes #}
<div class="last-subscriptions-log">
{% if last_events|length > 0 %}
2016-12-10 23:55:28 +00:00
<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>
2015-06-23 11:20:21 +00:00
{% else %}
2016-12-10 23:55:28 +00:00
<div class="alert alert-warning" role="alert">{{ 'No subscribers log data found'|trans }}</div>
2015-06-23 11:20:21 +00:00
{% endif %}
</div>
2016-12-10 23:55:28 +00:00
<div class="navigation">
{{ knp_pagination_render(last_events) }}
</div>
2015-06-23 11:20:21 +00:00
{% endblock %}