summaryrefslogtreecommitdiffhomepage
path: root/apioforum/templates/view_forum.html
blob: 59c594b3399a120f7b54fe37e3076549a0be9deb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% extends 'base.html' %}
{% from 'common.html' import ts, tag, disp_user %}
{% block header %}<h1>{% block title %}apioforum{%endblock%}</h1>{%endblock%}
{%block nmcontent%}
<main class="widemain">
<p>welcome to the apioforum</p>
<p>forum rules: do not be a bad person. do not do bad things.</p>
{% if g.user %}
<p><a class="actionbutton" href="{{url_for('forum.create_thread')}}">create new thread</a></p>
{% else %}
<p>please log in to create a new thread</p>
{% endif %}
<div class="threadlistings">
<div class="threadlisting">
    <div class="threadlisting-part threadlisting-part-title threadlisting-header">
        name<span class="only-small"> &amp; tags</span>
    </div>
    <div class="threadlisting-part threadlisting-part-tags threadlisting-header only-big">
        tags
    </div>
    <div class="threadlisting-part threadlisting-part-creator threadlisting-header">
        creator
    </div>
    <div class="threadlisting-part threadlisting-part-created threadlisting-header">
        created
    </div>
    <div class="threadlisting-part threadlisting-part-updated threadlisting-header">
        last updated
    </div>
    <div class="threadlisting-part threadlisting-part-lastactivityby threadlisting-header">
        last post by
    </div>
    <div class="threadlisting-part threadlisting-part-numreplies threadlisting-header">
        posts
    </div>
</div>
{%for thread in threads%}
<div class="threadlisting">
    <div class="threadlisting-part threadlisting-part-title"><a href="{{url_for('thread.view_thread',thread_id=thread.id)}}">{{thread.title}}</a>
        {% if thread_tags[thread.id]|length > 0 %}
            <span class="only-small">
                {% for the_tag in thread_tags[thread.id] %}
                    {{tag(the_tag)}}
                {% endfor %}
            </span>
        {%endif%}
    </div>
    <div class="threadlisting-part threadlisting-part-tags only-big">
        {% for the_tag in thread_tags[thread.id] %}
            {{tag(the_tag)}}
        {% endfor %}
    </div>
    <div class="threadlisting-part threadlisting-part-creator">{{disp_user(thread.creator)}}</div>
    <div class="threadlisting-part threadlisting-part-created">{{ts(thread.created)}}</div>
    <div class="threadlisting-part threadlisting-part-updated">{{ts(thread.updated)}}</div>
    <div class="threadlisting-part threadlisting-part-lastactivityby">{{disp_user(thread.last_user)}}</div>
    <div class="threadlisting-part threadlisting-part-numreplies">{{thread.num_replies}}</div>
</div>
{%endfor%}
</div>
</main>
{%endblock%}