forked from GNUsocial/gnu-social
58 lines
1.8 KiB
Twig
58 lines
1.8 KiB
Twig
<div class="note">
|
|
<div class="note-info">
|
|
{% set nickname = note.getActorNickname() %}
|
|
<a href="{{ path('settings_avatar') }}">
|
|
<img src="{{ note.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">
|
|
</a>
|
|
<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 %}
|
|
</div>
|
|
<div class="note-content">
|
|
{{ note.getContent() }}
|
|
|
|
|
|
{% if have_user %}
|
|
{% for test in get_note_test(note) %}
|
|
{{ form(test) }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<div class="note-attachments">
|
|
{% for attachment in note.getAttachments() %}
|
|
{% if attachment.mimetype starts with 'image/' %}
|
|
<div>
|
|
<img src="{{ path('attachment_inline', {'id': attachment.getId()}) }}" alt="{{ attachment.getTitle() }}">
|
|
<i> {{ attachment.getTitle() }} </i>
|
|
</img>
|
|
</div>
|
|
{% elseif attachment.mimetype starts with 'video/' %}
|
|
<div>
|
|
<video src="{{ path('attachment_inline', {'id': attachment.getId()}) }}">
|
|
<i> {{ attachment.getTitle() }} </i>
|
|
</video>
|
|
</div>
|
|
{% else %}
|
|
<div>
|
|
<i> {{ attachment.getTitle() }} </i>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="note-actions">
|
|
{% if have_user %}
|
|
{% for act in get_note_actions(note) %}
|
|
{{ form(act) }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
<div class="replies">
|
|
{% 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>
|
|
</div>
|