diff --git a/components/Collection/templates/collection/notes.html.twig b/components/Collection/templates/collection/notes.html.twig index b006940b98..ba324f8bb3 100644 --- a/components/Collection/templates/collection/notes.html.twig +++ b/components/Collection/templates/collection/notes.html.twig @@ -39,10 +39,7 @@ {% for conversation in notes %} {% block current_note %} {% if conversation is instanceof('array') %} - {% set args = { - 'type': 'vanilla_full', - 'conversation': conversation - } %} + {% set args = conversation | merge({'type': 'vanilla_full'}) %} {{ NoteFactory.constructor(args) }} {# {% else %} {% set args = { 'type': 'vanilla_full', 'note': conversation, 'extra': { 'depth': 0 } } %} diff --git a/plugins/TreeNotes/templates/tree_notes/note_replies_block.html.twig b/plugins/TreeNotes/templates/tree_notes/note_replies_block.html.twig index 09a47d082e..8b56e5f965 100644 --- a/plugins/TreeNotes/templates/tree_notes/note_replies_block.html.twig +++ b/plugins/TreeNotes/templates/tree_notes/note_replies_block.html.twig @@ -4,7 +4,7 @@
{% for reply in conversation.replies %} - {% set args = { 'type': 'vanilla_full', 'conversation': reply } %} + {% set args = reply | merge({ 'type': 'vanilla_full' }) %} {{ NoteFactory.constructor(args) }} {% endfor %} {% if conversation.show_more %} diff --git a/templates/cards/macros/note/types.html.twig b/templates/cards/macros/note/types.html.twig index 6911d18625..ed23f13953 100644 --- a/templates/cards/macros/note/types.html.twig +++ b/templates/cards/macros/note/types.html.twig @@ -1,6 +1,6 @@ {# args: { 'type': { 'vanilla_full' }, 'note': note, ?'replies': { note, ?replies }, ?'extra': { 'foo': bar } #} {% macro vanilla_full(args) %} - {% set note = args.conversation.note %} + {% set note = args.note %} {% set actor = note.getActor() %} {% set nickname = actor.getNickname() %} @@ -32,7 +32,7 @@ {{ block('note_complementary', 'cards/blocks/note.html.twig') }} - {% set additional_blocks = handle_event('AppendNoteBlock', app.request, args.conversation) %} + {% set additional_blocks = handle_event('AppendNoteBlock', app.request, args) %} {% for block in additional_blocks %} {{ block | raw }} {% endfor %} @@ -80,11 +80,11 @@ {# args: { 'type': { 'page_full' }, 'note': note, ?'replies': { note, ?replies }, ?'extra': { 'foo': bar } #} {% macro page_full(args) %} - {# TODO #} + TODO {% endmacro page_full %} {# args: { 'type': { 'page_compact' }, 'note': note, ?'extra': { 'foo': bar } } #} {% macro page_compact(args) %} - {# TODO #} -{% endmacro page_compact %} \ No newline at end of file + TODO +{% endmacro page_compact %}