{# Displays a sidebard module with information for given package pkg - The package dict that owns the resources. Example: {% snippet "package/snippets/info.html", pkg=pkg %} #} {% set daterange = h.get_daterange_prettified(pkg) %} {% set license_attribution_by_text = h.odsh_extract_value_from_extras(pkg.extras, 'licenseAttributionByText') %} {% block package_info %} {% if pkg %}
{% block package_info_inner %} {% block heading %} {% endblock heading %} {% block groups %} {# aka categories #} {% if pkg.groups|length %}
{% trans category_count=pkg.groups|length %} Category: {% pluralize %} Categories: {% endtrans %}
{% for category in pkg.groups %} {{ category.display_name }} {% endfor %}
{% endif %} {% endblock groups %} {% block timerange %} {% if daterange %}
{{ _('Period') }}:

{{ daterange }}

{% endif %} {% endblock timerange %} {% block last_change %}
{% set value = h.odsh_extract_value_from_extras(pkg.extras,'issued')%} {% set issued = h.odsh_render_datetime(value) if value else h.odsh_render_datetime(pkg.metadata_created)%}
{{ _('Issued') }}:
{{ issued }}
{% set modified = h.odsh_render_datetime(pkg.metadata_modified)%}
{{ _('Modified') }}:
{{ modified }}
{% endblock last_change %} {% block license %}
{{ _('License') }}:
{%set lic=pkg.license_title if pkg.license_title else '-'%} {%set licenseAttributionByText = h.odsh_extract_value_from_extras(pkg.extras,'licenseAttributionByText') %} {%set name=' (' + licenseAttributionByText +')' if licenseAttributionByText else ''%} {{ lic }}{{ name }}
{% endblock license %} {% block musterdatensatz %} {% if pkg.reference %} {% set mdk=h.odsh_load_raw_mdk_sample_dataset() %} {% set musterdatensatzName = mdk[pkg.reference] %}
{{ _('Sample Dataset') }}:
{{ musterdatensatzName }}
{% endif %} {% endblock musterdatensatz %} {% block applicableLegislation %} {% if pkg.applicableLegislation %} {% set applicable_legislation_urls = pkg.applicableLegislation.split(',') %}
{% trans al_count=applicable_legislation_urls|length %} Applicable Legislation: {% pluralize %} Applicable Legislation: {% endtrans %}
{% endif %} {% endblock applicableLegislation %} {% block hvdCategories %} {% if pkg.hvdCategory %} {% set hvd_urls = pkg.hvdCategory.split(',') %} {% endif %} {% endblock hvdCategories %} {% endblock package_info_inner %}
{% set map_text = h.odsh_get_spatial_text(pkg) %}
{{ _('Spatial URI') }}:
{%set ext=map_text if map_text else '-'%}

{{ ext }}

{% set dataset_extent = h.get_pkg_dict_extra(pkg, 'spatial', '') %} {% if dataset_extent %}
{% snippet "snippets/dataset_map.html", extent=dataset_extent %}
{% endif %} {% block spatial_info %}
{% set bbox = h.odsh_get_bounding_box(pkg) %} {% if bbox%}
{{ _('Map boundaries') }}:

{{ '{0:0.3f}'.format(bbox[0]).zfill(2).replace('.',',') }}° {{_('in east')}}

{{ '{0:0.3f}'.format(bbox[1]).replace('.',',') }}° {{_('in west')}}

{{ '{0:0.3f}'.format(bbox[2]).replace('.',',') }}° {{_('in north')}}

{{ '{0:0.3f}'.format(bbox[3]).replace('.',',') }}° {{_('in south')}}

{% endif %}
{% endblock %} {% block metadata_links %} {% endblock metadata_links %}
{% endif %} {% endblock package_info %}