moviewyrm/fedireads/templates/snippets/follow_button.html

23 lines
711 B
HTML
Raw Normal View History

{% if request.user == user %}
{% elif request.user in user.follower_requests.all %}
<div>
Follow request already sent.
</div>
{% elif not request.user in user.followers.all %}
2020-02-22 20:57:13 +00:00
<form action="/follow/" method="post">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}"></input>
{% if user.manually_approves_followers %}
<button type="submit">Send follow request</button>
{% else %}
<button type="submit">Follow</button>
{% endif %}
2020-02-22 20:57:13 +00:00
</form>
{% else %}
<form action="/unfollow/" method="post">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}"></input>
2020-03-17 00:09:45 +00:00
<button type="submit">Unfollow</button>
2020-02-22 20:57:13 +00:00
</form>
{% endif %}