2023-12-11 19:25:25 +00:00
|
|
|
{% macro recursive_post_tree(mode, namespace, tree) %}
|
2023-12-09 00:06:02 +00:00
|
|
|
{% import _self as self %}
|
|
|
|
{% if tree | length %}
|
|
|
|
<ul>
|
|
|
|
{% for post in tree %}
|
|
|
|
<li>
|
|
|
|
<div>
|
|
|
|
<a name="{{ post.id }}"></a>
|
2024-02-19 18:30:41 +00:00
|
|
|
<strong>
|
2024-02-20 19:09:05 +00:00
|
|
|
{{ post.user }}
|
2024-02-19 18:30:41 +00:00
|
|
|
</strong>
|
2023-12-09 00:06:02 +00:00
|
|
|
•
|
|
|
|
{% if post.pending %}
|
2024-02-15 21:15:00 +00:00
|
|
|
{{ post.time | format_ago }}
|
|
|
|
{% if post.pool %}
|
|
|
|
•
|
|
|
|
{{ 'pending %s KVA to %s (%s)' | trans | format(post.pool.cost, post.pool.address, post.pool.expires | format_expire ) }}
|
|
|
|
{% endif %}
|
2023-12-09 00:06:02 +00:00
|
|
|
<span title="{{ 'pending in pool' | trans }}">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 16 16">
|
|
|
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"/>
|
|
|
|
</svg>
|
|
|
|
</span>
|
2024-02-15 21:15:00 +00:00
|
|
|
{% else %}
|
|
|
|
<a rel="nofollow" href="{{ path('room_namespace', { mode : mode, namespace : namespace, _fragment : post.id }) }}" title="{{ post.time | date('c') }}">{{ post.time | format_ago }}</a>
|
|
|
|
•
|
|
|
|
<a rel="nofollow" href="{{ path('room_namespace', { mode : mode, namespace : namespace, txid : post.id, _fragment : post.id }) }}">{{ 'reply' | trans }}</a>
|
2023-12-09 00:06:02 +00:00
|
|
|
{% endif %}
|
|
|
|
{# apply markdown whitelist filters only to prevent ping from remote includes #}
|
|
|
|
{{
|
2024-02-13 21:36:02 +00:00
|
|
|
post.message | message_to_markdown
|
2023-12-09 00:06:02 +00:00
|
|
|
| trim
|
|
|
|
| nl2br
|
|
|
|
| markdown_to_html
|
|
|
|
}}
|
|
|
|
</div>
|
2024-02-13 21:34:17 +00:00
|
|
|
{% if post.tree is defined and post.tree | length %}
|
2023-12-11 19:25:25 +00:00
|
|
|
{{ self.recursive_post_tree(mode, namespace, post.tree) }}
|
2023-12-09 00:06:02 +00:00
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|
|
|
|
{% from _self import recursive_post_tree %}
|
2023-12-05 02:15:41 +00:00
|
|
|
{% extends 'default/layout.html.twig' %}
|
2023-12-19 06:56:59 +00:00
|
|
|
{% block head_title_content %}{{ request.get('namespace') | keva_namespace_value }} - {{ app.name }}{% endblock %}
|
2023-12-05 02:15:41 +00:00
|
|
|
{% block main_content %}
|
2023-12-09 00:06:02 +00:00
|
|
|
{% if tree %}
|
2023-12-11 19:25:25 +00:00
|
|
|
{{ recursive_post_tree(request.get('mode'), request.get('namespace'), tree) }}
|
2023-12-10 09:08:27 +00:00
|
|
|
<a name="latest"></a>
|
2023-12-06 01:58:39 +00:00
|
|
|
{% else %}
|
|
|
|
<ul>
|
|
|
|
<li>
|
2023-12-09 00:06:02 +00:00
|
|
|
<div>
|
|
|
|
{{ 'room does not contain kevachat messages' | trans }}
|
|
|
|
</div>
|
2023-12-06 01:58:39 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
2023-12-05 03:48:25 +00:00
|
|
|
{% endif %}
|
2023-12-05 02:15:41 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block footer_content %}
|
|
|
|
{{
|
|
|
|
render(
|
|
|
|
controller(
|
|
|
|
'App\\Controller\\ModuleController::post',
|
|
|
|
{
|
|
|
|
request: request
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
{% endblock %}
|