bookwyrm/fedireads/templates/user.html

76 lines
2.3 KiB
HTML
Raw Normal View History

2020-01-26 20:14:27 +00:00
{% extends 'layout.html' %}
{% block content %}
2020-01-29 23:10:32 +00:00
<div id="sidebar">
2020-01-26 20:14:27 +00:00
<div class="user-profile">
2020-01-29 23:10:32 +00:00
<h2>
{% include 'snippets/avatar.html' with user=user %}
2020-01-29 23:10:32 +00:00
{% if user.name %}{{ user.name }}{% endif %}
<small>{{ user.username }}</small>
</h2>
2020-01-29 07:23:05 +00:00
{% if user.summary %}
<blockquote>{{ user.summary | safe }}</blockquote>
2020-01-29 07:23:05 +00:00
{% endif %}
2020-01-26 20:14:27 +00:00
{% if not is_self %}
2020-02-22 20:57:13 +00:00
{% include 'snippets/follow_button.html' with user=user %}
2020-01-26 20:14:27 +00:00
{% endif %}
2020-01-27 02:49:57 +00:00
2020-01-29 23:10:32 +00:00
{% if is_self %}
<div class="interaction">
<a href="/edit_profile_page/">Edit profile</a>
2020-01-27 02:49:57 +00:00
</div>
2020-01-29 23:10:32 +00:00
{% endif %}
2020-01-27 02:49:57 +00:00
</div>
{% 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-27 02:49:57 +00:00
<div>
<h2>Followers</h2>
{% for follower in user.followers.all %}
2020-01-27 06:47:32 +00:00
<div>
{% include 'snippets/username.html' with user=follower show_full=True %}
2020-02-22 22:27:31 +00:00
{% include 'snippets/follow_button.html' with user=follower %}
2020-01-27 06:47:32 +00:00
</div>
2020-01-27 02:49:57 +00:00
{% endfor %}
2020-01-26 20:14:27 +00:00
</div>
<div>
<h2>Following</h2>
{% for following in user.following.all %}
<div>
{% include 'snippets/username.html' with user=following show_full=True %}
{% include 'snippets/follow_button.html' with user=following %}
</div>
{% endfor %}
</div>
2020-01-29 23:10:32 +00:00
</div>
2020-01-26 20:14:27 +00:00
2020-01-29 23:10:32 +00:00
<div id="content">
{% for shelf in shelves %}
<div>
2020-01-29 23:32:43 +00:00
<h2>{{ shelf.name }}</h2>
2020-02-22 00:03:05 +00:00
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
2020-01-29 23:10:32 +00:00
</div>
{% endfor %}
2020-01-26 20:14:27 +00:00
</div>
2020-01-29 23:10:32 +00:00
2020-01-26 20:14:27 +00:00
{% endblock %}