diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html
index 6d81290e..c8c78e0e 100644
--- a/bookwyrm/templates/book/book.html
+++ b/bookwyrm/templates/book/book.html
@@ -375,7 +375,7 @@
{% endif %}
- {% include "book/links.html" %}
+ {% include "book/file_links/links.html" %}
diff --git a/bookwyrm/templates/book/file_link_modal.html b/bookwyrm/templates/book/file_links/add_link_modal.html
similarity index 100%
rename from bookwyrm/templates/book/file_link_modal.html
rename to bookwyrm/templates/book/file_links/add_link_modal.html
diff --git a/bookwyrm/templates/book/edit_links.html b/bookwyrm/templates/book/file_links/edit_links.html
similarity index 100%
rename from bookwyrm/templates/book/edit_links.html
rename to bookwyrm/templates/book/file_links/edit_links.html
diff --git a/bookwyrm/templates/book/file_link_page.html b/bookwyrm/templates/book/file_links/file_link_page.html
similarity index 56%
rename from bookwyrm/templates/book/file_link_page.html
rename to bookwyrm/templates/book/file_links/file_link_page.html
index 26a8d89d..902057af 100644
--- a/bookwyrm/templates/book/file_link_page.html
+++ b/bookwyrm/templates/book/file_links/file_link_page.html
@@ -6,5 +6,5 @@
{% endblock %}
{% block content %}
-{% include "book/file_link_modal.html" with book=book active=True static=True id="file-link" %}
+{% include "book/file_links/add_link_modal.html" with book=book active=True static=True id="file-link" %}
{% endblock %}
diff --git a/bookwyrm/templates/book/links.html b/bookwyrm/templates/book/file_links/links.html
similarity index 90%
rename from bookwyrm/templates/book/links.html
rename to bookwyrm/templates/book/file_links/links.html
index c77e2146..10a6da2f 100644
--- a/bookwyrm/templates/book/links.html
+++ b/bookwyrm/templates/book/file_links/links.html
@@ -35,7 +35,7 @@
{% for link in links.all %}
{% join "verify" link.id as verify_modal %}
-{% include "book/link_verification_modal.html" with id=verify_modal %}
+{% include "book/file_links/verification_modal.html" with id=verify_modal %}
{% endfor %}
{% else %}
{% trans "No links available" %}
@@ -46,7 +46,7 @@
{% trans "Edit links" %}
-{% include 'book/file_link_modal.html' with book=book id="add-links" %}
+{% include 'book/file_links/add_link_modal.html' with book=book id="add-links" %}
{% endif %}
{% endif %}
diff --git a/bookwyrm/templates/book/link_verification_modal.html b/bookwyrm/templates/book/file_links/verification_modal.html
similarity index 100%
rename from bookwyrm/templates/book/link_verification_modal.html
rename to bookwyrm/templates/book/file_links/verification_modal.html
diff --git a/bookwyrm/views/books/links.py b/bookwyrm/views/books/links.py
index e10e8751..9dca41e4 100644
--- a/bookwyrm/views/books/links.py
+++ b/bookwyrm/views/books/links.py
@@ -16,7 +16,7 @@ class BookFileLinks(View):
def get(self, request, book_id):
"""view links"""
book = get_object_or_404(models.Edition, id=book_id)
- return TemplateResponse(request, "book/edit_links.html", {"book": book})
+ return TemplateResponse(request, "book/file_links/edit_links.html", {"book": book})
def post(self, request, book_id, link_id):
"""delete link"""
@@ -39,7 +39,7 @@ class AddFileLink(View):
"file_link_form": forms.FileLinkForm(),
"book": book,
}
- return TemplateResponse(request, "book/file_link_page.html", data)
+ return TemplateResponse(request, "book/file_links/file_link_page.html", data)
@transaction.atomic
def post(self, request, book_id, link_id=None):
@@ -49,7 +49,7 @@ class AddFileLink(View):
form = forms.FileLinkForm(request.POST, instance=link)
if not form.is_valid():
data = {"file_link_form": form, "book": book}
- return TemplateResponse(request, "book/file_link_page.html", data)
+ return TemplateResponse(request, "book/file_links/file_link_page.html", data)
link = form.save()
book.file_links.add(link)