2020-01-26 12:14:27 -08:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
{% block content %}
|
2020-01-29 15:10:32 -08:00
|
|
|
<div id="sidebar">
|
2020-01-26 12:14:27 -08:00
|
|
|
<div class="user-profile">
|
2020-01-29 15:10:32 -08:00
|
|
|
<h2>
|
2020-02-10 21:23:21 -08:00
|
|
|
{% include 'snippets/avatar.html' with user=user %}
|
2020-01-29 15:10:32 -08:00
|
|
|
{% if user.name %}{{ user.name }}{% endif %}
|
|
|
|
<small>{{ user.username }}</small>
|
|
|
|
</h2>
|
2020-01-28 23:23:05 -08:00
|
|
|
{% if user.summary %}
|
2020-02-14 20:24:35 -08:00
|
|
|
<blockquote>{{ user.summary | safe }}</blockquote>
|
2020-01-28 23:23:05 -08:00
|
|
|
{% endif %}
|
2020-01-26 12:14:27 -08:00
|
|
|
{% if not is_self %}
|
2020-02-22 12:57:13 -08:00
|
|
|
{% include 'snippets/follow_button.html' with user=user %}
|
2020-01-26 12:14:27 -08:00
|
|
|
{% endif %}
|
2020-01-26 18:49:57 -08:00
|
|
|
|
2020-01-29 15:10:32 -08:00
|
|
|
{% if is_self %}
|
|
|
|
<div class="interaction">
|
2020-03-08 16:39:59 +00:00
|
|
|
<a href="/edit_profile_page/">Edit profile</a>
|
2020-01-26 18:49:57 -08:00
|
|
|
</div>
|
2020-01-29 15:10:32 -08:00
|
|
|
{% endif %}
|
2020-01-26 18:49:57 -08:00
|
|
|
</div>
|
2020-03-13 14:34:40 +00:00
|
|
|
|
|
|
|
{% if is_self and user.follower_requests.all %}
|
|
|
|
<div>
|
|
|
|
<h2>Follow Requests</h2>
|
|
|
|
{% for requester in user.follower_requests.all %}
|
|
|
|
<div>
|
|
|
|
{% include 'snippets/username.html' with user=requester show_full=True %}
|
|
|
|
<form action="/accept_follow_request/" method="POST">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type=hidden name="user" value="{{ requester.username }}">
|
|
|
|
<input type=submit value="Accept">
|
|
|
|
</form>
|
|
|
|
<form action="/delete_follow_request/" method="POST">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type=hidden name="user" value="{{ requester.username }}">
|
|
|
|
<input type=submit value="Delete">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-01-26 18:49:57 -08:00
|
|
|
<div>
|
|
|
|
<h2>Followers</h2>
|
|
|
|
{% for follower in user.followers.all %}
|
2020-01-26 22:47:32 -08:00
|
|
|
<div>
|
2020-03-09 17:48:48 -07:00
|
|
|
{% include 'snippets/username.html' with user=follower show_full=True %}
|
2020-02-22 14:27:31 -08:00
|
|
|
{% include 'snippets/follow_button.html' with user=follower %}
|
2020-01-26 22:47:32 -08:00
|
|
|
</div>
|
2020-01-26 18:49:57 -08:00
|
|
|
{% endfor %}
|
2020-01-26 12:14:27 -08:00
|
|
|
</div>
|
2020-02-24 15:23:14 +00:00
|
|
|
|
|
|
|
<div>
|
|
|
|
<h2>Following</h2>
|
|
|
|
{% for following in user.following.all %}
|
|
|
|
<div>
|
2020-03-09 17:48:48 -07:00
|
|
|
{% include 'snippets/username.html' with user=following show_full=True %}
|
2020-02-24 15:23:14 +00:00
|
|
|
{% include 'snippets/follow_button.html' with user=following %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
2020-01-29 15:10:32 -08:00
|
|
|
</div>
|
2020-01-26 12:14:27 -08:00
|
|
|
|
2020-01-29 15:10:32 -08:00
|
|
|
<div id="content">
|
|
|
|
{% for shelf in shelves %}
|
|
|
|
<div>
|
2020-01-29 15:32:43 -08:00
|
|
|
<h2>{{ shelf.name }}</h2>
|
2020-02-21 16:03:05 -08:00
|
|
|
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
|
2020-01-29 15:10:32 -08:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2020-01-26 12:14:27 -08:00
|
|
|
</div>
|
2020-01-29 15:10:32 -08:00
|
|
|
|
2020-01-26 12:14:27 -08:00
|
|
|
{% endblock %}
|