From a617302006b1de642ca09df5379408c3340dc9bb Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 23 Feb 2021 12:10:54 -0800 Subject: [PATCH] Cleans up display of follow/block/unfollow/unblock buttons --- .../templates/snippets/follow_button.html | 37 ++++++++++++------- bookwyrm/templates/user/user_layout.html | 9 +---- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/bookwyrm/templates/snippets/follow_button.html b/bookwyrm/templates/snippets/follow_button.html index 7db69191e..f7286e67a 100644 --- a/bookwyrm/templates/snippets/follow_button.html +++ b/bookwyrm/templates/snippets/follow_button.html @@ -5,20 +5,29 @@ Follow request already sent. +{% elif user in request.user.blocks.all %} +{% include 'snippets/block_button.html' %} {% else %} -
- {% csrf_token %} - - {% if user.manually_approves_followers %} - - {% else %} - - {% endif %} -
-
- {% csrf_token %} - - -
+
+
+ + +
+
+ {% include 'snippets/user_options.html' with user=user class="is-small" %} +
+
{% endif %} diff --git a/bookwyrm/templates/user/user_layout.html b/bookwyrm/templates/user/user_layout.html index 979ee0b0b..9abc469aa 100644 --- a/bookwyrm/templates/user/user_layout.html +++ b/bookwyrm/templates/user/user_layout.html @@ -43,14 +43,7 @@ {% if not is_self and request.user.is_authenticated %} -
-
- {% include 'snippets/follow_button.html' with user=user %} -
-
- {% include 'snippets/user_options.html' with user=user class="is-small" %} -
-
+ {% include 'snippets/follow_button.html' with user=user %} {% endif %} {% if is_self and user.follower_requests.all %}