[COMPONENTS][Search][UI] Use base template and macros to display search results
This commit is contained in:
parent
424df54a1b
commit
ed5f6b6eed
|
@ -54,6 +54,7 @@ class Search extends Controller
|
|||
'_template' => 'search/show.html.twig',
|
||||
'notes' => $notes,
|
||||
'actors' => $actors,
|
||||
'page' => 1, // TODO paginate
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user