Move user templates into more subdirectories

This commit is contained in:
Mouse Reeve 2021-04-30 08:40:47 -07:00
parent d2355fef96
commit 862ef83536
11 changed files with 15 additions and 15 deletions

View file

@ -1,4 +1,4 @@
{% extends 'user/user_layout.html' %} {% extends 'user/layout.html' %}
{% load i18n %} {% load i18n %}
{% block header %} {% block header %}

View file

@ -1,4 +1,4 @@
{% extends 'user/user_layout.html' %} {% extends 'user/layout.html' %}
{% load i18n %} {% load i18n %}
{% load bookwyrm_tags %} {% load bookwyrm_tags %}

View file

@ -1,4 +1,4 @@
{% extends 'user/user_layout.html' %} {% extends 'user/layout.html' %}
{% load i18n %} {% load i18n %}
{% load bookwyrm_tags %} {% load bookwyrm_tags %}

View file

@ -1,16 +1,16 @@
{% extends 'user/user_layout.html' %} {% extends 'user/layout.html' %}
{% load bookwyrm_tags %} {% load bookwyrm_tags %}
{% load humanize %} {% load humanize %}
{% load i18n %} {% load i18n %}
{% block title %} {% block title %}
{% include 'user/books_header.html' %} {% include 'user/shelf/books_header.html' %}
{% endblock %} {% endblock %}
{% block header %} {% block header %}
<header class="columns"> <header class="columns">
<h1 class="title"> <h1 class="title">
{% include 'user/books_header.html' %} {% include 'user/shelf/books_header.html' %}
</h1> </h1>
</header> </header>
{% endblock %} {% endblock %}
@ -41,7 +41,7 @@
</div> </div>
<div class="block"> <div class="block">
{% include 'user/create_shelf_form.html' with controls_text='create-shelf-form' %} {% include 'user/shelf/create_shelf_form.html' with controls_text='create-shelf-form' %}
</div> </div>
<div class="block columns is-mobile"> <div class="block columns is-mobile">
@ -62,7 +62,7 @@
</div> </div>
<div class="block"> <div class="block">
{% include 'user/edit_shelf_form.html' with controls_text="edit-shelf-form" %} {% include 'user/shelf/edit_shelf_form.html' with controls_text="edit-shelf-form" %}
</div> </div>
<div class="block"> <div class="block">

View file

@ -1,4 +1,4 @@
{% extends 'user/user_layout.html' %} {% extends 'user/layout.html' %}
{% load i18n %} {% load i18n %}
{% load bookwyrm_tags %} {% load bookwyrm_tags %}
@ -11,7 +11,7 @@
</div> </div>
{% if is_self %} {% if is_self %}
<div class="column is-narrow"> <div class="column is-narrow">
<a href="/preferences/profile"> <a href="{% url 'prefs-profile' %}">
<span class="icon icon-pencil" title="Edit profile"> <span class="icon icon-pencil" title="Edit profile">
<span class="is-sr-only">{% trans "Edit profile" %}</span> <span class="is-sr-only">{% trans "Edit profile" %}</span>
</span> </span>
@ -25,7 +25,7 @@
{% if user.bookwyrm_user %} {% if user.bookwyrm_user %}
<div class="block"> <div class="block">
<h2 class="title"> <h2 class="title">
{% include 'user/books_header.html' %} {% include 'user/shelf/books_header.html' %}
</h2> </h2>
<div class="columns"> <div class="columns">
{% for shelf in shelves %} {% for shelf in shelves %}
@ -56,7 +56,7 @@
{% elif user == request.user %} {% elif user == request.user %}
<div class="block"> <div class="block">
{% now 'Y' as year %} {% now 'Y' as year %}
<h2 class="title is-4"><a href="{{ user.local_path }}/goal/{{ year }}">{% blocktrans %}Set a reading goal for {{ year }}{% endblocktrans %}</a></h2> <h2 class="title is-4"><a href="{% url 'user-goal' user.localname year %}">{% blocktrans %}Set a reading goal for {{ year }}{% endblocktrans %}</a></h2>
</div> </div>
{% endif %} {% endif %}

View file

@ -68,7 +68,7 @@ class Shelf(View):
"books": paginated.get_page(request.GET.get("page")), "books": paginated.get_page(request.GET.get("page")),
} }
return TemplateResponse(request, "user/shelf.html", data) return TemplateResponse(request, "user/shelf/shelf.html", data)
@method_decorator(login_required, name="dispatch") @method_decorator(login_required, name="dispatch")
# pylint: disable=unused-argument # pylint: disable=unused-argument

View file

@ -112,7 +112,7 @@ class Followers(View):
"is_self": request.user.id == user.id, "is_self": request.user.id == user.id,
"followers": paginated.page(request.GET.get("page", 1)), "followers": paginated.page(request.GET.get("page", 1)),
} }
return TemplateResponse(request, "user/followers.html", data) return TemplateResponse(request, "user/relationships/followers.html", data)
class Following(View): class Following(View):
@ -138,7 +138,7 @@ class Following(View):
"is_self": request.user.id == user.id, "is_self": request.user.id == user.id,
"following": paginated.page(request.GET.get("page", 1)), "following": paginated.page(request.GET.get("page", 1)),
} }
return TemplateResponse(request, "user/following.html", data) return TemplateResponse(request, "user/relationships/following.html", data)
@method_decorator(login_required, name="dispatch") @method_decorator(login_required, name="dispatch")