geoblacklight_admin 0.6.0 → 0.6.1
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 +4 -4
- data/README.md +5 -2
- data/app/models/asset.rb +2 -0
- data/app/models/document.rb +21 -21
- data/app/models/document_distribution.rb +1 -1
- data/app/models/geoblacklight_admin.rb +0 -1
- data/app/views/admin/advanced_search/facets.json.jbuilder +0 -2
- data/app/views/admin/advanced_search/index.json.jbuilder +0 -2
- data/app/views/admin/api/_field.json.jbuilder +0 -2
- data/app/views/admin/api/fetch.json.jbuilder +0 -2
- data/app/views/admin/api/index.json.jbuilder +0 -2
- data/app/views/admin/document_distributions/_form.html.erb +1 -1
- data/app/views/admin/document_distributions/index.html.erb +0 -2
- data/app/views/admin/documents/_form_nav.html.erb +0 -1
- data/app/views/admin/documents/_json_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/_json_btaa_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/_json_file.jbuilder +0 -2
- data/app/views/admin/documents/_json_gbl_v1.jbuilder +0 -2
- data/app/views/admin/documents/fetch.json_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/fetch.json_btaa_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/fetch.json_file.jbuilder +0 -2
- data/app/views/admin/documents/fetch.json_gbl_v1.jbuilder +0 -2
- data/app/views/admin/documents/index.json_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/index.json_btaa_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/index.json_file.jbuilder +0 -2
- data/app/views/admin/documents/index.json_gbl_v1.jbuilder +0 -2
- data/app/views/admin/documents/show.json_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/show.json_btaa_aardvark.jbuilder +0 -2
- data/app/views/admin/documents/show.json_gbl_v1.jbuilder +0 -2
- data/lib/geoblacklight_admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fcfdbb7ea830459ca48b31a53d53d8ffba6907f65854b0cc98c4405fa724531
|
4
|
+
data.tar.gz: b0f7f43a9fdf214711479393e8b1d485b551b230708d52d9e27172ba970174c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e56308683ec638bc5905254a8719f467c9b40d139389ed800038de75b318e4995e88ba297587042744e79433204556d87d65adcf7a0fe2867bc2b67ee618db2
|
7
|
+
data.tar.gz: 84ec89c486944d06a529caf276072fe426ab350bfcffd18f92cb172561c626d569ee5fe6871d9ef56003950215abce7e008b3be0d7212cd9f183be79463e14f2
|
data/README.md
CHANGED
@@ -69,8 +69,11 @@ The gem is available as open source under the terms of the [Apache 2.0 License](
|
|
69
69
|
* ~~Debug Rails 7.2 support (remove devise_invitable, see [#915](https://github.com/scambra/devise_invitable/issues/915))~~
|
70
70
|
* ~~Separate dct_references_s support into a separate model~~
|
71
71
|
* ~~Import/Export dct_references_s outside of the main document model~~
|
72
|
-
*
|
73
|
-
* DRY up Gem dependencies and Engine routing
|
72
|
+
* Data Dictionary: Add support for `document_data_dictionary`
|
74
73
|
* Gazetteer: Add GeoNames support
|
75
74
|
* Gazetteer: Add Who's On First support
|
75
|
+
* Gazetteer: Add Ollama support
|
76
|
+
* Gazetteer: Add BTAA spatial file support
|
77
|
+
* Migrate our GBL API controllers to just RSolr-based models
|
78
|
+
* DRY up Gem dependencies and Engine routing
|
76
79
|
* Remove any remaining GEOMG references
|
data/app/models/asset.rb
CHANGED
@@ -55,6 +55,8 @@ class Asset < Kithe::Asset
|
|
55
55
|
if dct_references_uri_key.present?
|
56
56
|
reference_type = ReferenceType.find_by_name(dct_references_uri_key)
|
57
57
|
hash[reference_type.reference_uri.to_s] = if reference_type.reference_uri.to_s == "http://schema.org/downloadUrl"
|
58
|
+
logger.debug("Asset#to_aardvark_reference > downloadUrl: #{full_file_url} > #{label.present? ? label : file.metadata["filename"]}")
|
59
|
+
|
58
60
|
{
|
59
61
|
"url" => full_file_url,
|
60
62
|
"label" => label.present? ? label : file.metadata["filename"]
|
data/app/models/document.rb
CHANGED
@@ -122,35 +122,35 @@ class Document < Kithe::Work
|
|
122
122
|
# - Use distributable assets
|
123
123
|
# @TODO: Remove BEFORE path once we've migrated to DocumentDistributions
|
124
124
|
def distributions
|
125
|
-
distributions =
|
125
|
+
distributions = {}
|
126
126
|
|
127
127
|
# AFTER - Add DocumentDistributions to distributions
|
128
128
|
if ENV["GBL_ADMIN_REFERENCES_MIGRATED"] == "true"
|
129
129
|
distributions = document_distributions.to_aardvark_distributions
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
130
|
+
else
|
131
|
+
# BEFORE - Prep value arrays
|
132
|
+
# @TODO: Remove this once we've migrated to DocumentDistributions
|
133
|
+
send(GeoblacklightAdmin::Schema.instance.solr_fields[:reference]).each do |ref|
|
134
|
+
if ref.category.present?
|
135
|
+
distributions[Document::Reference::REFERENCE_VALUES[ref.category.to_sym][:uri]] = []
|
136
|
+
end
|
137
137
|
end
|
138
|
-
end
|
139
138
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
139
|
+
# BEFORE - Seed value arrays
|
140
|
+
# @TODO: Remove this once we've migrated to DocumentDistributions
|
141
|
+
send(GeoblacklightAdmin::Schema.instance.solr_fields[:reference]).each do |ref|
|
142
|
+
if ref.category.present?
|
143
|
+
distributions[Document::Reference::REFERENCE_VALUES[ref.category.to_sym][:uri]] << ref.value
|
144
|
+
end
|
145
145
|
end
|
146
|
-
|
147
|
-
logger.debug("\n\nDocument#distributions > seeded: #{distributions}")
|
146
|
+
logger.debug("\n\nDocument#distributions > seeded: #{distributions}")
|
148
147
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
148
|
+
# BEFORE - Apply Multiple Downloads
|
149
|
+
# @TODO: Remove this once we've migrated to DocumentDistributions
|
150
|
+
if ENV["GBL_ADMIN_REFERENCES_MIGRATED"] == "false"
|
151
|
+
distributions = apply_downloads(distributions)
|
152
|
+
logger.debug("Document#distributions > downloads: #{distributions}")
|
153
|
+
end
|
154
154
|
end
|
155
155
|
|
156
156
|
# BEFORE & AFTER - Apply Distributable Assets
|
@@ -39,7 +39,7 @@ class DocumentDistribution < ApplicationRecord
|
|
39
39
|
merged["http://schema.org/downloadUrl"] ||= []
|
40
40
|
merged["http://schema.org/downloadUrl"] << {
|
41
41
|
"url" => dist.values.first,
|
42
|
-
"label" => dist[:label]
|
42
|
+
"label" => dist[:label].present? ? dist[:label] : dist.values.first
|
43
43
|
}
|
44
44
|
else
|
45
45
|
merged[dist.keys.first] = dist.values.first
|
@@ -21,7 +21,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
21
21
|
const labelInput = document.getElementById('label-input');
|
22
22
|
|
23
23
|
function toggleLabelInput() {
|
24
|
-
if (distributionSelect.options[distributionSelect.selectedIndex].text === 'Download
|
24
|
+
if (distributionSelect.options[distributionSelect.selectedIndex].text === 'Download') {
|
25
25
|
labelInput.disabled = false;
|
26
26
|
} else {
|
27
27
|
labelInput.disabled = true;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoblacklight_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Larson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_storage_validations
|