webapp/templates/default/room/index.html.twig

62 lines
2.2 KiB
Twig
Raw Normal View History

2023-12-05 02:15:41 +00:00
{% extends 'default/layout.html.twig' %}
2023-12-05 20:13:39 +00:00
{% block head_title_content %}{{ name }} - {{ 'KevaChat' | trans }}{% endblock %}
2023-12-05 02:15:41 +00:00
{% block main_content %}
{{
render(
controller(
'App\\Controller\\ModuleController::room',
{
request: request
}
)
)
}}
2023-12-05 15:14:07 +00:00
{% if feed %}
2023-12-05 03:48:25 +00:00
<ul>
2023-12-05 15:14:07 +00:00
{% for post in feed %}
2023-12-05 03:48:25 +00:00
<li>
<a name="{{ post.id }}"></a>
2023-12-05 16:28:36 +00:00
{% if post.icon %}
<img src="{{ post.icon }}" alt="icon" />
{% else %}
<strong>
2023-12-06 01:19:28 +00:00
@{{ 'guest' | trans }}
2023-12-05 16:28:36 +00:00
</strong>
{% endif %}
2023-12-05 21:19:22 +00:00
&bull;
<a href="{{ path('room_namespace', { namespace : request.get('namespace') }) }}#{{ post.id }}" title="{{ post.time }}">{{ post.timestamp | format_ago }}</a>
2023-12-05 21:19:22 +00:00
&bull;
2023-12-06 01:25:30 +00:00
<a href="{{ path('room_namespace', { namespace : request.get('namespace'), txid : post.id }) }}#{{ post.id }}">{{ 'reply' | trans }}</a>
2023-12-06 00:32:39 +00:00
{% if post.pending %}
2023-12-06 01:29:01 +00:00
<span title="{{ 'pending for DHT' | trans }}">
2023-12-06 00:32:39 +00:00
<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>
{% endif %}
2023-12-05 15:14:07 +00:00
<p>
{{ post.message }}
2023-12-05 15:14:07 +00:00
</p>
2023-12-05 03:48:25 +00:00
</li>
{% endfor %}
</ul>
2023-12-06 01:58:39 +00:00
{% else %}
<ul>
<li>
2023-12-06 02:04:10 +00:00
{{ 'room does not contain kevachat messages' | trans }}
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 %}