2021-08-19 20:37:16 +01:00
|
|
|
<article class="h-entry hentry note">
|
2021-09-08 20:09:38 +01:00
|
|
|
{% set nickname = note.getActorNickname() %}
|
|
|
|
<header tabindex="0" title="{{ 'Begin a note by the user: ' | trans }} {{ nickname }}." class="note-info">
|
2021-07-21 19:21:48 +01:00
|
|
|
|
2021-08-17 21:43:34 +01:00
|
|
|
{# TODO: this should link to the note's user profile? #}
|
2021-09-08 21:33:35 +01:00
|
|
|
<strong class="note-author u-url">
|
2021-07-23 13:04:04 +01:00
|
|
|
{# Microformat's h-card properties indicates a face icon is a "u-logo" #}
|
2021-09-08 20:09:38 +01:00
|
|
|
<img class="u-logo avatar" src="{{ note.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">
|
|
|
|
{{ nickname }}
|
|
|
|
</strong>
|
2021-07-21 19:21:48 +01:00
|
|
|
|
2021-04-30 02:51:03 +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-11 02:49:23 +01:00
|
|
|
|
2021-08-21 07:05:54 +01:00
|
|
|
{% if app.user %}
|
2021-09-07 15:23:41 +01:00
|
|
|
<div class="note-actions">
|
2021-08-11 02:49:23 +01:00
|
|
|
{% if have_user %}
|
2021-08-11 18:42:15 +01:00
|
|
|
{% for current_action in get_note_actions(note) %}
|
|
|
|
{{ form_start(current_action) }}
|
2021-09-05 15:56:32 +01:00
|
|
|
{% if current_action.submit_favourite is defined %}
|
2021-09-07 15:23:41 +01:00
|
|
|
{{ form_widget(current_action.submit_favourite) }}
|
2021-08-11 18:42:15 +01:00
|
|
|
{% endif %}
|
2021-09-05 15:56:32 +01:00
|
|
|
{% if current_action.submit_repeat is defined %}
|
2021-09-07 15:23:41 +01:00
|
|
|
{{ form_widget(current_action.submit_repeat) }}
|
2021-09-05 14:34:30 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if current_action.reply is defined %}
|
2021-09-07 15:23:41 +01:00
|
|
|
{{ form_widget(current_action.reply) }}
|
2021-09-05 14:34:30 +01:00
|
|
|
{% endif %}
|
2021-08-11 18:42:15 +01:00
|
|
|
{{ form_end(current_action) }}
|
2021-08-11 02:49:23 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-08-21 07:05:54 +01:00
|
|
|
{% endif %}
|
2021-09-07 15:23:41 +01:00
|
|
|
</header>
|
2021-09-08 17:27:28 +01:00
|
|
|
<section tabindex="0" role="dialog" class="e-content entry-content note-content">
|
2021-04-30 02:51:03 +01:00
|
|
|
{% block markdown %}
|
|
|
|
{% apply markdown_to_html %}
|
|
|
|
{{ note.getContent() }}
|
|
|
|
{% endapply %}
|
|
|
|
{% endblock %}
|
2021-05-05 14:35:02 +01:00
|
|
|
{# <div class="note-other-content"> #}
|
|
|
|
{# {% for other in get_note_other_content(note) %} #}
|
|
|
|
{# {% include '/'~ other.name ~ '/view.html.twig' with {'vars': other.vars} only %} #}
|
|
|
|
{# {% endfor %} #}
|
|
|
|
{# </div> #}
|
2021-04-30 02:51:03 +01:00
|
|
|
{% if hide_attachments is not defined %}
|
2021-09-08 22:32:20 +01:00
|
|
|
<div class="note-attachments" tabindex="0" title="{{ 'Note attachments.' | trans }}">
|
2021-04-30 02:51:03 +01:00
|
|
|
{% for attachment in note.getAttachments() %}
|
2021-08-12 03:43:11 +01:00
|
|
|
{% include '/attachments/view.html.twig' with {'attachment': attachment, 'note': note} only%}
|
2021-04-30 02:51:03 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-09-08 20:09:38 +01:00
|
|
|
{% if note.getLinks() is not empty %}
|
2021-09-08 22:32:20 +01:00
|
|
|
<div tabindex="0" class="note-links" title="{{ 'Shared links.' | trans }}">
|
2021-08-14 15:04:51 +01:00
|
|
|
{% for link in note.getLinks() %}
|
|
|
|
{% for block in handle_event('ViewLink', {'link': link, 'note': note}) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-09-08 20:09:38 +01:00
|
|
|
{% endif %}
|
2021-09-08 17:27:28 +01:00
|
|
|
</section>
|
2021-08-11 02:49:23 +01:00
|
|
|
|
2021-09-05 17:27:36 +01:00
|
|
|
{% if replies is defined and replies is not empty %}
|
2021-09-08 20:09:38 +01:00
|
|
|
<div class="u-in-reply-to replies" tabindex="0" title="{{ 'Begin replies to ' | trans }} {{ nickname }}'s note!">
|
2021-04-30 02:51:03 +01:00
|
|
|
{% 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 %}
|
2021-09-05 17:27:36 +01:00
|
|
|
{% if reply_to is not empty %}
|
2021-09-08 20:09:38 +01:00
|
|
|
<hr tabindex="0" title="{{ 'End of this reply.' | trans }}">
|
2021-09-05 17:27:36 +01:00
|
|
|
{% endif %}
|
|
|
|
</article>
|