[fix] re-add opensearch_url / its used in based.html

The URL was accidentally deleted in a85907a98, but is still required in
base.html for auto-discovery / from base.html::

  <link title="{{ instance_name }}"
        type="application/opensearchdescription+xml"
	rel="search" href="{{ opensearch_url }}"
	/>

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2024-02-25 18:15:34 +01:00 committed by Markus Heiser
parent e8bd6c03bf
commit c0b97c6543
1 changed files with 10 additions and 0 deletions

View File

@ -438,6 +438,16 @@ def render(template_name: str, **kwargs):
kwargs['cache_url'] = settings['ui']['cache_url'] kwargs['cache_url'] = settings['ui']['cache_url']
kwargs['get_result_template'] = get_result_template kwargs['get_result_template'] = get_result_template
kwargs['doi_resolver'] = get_doi_resolver(request.preferences) kwargs['doi_resolver'] = get_doi_resolver(request.preferences)
kwargs['opensearch_url'] = (
url_for('opensearch')
+ '?'
+ urlencode(
{
'method': request.preferences.get_value('method'),
'autocomplete': request.preferences.get_value('autocomplete'),
}
)
)
kwargs['urlparse'] = urlparse kwargs['urlparse'] = urlparse
# scripts from plugins # scripts from plugins