2012-12-16 08:31:21 +00:00
|
|
|
<!-- extend base layout -->
|
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2012-12-16 08:40:47 +00:00
|
|
|
{% include 'flash.html' %}
|
|
|
|
<div class="well well-large" style="height: 140px;">
|
|
|
|
<div class="pull-right">
|
|
|
|
<img src="{{user.avatar(128)}}" class="img-polaroid">
|
|
|
|
</div>
|
|
|
|
<h1>{{user.nickname}}</h1>
|
|
|
|
{% if user.about_me %}<p>{{user.about_me}}</p>{% endif %}
|
2012-12-31 21:07:54 +00:00
|
|
|
{% if user.last_seen %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<p><em>{{ _('Last seen:') }} {{ momentjs(user.last_seen).calendar() }}</em></p>
|
2012-12-31 21:07:54 +00:00
|
|
|
{% endif %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<p>{{ _('Followers:') }} {{user.followers.count() - 1}} | {{ _('Following:') }} {{user.followed.count() - 1}} |
|
2012-12-16 08:40:47 +00:00
|
|
|
{% if user.id == g.user.id %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<a href="{{url_for('edit')}}">{{ _('Edit your profile') }}</a>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% elif not g.user.is_following(user) %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<a href="{{url_for('follow', nickname = user.nickname)}}">{{ _('Follow') }}</a>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% else %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<a href="{{url_for('unfollow', nickname = user.nickname)}}">{{ _('Unfollow') }}</a>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
</div>
|
2012-12-16 08:34:46 +00:00
|
|
|
{% for post in posts.items %}
|
2012-12-16 08:31:21 +00:00
|
|
|
{% include 'post.html' %}
|
|
|
|
{% endfor %}
|
2012-12-16 08:40:47 +00:00
|
|
|
<ul class="pager">
|
|
|
|
{% if posts.has_prev %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<li class="previous"><a href="{{ url_for('user', nickname = user.nickname, page = posts.prev_num) }}">{{ _('Newer posts') }}</a></li>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% else %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<li class="previous disabled"><a href="#">{{ _('Newer posts') }}</a></li>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if posts.has_next %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<li class="next"><a href="{{ url_for('user', nickname = user.nickname, page = posts.next_num) }}">{{ _('Older posts') }}</a></li>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% else %}
|
2013-02-01 05:48:20 +00:00
|
|
|
<li class="next disabled"><a href="#">{{ _('Older posts') }}</a></li>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2012-12-31 21:07:54 +00:00
|
|
|
{% endblock %}
|