67 lines
1.9 KiB
HTML
67 lines
1.9 KiB
HTML
{% extends "board/base.html" %}
|
|
{% load i18n post_body static %}
|
|
|
|
{% block title %}
|
|
{% if post.subject %}
|
|
{{post.subject }} -
|
|
{% endif %}
|
|
/{{board.url}}/ - {{board.name}}
|
|
{{block.super}}
|
|
{% endblock title %}
|
|
|
|
{% block content %}
|
|
{# board header #}
|
|
<div class="row">
|
|
<div class="column"> </div>
|
|
<div class="column" style="text-align: center;">
|
|
<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" style="text-align: center;">
|
|
<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> ]
|
|
{# posts / images / poster count / page #}
|
|
<span class="post_stats">[
|
|
<span title="{% translate 'Post replies' %}">{{post.replies.count}}</span>
|
|
/
|
|
<span title="{% translate 'Image replies' %}">{{post.image_replies_count}}</span>
|
|
/
|
|
<span title="{% translate 'Unique posters in this thread' %}">{{post.unique_posters}}</span>
|
|
]
|
|
</span>
|
|
<hr />
|
|
{# posts #}
|
|
<div class="row thread">
|
|
{% 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 %} |