diff --git a/bookwyrm/templates/components/inline_form.html b/bookwyrm/templates/components/inline_form.html new file mode 100644 index 000000000..6a244ffd7 --- /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 000000000..706dff08d --- /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 000000000..55723b725 --- /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 1887cd825..d3ff2c48d 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 a0e18933c..ad2dfbaf8 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 %} diff --git a/bookwyrm/templates/user/create_shelf_form.html b/bookwyrm/templates/user/create_shelf_form.html new file mode 100644 index 000000000..89f41fd8f --- /dev/null +++ b/bookwyrm/templates/user/create_shelf_form.html @@ -0,0 +1,26 @@ +{% extends 'components/inline_form.html' %} + +{% block header %} +Create New Shelf +{% endblock %} + +{% block form %} +
+ {% csrf_token %} + +
+ + +
+ +
+
+ {% include 'snippets/privacy_select.html' %} +
+
+ +
+
+
+{% endblock %} + diff --git a/bookwyrm/templates/user/edit_shelf_form.html b/bookwyrm/templates/user/edit_shelf_form.html new file mode 100644 index 000000000..b179be9f8 --- /dev/null +++ b/bookwyrm/templates/user/edit_shelf_form.html @@ -0,0 +1,31 @@ +{% extends 'components/inline_form.html' %} + +{% block header %} +Edit Shelf +{% endblock %} + +{% block form %} +
+ {% csrf_token %} + + {% if shelf.editable %} +
+ + +
+ {% else %} + + {% endif %} + +
+
+ {% include 'snippets/privacy_select.html' with current=shelf.privacy %} +
+
+ +
+
+
+{% endblock %} + + diff --git a/bookwyrm/templates/user/shelf.html b/bookwyrm/templates/user/shelf.html index add5e5db1..5e2f532f1 100644 --- a/bookwyrm/templates/user/shelf.html +++ b/bookwyrm/templates/user/shelf.html @@ -29,30 +29,13 @@ {% if is_self %}
- {% include 'snippets/toggle/open_button.html' with text="Create shelf" icon="plus" class="is-clickable" controls_text="create-shelf-form" %} + {% include 'snippets/toggle/open_button.html' with text="Create shelf" icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
{% endif %}
- -