diff --git a/bookwyrm/templates/components/inline_form.html b/bookwyrm/templates/components/inline_form.html new file mode 100644 index 00000000..6a244ffd --- /dev/null +++ b/bookwyrm/templates/components/inline_form.html @@ -0,0 +1,13 @@ + diff --git a/bookwyrm/templates/lists/create_form.html b/bookwyrm/templates/lists/create_form.html new file mode 100644 index 00000000..706dff08 --- /dev/null +++ b/bookwyrm/templates/lists/create_form.html @@ -0,0 +1,11 @@ +{% extends 'components/inline_form.html' %} + +{% block header %} +Create List +{% endblock %} + +{% block form %} +
+ {% include 'lists/form.html' %} +
+{% endblock %} diff --git a/bookwyrm/templates/lists/edit_form.html b/bookwyrm/templates/lists/edit_form.html new file mode 100644 index 00000000..55723b72 --- /dev/null +++ b/bookwyrm/templates/lists/edit_form.html @@ -0,0 +1,11 @@ +{% extends 'components/inline_form.html' %} + +{% block header %} +Edit List +{% endblock %} + +{% block form %} +
+ {% include 'lists/form.html' %} +
+{% endblock %} diff --git a/bookwyrm/templates/lists/list_layout.html b/bookwyrm/templates/lists/list_layout.html index 1887cd82..d3ff2c48 100644 --- a/bookwyrm/templates/lists/list_layout.html +++ b/bookwyrm/templates/lists/list_layout.html @@ -15,15 +15,9 @@ {% endif %} - +
+ {% include 'lists/edit_form.html' with controls_text="edit-list" %} +
{% block panel %}{% endblock %} diff --git a/bookwyrm/templates/lists/lists.html b/bookwyrm/templates/lists/lists.html index a0e18933..ad2dfbaf 100644 --- a/bookwyrm/templates/lists/lists.html +++ b/bookwyrm/templates/lists/lists.html @@ -5,26 +5,20 @@

Lists

{% if request.user.is_authenticated and not lists.has_previous %} -
-
-
-

Your lists

-
-
- {% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon="plus" text="Create new list" focus="create-list-header" %} -
-
+
+
+

Your lists

+
+
+ {% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon="plus" text="Create new list" focus="create-list-header" %} +
+
- +
+ {% include 'lists/create_form.html' with controls_text="create-list" %} +
+
{% if request.user.list_set.exists %} {% include 'lists/list_items.html' with lists=request.user.list_set.all|slice:4 %} {% endif %}