moviewyrm/bookwyrm/templates/user/user_preview.html

53 lines
2.3 KiB
HTML
Raw Normal View History

{% load i18n %}
{% load humanize %}
2021-05-11 22:14:42 +00:00
{% load utilities %}
2022-01-18 20:28:59 +00:00
{% load user_page_tags %}
<div class="media block">
<div class="media-left">
<a href="{{ user.local_path }}">
{% include 'snippets/avatar.html' with user=user large=True %}
</a>
</div>
<div class="media-content">
2021-08-04 20:38:06 +00:00
<p>
{% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %}
{% if user.manually_approves_followers %}
<span class="icon icon-lock is-size-7" title="{% trans 'Locked account' %}">
<span class="is-sr-only">{% trans "Locked account" %}</span>
</span>
{% endif %}
</p>
<p><a href="{{ user.remote_id }}">{{ user.username }}</a></p>
<p>{% blocktrans with date=user.created_date|naturaltime %}Joined {{ date }}{% endblocktrans %}</p>
<p>
{% if request.user.id == user.id or admin_mode %}
2022-01-06 17:04:59 +00:00
<a href="{% url 'user-followers' user|username %}">{% blocktrans count counter=user.followers.count %}{{ counter }} follower{% plural %}{{ counter }} followers{% endblocktrans %}</a>,
<a href="{% url 'user-following' user|username %}">{% blocktrans with counter=user.following.count %}{{ counter }} following{% endblocktrans %}</a>
2022-02-28 20:07:06 +00:00
{% elif request.user.is_authenticated %}
2022-02-28 20:07:06 +00:00
{% if user.hide_follows %}
{% if request.user in user.following.all %}
{% trans "Follows you" %}
2022-01-06 17:04:59 +00:00
{% endif %}
2022-02-28 20:07:06 +00:00
{% else %}
{% mutuals_count user as mutuals %}
<a href="{% url 'user-followers' user|username %}">
{% if mutuals %}
{% blocktrans with mutuals_display=mutuals|intcomma count counter=mutuals %}{{ mutuals_display }} follower you follow{% plural %}{{ mutuals_display }} followers you follow{% endblocktrans %}
{% elif request.user in user.following.all %}
{% trans "Follows you" %}
{% else %}
{% trans "No followers you follow" %}
{% endif %}
</a>
{% endif %}
{% endif %}
</p>
</div>
</div>