point-tools/templates/Web/User/show.html.twig

130 lines
6 KiB
Twig
Raw Normal View History

2023-08-16 22:40:29 +00:00
{% extends 'Web/base.html.twig' %}
2015-05-30 06:50:44 +00:00
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 id="user-login">
{# TODO: Add class with image size #}
<img src="{{ user.login|point_avatar_large }}">
2017-01-04 22:36:30 +00:00
<a href="{{ user.login|point_user_blog_url }}" target="_blank">{{ user.login }}</a>
{% if not user.public %}<span title="{{ 'Non-public'|trans }}" class="glyphicon glyphicon-lock"></span>{% endif %}
{% if user.whitelistOnly %}<span title="{{ 'Whitelist-only'|trans }}" class="glyphicon glyphicon-list"></span>{% endif %}
2015-05-31 02:48:12 +00:00
</h1>
{% if user.removed %}
<div class="alert alert-danger" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
{{ 'User was removed from Point.im. It could be caused by Terms of Service violation.'|trans }}
</div>
{% endif %}
2015-05-31 02:48:12 +00:00
<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="heading-subscribers">
2015-06-02 02:24:38 +00:00
<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">
<span class="glyphicon glyphicon-collapse-down"></span> {{ 'Subscribers'|trans }} ({{ subscribers|length }})
2015-06-02 02:24:38 +00:00
</a>
</h4>
</div>
<div id="collapse-subscribers" class="panel-collapse collapse" aria-labelledby="heading-subscribers">
2015-06-02 02:24:38 +00:00
<div class="panel-body">
<ul class="users mosaic">
{% for user in subscribers %}
<li><a href="{{ path('user_show', {login: user.login}) }}">@{{ user.login }}</a></li>
2015-06-02 02:24:38 +00:00
{% 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>
<div class="user-rename-log">
{% if rename_log|length > 0 %}
<div class="panel-group" id="accordion-log">
<div class="panel panel-default">
<div class="panel-heading" id="heading-subscriptions-log">
<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> {{ 'Rename log'|trans }}
</a>
</h4>
</div>
<div id="collapse-log" class="panel-collapse collapse in" aria-labelledby="heading-subscriptions-log">
<div class="panel-body">
<table class="table table-striped">
<thead>
<tr>
<td>{{ 'Date'|trans }}</td>
<td>{{ 'Old login'|trans }}</td>
</tr>
</thead>
<tbody>
{% for event in rename_log %}
<tr>
<td>
{# @todo Use DateTime helper: https://sonata-project.org/bundles/intl/master/doc/reference/datetime.html #}
{{ event.date|date('d F Y H:i:s') }}
</td>
<td>
{{ event.oldLogin }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% else %}
<div class="alert alert-warning" role="alert">{{ 'No rename log data found'|trans }}</div>
{% endif %}
</div>
2015-06-02 02:24:38 +00:00
<div class="user-subscriptions-log">
<h3>{{ 'Subscriptions log'|trans }}</h3>
{% if subscriptions_log|length > 0 %}
<table class="table table-striped">
<thead>
<tr>
<td>{{ 'User'|trans }}</td>
<td>{{ 'Action'|trans }}</td>
<td>{{ 'Date'|trans }}</td>
</tr>
</thead>
<tbody>
{% for event in subscriptions_log %}
<tr>
<td>
<a href="{{ path('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>
{# @todo 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-02 02:24:38 +00:00
{% else %}
<div class="alert alert-warning" role="alert">{{ 'No subscribers log data found'|trans }}</div>
2015-06-02 02:24:38 +00:00
{% endif %}
2015-05-31 02:48:12 +00:00
</div>
2015-06-02 02:24:38 +00:00
<div class="navigation">
{{ knp_pagination_render(subscriptions_log) }}
</div>
2015-05-30 06:50:44 +00:00
{% endblock %}