56 lines
1.4 KiB
HTML
56 lines
1.4 KiB
HTML
{% extends "board/base.html" %}
|
|
{% load i18n post_body static %}
|
|
|
|
{% block title %}
|
|
{% with title=board.url %}
|
|
{{ block.super }}
|
|
{% endwith %}
|
|
{% endblock title %}
|
|
|
|
{% block content %}
|
|
{# board header #}
|
|
<div class="row">
|
|
<div class="column"> </div>
|
|
<div class="column">
|
|
<h1>/{{ board.url }}/ - {{ board.name }}</h1>
|
|
</div>
|
|
<div class="column"> </div>
|
|
</div>
|
|
<hr />
|
|
{# post creation form #}
|
|
<div class="row">
|
|
<div class="column"> </div>
|
|
<div class="column">
|
|
<h2>
|
|
<a id="create_reply" href="{% url 'board:reply_create' url=board.url id=post.id %}">{% translate "Reply to this thread" %}</a>
|
|
</h2>
|
|
</div>
|
|
<div class="column"> </div>
|
|
</div>
|
|
{# return links #}
|
|
[ <a href="{% url 'board:board_detail' board.url %}">{% translate "Return" %}</a> ]
|
|
<hr />
|
|
{# posts #}
|
|
<div class="row post">
|
|
{% include "board/post_snippet.html" %}
|
|
{% for post in post.replies.all %}
|
|
<div class="row reply">
|
|
{% include "board/post_snippet.html" %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<script>
|
|
const REPLY_URL = "{% url 'board:reply_create' url=board.url id=post.id %}";
|
|
|
|
$("#create_reply").on("click", (e) => {
|
|
e.preventDefault();
|
|
openReplyWindow(REPLY_URL);
|
|
});
|
|
$(window).on("quote", (e, postId) => {
|
|
openReplyWindow(REPLY_URL);
|
|
let toAdd = ">>" + postId + "\n";
|
|
replyAppend(toAdd);
|
|
});
|
|
</script>
|
|
{% endblock content %} |