2021-10-24 15:12:18 +01:00
|
|
|
{% set nickname = note.getActorNickname() %}
|
|
|
|
{% if note_actions_show is not defined %} {% set note_actions_show = true %} {% endif %}
|
2021-08-11 02:49:23 +01:00
|
|
|
|
2021-10-24 15:12:18 +01:00
|
|
|
<article class="h-entry hentry note">
|
2021-09-17 01:08:24 +01:00
|
|
|
<aside class="note-sidebar">
|
2021-09-18 04:54:35 +01:00
|
|
|
<img class="u-logo avatar" src="{{ note.getActorAvatarUrl() }}" alt="{{ nickname }}'s avatar" width="32px" height="32px">
|
2021-09-17 01:08:24 +01:00
|
|
|
</aside>
|
2021-09-16 16:27:28 +01:00
|
|
|
|
2021-09-17 01:08:24 +01:00
|
|
|
<div class="note-wrapper">
|
2021-09-16 23:53:38 +01:00
|
|
|
|
2021-09-17 01:08:24 +01:00
|
|
|
{# TODO: this should link to the note's user profile? #}
|
|
|
|
<div tabindex="0" title="{{ 'Begin a note by the user: ' | trans }} {{ nickname }}." class="note-info">
|
|
|
|
<strong class="note-author u-url">
|
|
|
|
{# Microformat's h-card properties indicates a face icon is a "u-logo" #}
|
|
|
|
{{ nickname }}
|
|
|
|
</strong>
|
2021-09-16 23:53:38 +01:00
|
|
|
|
2021-10-24 15:12:18 +01:00
|
|
|
{% if app.user and note_actions_show %}
|
2021-09-17 01:36:07 +01:00
|
|
|
<div class="note-actions">
|
2021-09-18 07:27:17 +01:00
|
|
|
{% for current_action in get_note_actions(note) %}
|
2021-10-21 20:14:22 +01:00
|
|
|
<a class="{{ current_action["classes"] }}" href="{{ current_action["url"] }}"></a>
|
2021-09-18 07:27:17 +01:00
|
|
|
{% endfor %}
|
2021-09-17 01:36:07 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2021-09-17 01:08:24 +01:00
|
|
|
{% set reply_to = note.getReplyToNickname() %}
|
|
|
|
{% if reply_to is not null and not skip_reply_to is defined %}
|
|
|
|
{% trans with {'%name%': reply_to} %} in reply to %name% {% endtrans %}
|
|
|
|
{% endif %}
|
2021-08-14 15:04:51 +01:00
|
|
|
</div>
|
2021-09-16 23:53:38 +01:00
|
|
|
|
2021-09-17 01:08:24 +01:00
|
|
|
<section tabindex="0" role="dialog" class="e-content entry-content note-content">
|
|
|
|
|
|
|
|
<div class="note-text" tabindex="0" title="{{ 'Note text content.' | trans }}">
|
|
|
|
{{ note.getRendered() | raw }}
|
|
|
|
</div>
|
2021-08-11 02:49:23 +01:00
|
|
|
|
2021-09-17 01:08:24 +01:00
|
|
|
{% if hide_attachments is not defined %}
|
2021-09-23 15:38:56 +01:00
|
|
|
{% if note.getAttachments() is not empty %}
|
2021-10-24 22:45:38 +01:00
|
|
|
<section class="note-attachments" tabindex="0" title="{{ 'Note attachments.' | trans }}">
|
2021-09-23 15:38:56 +01:00
|
|
|
{% for attachment in note.getAttachments() %}
|
2021-10-04 12:17:14 +01:00
|
|
|
{% include '/cards/attachments/view.html.twig' with {'attachment': attachment, 'note': note} only%}
|
2021-09-23 15:38:56 +01:00
|
|
|
{% endfor %}
|
2021-09-23 16:18:08 +01:00
|
|
|
</section>
|
2021-09-23 15:38:56 +01:00
|
|
|
{% endif %}
|
2021-09-17 01:08:24 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if note.getLinks() is not empty %}
|
2021-09-23 17:14:53 +01:00
|
|
|
<div class="note-links" title="{{ 'Shared links.' | trans }}">
|
2021-09-17 01:08:24 +01:00
|
|
|
{% for link in note.getLinks() %}
|
|
|
|
{% for block in handle_event('ViewLink', {'link': link, 'note': note}) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{% 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 %}
|
|
|
|
{% include '/note/view.html.twig' with {'note': conversation['note'], 'skip_reply_to': true, 'have_user': have_user, 'replies': conversation['replies']} only %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if reply_to is not empty %}
|
|
|
|
<hr tabindex="0" title="{{ 'End of this reply' | trans }}">
|
|
|
|
{% endif %}
|
2021-09-16 23:53:38 +01:00
|
|
|
</div>
|
|
|
|
|
2021-09-14 13:40:50 +01:00
|
|
|
</article>
|