fix collection breadcrumbs on queryables and schemas HTML Jinja2 templates (#1769)

This commit is contained in:
Tom Kralidis
2024-08-02 09:07:47 -04:00
committed by GitHub
parent d1dfa179b3
commit 491ceaff48
4 changed files with 4 additions and 2 deletions
+1
View File
@@ -1382,6 +1382,7 @@ class API:
self.config['resources'][dataset]['title'], request.locale)
schema['collections_path'] = self.get_collections_url()
schema['dataset_path'] = f'{self.get_collections_url()}/{dataset}'
content = render_j2_template(self.tpl_config,
'collections/schema.html',
+1
View File
@@ -188,6 +188,7 @@ def get_collection_queryables(api: API, request: Union[APIRequest, Any],
api.config['resources'][dataset]['title'], request.locale)
queryables['collections_path'] = api.get_collections_url()
queryables['dataset_path'] = f'{api.get_collections_url()}/{dataset}'
content = render_j2_template(api.tpl_config,
'collections/queryables.html',
@@ -2,7 +2,7 @@
{% block title %}{{ super() }} {{ data['title'] }} {% endblock %}
{% block crumbs %}{{ super() }}
/ <a href="{{ data['collections_path'] }}">{% trans %}Collections{% endtrans %}</a>
/ <a href="./{{ data['id'] }}">{{ data['title'] | truncate( 25 ) }}</a>
/ <a href="{{ data['dataset_path'] }}">{{ data['title'] | truncate( 25 ) }}</a>
/ <a href="./{{ data['id'] }}queryables">{% trans %}Queryables{% endtrans %}</a>
{% endblock %}
{% block body %}
+1 -1
View File
@@ -2,7 +2,7 @@
{% block title %}{{ super() }} {{ data['title'] }} {% endblock %}
{% block crumbs %}{{ super() }}
/ <a href="{{ data['collections_path'] }}">{% trans %}Collections{% endtrans %}</a>
/ <a href="./{{ data['id'] }}">{{ data['title'] | truncate( 25 ) }}</a>
/ <a href="{{ data['dataset_path'] }}">{{ data['title'] | truncate( 25 ) }}</a>
/ <a href="./{{ data['id'] }}schema">{% trans %}Schema{% endtrans %}</a>
{% endblock %}
{% block body %}