{% extends 'base.html' %} {% from 'common.html' import ts, tag, disp_user, post_url, forum_breadcrumb, ab, vote_meter, pagination_nav %} {% block header %}

{% block title %}{{forum.name}}{% endblock %} #{{forum.id}}

{% if forum.id != 1 %} {{ forum_breadcrumb(forum) }} {% endif %} {%endblock%} {%block content%} {{forum.description|md|safe}}
{% if bureaucrats|length > 0 %}

bureaucrats in this forum: {% for b in bureaucrats %} {{disp_user(b)}} {% endfor %}

{% endif %} {% set role = get_user_role(forum.id, g.user) %} {% if role != "other" %}

your role in this forum: {{role}}

{% endif %}

available tags: {% for the_tag in avail_tags %} {{tag(the_tag)}} {% else %} (none available) {% endfor %}

{% if is_bureaucrat(forum.id, g.user) %} {{ab("forum settings",url_for('forum.edit_forum',forum_id=forum.id))}} {{ab("role/permission settings",url_for('forum.edit_roles',forum_id=forum.id))}} {{ab("assign roles",url_for('forum.view_user_role',forum_id=forum.id))}} {% endif %} {% if has_permission(forum.id, g.user, "p_create_subforum") %} {{ab("create subforum",url_for('forum.create_forum',forum_id=forum.id))}} {% endif %} {% if not is_bureaucrat(forum.id, g.user) and has_permission(forum.id, g.user, "p_approve") %} {{ab("approve users",url_for('forum.view_user_role',forum_id=forum.id))}} {% endif %}

{% if subforums %}

subforæ

{% for subforum in subforums %}
{% if subforum.updated %} last activity {{ts(subforum.updated)}} ago {% else %} no threads {% endif %}
{% endfor %}
{% endif %}

threads

{% if has_permission(forum.id, g.user, "p_create_threads") %} create new thread {% elif has_permission(forum.id, g.user, "p_create_threads", login_required=False) %} please log in to create a new thread {% else %} you do not have permission to create threads in this forum {% endif %} {% if has_permission(forum.id, g.user, "p_view_threads", login_required=False) %}

{%for thread in threads%}
{% for the_tag in thread_tags[thread.id] %} {{tag(the_tag)}} {% endfor %}
{{ disp_user(thread.creator) }}
{{ ts(thread.created) }}
{% if not thread.mrp_deleted %}
{{ disp_user(thread.mrp_author) }} {{ ts(thread.mrp_created) }} {{ thread.mrp_content[:500]|e }}
{% else %} {% endif %} {% if thread_polls[thread.id] %}
{{ vote_meter(thread_polls[thread.id]) }}
{% endif %}
{%endfor%}
{{ pagination_nav(page,max_pageno,'forum.view_forum',forum_id=forum.id) }} {% else %}

you do not have permission to view threads in this forum

{% endif %} {%endblock%}