From fc57b3290e16dcfad1f5b1da8df1782cd053bcf3 Mon Sep 17 00:00:00 2001 From: Eliseu Amaro Date: Fri, 7 Jan 2022 21:12:07 +0000 Subject: [PATCH] [COMPONENTS][Search] Polished results page HTML view --- .../Search/templates/search/show.html.twig | 162 ++++++++++-------- 1 file changed, 94 insertions(+), 68 deletions(-) diff --git a/components/Search/templates/search/show.html.twig b/components/Search/templates/search/show.html.twig index aedb60c644..684dab7384 100644 --- a/components/Search/templates/search/show.html.twig +++ b/components/Search/templates/search/show.html.twig @@ -8,83 +8,109 @@ {% endif %} -
+
+

{% trans %}Search{% endtrans %}

+ {{ form_start(search_form) }} -
+
{{ form_row(search_form.search_query) }} + {% if actor is not null %} +
+ + {% trans %}Other options{% endtrans %} + {{ icon('arrow-down', 'icon icon-details-open') | raw }} + + +
+
+ + + {% trans %}Save query as a feed{% endtrans %} + + {{ icon('arrow-down', 'icon icon-details-open') | raw }} + +
+ {{ form_row(search_form.title) }} + {{ form_row(search_form.subscribe_to_search) }} +
+
+
+
+ {% endif %} {{ form_row(search_form.submit_search) }} -
- {% if actor is not null %} -
- -

- {% trans %}Save this search as a feed{% endtrans %} - {{ icon('arrow-down', 'icon icon-details-open') | raw }} -

-
- {{ form_row(search_form.title) }} - {{ form_row(search_form.subscribe_to_search) }} -
- {% endif %} - {{ form_end(search_form)}} -
-
- -

- {% trans %}Build a search query{% endtrans %} +

+ +
+
+ + {% trans %}Build a search query{% endtrans %} {{ icon('arrow-down', 'icon icon-details-open') | raw }} - - - - {{ form_start(search_builder_form) }} - - {# actor options, display if first checked, with checkbox trick #} -
- -

- {% trans %}People search options{% endtrans %} - {{ icon('arrow-down', 'icon icon-details-open') | raw }} -

- {{ form_row(search_builder_form.include_actors) }} - {{ form_row(search_builder_form.include_actors_people) }} - {{ form_row(search_builder_form.include_actors_groups) }} - {{ form_row(search_builder_form.include_actors_lists) }} - {{ form_row(search_builder_form.include_actors_businesses) }} - {{ form_row(search_builder_form.include_actors_organizations) }} - {{ form_row(search_builder_form.include_actors_bots) }} - {{ form_row(search_builder_form.actor_langs) }} - {{ form_row(search_builder_form.actor_tags) }} + + {{ form_start(search_builder_form) }} +
+ {# actor options, display if first checked, with checkbox trick #} +
+ + {% trans %}People search options{% endtrans %} + {{ icon('arrow-down', 'icon icon-details-open') | raw }} + + {{ form_row(search_builder_form.include_actors) }} + {{ form_row(search_builder_form.include_actors_people) }} + {{ form_row(search_builder_form.include_actors_groups) }} + {{ form_row(search_builder_form.include_actors_lists) }} + {{ form_row(search_builder_form.include_actors_businesses) }} + {{ form_row(search_builder_form.include_actors_organizations) }} + {{ form_row(search_builder_form.include_actors_bots) }} + {{ form_row(search_builder_form.actor_langs) }} + {{ form_row(search_builder_form.actor_tags) }} +
+ +
+ + {% trans %}Note search options{% endtrans %} + {{ icon('arrow-down', 'icon icon-details-open') | raw }} + + {{ form_row(search_builder_form.include_notes) }} + {{ form_row(search_builder_form.include_notes_text) }} + {{ form_row(search_builder_form.include_notes_media) }} + {{ form_row(search_builder_form.include_notes_polls) }} + {{ form_row(search_builder_form.include_notes_bookmarks) }} + {{ form_row(search_builder_form.note_langs) }} + {{ form_row(search_builder_form.note_tags) }} + {{ form_row(search_builder_form.note_actor_langs) }} + {{ form_row(search_builder_form.note_actor_tags) }} +
+
+ {{ form_end(search_builder_form) }}
+
+ -
- -

- {% trans %}Note search options{% endtrans %} - {{ icon('arrow-down', 'icon icon-details-open') | raw }} -

-
- {{ form_row(search_builder_form.include_notes) }} - {{ form_row(search_builder_form.include_notes_text) }} - {{ form_row(search_builder_form.include_notes_media) }} - {{ form_row(search_builder_form.include_notes_polls) }} - {{ form_row(search_builder_form.include_notes_bookmarks) }} - {{ form_row(search_builder_form.note_langs) }} - {{ form_row(search_builder_form.note_tags) }} - {{ form_row(search_builder_form.note_actor_langs) }} - {{ form_row(search_builder_form.note_actor_tags) }} -
- {{ form_end(search_builder_form) }} - -
-
+ {{ form_end(search_form)}} - {# Backwards compatibility with hAtom 0.1 #} - {{ parent() }} +
+

{% trans %}Results{% endtrans %}

+
+

{% trans %}Notes found{% endtrans %}

+ {% if notes is defined and notes is not empty %} + {{ parent() }} + {% else %} + {% trans %}No notes were found for the specified query...{% endtrans %} + {% endif %} +
- {% for actor in actors %} - {% include 'cards/profile/view.html.twig' with {'actor': actor} %} - {% endfor %} +
+

{% trans %}Actors found{% endtrans %}

+ {% if actors is defined and actors is not empty %} + {% for actor in actors %} + {% include 'cards/profile/view.html.twig' with {'actor': actor} %} + {% endfor %} + {% else %} + {% trans %}No Actors were found for the specified query...{% endtrans %} + {% endif %} +
+
{{ "Page: " ~ page }} {% endblock body %}