blob: 25d83e50c8a0c365c92b7c913da457436703686f (
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
{% extends 'base.html' %}
{% from 'common.html' import ts, tag, disp_user, post_url, forum_breadcrumb, vote_meter %}
{% block header %}
<h1>{% block title %}{{forum.name}}{%endblock%}</h1>
{% if forum.id != 1 %}
{{ forum_breadcrumb(forum) }}
{% endif %}
{%endblock%}
{%block content%}
{% if forum.description %}
{{forum.description|md|safe}}
{% endif %}
<p class="avail_tags">available tags:
{% for the_tag in avail_tags %}
{{tag(the_tag)}}
{% else %}
<em>(none available)</em>
{% endfor %}
{% if subforums %}
<h2>subforae</h2>
<div class="forum-list">
{% for subforum in subforums %}
<div class="listing">
<div class="listing-main">
<div class="listing-title">
<a href="{{url_for('forum.view_forum',forum_id=subforum.id)}}">
{{- subforum.name -}}
</a>
</div>
</div>
<div class="listing-caption">
{% if subforum.updated %}
last activity {{ts(subforum.updated)}} ago
{% else %}
no threads
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endif %}
<h2>threads</h2>
{% if g.user %}
<p><a class="actionbutton" href="{{url_for('forum.create_thread',forum_id=forum.id)}}">create new thread</a></p>
{% else %}
<p>please log in to create a new thread</p>
{% endif %}
<div class="thread-list">
{%for thread in threads%}
<div class="listing">
<div class="listing-main">
<div class="listing-title">
<a href="{{url_for('thread.view_thread',thread_id=thread.id)}}">
{{- thread.title -}}
</a>
</div>
<div class="thread-listing-tags">
{% for the_tag in thread_tags[thread.id] %}
{{tag(the_tag)}}
{% endfor %}
</div>
<div class="thread-listing-creation">
<div class="thread-listing-creator">
{{ disp_user(thread.creator) }}
</div>
{{ ts(thread.created) }}
</div>
</div>
{#{% if thread.mrp_id %}#}
<div class="listing-caption">
{{ disp_user(thread.mrp_author) }}
<span class="thread-preview-ts">
{{ ts(thread.mrp_created) }}
</span>
<span class="thread-preview-post">
<a href="{{url_for('thread.view_thread',thread_id=thread.id)}}#post_{{thread.mrp_id}}">
{{ thread.mrp_content[:500]|e }}
</a>
</span>
</div>
{#{% endif %}#}
{% if thread_polls[thread.id] %}
<div class="thread-vote-summary">
{{ vote_meter(thread_polls[thread.id]) }}
</div>
{% endif %}
</div>
{%endfor%}
</div>
</main>
{%endblock%}
|