From f5c129dce732032a1daee5ba1be1c1a3dac1fd53 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 4 Aug 2021 13:38:06 -0700 Subject: [PATCH] Also in suggestion area --- bookwyrm/templates/directory/user_card.html | 9 ++++++++- .../templates/snippets/suggested_users.html | 17 +++++++++++++++-- bookwyrm/templates/user/user_preview.html | 15 ++++++++++++++- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/directory/user_card.html b/bookwyrm/templates/directory/user_card.html index b7941826..ccae925a 100644 --- a/bookwyrm/templates/directory/user_card.html +++ b/bookwyrm/templates/directory/user_card.html @@ -11,7 +11,14 @@
- {{ user.display_name }} + + {{ user.display_name }} + {% if user.manually_approves_followers %} + + {% trans "Locked account" %} + + {% endif %} + @{{ user|username }} {% include 'snippets/follow_button.html' with user=user %} diff --git a/bookwyrm/templates/snippets/suggested_users.html b/bookwyrm/templates/snippets/suggested_users.html index eb146f7e..4a757ef0 100644 --- a/bookwyrm/templates/snippets/suggested_users.html +++ b/bookwyrm/templates/snippets/suggested_users.html @@ -13,10 +13,23 @@ {% include 'snippets/follow_button.html' with user=user minimal=True %} {% if user.mutuals %}

- {% blocktrans with mutuals=user.mutuals|intcomma count counter=user.mutuals %}{{ mutuals }} follower you follow{% plural %}{{ mutuals }} followers you follow{% endblocktrans %} + {% blocktrans trimmed with mutuals=user.mutuals|intcomma count counter=user.mutuals %} + {{ mutuals }} follower you follow + {% plural %} + {{ mutuals }} followers you follow{% endblocktrans %}

{% elif user.shared_books %} -

{% blocktrans with shared_books=user.shared_books|intcomma count counter=user.shared_books %}{{ shared_books }} book on your shelves{% plural %}{{ shared_books }} books on your shelves{% endblocktrans %}

+

+ {% blocktrans trimmed with shared_books=user.shared_books|intcomma count counter=user.shared_books %} + {{ shared_books }} book on your shelves + {% plural %} + {{ shared_books }} books on your shelves + {% endblocktrans %} +

+ {% elif request.user in user.following.all %} +

+ {% trans "Follows you" %} +

{% endif %}
diff --git a/bookwyrm/templates/user/user_preview.html b/bookwyrm/templates/user/user_preview.html index 22d44c87..c6b3ea84 100644 --- a/bookwyrm/templates/user/user_preview.html +++ b/bookwyrm/templates/user/user_preview.html @@ -10,7 +10,14 @@
-

{% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %}

+

+ {% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %} + {% if user.manually_approves_followers %} + + {% trans "Locked account" %} + + {% endif %} +

{{ user.username }}

{% blocktrans with date=user.created_date|naturaltime %}Joined {{ date }}{% endblocktrans %}

@@ -23,7 +30,13 @@ {% mutuals_count user as mutuals %} + {% 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 %} {% endif %}