From 821e579a39e4333f342d794b2eba216a4b41f3a9 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 30 Dec 2021 12:34:21 -0800 Subject: [PATCH] Refactors list curate page --- bookwyrm/templates/lists/curate.html | 116 ++++++++++++++------------- bookwyrm/templates/lists/layout.html | 3 + bookwyrm/templates/lists/list.html | 13 +++ 3 files changed, 75 insertions(+), 57 deletions(-) diff --git a/bookwyrm/templates/lists/curate.html b/bookwyrm/templates/lists/curate.html index 13de89c16..927fb5b6a 100644 --- a/bookwyrm/templates/lists/curate.html +++ b/bookwyrm/templates/lists/curate.html @@ -1,72 +1,74 @@ {% extends 'lists/layout.html' %} {% load i18n %} + +{% block breadcrumbs %} + +{% endblock %} + {% block panel %} -
-
-
-

{% trans "Pending Books" %}

-
- -

{% trans "Go to list" %}

-
+

{% trans "Pending Books" %}

{% if not pending.exists %} -

{% trans "You're all set!" %}

+

{% trans "You're all set!" %}

{% else %} -
+
{% for item in pending %} - {% with book=item.book %} -
-
-
- -
- {% trans "Suggested by" %} - - - {{ item.user.display_name }} - -
- -
-
- {% csrf_token %} - - - -
-
- {% csrf_token %} - - - -
-
+

+
- {% endwith %} + + +
+
+
+ {% csrf_token %} + + + +
+
+ {% csrf_token %} + + + +
+
+
+ {% endwith %} {% endfor %} -
+ {% endif %}
{% endblock %} diff --git a/bookwyrm/templates/lists/layout.html b/bookwyrm/templates/lists/layout.html index 6e772221a..c194e2f5f 100644 --- a/bookwyrm/templates/lists/layout.html +++ b/bookwyrm/templates/lists/layout.html @@ -11,6 +11,7 @@ {% include 'lists/created_text.html' with list=list %}

+
{% if request.user == list.user %} {% trans "Edit List" as button_text %} @@ -20,6 +21,8 @@
+{% block breadcrumbs %}{% endblock %} +
{% include 'snippets/trimmed_text.html' with full=list.description %}
diff --git a/bookwyrm/templates/lists/list.html b/bookwyrm/templates/lists/list.html index aeabfaaf8..880413cdb 100644 --- a/bookwyrm/templates/lists/list.html +++ b/bookwyrm/templates/lists/list.html @@ -4,6 +4,19 @@ {% load bookwyrm_group_tags %} {% load markdown %} +{% block breadcrumbs %} + +{% endblock %} + {% block panel %} {% if request.user == list.user and pending_count %}