From 176257eb85988a941cadc41eea3be9c235eab837 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 10 Nov 2020 16:18:48 -0800 Subject: [PATCH] SHow privacy icon on shelves --- bookwyrm/templates/shelf.html | 7 ++++++- bookwyrm/templates/snippets/privacy-icons.html | 18 ++++++++++++++++++ bookwyrm/templates/snippets/status_body.html | 18 +----------------- 3 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 bookwyrm/templates/snippets/privacy-icons.html diff --git a/bookwyrm/templates/shelf.html b/bookwyrm/templates/shelf.html index b2d01e5d..f8e0e35b 100644 --- a/bookwyrm/templates/shelf.html +++ b/bookwyrm/templates/shelf.html @@ -68,7 +68,12 @@
-

{{ shelf.name }}

+

+ {{ shelf.name }} + + {% include 'snippets/privacy-icons.html' with item=shelf %} + +

{% if is_self %}
diff --git a/bookwyrm/templates/snippets/privacy-icons.html b/bookwyrm/templates/snippets/privacy-icons.html new file mode 100644 index 00000000..b911f128 --- /dev/null +++ b/bookwyrm/templates/snippets/privacy-icons.html @@ -0,0 +1,18 @@ +{% if item.privacy == 'public' %} + + Public post + +{% elif item.privacy == 'unlisted' %} + + Unlisted post + +{% elif item.privacy == 'followers' %} + + Followers-only post + +{% else %} + + Private post + +{% endif %} + diff --git a/bookwyrm/templates/snippets/status_body.html b/bookwyrm/templates/snippets/status_body.html index 1c1d41de..05e890b9 100644 --- a/bookwyrm/templates/snippets/status_body.html +++ b/bookwyrm/templates/snippets/status_body.html @@ -60,23 +60,7 @@