123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- {% set page_title = forum[0].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="{{ url_for('forum.view_category', category_id=forum[0].category.id) }}">{{ forum[0].category.title }}</a></li>
- <li class="active">{{ forum[0].title }}</li>
- </ol>
- <div class="pull-left" style="padding-bottom: 10px">
- {{ render_pagination(topics, url_for('forum.view_forum', forum_id=forum[0].id)) }}
- </div> <!-- end span pagination -->
- {% if current_user|post_topic(forum[0]) %}
- <div class="pull-right" style="padding-bottom: 10px">
- <div class="btn-group">
- <a href="{{ url_for('forum.markread', forum_id=forum[0].id) }}" class="btn btn-default">
- <span class="fa fa-check"></span> Mark as Read
- </a>
- {% if forum[0].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[0].id) }}" 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[0].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%">
- {% if topic.locked %}
- <span class="fa fa-locked" style="font-size: 2em"></span>
- {% else %}
- {% if topic|topic_is_unread(topicread, current_user, forum[1]) %}
- <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="{{ url_for('forum.view_topic', topic_id=topic.id) }}">{{ topic.title }}</a>
- <!-- Topic Pagination -->
- {{ topic_pages(topic, config["POSTS_PER_PAGE"]) }}
- <br />
- {% if topic.user_id %}
- <small>by <a href="{{ url_for('user.profile', username=topic.user.username) }}">{{ 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="{{ url_for('forum.view_post', post_id=topic.last_post.id) }}">{{ topic.last_post.date_created|time_since }}</a><br />
- {% if topic.last_post.user_id %}
- <small>by <a href="{{ url_for('user.profile', username=topic.last_post.user.username) }}">{{ 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 %}
|