Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Transparenzportal
ckanext-odsh
Commits
352b66eb
Commit
352b66eb
authored
4 years ago
by
Benjamin Becker
Browse files
Options
Downloads
Patches
Plain Diff
adds link to collection overview
parent
b01b3512
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ckanext/odsh/collection/helpers.py
+3
-0
3 additions, 0 deletions
ckanext/odsh/collection/helpers.py
ckanext/odsh/templates/package/read.html
+2
-1
2 additions, 1 deletion
ckanext/odsh/templates/package/read.html
with
5 additions
and
1 deletion
ckanext/odsh/collection/helpers.py
+
3
−
0
View file @
352b66eb
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
ckanext/odsh/templates/package/read.html
+
2
−
1
View file @
352b66eb
...
...
@@ -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 #}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment