blob: 33aee0b856f6319d5e67ad7b4c5fc883aebcfa6d (
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
|
{% macro disp_post(post, buttons=False) %}
<div class="post" id="post_{{post.id}}">
<div class="post-heading">
<span class="post-heading-a">
<span class="post-heading-em">{{post.author}}</span> {{ts(post.created)}}
{% if post.edited %}
(edited {{ts(post.updated)}})
{% endif %}
</span>
<span class="post-heading-b">
{% if buttons and post.author == g.user %}
<a class="actionbutton"
href="{{url_for('thread.edit_post',post_id=post.id)}}">edit</a>
<a class="actionbutton"
href="{{url_for('thread.delete_post',post_id=post.id)}}">delete</a>
{% endif %}
<a class="post-anchor-link" href="{{url_for('thread.view_thread', thread_id=post.thread)}}#post_{{post.id}}">#{{post.id}}</a>
</span>
</div>
<div class="post-content">
{{ caller() }}
</div>
</div>
{% endmacro %}
{% macro ts(dt) -%}
<time title="{{dt.isoformat(' ')}}" datetime="{{dt.isoformat(' ')}}">{{dt | fuzzy}}</time>
{%- endmacro %}
|