2019-05-01 15:33:28 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
{% block body %}
|
|
|
|
|
<h2>Messages from {{ user.username }}</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<strong>{{ user.messages|count }}</strong> messages
|
|
|
|
|
-
|
|
|
|
|
<strong>{{ user.followers()|count }}</strong> followers
|
|
|
|
|
-
|
|
|
|
|
<strong>{{ user.following()|count }}</strong> following
|
|
|
|
|
</p>
|
|
|
|
|
{% if current_user %}
|
|
|
|
|
{% if user.username != current_user.username %}
|
|
|
|
|
{% if current_user|is_following(user) %}
|
|
|
|
|
<form action="{{ url_for('user_unfollow', username=user.username) }}" method="post">
|
2019-10-10 14:22:06 +02:00
|
|
|
<input type="submit" class="follow_button following" value="- Un-follow" />
|
2019-05-01 15:33:28 +02:00
|
|
|
</form>
|
|
|
|
|
{% else %}
|
|
|
|
|
<form action="{{ url_for('user_follow', username=user.username) }}" method="post">
|
2019-10-10 14:22:06 +02:00
|
|
|
<input type="submit" class="follow_button" value="+ Follow" />
|
2019-05-01 15:33:28 +02:00
|
|
|
</form>
|
|
|
|
|
{% endif %}
|
2019-10-10 14:22:06 +02:00
|
|
|
<p><a href="/create/?preload=%2B{{ user.username }}">Mention this user in a message</a></p>
|
2019-05-01 15:33:28 +02:00
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
<ul>
|
|
|
|
|
{% for message in message_list %}
|
|
|
|
|
<li>{% include "includes/message.html" %}</li>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
{% include "includes/pagination.html" %}
|
|
|
|
|
{% endblock %}
|