Improve the replies/thread display
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
<div id="container">
|
||||
{% include "header.html" %}
|
||||
<div id="new">
|
||||
{% if thread %}
|
||||
<h3 style="padding-bottom: 30px">Replying to {{ content }}</h3>
|
||||
{{ utils.display_thread(thread) }}
|
||||
{% else %}
|
||||
<h3 style="padding-bottom:20px;">New note</h3>
|
||||
{% endif %}
|
||||
<form action="/api/new_note" method="POST">
|
||||
<input type="hidden" name="redirect" value="/">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
|
@@ -16,9 +16,7 @@
|
||||
{% block content %}
|
||||
<div id="container">
|
||||
{% include "header.html" %}
|
||||
{{ utils.display_note(note, perma=True) }}
|
||||
{% for reply in replies %}
|
||||
{{ utils.display_note(reply, perma=False) }}
|
||||
{% endfor %}
|
||||
{{ thread }}
|
||||
{{ utils.display_thread(thread) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -67,7 +67,7 @@
|
||||
{% if item.meta.count_boost %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_boost }} boosts</a>{% endif %}
|
||||
{% if item.meta.count_like %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_like }} likes</a>{% endif %}
|
||||
|
||||
{% if ui %}
|
||||
{% if ui and session.logged_in %}
|
||||
|
||||
{% set aid = item.activity.object.id | quote_plus %}
|
||||
<a class="bar-item" href="/new?reply={{ aid }}">reply</a>
|
||||
@@ -112,3 +112,13 @@
|
||||
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro display_thread(thread) -%}
|
||||
{% for reply in thread %}
|
||||
{% if reply._requested %}
|
||||
{{ display_note(reply, perma=True, ui=False) }}
|
||||
{% else %}
|
||||
{{ display_note(reply, perma=False, ui=True) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endmacro -%}
|
||||
|
Reference in New Issue
Block a user