blob: f83503b67c5151ffe003fd1c1b7e17080effde40 (
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
|
{% extends 'base.html' %}
{% from 'common.html' import ts, tag, disp_user, post_url %}
{% block header %}<h1>{% block title %}{{forum.name}}{%endblock%}</h1>{%endblock%}
{%block nmcontent%}
<main class="widemain">
{{forum.description|md|safe}}
{% 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="thread-listing">
<div class="thread-listing-main">
<div class="thread-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 preview_post[thread.id] %}
<div class="thread-preview">
{{ disp_user(preview_post[thread.id].author) }}
<span class="thread-preview-ts">
{{ ts(preview_post[thread.id].created) }}
</span>
<span class="thread-preview-post">
<a href="{{post_url(preview_post[thread.id])}}">
{{ preview_post[thread.id].content[:500]|e }}
</a>
</span>
</div>
{% endif %}
</div>
{%endfor%}
</div>
</main>
{%endblock%}
|