{# args: { 'type': { 'vanilla_full' }, 'note': note, ?'replies': { note, ?replies }, ?'extra': { 'foo': bar } #} {% macro vanilla_full(args) %} {% set note = args.conversation.note %} {% set actor = note.getActor() %} {% set nickname = actor.getNickname() %} {% set fullname = actor.getFullname() %} {% set actor_uri = actor.getUri() %} {% set actor_url = actor.getUrl() %} {% set mention = mention(actor) %} {% set note_language = note.getNoteLanguageShortDisplay() %} {% set note_anchor = 'note-anchor-' ~ note.getId() %}
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }}
{{ block('note_info', 'cards/blocks/note.html.twig') }}
{{ block('note_context', 'cards/blocks/note.html.twig') }} {{ block('note_text', 'cards/blocks/note.html.twig') }} {{ block('note_attachments', 'cards/blocks/note.html.twig') }} {{ block('note_links', 'cards/blocks/note.html.twig') }}
{{ block('note_complementary', 'cards/blocks/note.html.twig') }}
{% set additional_blocks = handle_event('AppendNoteBlock', app.request, args.conversation) %} {% for block in additional_blocks %} {{ block | raw }} {% endfor %} {% endmacro vanilla_full %} {# args: { 'type': { 'vanilla_compact' }, 'note': note, ?'extra': { 'foo': bar } } #} {% macro vanilla_compact(args) %} {% set note = args.note %} {% if args.extra is defined %}{% set extra = args.extra %}{% else %}{% set extra = null %}{% endif %} {% set actor = note.getActor() %} {% set nickname = actor.getNickname() %} {% set fullname = actor.getFullname() %} {% set actor_uri = actor.getUri() %} {% set actor_url = actor.getUrl() %} {% set mention = mention(actor) %}
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }} {{ block('note_author', 'cards/blocks/note.html.twig') }}
{{ 'in conversation' | trans }} {{ note.getModified() | ago }}
{{ block('note_text', 'cards/blocks/note.html.twig') }}
{% endmacro vanilla_compact %} {# args: { 'type': { 'page_full' }, 'note': note, ?'replies': { note, ?replies }, ?'extra': { 'foo': bar } #} {% macro page_full(args) %} {# TODO #} {% endmacro page_full %} {# args: { 'type': { 'page_compact' }, 'note': note, ?'extra': { 'foo': bar } } #} {% macro page_compact(args) %} {# TODO #} {% endmacro page_compact %}