mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Show if user follows you
This commit is contained in:
parent
ec93d1812a
commit
3dbbe0089c
1 changed files with 16 additions and 10 deletions
|
@ -26,18 +26,24 @@
|
||||||
<a href="{% url 'user-followers' user|username %}">{% blocktrans count counter=user.followers.count %}{{ counter }} follower{% plural %}{{ counter }} followers{% endblocktrans %}</a>,
|
<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>
|
<a href="{% url 'user-following' user|username %}">{% blocktrans with counter=user.following.count %}{{ counter }} following{% endblocktrans %}</a>
|
||||||
|
|
||||||
{% elif request.user.is_authenticated and not user.hide_follows %}
|
{% elif request.user.is_authenticated %}
|
||||||
|
|
||||||
{% mutuals_count user as mutuals %}
|
{% if user.hide_follows %}
|
||||||
<a href="{% url 'user-followers' user|username %}">
|
{% if request.user in user.following.all %}
|
||||||
{% if mutuals %}
|
{% trans "Follows you" %}
|
||||||
{% 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 %}
|
{% endif %}
|
||||||
</a>
|
{% 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 %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in a new issue