2021-10-27 20:39:34 +01:00
|
|
|
{% block note_actions %}
|
|
|
|
{% if app.user or note_actions_hide is defined %}
|
|
|
|
<div class="note-actions">
|
|
|
|
{% for current_action in get_note_actions(note) %}
|
2021-12-02 15:05:23 +00:00
|
|
|
<a title="{{ current_action["title"] | trans }}" class="{{ current_action["classes"] }}" href="{{ current_action["url"] }}"></a>
|
2021-10-27 20:39:34 +01:00
|
|
|
{% endfor %}
|
2021-12-04 11:59:45 +00:00
|
|
|
<details>
|
|
|
|
<summary>
|
|
|
|
{{ icon('kebab', 'icon icon-extra-note-actions') | raw }} {# button-container #}
|
|
|
|
</summary>
|
|
|
|
<ul>
|
|
|
|
{% for current_action in get_extra_note_actions(note) %}
|
|
|
|
<li>
|
|
|
|
<a class="{{ current_action["classes"] }}" href="{{ current_action["url"] }}">{{ current_action['title'] }}</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</details>
|
2021-10-27 20:39:34 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock note_actions %}
|
2021-09-16 16:27:28 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% block note_replies %}
|
|
|
|
{% if replies is defined and replies is not empty %}
|
|
|
|
<div class="u-in-reply-to replies" tabindex="0" title="{{ 'Begin replies to ' | trans }} {{ nickname }}'s note!">
|
|
|
|
{% for conversation in replies %}
|
|
|
|
{{ _self.macro_note(conversation['note'], conversation['replies']) }}
|
|
|
|
<hr tabindex="0" title="{{ 'End of reply' | trans }}">
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock note_replies %}
|
2021-09-16 23:53:38 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% block note_attachments %}
|
|
|
|
{% if hide_attachments is not defined %}
|
|
|
|
{% if note.getAttachments() is not empty %}
|
|
|
|
<section class="note-attachments" tabindex="0" title="{{ 'Note attachments.' | trans }}">
|
|
|
|
{% for attachment in note.getAttachments() %}
|
|
|
|
{% include '/cards/attachments/view.html.twig' with {'attachment': attachment, 'note': note} only%}
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endblock note_attachments %}
|
2021-09-17 01:36:07 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% block note_links %}
|
|
|
|
{% if note.getLinks() is not empty %}
|
|
|
|
<div class="note-links" title="{{ 'Shared links.' | trans }}">
|
|
|
|
{% for link in note.getLinks() %}
|
|
|
|
{% for block in handle_event('ViewLink', {'link': link, 'note': note}) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
2021-08-14 15:04:51 +01:00
|
|
|
</div>
|
2021-10-27 20:39:34 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endblock note_links %}
|
2021-09-16 23:53:38 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% block note_text %}
|
|
|
|
<div class="note-text" tabindex="0" title="{{ 'Note text content.' | trans }}">
|
|
|
|
{{ note.getRendered() | raw }}
|
|
|
|
</div>
|
|
|
|
{% endblock note_text %}
|
2021-08-11 02:49:23 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% block note_author %}
|
|
|
|
{# Microformat's h-card properties indicates a face icon is a "u-logo" #}
|
|
|
|
<a href="{{ actor_url }}" class="note-author u-url">
|
|
|
|
<strong class="note-author-fullname">
|
2021-10-29 22:05:10 +01:00
|
|
|
{% if fullname is not null %}
|
2021-10-27 20:39:34 +01:00
|
|
|
{{ fullname }}
|
|
|
|
{% else %}
|
|
|
|
{{ nickname }}
|
2021-09-17 01:08:24 +01:00
|
|
|
{% endif %}
|
2021-10-27 20:39:34 +01:00
|
|
|
</strong>
|
|
|
|
<em class="note-author-nickname">{{ nickname }}</em>
|
|
|
|
</a>
|
|
|
|
{% endblock note_author %}
|
2021-09-17 01:08:24 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% block note_sidebar %}
|
|
|
|
<aside class="note-sidebar">
|
|
|
|
<img class="u-logo avatar" src="{{ note.getActorAvatarUrl() }}" alt="{{ nickname }}'s avatar" width="32px" height="32px">
|
|
|
|
</aside>
|
|
|
|
{% endblock note_sidebar %}
|
2021-09-17 01:08:24 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% macro macro_note(note, replies) %}
|
|
|
|
{% set nickname = note.getActorNickname() %}
|
|
|
|
{% set fullname = note.getActorFullname() %}
|
2021-11-07 01:32:06 +00:00
|
|
|
{% set actor = note.getActor() %}
|
|
|
|
{% set actor_url = actor.getUrl() %}
|
2021-12-02 15:05:23 +00:00
|
|
|
{% set note_language = note.getNoteLanguageShortDisplay() %}
|
2021-10-27 20:39:34 +01:00
|
|
|
|
2021-12-02 15:05:23 +00:00
|
|
|
<article class="h-entry hentry note" lang={{ note.getLanguageLocale() }}>
|
2021-10-27 20:39:34 +01:00
|
|
|
{{ block('note_sidebar') }}
|
|
|
|
<div class="note-wrapper">
|
|
|
|
<div tabindex="0" title="{{ 'Begin a note by the user: ' | trans }} {{ nickname }}." class="note-info">
|
|
|
|
{{ block('note_author') }}
|
|
|
|
{{ block('note_actions') }}
|
2021-09-17 01:08:24 +01:00
|
|
|
</div>
|
2021-11-07 01:32:06 +00:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
<section tabindex="0" role="dialog" class="e-content entry-content note-content">
|
|
|
|
{{ block('note_text') }}
|
|
|
|
{{ block('note_attachments') }}
|
|
|
|
{{ block('note_links') }}
|
|
|
|
</section>
|
2021-11-07 01:32:06 +00:00
|
|
|
|
2021-11-10 15:44:28 +00:00
|
|
|
{% for block in handle_event('AppendCardNote', {'note': note, 'actor': note.getActor() }) %}
|
2021-12-02 15:05:23 +00:00
|
|
|
<aside title="{{ 'Note\'s complementary information' | trans }}" class="note-complementary">
|
2021-11-07 01:32:06 +00:00
|
|
|
{{ block | raw }}
|
|
|
|
</aside>
|
|
|
|
{% endfor %}
|
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{{ block('note_replies') }}
|
2021-12-02 15:05:23 +00:00
|
|
|
|
|
|
|
{% if note_language is defined and note_language is not empty %}
|
|
|
|
<div title="{{ 'Note\'s language' | trans }}" class="h-entry-language">{{ note_language }}</div>
|
|
|
|
{% endif %}
|
2021-10-27 20:39:34 +01:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{% endmacro macro_note %}
|
2021-09-17 01:08:24 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
{% macro macro_note_minimal(note) %}
|
|
|
|
{% set nickname = note.getActorNickname() %}
|
|
|
|
{% set fullname = note.getActorFullname() %}
|
|
|
|
{% set actor_url = note.getActor().getUrl() %}
|
2021-09-16 23:53:38 +01:00
|
|
|
|
2021-10-27 20:39:34 +01:00
|
|
|
<article class="h-entry hentry note">
|
|
|
|
{{ block('note_sidebar') }}
|
|
|
|
<div class="note-wrapper">
|
|
|
|
<div tabindex="0" title="{{ 'Begin a note by the user: ' | trans }} {{ nickname }}." class="note-info">
|
|
|
|
{{ block('note_author') }}
|
|
|
|
</div>
|
|
|
|
<section tabindex="0" role="dialog" class="e-content entry-content note-content">
|
|
|
|
{{ block('note_text') }}
|
|
|
|
{{ block('note_attachments') }}
|
|
|
|
{{ block('note_links') }}
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</article>
|
2021-11-26 11:59:11 +00:00
|
|
|
{% endmacro macro_note_minimal %}
|