add posts route
This commit is contained in:
@ -123,7 +123,7 @@
|
||||
{% set show_edit = (active_user.id | string) == (post['user_id'] | string) and (not post['thread_is_locked'] or active_user.is_mod()) and not no_reply %}
|
||||
{% endif %}
|
||||
{% if show_edit %}
|
||||
<a class="linkbutton" href="#TODO">Edit</a>
|
||||
<a class="linkbutton" href="{{ url_for('posts.edit', post_id=post.id, _anchor='babycode-content') }}">Edit</a>
|
||||
{% endif %}
|
||||
|
||||
{% set show_reply = true %}
|
||||
|
18
app/templates/posts/edit.html
Normal file
18
app/templates/posts/edit.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% from 'common/macros.html' import full_post %}
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}editing a post{% endblock %}
|
||||
{% block content %}
|
||||
{% for post in prev_context | reverse %}
|
||||
{{ full_post(post=post, no_reply=true, active_user=active_user) }}
|
||||
{% endfor %}
|
||||
<span class="context-explain">
|
||||
<span>↑↑↑</span><i>Context</i><span>↑↑↑</span>
|
||||
</span>
|
||||
{{ full_post(post=editing_post, editing=true, no_reply=true, active_user=active_user) }}
|
||||
<span class="context-explain">
|
||||
<span>↓↓↓</span><i>Context</i><span>↓↓↓</span>
|
||||
</span>
|
||||
{% for post in next_context %}
|
||||
{{ full_post(post=post, no_reply=true, active_user=active_user) }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user