fix collection breadcrumbs on queryables and schemas HTML Jinja2 templates (#1769)
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user