Skip to content

Commit

Permalink
Merge pull request #7 from mjanez/develop
Browse files Browse the repository at this point in the history
Update geospatial metadata only if it is INSPIRE data/service
  • Loading branch information
mjanez authored Aug 16, 2023
2 parents 3a887c7 + 29669a6 commit e231cff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 13 additions & 1 deletion ckanext/scheming_dcat/templates/package/read_base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{% ckan_extends %}
{#
geospatial_metadata_values: Sublist of dcat_type_values that has geospatial metadata (INSPIRE Register).
#}
{%- set geospatial_metadata_values = [
'http://inspire.ec.europa.eu/metadata-codelist/ResourceType/dataset',
'http://inspire.ec.europa.eu/metadata-codelist/ResourceType/series',
'http://inspire.ec.europa.eu/metadata-codelist/ResourceType/service'
] -%}

{% block content_primary_nav %}
{{ super() }}
{{ h.build_nav_icon('scheming_dcat.index', _('Linked Data'), id=pkg.id if is_activity_archive else pkg.name, icon='asterisk') }}
{{ h.build_nav_icon('scheming_dcat.geospatial_metadata', _('Geospatial Metadata'), id=pkg.id if is_activity_archive else pkg.name, icon='globe') }}

{% if pkg.dcat_type in geospatial_metadata_values %}
{{ h.build_nav_icon('scheming_dcat.geospatial_metadata', _('Geospatial Metadata'), id=pkg.id if is_activity_archive else pkg.name, icon='globe') }}
{% endif %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

{% block secondary_content %}
{{ super() }}

// Standard version: "{% set dataset_extent = h.get_pkg_dict_extra(c.pkg_dict, 'spatial', '') %}"
// CKAN Docker Compose version: "{% set dataset_extent = pkg.spatial %}"
{% set dataset_extent = pkg.spatial %}
{% if dataset_extent %}
{% snippet "spatial/snippets/dataset_map_sidebar.html", extent=dataset_extent %}
Expand Down

0 comments on commit e231cff

Please sign in to comment.