2021-04-29 20:51:13 +01:00
|
|
|
{% extends 'stdgrid.html.twig' %}
|
2022-02-06 21:37:04 +00:00
|
|
|
{% import '/cards/macros/note.html.twig' as noteView %}
|
2020-03-12 17:59:13 +00:00
|
|
|
|
2021-09-22 16:46:58 +01:00
|
|
|
{% block title %}{% if page_title is defined %}{{ page_title | trans }}{% endif %}{% endblock %}
|
2020-07-26 16:05:07 +01:00
|
|
|
|
2021-10-05 22:44:22 +01:00
|
|
|
{% block stylesheets %}
|
|
|
|
{{ parent() }}
|
2022-02-08 14:12:59 +00:00
|
|
|
<link rel="stylesheet" href="{{ asset('assets/default_theme/pages/feeds.css') }}" type="text/css">
|
2021-10-05 22:44:22 +01:00
|
|
|
{% endblock stylesheets %}
|
|
|
|
|
2020-07-26 16:05:07 +01:00
|
|
|
{% block body %}
|
2022-01-16 15:11:34 +00:00
|
|
|
{% for block in handle_event('BeforeFeed', app.request) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
|
2022-01-17 02:51:20 +00:00
|
|
|
{% if notes is defined %}
|
2022-02-16 03:01:25 +00:00
|
|
|
<header class="feed-header">
|
2022-01-23 19:46:47 +00:00
|
|
|
{% set current_path = app.request.get('_route') %}
|
2022-02-16 03:01:25 +00:00
|
|
|
{% if notes_feed_title is defined %}
|
|
|
|
{{ notes_feed_title.getHtml() }}
|
2021-08-09 13:25:08 +01:00
|
|
|
{% endif %}
|
2022-02-09 18:49:34 +00:00
|
|
|
<nav class="feed-actions" title="{{ 'Actions that change how the feed behaves' | trans }}">
|
|
|
|
<details class="feed-actions-details" role="group">
|
2022-01-17 16:32:41 +00:00
|
|
|
<summary>
|
|
|
|
{{ icon('filter', 'icon icon-feed-actions') | raw }} {# button-container #}
|
|
|
|
</summary>
|
2022-02-09 18:49:34 +00:00
|
|
|
<menu class="feed-actions-details-dropdown" role="toolbar">
|
2022-01-27 00:54:27 +00:00
|
|
|
{% for block in handle_event('AddFeedActions', app.request, notes is defined and notes is not empty) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
</menu>
|
2022-01-17 16:32:41 +00:00
|
|
|
</details>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{% if notes is not empty %}
|
2022-01-19 23:54:45 +00:00
|
|
|
{# Backwards compatibility with hAtom 0.1 #}
|
2022-02-09 18:49:34 +00:00
|
|
|
<section class="feed h-feed hfeed notes" role="feed" aria-busy="false" title="{{ 'Feed content' | trans }}">
|
2022-01-19 23:54:45 +00:00
|
|
|
{% for conversation in notes %}
|
|
|
|
{% block current_note %}
|
|
|
|
{% if conversation is instanceof('array') %}
|
2022-02-09 18:49:34 +00:00
|
|
|
{{ noteView.note_vanilla(conversation['note'], conversation['replies'], {'depth': 0}) }}
|
2022-01-19 23:54:45 +00:00
|
|
|
{% else %}
|
2022-02-06 21:37:04 +00:00
|
|
|
{{ noteView.note_vanilla(conversation) }}
|
2022-01-19 23:54:45 +00:00
|
|
|
{% endif %}
|
2022-02-09 18:49:34 +00:00
|
|
|
<hr class="hr-replies-end" role="separator" aria-label="{{ 'Marks the end of previous conversation\'s initial note' | trans }}">
|
2022-01-19 23:54:45 +00:00
|
|
|
{% endblock current_note %}
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
2022-01-22 19:16:35 +00:00
|
|
|
{% else %}
|
|
|
|
<section class="feed h-feed hfeed notes" tabindex="0" role="feed">
|
|
|
|
<span>{% trans %}No notes here...{% endtrans %}</span>
|
|
|
|
</section>
|
2022-01-17 16:32:41 +00:00
|
|
|
{% endif %}
|
2022-01-17 02:51:20 +00:00
|
|
|
{% endif %}
|
2021-11-26 13:05:23 +00:00
|
|
|
{% endblock body %}
|