diff options
Diffstat (limited to 'apioforum/templates/common.html')
-rw-r--r-- | apioforum/templates/common.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html new file mode 100644 index 0000000..a547f73 --- /dev/null +++ b/apioforum/templates/common.html @@ -0,0 +1,24 @@ +{% macro disp_post(post, thread_id, buttons=False) %} +<div class="post"> + <div class="post-heading"> + <span class="post-heading-a"> + {{post.author}} @{{post.created}} #{{post.id}} + </span> + {% if buttons and post.author == g.user %} + <span class="post-heading-b"> + <a class="actionbutton" + href="{{url_for('thread.edit_post',post_id=post.id,thread_id=thread_id)}}"> + edit + </a> + <a class="actionbutton" + href="{{url_for('thread.delete_post',post_id=post.id,thread_id=thread_id)}}"> + delete + </a> + </span> + {% endif %} + </div> + <div class="post-content"> + {{ caller() }} + </div> +</div> +{% endmacro %} |