Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
86c83411
Commit
86c83411
authored
Oct 20, 2020
by
Matthieu Benoist
Browse files
Add a copy link button component to the download tab
parent
a8dc718b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/dataset-detail/components/dataset-downloads/resource-download-item/resource-download-item/resource-download-item.component.html
View file @
86c83411
...
...
@@ -54,8 +54,13 @@
<span
class=
"sr-only"
>
Options
</span>
</button>
<app-download-button
[url]=
"queryableUrl"
[fileName]=
"fileName"
>
</app-download-button>
<app-link-copy-icon
[linkUrl]=
"queryableUrl"
[displayLink]=
"false"
>
<div
class=
"resource-download-icon"
>
<app-download-button
[url]=
"queryableUrl"
[fileName]=
"fileName"
>
</app-download-button>
</div>
</app-link-copy-icon>
</div>
</div>
...
...
src/app/dataset-detail/components/dataset-downloads/resource-download-item/resource-download-item/resource-download-item.component.ts
View file @
86c83411
...
...
@@ -133,7 +133,6 @@ export class ResourceDownloadItemComponent implements OnInit {
get
queryableUrl
()
{
let
queryableUrl
=
''
;
if
(
this
.
isQueryable
)
{
queryableUrl
=
this
.
resource
.
metadataLink
.
url
;
let
layer
=
''
;
let
outputFormat
=
''
;
...
...
@@ -161,9 +160,11 @@ export class ResourceDownloadItemComponent implements OnInit {
}
}
else
if
(
this
.
resource
.
type
===
linkFormats
.
ws
)
{
if
(
this
.
format
.
name
===
'
JSON
'
)
{
queryableUrl
+=
`/
${
this
.
resource
.
metadataLink
.
name
}
/all.json`
;
queryableUrl
+=
`/
${
this
.
resource
.
metadataLink
.
name
}
/all.json
?maxFeatures=-1
`
;
}
else
{
queryableUrl
+=
`/
${
this
.
resource
.
metadataLink
.
name
}
.shp?srsname=EPSG:3946`
;
const
projectionAndBbox
=
this
.
getProjectionAndBbox
(
this
.
format
);
queryableUrl
+=
`/
${
this
.
resource
.
metadataLink
.
name
}
.shp?
${
projectionAndBbox
.
projection
}
`
;
}
}
else
if
(
this
.
resource
.
type
===
linkFormats
.
kml
)
{
queryableUrl
+=
`?
${
this
.
resource
.
parametersUrl
}
`
+
...
...
Write
Preview
Supports
Markdown
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