view.html.twig 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <div class="note">
  2. <div class="note-info">
  3. {% set nickname = note.getActorNickname() %}
  4. <a href="{{ path('settings_avatar') }}">
  5. <img class="avatar" src="{{ note.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">
  6. </a>
  7. <b>{{ nickname }}</b>
  8. {% set reply_to = note.getReplyToNickname() %}
  9. {% if reply_to is not null and not skip_reply_to is defined %}
  10. {% trans with {'%name%': reply_to} %} in reply to %name% {% endtrans %}
  11. {% endif %}
  12. </div>
  13. <div class="note-content">
  14. {% block markdown %}
  15. {% apply markdown_to_html %}
  16. {{ note.getContent() }}
  17. {% endapply %}
  18. {% endblock %}
  19. {# <div class="note-other-content"> #}
  20. {# {% for other in get_note_other_content(note) %} #}
  21. {# {% include '/'~ other.name ~ '/view.html.twig' with {'vars': other.vars} only %} #}
  22. {# {% endfor %} #}
  23. {# </div> #}
  24. {% if hide_attachments is not defined %}
  25. <div class="note-attachments">
  26. {% for attachment in note.getAttachments() %}
  27. {% include '/attachments/view.html.twig' with {'attachment': attachment} %}
  28. {% endfor %}
  29. </div>
  30. {% endif %}
  31. </div>
  32. <div class="note-actions">
  33. {# {% if have_user %} #}
  34. {# {\#{% for act in get_note_actions(note) %}#\} #}
  35. {# {\#{{ form(act) }}#\} #}
  36. {# {\#{% endfor %}#\} #}
  37. {# {% endif %} #}
  38. </div>
  39. {% if replies is defined %}
  40. <div class="replies">
  41. {% for conversation in replies %}
  42. {% include '/note/view.html.twig' with {'note': conversation['note'], 'skip_reply_to': true, 'have_user': have_user, 'replies': conversation['replies']} only %}
  43. {% endfor %}
  44. </div>
  45. {% endif %}
  46. </div>