bundled/flask/examples/minitwit/templates/timeline.html @ 676834353b0d
Categorize only the last signoff of each user.
On the index view, all the signoff of a single user (done on precursors of a
cset) were displayed in the counts.
This patch make sure only the last signoff of each user is counted, so that the
final vote on the latest version of a cset gets displayed.
author |
Christophe de Vienne <cdevienne@gmail.com> |
date |
Wed, 29 Oct 2014 14:49:08 +0100 |
parents |
f33efe14bff1 |
children |
(none) |
{% extends "layout.html" %}
{% block title %}
{% if request.endpoint == 'public_timeline' %}
Public Timeline
{% elif request.endpoint == 'user_timeline' %}
{{ profile_user.username }}'s Timeline
{% else %}
My Timeline
{% endif %}
{% endblock %}
{% block body %}
<h2>{{ self.title() }}</h2>
{% if g.user %}
{% if request.endpoint == 'user_timeline' %}
<div class=followstatus>
{% if g.user.user_id == profile_user.user_id %}
This is you!
{% elif followed %}
You are currently following this user.
<a class=unfollow href="{{ url_for('unfollow_user', username=profile_user.username)
}}">Unfollow user</a>.
{% else %}
You are not yet following this user.
<a class=follow href="{{ url_for('follow_user', username=profile_user.username)
}}">Follow user</a>.
{% endif %}
</div>
{% elif request.endpoint == 'timeline' %}
<div class=twitbox>
<h3>What's on your mind {{ g.user.username }}?</h3>
<form action="{{ url_for('add_message') }}" method=post>
<p><input type=text name=text size=60><!--
--><input type=submit value="Share">
</form>
</div>
{% endif %}
{% endif %}
<ul class=messages>
{% for message in messages %}
<li><img src="{{ message.email|gravatar(size=48) }}"><p>
<strong><a href="{{ url_for('user_timeline', username=message.username)
}}">{{ message.username }}</a></strong>
{{ message.text }}
<small>— {{ message.pub_date|datetimeformat }}</small>
{% else %}
<li><em>There's no message so far.</em>
{% endfor %}
</ul>
{% endblock %}