{% extends theme('layout.html') %}
{% from theme('macros.html') import render_pagination %}

{% block content %}
<ul class="breadcrumb">
    <li><a href="{{ url_for('forum.index') }}">Forum</a></li>
    <li ><a href="{{ user.url }}">{{ user.username }}</a></li>
    <li class="active">All Posts</li>
</ul>

<div class="pull-left" style="padding-bottom: 10px">
    {{ render_pagination(posts, url_for('user.view_all_posts', username=user.username)) }}
</div> <!-- end span pagination -->
<table class="table table-bordered">
    <tbody>
    {% for post in posts.items %}
        <tr>
            <td>
                <strong><a href="{{ post.topic.url }}">{{ post.topic.title }}</a></strong>
                in <a href="{{ post.topic.forum.url }}">{{ post.topic.forum.title }}</a>
                <span class="divider"> - </span>
                <small>{{ post.date_created|time_since }}</small>
            </td>
        </tr>
        <tr>
            <td>
                {{ post.content }}
            </td>
        </tr>
    {% endfor %}

    </tbody>
</table>
{% endblock %}
