diff --git a/ckanext/odsh/collection/helpers.py b/ckanext/odsh/collection/helpers.py index 9c3024337c10aabcf5723f4bea75abd4adc0de08..282fe5e0c1a0be68034caa18ba201181970f5291 100644 --- a/ckanext/odsh/collection/helpers.py +++ b/ckanext/odsh/collection/helpers.py @@ -75,6 +75,8 @@ def gather_collection_info(collection_dict, datasets_in_collection, dataset_dict name_collection = collection_dict.get('name') persistent_link_last_member = url_last_member(name_collection) + url_collection = url_from_id(collection_dict.get('id')) + if dataset_dict: name_current_dataset = dataset_dict.get('name') dataset_names = [d.get('name') for d in datasets_in_collection] @@ -107,6 +109,7 @@ def gather_collection_info(collection_dict, datasets_in_collection, dataset_dict return { 'title': collection_dict.get('title'), + 'url': url_collection, 'members': datasets_in_collection, 'first_member': { 'name': name_first_dataset, diff --git a/ckanext/odsh/templates/package/read.html b/ckanext/odsh/templates/package/read.html index fd94229c593a5ceb09e219f32f13b9babeff6458..34da5ee1fa035c942a6b95f81a29d9755bc01a4a 100644 --- a/ckanext/odsh/templates/package/read.html +++ b/ckanext/odsh/templates/package/read.html @@ -3,6 +3,7 @@ {% set pkg = c.pkg_dict %} {% set collection = h.get_collection(pkg) %} {% set collection_title = collection['title'] if collection else None %} +{% set collection_url = collection['url'] if collection else None %} {% set successor_url = collection['successor']['url'] if collection else None %} {% set predecessor_url = collection['predecessor']['url'] if collection else None %} {% set latest_collection_member = collection['persistent_link_last_member'] if collection else None %} @@ -101,7 +102,7 @@ <section id="dataset-collection"> {% if collection_title %} <p> - Dieses Dokument ist Bestandteil der Dokumentengruppe "{{ collection_title }}". + Dieses Dokument ist Bestandteil der <a href={{ collection_url }}>Dokumentengruppe "{{ collection_title }}"</a>. Sie können zu älteren und neueren Dokumenten blättern. </p> {% endif %} {# collection_title #}