Skip to content
Snippets Groups Projects
Commit 352b66eb authored by Benjamin Becker's avatar Benjamin Becker
Browse files

adds link to collection overview

parent b01b3512
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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 #}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment