12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- {% set page_title = forum.title ~ " - Forum" %}
- {% set active_forum_nav=True %}
- {% extends "layout.html" %}
- {% block content %}
- {% from 'macros.html' import render_pagination %}
- <ol class="breadcrumb">
- <li><a href="{{ url_for('forum.index') }}">Forum</a></li>
- <li><a href="{{ url_for('forum.view_category', category_id=forum.parent_id) }}">{{ forum.parent.title }}</a></li>
- <li class="active">{{ forum.title }}</li>
- </ol>
- <div class="pull-left" style="padding-bottom: 10px">
- {{ render_pagination(topics, url_for('forum.view_forum', forum_id=forum.id)) }}
- </div> <!-- end span pagination -->
- {% if current_user|post_topic(forum) %}
- <div class="pull-right" style="padding-bottom: 10px">
- <a href="{{ url_for('forum.new_topic', forum_id=forum.id) }}" class="btn btn-primary">New Topic</a>
- </div>
- {% endif %}
- <table class="table table-bordered">
- <thead>
- <tr>
- <th colspan="5">
- {{ forum.title }}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td colspan="2">Thread</td>
- <td>Posts</td>
- <td>Views</td>
- <td>Last Post</td>
- </tr>
- {% for topic in topics.items %}
- <tr>
- <td width="4%"></td>
- <td>
- <div>
- <a href="{{ url_for('forum.view_topic', topic_id=topic.id) }}">{{ topic.title }}</a> <br />
- <small>by <a href="{{ url_for('user.profile', username=topic.user.username) }}">{{ topic.user.username }}</a></small>
- </div>
- </td>
- <td>
- {{ topic.post_count }}
- </td>
- <td>
- {{ topic.views }}
- </td>
- <td>
- <a href="{{ url_for('forum.view_post', post_id=topic.last_post.id) }}">{{ topic.last_post.date_created|time_since }}</a><br />
- <small>by <a href="{{ url_for('user.profile', username=topic.last_post.user.username) }}">{{ topic.last_post.user.username }}</a></small>
- </td>
- </tr>
- {% else %}
- <tr>
- <td colspan="5">
- No Topics so far.
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endblock %}
|