[COMPONENT][Search] Only display search subscribe field if a user is logged in
This commit is contained in:
parent
af122df6e1
commit
012e0665b0
|
@ -150,7 +150,8 @@ class Search extends FeedController
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'_template' => 'search/show.html.twig',
|
'_template' => 'search/show.html.twig',
|
||||||
'search_form' => Comp\Search::searchForm($request, query: $q, add_subscribe: true),
|
'actor' => $actor,
|
||||||
|
'search_form' => Comp\Search::searchForm($request, query: $q, add_subscribe: !\is_null($actor)),
|
||||||
'search_builder_form' => $search_builder_form->createView(),
|
'search_builder_form' => $search_builder_form->createView(),
|
||||||
'notes' => $notes ?? [],
|
'notes' => $notes ?? [],
|
||||||
'actors' => $actors ?? [],
|
'actors' => $actors ?? [],
|
||||||
|
|
|
@ -21,16 +21,18 @@
|
||||||
{{ form_row(search_form.search_query) }}
|
{{ form_row(search_form.search_query) }}
|
||||||
{{ form_row(search_form.submit_search) }}
|
{{ form_row(search_form.submit_search) }}
|
||||||
</div>
|
</div>
|
||||||
<details class="section-widget">
|
{% if actor is not null %}
|
||||||
<summary>
|
<details class="section-widget">
|
||||||
<h3>
|
<summary>
|
||||||
{% trans %}Save this search as a feed{% endtrans %}
|
<h3>
|
||||||
{{ icon('arrow-down', 'icon icon-details-open') | raw }}
|
{% trans %}Save this search as a feed{% endtrans %}
|
||||||
</h3>
|
{{ icon('arrow-down', 'icon icon-details-open') | raw }}
|
||||||
</summary>
|
</h3>
|
||||||
{{ form_row(search_form.title) }}
|
</summary>
|
||||||
{{ form_row(search_form.subscribe_to_search) }}
|
{{ form_row(search_form.title) }}
|
||||||
</details>
|
{{ form_row(search_form.subscribe_to_search) }}
|
||||||
|
</details>
|
||||||
|
{% endif %}
|
||||||
{{ form_end(search_form)}}
|
{{ form_end(search_form)}}
|
||||||
<hr>
|
<hr>
|
||||||
<details class="section-widget">
|
<details class="section-widget">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user