geoblacklight 6.0.0.pre.alpha.5 → 6.0.0.pre.alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 61ecf2c6234b04ec7373158fed8c716500eaca2cbb482884a01d9a9249eb56aa
|
|
4
|
+
data.tar.gz: a1e78966179cb3bb969489bd9d8a03c2a0b0132cae20e7391d3cfe63fcdc07d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 484b6090ec0e6a9bfc172f2a4016ff759e49eaaafe17eef71bfa43a904afeded28772fef76927c695ed4455da0266454683c7e6b3bab5f57fefdc98609bb52f4
|
|
7
|
+
data.tar.gz: e0f6c7f9555f442790dce2d959c4fd2c46ac3df04a0f0511b092b2ec00c2a4d78e16c363274af02880b3e24cee1147a3882d46490382e2899567d3b3e0380ad4
|
|
@@ -19,6 +19,10 @@ module Geoblacklight
|
|
|
19
19
|
(direct_download_links + iiif_download_links).compact
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def child_component
|
|
23
|
+
Geoblacklight::Document::DownloadLinkComponent
|
|
24
|
+
end
|
|
25
|
+
|
|
22
26
|
# Direct download links to files
|
|
23
27
|
def direct_download_links
|
|
24
28
|
direct_downloads = Array(document.direct_download&.dig(:download))
|
|
@@ -27,12 +31,12 @@ module Geoblacklight
|
|
|
27
31
|
# Use label and url for multiple downloads; use format to label otherwise
|
|
28
32
|
direct_downloads.map do |entry|
|
|
29
33
|
if entry.is_a?(Hash)
|
|
30
|
-
|
|
34
|
+
child_component.new(
|
|
31
35
|
title: entry["label"],
|
|
32
36
|
url: entry["url"]
|
|
33
37
|
)
|
|
34
38
|
else
|
|
35
|
-
|
|
39
|
+
child_component.new(
|
|
36
40
|
url: entry,
|
|
37
41
|
data_file_type: document.file_format
|
|
38
42
|
)
|
|
@@ -43,11 +47,11 @@ module Geoblacklight
|
|
|
43
47
|
# Links to IIIF image and manifest downloads
|
|
44
48
|
def iiif_download_links
|
|
45
49
|
[
|
|
46
|
-
document.iiif_download.present? &&
|
|
50
|
+
document.iiif_download.present? && child_component.new(
|
|
47
51
|
title: t("geoblacklight.download.iiif_image_link"),
|
|
48
52
|
url: document.iiif_download[:iiif].sub(/\/info\.json$/, "/full/full/0/default.jpg")
|
|
49
53
|
),
|
|
50
|
-
document.references.iiif_manifest.present? &&
|
|
54
|
+
document.references.iiif_manifest.present? && child_component.new(
|
|
51
55
|
title: t("geoblacklight.download.iiif_manifest_link"),
|
|
52
56
|
url: document.references.iiif_manifest.endpoint,
|
|
53
57
|
file_type: "JSON"
|