123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- {% set page_title = forum.title %}
- {% set active_forum_nav=True %}
- {% extends theme("layout.html") %}
- {% block content %}
- {% from theme('macros.html') import render_pagination, topic_pages %}
- <ol class="breadcrumb">
- <li><a href="{{ url_for('forum.index') }}">Forum</a></li>
- <li><a href="{{ forum.category.url }}">{{ forum.category.title }}</a></li>
- <li class="active">{{ forum.title }}</li>
- </ol>
- <div class="pull-left" style="padding-bottom: 10px">
- {{ render_pagination(topics, forum.url) }}
- </div> <!-- end span pagination -->
- {% if current_user|post_topic(forum) %}
- <div class="pull-right" style="padding-bottom: 10px">
- <div class="btn-group">
- <a href="{{ url_for('forum.markread', forum_id=forum.id, slug=forum.slug) }}" class="btn btn-default">
- <span class="fa fa-check"></span> Mark as Read
- </a>
- {% if forum.locked %}
- <span class="btn btn-primary">
- <span class="fa fa-lock"></span> Locked
- </span>
- {% else %}
- <a href="{{ url_for('forum.new_topic', forum_id=forum.id, slug=forum.slug) }}" class="btn btn-primary">
- <span class="fa fa-pencil"></span> New Topic
- </a>
- {% endif %}
- </div>
- </div>
- {% endif %}
- <table class="table table-bordered">
- <thead>
- <tr>
- <th colspan="5">
- {{ forum.title }}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td colspan="2">Topic</td>
- <td>Posts</td>
- <td>Views</td>
- <td>Last Post</td>
- </tr>
- {% for topic, topicread in topics.items %}
- <tr>
- <td width="4%" style="vertical-align: middle; text-align: center;">
- {% if topic.locked %}
- <span class="fa fa-lock" style="font-size: 2em"></span>
- {% else %}
- {% if topic|topic_is_unread(topicread, current_user, forumsread) %}
- <span class="fa fa-comment" style="font-size: 2em"></span>
- {% else %}
- <span class="fa fa-comment-o" style="font-size: 2em"></span>
- {% endif %}
- {% endif %}
- </td>
- <td>
- <div>
- <a href="{{ topic.url }}">{{ topic.title }}</a>
- <!-- Topic Pagination -->
- {{ topic_pages(topic, flaskbb_config["POSTS_PER_PAGE"]) }}
- <br />
- {% if topic.user_id %}
- <small>by <a href="{{ topic.user.url }}">{{ topic.user.username }}</a></small>
- {% else %}
- <small>by {{ topic.username }}</small>
- {% endif %}
- </div>
- </td>
- <td>
- {{ topic.post_count }}
- </td>
- <td>
- {{ topic.views }}
- </td>
- <td>
- <a href="{{ topic.last_post.url }}">{{ topic.last_post.date_created|time_since }}</a><br />
- {% if topic.last_post.user_id %}
- <small>by <a href="{{ topic.last_post.user.url }}">{{ topic.last_post.user.username }}</a></small>
- {% else %}
- <small>{{ topic.last_post.username }}</small>
- {% endif %}
- </td>
- </tr>
- {% else %}
- <tr>
- <td colspan="5">
- No Topics so far.
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endblock %}
|