From 51f26e2b252bce2b918dde1db9a3813e48a5a55b Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Mon, 11 Jun 2018 18:16:32 -0400 Subject: [PATCH] Template changes for user actions --- brutaldon/static/css/brutaldon.css | 6 ++++ brutaldon/templates/main/user.html | 55 ++++++++++++++++++++++++------ brutaldon/views.py | 2 ++ 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/brutaldon/static/css/brutaldon.css b/brutaldon/static/css/brutaldon.css index 3efeae2..f98d6e6 100644 --- a/brutaldon/static/css/brutaldon.css +++ b/brutaldon/static/css/brutaldon.css @@ -60,6 +60,12 @@ article.media.user-info .content img max-width: 1.5rem; } +span.account-locked +{ + margin-top: 48px; + margin-left: -16px; +} + @media screen and (max-width: 768px) { .media { display: block; diff --git a/brutaldon/templates/main/user.html b/brutaldon/templates/main/user.html index 28d8173..bc755f0 100644 --- a/brutaldon/templates/main/user.html +++ b/brutaldon/templates/main/user.html @@ -22,6 +22,11 @@ Brutaldon - {{ timeline }} timelime
Avatar + {% if user.locked %} + + {% endif %}
@@ -30,20 +35,50 @@ Brutaldon - {{ timeline }} timelime
- - - - - - + {% if not relationship.muting %} + + + + {% else %} + + + + {% endif %} + {% if not relationship.blocking %} + + + + {% else %} + + + + {% endif %}
diff --git a/brutaldon/views.py b/brutaldon/views.py index c511b00..c79cfb8 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -268,8 +268,10 @@ def user(request, username): except IndexError: raise Http404("The user %s could not be found." % username) data = mastodon.account_statuses(user_dict.id) + relationship = mastodon.account_relationships(user_dict.id)[0] return render(request, 'main/user.html', {'toots': data, 'user': user_dict, + 'relationship': relationship, 'own_username': request.session['user'].acct, 'fullbrutalism': fullbrutalism_p(request)})