phpcomposeryggdrasilbittorrentjs-lessalt-websymfonysphinxcatalogtorrentmagnetwikidistributedsocial-networkfederatedsqlitetracker
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
299 lines
17 KiB
299 lines
17 KiB
{% extends 'default/layout.html.twig' %} |
|
{% block title %}{{ 'User'|trans }} #{{ user.id }}{% if pagination.page > 1 %} - {{ 'Page' | trans }} {{ pagination.page }}{% endif %} - {{ name }}{% endblock %} |
|
{% block main_content %} |
|
<div class="padding-24-px margin-y-8-px border-radius-3-px background-color-night"> |
|
<div class="margin-b-16-px text-center"> |
|
<img class="border-radius-50 border-color-default border-width-2-px" src="{{ user.identicon }}" alt="{{ 'identicon'|trans }}" /> |
|
</div> |
|
{# @TODO username feature |
|
<div class="margin-b-16-px"> |
|
<h1 class="display-block text-center margin-b-16-px"> |
|
{{ 'User'|trans }} #{{ user.id }} |
|
</h1> |
|
</div> |
|
#} |
|
<div class="text-center"> |
|
<a rel="nofollow" class="margin-l-8-px margin-r-4-px" href="{{ path('user_star_toggle', {userId : user.id}) }}" title="{{ 'Bookmark' | trans }}"> |
|
{% if user.star.exist %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> |
|
</svg> |
|
{% else %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/> |
|
</svg> |
|
{% endif %} |
|
</a> |
|
<small class="cursor-default" title="{{ 'Total' | trans }}"> |
|
{{ user.star.total }} |
|
</small> |
|
</div> |
|
<table class="width-100"> |
|
<tbody> |
|
<tr> |
|
<td class="padding-y-8-px border-bottom-default text-right" colspan="2">{{ 'Common'|trans }}</td> |
|
</tr> |
|
{% if session.owner or session.moderator %} |
|
<tr> |
|
<td class="padding-t-16-px">{{ 'Address' | trans }}</td> |
|
<td class="padding-t-16-px"> |
|
{{ user.address }} |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2zM3 8a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1H3z"/> |
|
</svg> |
|
<span class="opacity-0 parent-hover-opacity-09" title="{{ 'Address hidden for others'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/> |
|
</svg> |
|
</span> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td>{{ 'Joined' | trans }}</td> |
|
<td>{{ user.added | format_ago }}</td> |
|
</tr> |
|
{% else %} |
|
<tr> |
|
<td class="padding-t-16-px">{{ 'Joined' | trans }}</td> |
|
<td class="padding-t-16-px">{{ user.added | format_ago }}</td> |
|
</tr> |
|
{% endif %} |
|
<tr> |
|
<td class="padding-y-8-px border-bottom-default text-right" colspan="2">{{ 'Access' | trans }}</td> |
|
</tr> |
|
<tr> |
|
<td class="padding-t-16-px"> |
|
{{ 'Status' | trans }} |
|
</td> |
|
<td class="padding-t-16-px"> |
|
{% if user.status %} |
|
{{ 'Active' | trans }} |
|
{% if session.moderator %} |
|
<a class="float-right" href="{{ path('user_status_toggle', { userId : user.id }) }}" title="{{ 'Toggle' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/> |
|
</svg> |
|
</a> |
|
{% endif %} |
|
{% else %} |
|
{{ 'Disabled' | trans }} |
|
{% if session.moderator %} |
|
<a class="float-right text-color-red" href="{{ path('user_status_toggle', { userId : user.id }) }}" title="{{ 'Toggle' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/> |
|
</svg> |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{{ 'Approved' | trans }} |
|
</td> |
|
<td> |
|
{% if user.approved %} |
|
{{ 'Yes'| trans }} |
|
{% if session.moderator %} |
|
<a class="float-right" href="{{ path('user_approved_toggle', { userId : user.id }) }}" title="{{ 'Toggle' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/> |
|
</svg> |
|
</a> |
|
{% endif %} |
|
{% else %} |
|
{{ 'No'| trans }} |
|
{% if session.moderator %} |
|
<a class="float-right text-color-red" href="{{ path('user_approved_toggle', { userId : user.id }) }}" title="{{ 'Toggle' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/> |
|
</svg> |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{{ 'Moderator' | trans }} |
|
</td> |
|
<td> |
|
{% if user.moderator %} |
|
{{ 'Yes'| trans }} |
|
{% if session.moderator %} |
|
<a class="float-right" href="{{ path('user_moderator_toggle', { userId : user.id }) }}" title="{{ 'Toggle' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/> |
|
</svg> |
|
</a> |
|
{% endif %} |
|
{% else %} |
|
{{ 'No'| trans }} |
|
{% if session.moderator %} |
|
<a class="float-right text-color-red" href="{{ path('user_moderator_toggle', { userId : user.id }) }}" title="{{ 'Toggle' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/> |
|
</svg> |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td class="padding-y-8-px border-bottom-default text-right" colspan="2"> |
|
{% if user.owner %} |
|
<a class="margin-r-4-px{#opacity-0 parent-hover-opacity-09#}" href="{{ path('user_settings', { userId : user.id }) }}" title="{{'Edit'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/> |
|
</svg> |
|
</a> |
|
{% endif %} |
|
{{ 'Settings' | trans }} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td class="padding-t-16-px"> |
|
{{ 'Theme' | trans }} |
|
</td> |
|
<td class="padding-t-16-px"> |
|
{{ user.theme | u.title }} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{{ 'Interface' | trans }} |
|
</td> |
|
<td> |
|
{{ user.locale | locale_name(user.locale) | u.title }} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td class="width-20"> |
|
{{ 'Languages' | trans }} |
|
</td> |
|
<td class="width-80 line-height-20-px"> |
|
{% set i = 0 %} |
|
{% for locale in user.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% set i = i + 1 %}{% endfor %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td class="width-20"> |
|
{{ 'Categories' | trans }} |
|
</td> |
|
<td class="width-80 line-height-20-px"> |
|
{% set i = 0 %} |
|
{% for category in user.categories | sort %}{% if i > 0 %},{% endif %} {{ category | trans_category | u.title }}{% set i = i + 1 %}{% endfor %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{{ 'Posters' | trans }} |
|
</td> |
|
<td> |
|
{% if user.posters %} |
|
{{ 'Yes' | trans }} |
|
{% else %} |
|
{{ 'No' | trans }} |
|
{% endif %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{{ 'Sensitive' | trans }} |
|
</td> |
|
<td> |
|
{% if user.sensitive %} |
|
{{ 'Yes' | trans }} |
|
{% else %} |
|
{{ 'No' | trans }} |
|
{% endif %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{{ 'Events subscribed' | trans }} |
|
</td> |
|
<td> |
|
{% for group, event in events %} |
|
<div class="margin-b-4-px"> |
|
<span class="text-color-night"> |
|
{{ group }}: |
|
</span> |
|
{% set i = 0 %} |
|
{% for key, value in event %}{% if value in user.events %}{% if i > 0 %}, {% endif %}{{ key | lower }}{% set i = i + 1 %}{% endif %}{% endfor %} |
|
</div> |
|
{% endfor %} |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{{ 'Yggdrasil only' | trans }} |
|
</td> |
|
<td> |
|
{% if user.yggdrasil %} |
|
{{ 'Yes'|trans }} |
|
{% else %} |
|
{{ 'No'|trans }} |
|
{% endif %} |
|
</td> |
|
</tr> |
|
</tbody> |
|
</table> |
|
</div> |
|
<a name="activity"></a> |
|
<div class="padding-t-16-px padding-b-8-px text-right"> |
|
<h2>{{ 'Recent activity' | trans }}</h2> |
|
<sub> |
|
<a class="text-color-night margin-x-4-px" href="{{ path('rss_activity_user', { userId : user.id }) }}" title="RSS"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/> |
|
</svg> |
|
</a> |
|
</sub> |
|
</div> |
|
{% if user.activities %} |
|
{% for activity in user.activities %} |
|
<div class="padding-x-24-px padding-y-16-px margin-y-8-px border-radius-3-px background-color-night"> |
|
{{ render(controller( |
|
'App\\Controller\\ActivityController::event', |
|
{ user: session.user, activity : activity } |
|
)) }} |
|
</div> |
|
{% endfor %} |
|
{% if pagination.pages > 1 %} |
|
<div class="row margin-t-16-px"> |
|
<div class="column width-50 padding-t-16-px"> |
|
|
|
{# @TODO |
|
<a class="text-color-night" href="#" title="RSS"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/> |
|
</svg> |
|
</a> |
|
#} |
|
</div> |
|
<div class="column width-50 text-right"> |
|
{% if pagination.pages > 1 %} |
|
{{ 'Page' | trans | lower }} {{ pagination.page }} / {{ pagination.pages }} |
|
{% if pagination.page > 1 %} |
|
{% if pagination.page == 2 %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('user_info', { userId : user.id }) }}#activity"> |
|
{{ 'Back' | trans | lower }} |
|
</a> |
|
{% else %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('user_info', { userId : user.id, page : pagination.page - 1 }) }}#activity"> |
|
{{ 'Back' | trans | lower }} |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
{% if pagination.page < pagination.pages %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('user_info', { userId : user.id, page : pagination.page + 1 }) }}#activity"> |
|
{{ 'Next' | trans | lower }} |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
</div> |
|
</div> |
|
{% endif %} |
|
{% endif %} |
|
{% endblock %} |