From 7a6b66d0fcc15015b43a7e983914c492150cfa5d Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Fri, 25 Oct 2024 13:51:35 +0200 Subject: [PATCH] Add OpenAPI navigation tab to header --- ckanext/miteco/templates/header.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ckanext/miteco/templates/header.html b/ckanext/miteco/templates/header.html index c41fc70..481ed9f 100644 --- a/ckanext/miteco/templates/header.html +++ b/ckanext/miteco/templates/header.html @@ -9,4 +9,19 @@ {% endif %} {{ g.site_title }} +{% endblock %} + +{% block header_site_navigation_tabs %} + {% set org_type = h.default_group_type('organization') %} + {% set group_type = h.default_group_type('group') %} + + {{ h.build_nav_main( + (dataset_type ~ '.search', h.humanize_entity_type('package', dataset_type, 'main nav') or _('Datasets'), ["dataset", "resource"]), + (org_type ~ '.index', + h.humanize_entity_type('organization', org_type, 'main nav') or _('Organizations'), ['organization']), + (group_type ~ '.index', + h.humanize_entity_type('group', group_type, 'main nav') or _('Groups'), ['group']), + ('home.about', _('About')) , + ('openapi.openapi_index', _('OpenAPI')) + ) }} {% endblock %} \ No newline at end of file