2021-02-28 02:48:10 +00:00
{% load i18n %}
2020-03-27 17:11:32 +00:00
{% if request.user == user or not request.user.is_authenticated %}
2020-03-13 17:21:00 +00:00
{% elif request.user in user.follower_requests.all %}
2020-03-21 21:29:39 +00:00
2020-03-13 14:56:50 +00:00
< div >
2021-02-28 02:48:10 +00:00
{% trans "Follow request already sent." %}
2020-03-13 14:56:50 +00:00
< / div >
2020-03-21 21:29:39 +00:00
2021-02-23 20:10:54 +00:00
{% elif user in request.user.blocks.all %}
{% include 'snippets/block_button.html' %}
2020-03-21 21:29:39 +00:00
{% else %}
2021-02-23 20:10:54 +00:00
< div class = "field has-addons" >
< div class = "control" >
< form action = "/follow/" method = "POST" class = "interaction follow-{{ user.id }} {% if request.user in user.followers.all %}hidden{%endif %}" data-id = "follow-{{ user.id }}" >
{% csrf_token %}
< input type = "hidden" name = "user" value = "{{ user.username }}" >
{% if user.manually_approves_followers %}
2021-02-28 02:48:10 +00:00
< button class = "button is-small is-link" type = "submit" > {% trans "Send follow request" %}< / button >
2021-02-23 20:10:54 +00:00
{% else %}
2021-02-28 02:48:10 +00:00
< button class = "button is-small is-link" type = "submit" > {% trans "Follow" %}< / button >
2021-02-23 20:10:54 +00:00
{% endif %}
< / form >
< form action = "/unfollow/" method = "POST" class = "interaction follow-{{ user.id }} {% if not request.user in user.followers.all %}hidden{%endif %}" data-id = "follow-{{ user.id }}" >
{% csrf_token %}
< input type = "hidden" name = "user" value = "{{ user.username }}" >
2021-02-28 02:48:10 +00:00
< button class = "button is-small is-danger is-light" type = "submit" > {% trans "Unfollow" %}< / button >
2021-02-23 20:10:54 +00:00
< / form >
< / div >
< div class = "control" >
{% include 'snippets/user_options.html' with user=user class="is-small" %}
< / div >
< / div >
2020-02-22 20:57:13 +00:00
{% endif %}