thread: use the thread widget for top comments
This allows the top comment to be permalinked and edited as any comment, following the intent of pinning normal comments to the top.
This commit is contained in:
parent
c7846c4f8b
commit
36ccb16536
|
@ -11,14 +11,11 @@
|
|||
{% block content %}
|
||||
<section>
|
||||
<h1>{{ t.title }}</h1>
|
||||
<table class="thread"><tr>
|
||||
<td class="author">{{ widget_user.profile(t.author ) }}</td>
|
||||
<td>{{ t.thread.top_comment.text|md }}</td>
|
||||
</tr></table>
|
||||
{{ widget_thread.thread([t.thread.top_comment], None) }}
|
||||
|
||||
{{ widget_pagination.paginate(comments, 'forum_topic', t, {'f': t.forum}) }}
|
||||
|
||||
{{ widget_thread.thread(comments, t.thread.top_comment) }}
|
||||
{{ widget_thread.thread(comments.items, t.thread.top_comment) }}
|
||||
|
||||
{{ widget_pagination.paginate(comments, 'forum_topic', t, {'f': t.forum}) }}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{% import "widgets/user.html" as widget_user %}
|
||||
{% import "widgets/attachments.html" as widget_attachments %}
|
||||
|
||||
{% macro thread(comments, top_comment, anchor) %}
|
||||
<table class="thread">
|
||||
{% for c in comments.items %}
|
||||
{% macro thread(comments, top_comment) %}
|
||||
<table class="thread {{ 'topcomment' if top_comment == None else ''}} ">
|
||||
{% for c in comments %}
|
||||
<tr id="{{ c.id }}">
|
||||
{% if c != top_comment %}
|
||||
<td class="author">{{ widget_user.profile(c.author) }}</td>
|
||||
|
|
Loading…
Reference in New Issue