coriplus/templates/user_detail.html
2019-05-01 15:33:28 +02:00

30 lines
980 B
HTML

{% 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">
<input type="submit" value="- Un-follow" />
</form>
{% else %}
<form action="{{ url_for('user_follow', username=user.username) }}" method="post">
<input type="submit" value="+ Follow" />
</form>
{% endif %}
{% endif %}
{% endif %}
<ul>
{% for message in message_list %}
<li>{% include "includes/message.html" %}</li>
{% endfor %}
</ul>
{% include "includes/pagination.html" %}
{% endblock %}