geoblacklight 5.0.2 → 5.2.0
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/.github/dependabot.yml +15 -0
- data/.github/workflows/ruby.yml +11 -6
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +5 -1
- data/app/components/blacklight/icons/circle_info_solid_component.rb +1 -1
- data/app/components/blacklight/icons/fire_solid_component.rb +1 -1
- data/app/components/blacklight/icons/lightbulb_solid_component.rb +1 -1
- data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +1 -1
- data/app/components/geoblacklight/arcgis_component.html.erb +1 -1
- data/app/components/geoblacklight/arcgis_component.rb +1 -1
- data/app/components/geoblacklight/attribute_table_component.rb +1 -1
- data/app/components/geoblacklight/data_dictionary_download_component.rb +1 -1
- data/app/components/geoblacklight/display_note_component.rb +2 -2
- data/app/components/geoblacklight/document/sidebar_component.html.erb +5 -5
- data/app/components/geoblacklight/document/sidebar_component.rb +15 -0
- data/app/components/geoblacklight/download_links_component.rb +5 -1
- data/app/components/geoblacklight/header_icons_component.rb +4 -4
- data/app/components/geoblacklight/homepage_feature_facet_component.html.erb +1 -1
- data/app/components/geoblacklight/homepage_feature_facet_component.rb +1 -1
- data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +2 -2
- data/app/components/geoblacklight/iiif_drag_drop_component.rb +1 -1
- data/app/components/geoblacklight/index_map_inspect_component.rb +1 -1
- data/app/components/geoblacklight/index_map_legend_component.rb +1 -1
- data/app/components/geoblacklight/item_map_viewer_component.html.erb +58 -0
- data/app/components/geoblacklight/item_map_viewer_component.rb +24 -13
- data/app/components/geoblacklight/location_leaflet_map_component.rb +1 -1
- data/app/components/geoblacklight/login_link_component.rb +1 -1
- data/app/components/geoblacklight/relations_component.html.erb +1 -1
- data/app/components/geoblacklight/relations_component.rb +1 -1
- data/app/components/geoblacklight/static_map_component.rb +1 -4
- data/app/components/geoblacklight/viewer_help_text_component.rb +2 -2
- data/app/components/geoblacklight/web_services_component.rb +1 -1
- data/app/components/geoblacklight/web_services_default_component.html.erb +1 -1
- data/app/components/geoblacklight/web_services_default_component.rb +1 -1
- data/app/components/geoblacklight/web_services_link_component.rb +1 -1
- data/app/components/geoblacklight/web_services_wfs_component.rb +1 -1
- data/app/components/geoblacklight/web_services_wms_component.rb +1 -1
- data/app/controllers/relation_controller.rb +1 -1
- data/app/helpers/geoblacklight_helper.rb +0 -4
- data/app/javascript/geoblacklight/controllers/downloads_controller.js +2 -2
- data/app/javascript/geoblacklight/core.js +0 -2
- data/app/javascript/geoblacklight/index.js +0 -2
- data/config/locales/geoblacklight.en.yml +1 -0
- data/lib/generators/geoblacklight/assets/importmap_generator.rb +3 -15
- data/lib/generators/geoblacklight/assets/vite_generator.rb +6 -16
- data/lib/generators/geoblacklight/assets_generator.rb +15 -0
- data/lib/generators/geoblacklight/templates/settings.yml +1 -1
- data/lib/geoblacklight/download/geojson_download.rb +1 -1
- data/lib/geoblacklight/engine.rb +1 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/tasks/geoblacklight.rake +15 -23
- data/package.json +6 -9
- data/solr/conf/solrconfig.xml +1 -1
- data/spec/components/blacklight/icons/triangle_exclamation_solid_component_spec.rb +1 -1
- data/spec/components/geoblacklight/document_component_spec.rb +1 -1
- data/spec/components/geoblacklight/download_links_component_spec.rb +16 -0
- data/spec/components/geoblacklight/item_map_viewer_component_spec.rb +1 -1
- data/spec/features/configurable_basemap_spec.rb +7 -4
- data/spec/features/full_screen_control_spec.rb +2 -0
- data/spec/features/home_page_spec.rb +1 -6
- data/spec/features/index_view_spec.rb +21 -21
- data/spec/features/layer_inspection_spec.rb +1 -0
- data/spec/features/relations_spec.rb +9 -9
- data/spec/features/search_spec.rb +3 -3
- data/spec/features/tms_spec.rb +2 -2
- data/spec/features/xyz_spec.rb +2 -2
- data/spec/helpers/geoblacklight_helper_spec.rb +0 -17
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -0
- data/template.rb +7 -20
- metadata +4 -13
- data/.github/workflows/build-demo-app.yml +0 -156
- data/.github/workflows/prune-containers.yml +0 -19
- data/app/javascript/geoblacklight/controllers/clover_viewer_controller.js +0 -47
- data/lib/generators/geoblacklight/templates/demo-app/Dockerfile +0 -31
- data/lib/generators/geoblacklight/templates/demo-app/compose.yml +0 -26
- data/lib/generators/geoblacklight/templates/demo-app/start-server.sh +0 -21
- data/spec/features/iiif_viewer_spec.rb +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32b1f6b2ee7ddbd7ba16adc14ddad99cb87a9294004dfe7337ed0084626d1202
|
|
4
|
+
data.tar.gz: 3dfb956c7f0f3236671a65d9b3b8aea8135f473a388236b8879b0fdca064e310
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8f1c491b83df2cf7c3ca22b8239c718697eb9e9aa3596255e2bd2c6b59ee85d79ee04bbc70c8fac9fe9bd20f9d9ed56519184898d4e6bfa21adc3a2b7261728
|
|
7
|
+
data.tar.gz: 24f5d3148d558ffe6a2c8845419228bc51bf64d7277fa1ae7aad8e920341851cf02a91cb699cc7080dd7a27ea6c62d415d91620b0744b92bd9d8148cbe917362
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "github-actions"
|
|
9
|
+
directory: "/"
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
- package-ecosystem: "npm"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -10,7 +10,7 @@ jobs:
|
|
|
10
10
|
linter:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
13
|
+
- uses: actions/checkout@v6
|
|
14
14
|
- name: Set up Ruby
|
|
15
15
|
uses: ruby/setup-ruby@v1
|
|
16
16
|
with:
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
aardvark-fixture-linter:
|
|
24
24
|
runs-on: ubuntu-latest
|
|
25
25
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
27
|
- name: Set up Ruby
|
|
28
28
|
uses: ruby/setup-ruby@v1
|
|
29
29
|
with:
|
|
@@ -38,13 +38,18 @@ jobs:
|
|
|
38
38
|
strategy:
|
|
39
39
|
matrix:
|
|
40
40
|
ruby_version: ["3.2", "3.3", "3.4"]
|
|
41
|
-
rails_version: ["7.
|
|
41
|
+
rails_version: ["7.2.3", "8.1.1"]
|
|
42
42
|
asset_pipeline: ["vite"]
|
|
43
43
|
additional_engine_cart_rails_options: ["--js rollup"]
|
|
44
|
+
include:
|
|
45
|
+
- ruby_version: "3.4"
|
|
46
|
+
rails_version: "8.1.1"
|
|
47
|
+
asset_pipeline: "importmap"
|
|
48
|
+
additional_engine_cart_rails_options: "--js importmap"
|
|
44
49
|
|
|
45
50
|
name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }} / ${{ matrix.asset_pipeline }}
|
|
46
51
|
steps:
|
|
47
|
-
- uses: actions/checkout@
|
|
52
|
+
- uses: actions/checkout@v6
|
|
48
53
|
- name: Set up Ruby
|
|
49
54
|
uses: ruby/setup-ruby@v1
|
|
50
55
|
with:
|
|
@@ -67,8 +72,8 @@ jobs:
|
|
|
67
72
|
ENGINE_CART_RAILS_OPTIONS: "--skip-docker --skip-action-cable --skip-rubocop --skip-brakeman --skip-kamal --skip-solid -a propshaft --css bootstrap ${{ matrix.additional_engine_cart_rails_options }}"
|
|
68
73
|
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
|
|
69
74
|
- name: Upload coverage artifacts
|
|
70
|
-
uses: actions/upload-artifact@
|
|
71
|
-
if:
|
|
75
|
+
uses: actions/upload-artifact@v6
|
|
76
|
+
if: matrix.asset_pipeline == 'vite'
|
|
72
77
|
with:
|
|
73
78
|
name: "coverage-${{ matrix.ruby_version }}-${{ matrix.rails_version }}"
|
|
74
79
|
path: coverage/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
|
|
14
14
|
// Ensure embeds, openlayers viewer, and IIIF viewer fit their container
|
|
15
|
-
iframe, .ol-viewport, .
|
|
15
|
+
iframe, .ol-viewport, .openseadragon-container {
|
|
16
16
|
min-height: 27.5rem;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
margin-bottom: 1rem;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
#mirador {
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
.help-text {
|
|
28
32
|
cursor: pointer;
|
|
29
33
|
}
|
|
@@ -7,7 +7,7 @@ module Blacklight
|
|
|
7
7
|
|
|
8
8
|
def svg
|
|
9
9
|
<<~SVG
|
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
|
11
11
|
<title>#{title}</title>
|
|
12
12
|
<path fill="#6c757d" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/>
|
|
13
13
|
</svg>
|
|
@@ -7,7 +7,7 @@ module Blacklight
|
|
|
7
7
|
|
|
8
8
|
def svg
|
|
9
9
|
<<~SVG
|
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
|
11
11
|
<title>#{title}</title>
|
|
12
12
|
<path fill="#6c757d" d="M159.3 5.4c7.8-7.3 19.9-7.2 27.7 .1c27.6 25.9 53.5 53.8 77.7 84c11-14.4 23.5-30.1 37-42.9c7.9-7.4 20.1-7.4 28 .1c34.6 33 63.9 76.6 84.5 118c20.3 40.8 33.8 82.5 33.8 111.9C448 404.2 348.2 512 224 512C98.4 512 0 404.1 0 276.5c0-38.4 17.8-85.3 45.4-131.7C73.3 97.7 112.7 48.6 159.3 5.4zM225.7 416c25.3 0 47.7-7 68.8-21c42.1-29.4 53.4-88.2 28.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2 29.3c-6.6 7.6-18.5 7.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8 42.5-50.8 69.3-50.8 99.4C112 375.4 162.6 416 225.7 416z"/>
|
|
13
13
|
</svg>
|
|
@@ -7,7 +7,7 @@ module Blacklight
|
|
|
7
7
|
|
|
8
8
|
def svg
|
|
9
9
|
<<~SVG
|
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
|
11
11
|
<title>#{title}</title>
|
|
12
12
|
<path fill="#6c757d" d="M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"/>
|
|
13
13
|
</svg>
|
|
@@ -8,7 +8,7 @@ module Blacklight
|
|
|
8
8
|
def svg
|
|
9
9
|
<<~SVG
|
|
10
10
|
<title>#{title}</title>
|
|
11
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome
|
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
|
|
12
12
|
<path fill="#6c757d" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/>
|
|
13
13
|
</svg>
|
|
14
14
|
SVG
|
|
@@ -6,7 +6,7 @@ module Geoblacklight
|
|
|
6
6
|
|
|
7
7
|
def initialize(display_note:)
|
|
8
8
|
@display_note = display_note
|
|
9
|
-
super
|
|
9
|
+
super()
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def before_render
|
|
@@ -24,7 +24,7 @@ module Geoblacklight
|
|
|
24
24
|
prefixed = true
|
|
25
25
|
@note = tag.div class: "gbl-display-note alert #{value.first}", role: "alert" do
|
|
26
26
|
capture do
|
|
27
|
-
"#{geoblacklight_icon(value.second)}
|
|
27
|
+
"#{helpers.geoblacklight_icon(value.second)}
|
|
28
28
|
#{@display_note}".html_safe
|
|
29
29
|
end
|
|
30
30
|
end
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<%=
|
|
1
|
+
<%= render_static_map_component %>
|
|
2
2
|
<%= render_show_tools %>
|
|
3
3
|
|
|
4
4
|
<div class="sidebar-buttons">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
<% sidebar_buttons.each do | sidebar_button | %>
|
|
6
|
+
<%= render sidebar_button %>
|
|
7
|
+
<% end %>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
<%=
|
|
10
|
+
<%= render_more_like_this %>
|
|
11
11
|
|
|
12
12
|
<%= render "relations_container", document: document %>
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
module Geoblacklight
|
|
4
4
|
module Document
|
|
5
5
|
class SidebarComponent < Blacklight::Document::SidebarComponent
|
|
6
|
+
def render_static_map_component
|
|
7
|
+
render Geoblacklight::StaticMapComponent.new(document:)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def sidebar_buttons
|
|
11
|
+
[
|
|
12
|
+
Geoblacklight::WebServicesLinkComponent.new(document:),
|
|
13
|
+
Geoblacklight::DownloadLinksComponent.new(document:),
|
|
14
|
+
Geoblacklight::LoginLinkComponent.new(document:)
|
|
15
|
+
]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def render_more_like_this
|
|
19
|
+
render Blacklight::Document::MoreLikeThisComponent.new(document:)
|
|
20
|
+
end
|
|
6
21
|
end
|
|
7
22
|
end
|
|
8
23
|
end
|
|
@@ -7,7 +7,7 @@ module Geoblacklight
|
|
|
7
7
|
|
|
8
8
|
def initialize(document:)
|
|
9
9
|
@document = document
|
|
10
|
-
super
|
|
10
|
+
super()
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def render?
|
|
@@ -76,5 +76,9 @@ module Geoblacklight
|
|
|
76
76
|
def proper_case_format(format)
|
|
77
77
|
t("geoblacklight.formats.#{format.to_s.parameterize(separator: "_")}")
|
|
78
78
|
end
|
|
79
|
+
|
|
80
|
+
def iiif_jpg_url
|
|
81
|
+
@document.references.iiif.endpoint.sub! "info.json", "full/full/0/default.jpg"
|
|
82
|
+
end
|
|
79
83
|
end
|
|
80
84
|
end
|
|
@@ -7,23 +7,23 @@ module Geoblacklight
|
|
|
7
7
|
def initialize(document:, fields: [Settings.FIELDS.RESOURCE_CLASS, Settings.FIELDS.PROVIDER, Settings.FIELDS.ACCESS_RIGHTS])
|
|
8
8
|
@document = document
|
|
9
9
|
@fields = fields
|
|
10
|
-
super
|
|
10
|
+
super()
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def icon(field)
|
|
14
14
|
return resource_icon if field == Settings.FIELDS.RESOURCE_CLASS
|
|
15
15
|
|
|
16
|
-
geoblacklight_icon(@document[field], classes: "svg_tooltip")
|
|
16
|
+
helpers.geoblacklight_icon(@document[field], classes: "svg_tooltip")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
# If the item has a resource type of "X data" where "X" is an existing icon, use that icon
|
|
20
20
|
# Otherwise just use the resource class icon
|
|
21
21
|
def resource_icon
|
|
22
22
|
dataset_type = @document.resource_type.find { |type| type.include?(" data") }&.gsub(" data", "")
|
|
23
|
-
resource_type_icon = geoblacklight_icon(dataset_type, classes: "svg_tooltip")
|
|
23
|
+
resource_type_icon = helpers.geoblacklight_icon(dataset_type, classes: "svg_tooltip")
|
|
24
24
|
return resource_type_icon unless resource_type_icon.include?("icon-missing")
|
|
25
25
|
|
|
26
|
-
geoblacklight_icon(@document.resource_class.first, classes: "svg_tooltip")
|
|
26
|
+
helpers.geoblacklight_icon(@document.resource_class.first, classes: "svg_tooltip")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<%= link_to @href_link, data: {manifest: @manifest}, class: 'float-end' do %>
|
|
2
|
-
<%= geoblacklight_icon('iiif-drag-drop', classes: 'svg_tooltip iiif-icon') %>
|
|
3
|
-
<% end %>
|
|
2
|
+
<%= helpers.geoblacklight_icon('iiif-drag-drop', classes: 'svg_tooltip iiif-icon') %>
|
|
3
|
+
<% end %>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Geoblacklight
|
|
4
4
|
class IiifDragDropComponent < ViewComponent::Base
|
|
5
5
|
def initialize(document:)
|
|
6
|
-
super
|
|
6
|
+
super()
|
|
7
7
|
manifest_ref = document.item_viewer&.iiif_manifest
|
|
8
8
|
@manifest = manifest_ref&.endpoint || ""
|
|
9
9
|
@href_link = Settings.IIIF_DRAG_DROP_LINK&.gsub("@manifest", @manifest)
|
|
@@ -1 +1,59 @@
|
|
|
1
1
|
<%= display_tag %>
|
|
2
|
+
<% content_for :head do %>
|
|
3
|
+
<!-- Include Mirador 3 for IIIF content -->
|
|
4
|
+
<script src="https://unpkg.com/mirador@^3/dist/mirador.min.js"></script>
|
|
5
|
+
<!-- Include OpenSeadragon for IIIF Image content -->
|
|
6
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.4.2/openseadragon.min.js"></script>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% if iiif_manifest? %>
|
|
9
|
+
<!-- Initialize Mirador viewer -->
|
|
10
|
+
<script>
|
|
11
|
+
window.miradorTarget = document.getElementById("mirador");
|
|
12
|
+
if (window.miradorTarget) {
|
|
13
|
+
Mirador.viewer({
|
|
14
|
+
id: "mirador",
|
|
15
|
+
windows: [
|
|
16
|
+
{
|
|
17
|
+
id: "main",
|
|
18
|
+
loadedManifest: window.miradorTarget.dataset.manifestUrl,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
window: {
|
|
22
|
+
allowClose: false,
|
|
23
|
+
allowFullscreen: true,
|
|
24
|
+
allowMaximize: false,
|
|
25
|
+
authNewWindowCenter: "screen",
|
|
26
|
+
hideWindowTitle: true,
|
|
27
|
+
sidebarPanel: "attribution",
|
|
28
|
+
views: [
|
|
29
|
+
{ key: "single", behaviors: [null, "individuals"] },
|
|
30
|
+
{ key: "book", behaviors: [null, "paged"] },
|
|
31
|
+
{ key: "scroll", behaviors: ["continuous"] },
|
|
32
|
+
{ key: "gallery" },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
workspace: {
|
|
36
|
+
showZoomControls: true,
|
|
37
|
+
type: "single",
|
|
38
|
+
},
|
|
39
|
+
workspaceControlPanel: {
|
|
40
|
+
enabled: false,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
<% elsif iiif_image? %>
|
|
46
|
+
<!-- Initialize OpenSeadragon viewer -->
|
|
47
|
+
<script>
|
|
48
|
+
window.osdTarget = document.getElementById("openseadragon");
|
|
49
|
+
if (window.osdTarget) {
|
|
50
|
+
OpenSeadragon({
|
|
51
|
+
id: "openseadragon",
|
|
52
|
+
tileSources: [window.osdTarget.dataset.imageUrl],
|
|
53
|
+
prefixUrl: "https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.4.2/images/",
|
|
54
|
+
preserveViewport: true,
|
|
55
|
+
visibilityRatio: 1,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
<% end %>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Geoblacklight
|
|
4
4
|
class ItemMapViewerComponent < ViewComponent::Base
|
|
5
5
|
def initialize(document:)
|
|
6
|
-
super
|
|
6
|
+
super()
|
|
7
7
|
@document = document
|
|
8
8
|
end
|
|
9
9
|
|
|
@@ -12,8 +12,9 @@ module Geoblacklight
|
|
|
12
12
|
# Otherwise display the base viewer which will take into account if it is open layers
|
|
13
13
|
# or generic content.
|
|
14
14
|
def display_tag
|
|
15
|
-
return
|
|
16
|
-
return
|
|
15
|
+
return iiif_manifest_tag if iiif_manifest?
|
|
16
|
+
return iiif_image_tag if iiif_image?
|
|
17
|
+
return oembed_tag if protocol == "Oembed"
|
|
17
18
|
|
|
18
19
|
base_tag
|
|
19
20
|
end
|
|
@@ -32,23 +33,33 @@ module Geoblacklight
|
|
|
32
33
|
%w[Cog Pmtiles].include?(protocol)
|
|
33
34
|
end
|
|
34
35
|
|
|
35
|
-
def
|
|
36
|
-
|
|
36
|
+
def iiif_image?
|
|
37
|
+
protocol == "Iiif"
|
|
37
38
|
end
|
|
38
39
|
|
|
39
|
-
def
|
|
40
|
-
protocol == "
|
|
40
|
+
def iiif_manifest?
|
|
41
|
+
protocol == "IiifManifest"
|
|
41
42
|
end
|
|
42
43
|
|
|
43
|
-
#
|
|
44
|
-
|
|
44
|
+
# Use mirador as the IIIF manifest viewer due to bug in Clover; see:
|
|
45
|
+
# https://github.com/samvera-labs/clover-iiif/issues/294
|
|
46
|
+
def iiif_manifest_tag
|
|
45
47
|
tag.div(nil,
|
|
46
|
-
id: "
|
|
48
|
+
id: "mirador",
|
|
47
49
|
class: "viewer",
|
|
48
50
|
data: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
manifest_url: @document.viewer_endpoint
|
|
52
|
+
})
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Use openseadragon for IIIF image content due to bug in Clover; see:
|
|
56
|
+
# https://github.com/samvera-labs/clover-iiif/issues/294
|
|
57
|
+
def iiif_image_tag
|
|
58
|
+
tag.div(nil,
|
|
59
|
+
id: "openseadragon",
|
|
60
|
+
class: "viewer",
|
|
61
|
+
data: {
|
|
62
|
+
image_url: @document.viewer_endpoint
|
|
52
63
|
})
|
|
53
64
|
end
|
|
54
65
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<% relationship_type_results['docs'][0..2].map { |hash| SolrDocument.new(hash) }.each do |doc| %>
|
|
8
8
|
<li class="list-group-item border-bottom-0">
|
|
9
9
|
<%= link_to solr_document_path(doc) do %>
|
|
10
|
-
<%= relations_icon(doc, rel_type_info.icon) unless rel_type_info.icon.nil? %>
|
|
10
|
+
<%= helpers.relations_icon(doc, rel_type_info.icon) unless rel_type_info.icon.nil? %>
|
|
11
11
|
<%= doc.title %>
|
|
12
12
|
<% end %>
|
|
13
13
|
</li>
|
|
@@ -6,7 +6,7 @@ module Geoblacklight
|
|
|
6
6
|
|
|
7
7
|
def initialize(document:, **)
|
|
8
8
|
@document = document
|
|
9
|
-
super
|
|
9
|
+
super()
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def render?
|
|
@@ -22,9 +22,6 @@ module Geoblacklight
|
|
|
22
22
|
leaflet_options.SLEEP.SLEEP = false
|
|
23
23
|
tag.div(nil,
|
|
24
24
|
id: "static-map",
|
|
25
|
-
aria: {
|
|
26
|
-
label: @label
|
|
27
|
-
},
|
|
28
25
|
data: {
|
|
29
26
|
"controller" => "leaflet-viewer",
|
|
30
27
|
"leaflet-viewer-basemap-value" => helpers.geoblacklight_basemap,
|
|
@@ -8,12 +8,12 @@ module Geoblacklight
|
|
|
8
8
|
def initialize(feature, key)
|
|
9
9
|
@feature = feature
|
|
10
10
|
@key = key
|
|
11
|
-
super
|
|
11
|
+
super()
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# Retrieve i18n value
|
|
15
15
|
def help_text_exists?
|
|
16
|
-
I18n.exists?("geoblacklight.help_text.#{@feature}.#{@key}", locale)
|
|
16
|
+
I18n.exists?("geoblacklight.help_text.#{@feature}.#{@key}", helpers.locale)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def help_text_value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class='mb-3 web-services-form'>
|
|
2
2
|
<label for='<%= reference.type%>_webservice'>
|
|
3
|
-
<%= "#{formatted_name_reference(reference.type)}" %>
|
|
3
|
+
<%= "#{helpers.formatted_name_reference(reference.type)}" %>
|
|
4
4
|
</label>
|
|
5
5
|
<div class='input-group'>
|
|
6
6
|
<input type='text' id='<%= reference.type%>_webservice' value='<%= reference.endpoint %>' class='form-control'>
|
|
@@ -5,10 +5,6 @@ module GeoblacklightHelper
|
|
|
5
5
|
document.public? || (document.same_institution? && user_signed_in?)
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
def iiif_jpg_url
|
|
9
|
-
@document.references.iiif.endpoint.sub! "info.json", "full/full/0/default.jpg"
|
|
10
|
-
end
|
|
11
|
-
|
|
12
8
|
##
|
|
13
9
|
# Blacklight catalog controller helper method to truncate field value to 150 chars
|
|
14
10
|
# @param [SolrDocument] args
|
|
@@ -48,8 +48,8 @@ export default class extends Controller {
|
|
|
48
48
|
renderMessage(message) {
|
|
49
49
|
Object.entries(message).forEach(([idx, msg]) => {
|
|
50
50
|
const flash = document.createElement("div");
|
|
51
|
-
flash.className = `alert alert-${msg[0]}`;
|
|
52
|
-
flash.innerHTML =
|
|
51
|
+
flash.className = `alert alert-${msg[0]} alert-dismissible fade show`;
|
|
52
|
+
flash.innerHTML = `${msg[1]}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>`;
|
|
53
53
|
document.querySelector("div.flash_messages").appendChild(flash);
|
|
54
54
|
});
|
|
55
55
|
}
|