point-tools/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig

86 lines
4.2 KiB
Twig
Raw Normal View History

2015-05-30 06:50:44 +00:00
{% extends "::base.html.twig" %}
2015-05-31 02:48:12 +00:00
{% block header_title %}{{ user.login }} @ Point Tools{% endblock %}
2015-05-30 06:50:44 +00:00
2015-05-31 02:48:12 +00:00
{% block content %}
<h1 class="user-login">
<img src="{{ avatar_url }}">
<a href="//{{ user.login }}.point.im/blog/" target="_blank">{{ user.login }}</a>
</h1>
<div class="user-subscribers">
2015-06-02 02:24:38 +00:00
{% if subscribers|length > 0 %}
<div class="panel-group" id="accordion-subscribers">
<div class="panel panel-default">
<div class="panel-heading"id="headingOne">
<h4 class="panel-title">
2015-06-02 05:56:38 +00:00
<a data-toggle="collapse" data-parent="#accordion-subscribers" aria-expanded="false" href="#collapse-subscribers">
2015-06-02 02:24:38 +00:00
<span class="glyphicon glyphicon-collapse-down"></span> {{ 'Subscribers'|trans }}
</a>
</h4>
</div>
2015-06-02 05:56:38 +00:00
<div id="collapse-subscribers" class="panel-collapse collapse">
2015-06-02 02:24:38 +00:00
<div class="panel-body">
<ul class="users mosaic">
{% for user in subscribers %}
<li><a href="{{ url('user_show', {login: user.login}) }}">@{{ user.login }}</a></li>
{% endfor %}
</ul>
</div>
2015-05-31 02:48:12 +00:00
</div>
</div>
</div>
2015-06-02 02:24:38 +00:00
{% else %}
<div class="alert alert-warning" role="alert">{{ 'No subscribers data found'|trans }}</div>
{% endif %}
2015-05-31 02:48:12 +00:00
</div>
2015-06-02 02:24:38 +00:00
<div class="user-subscriptions-log">
{% if log|length > 0 %}
<div class="panel-group" id="accordion-log">
<div class="panel panel-default">
<div class="panel-heading" id="headingOne">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion-log" aria-expanded="true" href="#collapse-log">
<span class="glyphicon glyphicon-collapse-down"></span> {{ 'Subscriptions log'|trans }}
</a>
</h4>
</div>
<div id="collapse-log" class="panel-collapse collapse in">
<div class="panel-body">
<table class="table table-striped">
<thead>
2015-05-31 02:48:12 +00:00
<tr>
2015-06-02 02:24:38 +00:00
<td>{{ 'User'|trans }}</td>
<td>{{ 'Action'|trans }}</td>
<td>{{ 'Date'|trans }}</td>
2015-05-31 02:48:12 +00:00
</tr>
2015-06-02 02:24:38 +00:00
</thead>
<tbody>
{% for event in log %}
<tr>
<td>
<a href="{{ url('user_show', {login: event.subscriber.login}) }}">@{{ event.subscriber.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 #}
2015-06-02 03:02:53 +00:00
{{ event.date|date('d F Y H:i:s') }}
2015-06-02 02:24:38 +00:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
2015-05-31 02:48:12 +00:00
</div>
</div>
</div>
2015-06-02 02:24:38 +00:00
{% else %}
<div class="alert alert-warning" role="alert">{{ 'No log data found'|trans }}</div>
{% endif %}
2015-05-31 02:48:12 +00:00
</div>
2015-06-02 02:24:38 +00:00
2015-05-30 06:50:44 +00:00
{% endblock %}