2021-04-29 20:51:13 +01:00
|
|
|
{% extends 'stdgrid.html.twig' %}
|
2021-11-07 01:32:06 +00:00
|
|
|
{% import '/cards/note/view.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() }}
|
2021-10-06 00:45:37 +01:00
|
|
|
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/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-01-17 16:32:41 +00:00
|
|
|
<header class="feed-header">
|
2022-01-23 19:46:47 +00:00
|
|
|
{% set current_path = app.request.get('_route') %}
|
2022-01-17 16:32:41 +00:00
|
|
|
{% if page_title is defined %}
|
2022-01-23 19:46:47 +00:00
|
|
|
{% if current_path starts with 'feed_' %}
|
|
|
|
<h1 class="section-title">{{ page_title | trans }}</h1>
|
|
|
|
{% endif %}
|
2022-01-17 16:32:41 +00:00
|
|
|
{% else %}
|
2022-01-27 02:17:41 +00:00
|
|
|
{% if current_path starts with 'search' %}
|
|
|
|
<h3 class="heading-no-margin">{{ 'Notes found' | trans }}</h3>
|
|
|
|
{% else %}
|
|
|
|
<span class="section-title">{{ 'Notes' | trans }}</span>
|
|
|
|
{% endif %}
|
2021-08-09 13:25:08 +01:00
|
|
|
{% endif %}
|
2022-01-17 16:32:41 +00:00
|
|
|
<nav class="feed-actions">
|
|
|
|
<details class="feed-actions-details">
|
|
|
|
<summary>
|
|
|
|
{{ icon('filter', 'icon icon-feed-actions') | raw }} {# button-container #}
|
|
|
|
</summary>
|
2022-01-27 00:54:27 +00:00
|
|
|
<menu class="feed-actions-details-dropdown">
|
|
|
|
{% 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 #}
|
|
|
|
<section class="feed h-feed hfeed notes" tabindex="0" role="feed">
|
|
|
|
{% for conversation in notes %}
|
|
|
|
{% block current_note %}
|
|
|
|
{% if conversation is instanceof('array') %}
|
|
|
|
{{ noteView.macro_note(conversation['note'], conversation['replies']) }}
|
|
|
|
{% else %}
|
|
|
|
{{ noteView.macro_note(conversation) }}
|
|
|
|
{% endif %}
|
|
|
|
<hr tabindex="0" title="{{ 'End of note and replies.' | trans }}">
|
|
|
|
{% 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 %}
|