coriplus/templates/user_detail.html

35 lines
1.3 KiB
HTML
Raw Normal View History

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>
2019-10-12 19:22:10 +02:00
{% if not current_user.is_anonymous %}
2019-05-01 15:33:28 +02:00
{% 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" 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">
<input type="submit" class="follow_button" value="+ Follow" />
2019-05-01 15:33:28 +02:00
</form>
{% endif %}
<p><a href="/create/?preload=%2B{{ user.username }}">Mention this user in a message</a></p>
2019-10-12 19:22:10 +02:00
{% else %}
<!-- here should go the "edit profile" button -->
<a href="/create/">Create a status</a>
2019-05-01 15:33:28 +02:00
{% endif %}
{% endif %}
<ul>
{% for message in message_list %}
2019-10-14 19:53:33 +02:00
<li id="{{ message.id }}">{% include "includes/message.html" %}</li>
2019-05-01 15:33:28 +02:00
{% endfor %}
</ul>
{% include "includes/pagination.html" %}
{% endblock %}