[COMPONENTS][Search][UI] Use base template and macros to display search results

This commit is contained in:
Hugo Sales 2021-11-28 21:07:29 +00:00 committed by Diogo Peralta Cordeiro
parent 424df54a1b
commit ed5f6b6eed
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
2 changed files with 20 additions and 6 deletions

View File

@ -54,6 +54,7 @@ class Search extends Controller
'_template' => 'search/show.html.twig',
'notes' => $notes,
'actors' => $actors,
'page' => 1, // TODO paginate
];
}
}

View File

@ -1,7 +1,20 @@
{% for note in notes %}
{% include '/cards/note/view.html.twig' with {'note': note} %}
{% endfor %}
{% extends 'base.html.twig' %}
{% import '/cards/note/view.html.twig' as noteView %}
{% block body %}
{% for note in notes %}
{% block current_note %}
<div class="section-widget">
{{ noteView.macro_note(note) }}
</div>
{% endblock current_note %}
{% endfor %}
{% for actor in actors %}
{% include 'actor/view.html.twig' with {'actor': actor} %}
{% endfor %}
{{ "Page: " ~ page }}
{% endblock %}
{% for actor in actors %}
{% include 'actor/view.html.twig' with {'actor': actor} %}
{% endfor %}