From fa705221ddf4b6ba6b02738eebe5cf46fa9d3225 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Fri, 3 Jan 2025 13:40:44 +0100 Subject: [PATCH] view: add route for rdm-search * it is necessary to add it here because the old approach with adding to the invenio-search-ui blueprint is not possible anymore since it has been changed to a function. --- invenio_theme_tugraz/views.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/invenio_theme_tugraz/views.py b/invenio_theme_tugraz/views.py index 4717504..6f19ba2 100644 --- a/invenio_theme_tugraz/views.py +++ b/invenio_theme_tugraz/views.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2020-2024 Graz University of Technology. +# Copyright (C) 2020-2025 Graz University of Technology. # # invenio-theme-tugraz is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more @@ -30,6 +30,20 @@ blueprint = Blueprint( ) +@blueprint.route("/records/search") +def records_search(): + """Search page ui. + + With this route it is possible to override the default route + "/search" to get to the rdm-records search. The default route will + be overriden by the global search with changing the + SEARCH_UI_SEARCH_TEMPLATE variable to the value + "invenio_records_global_search/search/search.html" in the + invenio.cfg file. + """ + return render_template("invenio_app_rdm/records/search.html") + + def current_identity_is_tugraz_authenticated() -> bool: """Checks whether current identity has tugraz-authentication.