123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- {% 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') }}">{% trans %}Forum{% endtrans %}</a></li>
- <li><a href="{{ forum.category.url }}">{{ forum.category.title }}</a></li>
- <li class="active">{{ forum.title }}</li>
- </ol>
- <div class="pull-left">
- {{ render_pagination(topics, forum.url) }}
- </div> <!-- end span pagination -->
- {% if current_user|post_topic(forum) %}
- <div class="pull-right">
- <form class="inline-form" method="post" action="{{ url_for('forum.markread', forum_id=forum.id, slug=forum.slug) }}">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
- <button class="btn btn-default">
- <span class="fa fa-check"></span> {% trans %}Mark as Read{% endtrans %}
- </button>
- </form>
- {% if forum.locked %}
- <span class="btn btn-primary">
- <span class="fa fa-lock"></span> {% trans %}Locked{% endtrans %}
- </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> {% trans %}New Topic{% endtrans %}
- </a>
- {% endif %}
- </div>
- {% endif %}
- <table class="table table-bordered">
- <thead>
- <tr>
- <th colspan="5">
- {{ forum.title }}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td colspan="2">{% trans %}Topic{% endtrans %}</td>
- <td>{% trans %}Posts{% endtrans %}</td>
- <td>{% trans %}Views{% endtrans %}</td>
- <td>{% trans %}Last Post{% endtrans %}</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>
- {% elif topic.important %}
- {% if topic|topic_is_unread(topicread, current_user, forumsread) %}
- <span class="fa fa-star" style="font-size: 2em"></span>
- {% else %}
- <span class="fa fa-star-o" style="font-size: 2em"></span>
- {% endif %}
- {% 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 />
- <small>
- {% trans %}by{% endtrans %}
- {% if topic.user_id %}
- <a href="{{ topic.user.url }}">{{ topic.user.username }}</a>
- {% else %}
- {{ topic.username }}
- {% endif %}
- </small>
- </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 />
- <small>
- {% trans %}by{% endtrans %}
- {% if topic.last_post.user_id %}
- <a href="{{ topic.last_post.user.url }}">{{ topic.last_post.user.username }}</a>
- {% else %}
- {{ topic.last_post.username }}
- {% endif %}
- </small>
- </td>
- </tr>
- {% else %}
- <tr>
- <td colspan="5">
- {% trans %}No Topics.{% endtrans %}
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endblock %}
|