Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-dgu
Commits
f65458c7
Commit
f65458c7
authored
Nov 25, 2014
by
Tom Mortimer-Jones
Browse files
[1625] Fix dataset links
parent
d6b8c813
Changes
1
Hide whitespace changes
Inline
Side-by-side
ckanext/dgu/lib/reports.py
View file @
f65458c7
...
...
@@ -481,6 +481,8 @@ datasets_without_resources_info = {
def
dataset_app_report
(
reverse
=
False
):
from
ckan.lib.helpers
import
url_for
table
=
[]
data
=
collections
.
defaultdict
(
lambda
:
{
'related'
:
[]})
...
...
@@ -491,12 +493,9 @@ def dataset_app_report(reverse=False):
data
[
key
][
'title'
]
=
related
.
related
.
title
data
[
key
][
'url'
]
=
related
.
related
.
url
if
related
.
related
.
title
==
'EnviroFIND'
:
print
"EnviroFIND"
,
related
.
related
.
id
dataset
=
{
'title'
:
related
.
dataset
.
title
,
'url'
:
''
'url'
:
url_for
(
controller
=
'package'
,
action
=
'read'
,
id
=
related
.
dataset
.
name
)
}
data
[
key
][
'related'
].
append
(
dataset
)
...
...
@@ -504,7 +503,7 @@ def dataset_app_report(reverse=False):
else
:
key
=
related
.
dataset
.
id
data
[
key
][
'title'
]
=
related
.
dataset
.
title
data
[
key
][
'url'
]
=
''
data
[
key
][
'url'
]
=
url_for
(
controller
=
'package'
,
action
=
'read'
,
id
=
related
.
dataset
.
name
)
app
=
{
'title'
:
related
.
related
.
title
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment