71 lines
3.4 KiB
Twig
71 lines
3.4 KiB
Twig
<aside class="{{ html_classes('options', {'options--top': not is_route_name('user_overview')}) }}" id="options">
|
|
<div></div>
|
|
<menu class="options__main">
|
|
<li>
|
|
<a href="{{ path('user_overview', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_overview')}) }}">
|
|
{{ 'overview'|trans|lower }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('user_entries', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_entries')}) }}">
|
|
{{ 'threads'|trans|lower }} ({{ user.entries|length }})
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('user_comments', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_comments')}) }}">
|
|
{{ 'comments'|trans|lower }} ({{ user.entryComments|length }})
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('user_posts', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_posts')}) }}">
|
|
{{ 'posts'|trans|lower }} ({{ user.posts|length }})
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('user_replies', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_replies')}) }}">
|
|
{{ 'replies'|trans|lower }} ({{ user.postComments|length }})
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('user_boosts', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_boosts')}) }}">
|
|
{{ 'boosts'|trans|lower }} ({{ count_user_boosts(user) }})
|
|
</a>
|
|
</li>
|
|
{% if user.getShowProfileFollowings or app.user is same as user %}
|
|
<li>
|
|
<a href="{{ path('user_following', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_following'), 'opacity-50': not user.getShowProfileFollowings}) }}">
|
|
{{ 'following'|trans|lower }} ({{ user.follows|length }})
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
<li>
|
|
<a href="{{ path('user_followers', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_followers')}) }}">
|
|
{{ 'followers'|trans|lower }} ({{ user.followers|length }})
|
|
</a>
|
|
</li>
|
|
{% if user.getShowProfileSubscriptions or app.user is same as user %}
|
|
<li>
|
|
<a href="{{ path('user_subscriptions', {username: user.username}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_subscriptions'), 'opacity-50': not user.getShowProfileSubscriptions}) }}">
|
|
{{ 'subscriptions'|trans|lower }} ({{ user.subscriptions|length }})
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
<li>
|
|
{%- set TYPE_ENTRY = constant('App\\Repository\\ReputationRepository::TYPE_ENTRY') -%}
|
|
<a href="{{ path('user_reputation', {username: user.username, reputationType: TYPE_ENTRY}) }}"
|
|
class="{{ html_classes({'active': is_route_name('user_reputation')}) }}">
|
|
{{ 'reputation'|trans|lower }} ({{ get_reputation_total(user) }})
|
|
</a>
|
|
</li>
|
|
</menu>
|
|
</aside>
|