Newer
Older
{#
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') %}
{% if pkg %}
<section class="module module-narrow">
<div class="module context-info">
<div class="module-content">
{% if pkg.groups|length %}
<div class="info-detail groups-detail">
<div>
</div>
{% for category in pkg.groups %}
<span class='category-with-icon'>
<span class='category-icon-container'>
<img src="/base/images/icon_kat_{{category.name}}.svg" />
</span>
<span class="category-name">
{% endfor %}
</div>
{% endif %}
{% if daterange %}
<div class="timerange-detail info-detail">
<div>{{ _('Period') }}:</div>
<p>{{ daterange }}</p>
</div>
{% endif %}
<div class="last-change-detail info-detail">
{% 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)%}
<div>{{ _('Issued') }}:</div>
<span property="dc:issued">{{ issued }}</span>
</div>
<div class="last-change-detail info-detail">
{% set modified = h.odsh_render_datetime(pkg.metadata_modified)%}
<div>{{ _('Modified') }}:</div>
<span property="dc:modified">{{ modified }}</span>
<div class="license-detail info-detail">
<div>{{ _('License') }}:</div>
{%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 ''%}
<a href="{{pkg.license_url}}" rel="dc:rights">{{ lic }}</a>{{ name }}
</div>

Thorge Petersen
committed
{% if pkg.reference %}
{% set mdk=h.odsh_load_raw_mdk_sample_dataset() %}

Thorge Petersen
committed
{% set musterdatensatzName = mdk[pkg.reference] %}
<div class="musterdatensatz-detail info-detail">

Thorge Petersen
committed
<a href="/dataset?reference={{ pkg.reference }}">{{ musterdatensatzName }}</a>
</div>
{% endif %}
{% endblock musterdatensatz %}
{% block applicableLegislation %}
{% if pkg.applicableLegislation %}
{% set applicable_legislation_urls = pkg.applicableLegislation.split(',') %}
<div class="applicableLegislation-detail info-detail">
<div>{{ _('Applicable Legislation') }}:</div>
<ul class="inline-list">
{% for url in applicable_legislation_urls %}
{% set applicable_legislation = h.odsh_load_applicable_legislations(url.strip('{}')) %}
<li><a href="{{ applicable_legislation.uri }}">{{ applicable_legislation.short_title if applicable_legislation.short_title else applicable_legislation.title }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock applicableLegislation %}
{% block hvdCategories %}
{% if pkg.hvdCategory %}
{% set hvd_urls = pkg.hvdCategory.split(',') %}
<div class="hvdCategories-detail info-detail">
<a data-module="odsh_popover" data-module-trigger="custom" data-module-text="{{ _('A High-Value Dataset (HVD) category refers to a group of datasets that are considered particularly important and valuable. These datasets cover various topics such as maps, environmental data, weather information, statistics, company details, and data related to transportation. The European Commission has identified six main categories of these high-value datasets to ensure that they are easily accessible and useful for different purposes. These categories help to organize and prioritize datasets that have the potential to significantly benefit European citizens and businesses.') }}" title="{{ _('HVD Categories') }}">
<i class="fa fa-circle-info"></i>
</a>
</div>
<ul class="inline-list">
{% for url in hvd_urls %}
{% set hvd = h.odsh_load_hvd_categories(url.strip('{}')) %}
<li>{{ hvd.short_title if hvd.short_title else hvd.title }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock hvdCategories %}
{% endblock package_info_inner %}
{% set map_text = h.odsh_get_spatial_text(pkg) %}
<div class="spatial-detail info-detail">
<div>{{ _('Spatial uri') }}:</div>
{%set ext=map_text if map_text else '-'%}
<p>{{ ext }}</p>
{% set dataset_extent = h.get_pkg_dict_extra(pkg, 'spatial', '') %}
<section class="module module-narrow dataset-map">
{% set bbox = h.odsh_get_bounding_box(pkg) %}
{% if bbox%}
<div>{{ _('Map boundaries') }}:</div>
<p> {{ '{0:0.3f}'.format(bbox[0]).zfill(2).replace('.',',') }}° {{_('in east')}}</p>
<p> {{ '{0:0.3f}'.format(bbox[1]).replace('.',',') }}° {{_('in west')}}</p>
<p> {{ '{0:0.3f}'.format(bbox[2]).replace('.',',') }}° {{_('in north')}}</p>
<p> {{ '{0:0.3f}'.format(bbox[3]).replace('.',',') }}° {{_('in south')}}</p>
{% block metadata_links %}
<div class="info-detail metadata-links">
<div>{{ _('DCAT-AP.de metadata') }}</div>
<ul>
<li><a href="/dataset/{{ pkg.id }}.rdf">Download (RDF/XML)</a></li>
<li><a href="/dataset/{{ pkg.id }}.ttl">Download (Turtle)</a></li>
<li><a href="/dataset/{{ pkg.id }}.n3">Download (N3)</a></li>
<li><a href="/dataset/{{ pkg.id }}.jsonld">Download (JSON-LD)</a></li>
</ul>
</div>
{% endblock metadata_links %}
</div>
</section>
{% endif %}