2021-08-20 04:37:16 +09:00
|
|
|
<article class="h-entry hentry note">
|
2021-09-09 04:09:38 +09:00
|
|
|
{% set nickname = note.getActorNickname() %}
|
2021-08-11 10:49:23 +09:00
|
|
|
|
2021-09-17 09:08:24 +09:00
|
|
|
<aside class="note-sidebar">
|
2021-09-18 12:54:35 +09:00
|
|
|
<img class="u-logo avatar" src="{{ note.getActorAvatarUrl() }}" alt="{{ nickname }}'s avatar" width="32px" height="32px">
|
2021-09-17 09:08:24 +09:00
|
|
|
</aside>
|
2021-09-17 00:27:28 +09:00
|
|
|
|
2021-09-17 09:08:24 +09:00
|
|
|
<div class="note-wrapper">
|
2021-09-17 07:53:38 +09:00
|
|
|
|
2021-09-17 09:08:24 +09: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-17 07:53:38 +09:00
|
|
|
|
2021-09-17 09:36:07 +09:00
|
|
|
{% if app.user %}
|
|
|
|
<div class="note-actions">
|
2021-09-18 15:27:17 +09:00
|
|
|
{% for current_action in get_note_actions(note) %}
|
2021-09-23 00:46:58 +09:00
|
|
|
{{ form(current_action) }}
|
2021-09-18 15:27:17 +09:00
|
|
|
{% endfor %}
|
2021-09-17 09:36:07 +09:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2021-09-17 09:08:24 +09: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 23:04:51 +09:00
|
|
|
</div>
|
2021-09-17 07:53:38 +09:00
|
|
|
|
2021-09-17 09:08:24 +09: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 10:49:23 +09:00
|
|
|
|
2021-09-17 09:08:24 +09:00
|
|
|
{% if hide_attachments is not defined %}
|
2021-09-23 23:38:56 +09:00
|
|
|
{% if note.getAttachments() is not empty %}
|
2021-09-24 00:18:08 +09:00
|
|
|
<section class="section-attachments" tabindex="0" title="{{ 'Note attachments.' | trans }}">
|
2021-09-23 23:38:56 +09:00
|
|
|
{% for attachment in note.getAttachments() %}
|
|
|
|
{% include '/attachments/view.html.twig' with {'attachment': attachment, 'note': note} only%}
|
|
|
|
{% endfor %}
|
2021-09-24 00:18:08 +09:00
|
|
|
</section>
|
2021-09-23 23:38:56 +09:00
|
|
|
{% endif %}
|
2021-09-17 09:08:24 +09:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if note.getLinks() is not empty %}
|
|
|
|
<div tabindex="0" 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 %}
|
|
|
|
</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-17 07:53:38 +09:00
|
|
|
</div>
|
|
|
|
|
2021-09-14 21:40:50 +09:00
|
|
|
</article>
|