2020-08-28 21:16:26 +01:00
|
|
|
<div class="note">
|
|
|
|
<div class="note-info">
|
2020-09-06 22:34:36 +01:00
|
|
|
{% set nickname = note.getActorNickname() %}
|
2020-08-28 21:16:26 +01:00
|
|
|
<a href="{{ path('settings_avatar') }}">
|
2020-09-06 22:34:36 +01:00
|
|
|
<img src="{{ note.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">
|
2020-08-28 21:16:26 +01:00
|
|
|
</a>
|
2020-09-06 22:34:36 +01:00
|
|
|
<b>{{ nickname }}</b>
|
|
|
|
{% 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 %}
|
2020-08-28 21:16:26 +01:00
|
|
|
</div>
|
|
|
|
<div class="note-content">
|
|
|
|
{{ note.getContent() }}
|
2020-09-05 03:28:50 +01:00
|
|
|
<div class="note-attachments">
|
|
|
|
{% for attachment in note.getAttachments() %}
|
|
|
|
{% if attachment.mimetype starts with 'image/' %}
|
2020-09-05 06:37:30 +01:00
|
|
|
<div>
|
|
|
|
<img src="{{ path('attachment_inline', {'id': attachment.getId()}) }}" alt="{{ attachment.getTitle() }}">
|
|
|
|
<i> {{ attachment.getTitle() }} </i>
|
|
|
|
</img>
|
|
|
|
</div>
|
2020-09-05 03:28:50 +01:00
|
|
|
{% elseif attachment.mimetype starts with 'video/' %}
|
2020-09-05 06:37:30 +01:00
|
|
|
<div>
|
|
|
|
<video src="{{ path('attachment_inline', {'id': attachment.getId()}) }}">
|
|
|
|
<i> {{ attachment.getTitle() }} </i>
|
|
|
|
</video>
|
|
|
|
</div>
|
2020-09-05 03:28:50 +01:00
|
|
|
{% else %}
|
2020-09-05 06:37:30 +01:00
|
|
|
<div>
|
|
|
|
<i> {{ attachment.getTitle() }} </i>
|
|
|
|
</div>
|
2020-09-05 03:28:50 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-08-28 21:16:26 +01:00
|
|
|
</div>
|
|
|
|
<div class="note-actions">
|
2020-09-10 21:40:58 +01:00
|
|
|
{% if have_user %}
|
|
|
|
{% for act in get_note_actions(note) %}
|
|
|
|
{{ form(act) }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2020-08-28 21:16:26 +01:00
|
|
|
</div>
|
|
|
|
<div class="replies">
|
|
|
|
{% for reply in note.getReplies() %}
|
2020-09-10 21:40:58 +01:00
|
|
|
{% include '/note/view.html.twig' with {'note': reply, 'skip_reply_to': true, 'have_user': have_user} only %}
|
2020-08-28 21:16:26 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|