{# Copyright (C) 2026 Front Matter. Invenio App RDM is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. The menubar search: on a community page its own options first, elsewhere works, people and organizations. See invenio_pidbox/search_form.html. #} {%- import "invenio_pidbox/search_form.html" as search with context %} {% if community %} {% if collection %} {% set root_collection=collection[collection.root] %} {% set options = [ { "key": "collections", "text": _("In this collection"), "value": url_for("invenio_app_rdm_communities.community_collection", pid_value=community.slug, collection_slug=root_collection.slug, tree_slug=tree.slug) }, { "key": "communities", "text": _("In this community"), "value": url_for("invenio_app_rdm_communities.communities_detail", pid_value=community.slug), }, { "key": "records", "text": _("All") + " " + config.THEME_SITENAME, "value": url_for("invenio_search_ui.search"), }] %} {% else %} {% set options = [ { "key": "communities", "text": _("In this community"), "value": url_for("invenio_app_rdm_communities.communities_detail", pid_value=community.slug), }, { "key": "records", "text": _("All Works"), "value": url_for("invenio_search_ui.search"), }] %} {% endif %} {% else %} {%- set options = search.kind_options %} {% endif %}