Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BL: Add allmaps feature via show config #33

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/views/catalog/_blacklight_allmaps.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<% unless defined?(Geoblacklight) %>
<% if @document.sidecar_allmaps.georeferenced? %>
<%= render partial: 'allmaps/show/blacklight', locals: { document: @document } %>
<% end %>
<% end %>
58 changes: 0 additions & 58 deletions app/views/catalog/_show_main_content.html.erb

This file was deleted.

10 changes: 10 additions & 0 deletions lib/generators/blacklight/allmaps/config_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ def add_gbl_tabbed_viewer
gsub_file("app/controllers/catalog_controller.rb", "config.show.partials << \"show_default_viewer_container\"", "#config.show.partials << \"show_default_viewer_container\"")
end

def add_bl_allmaps_viewer
return unless ENV["LIGHT"] == "blacklight"
# Use the allmaps viewer
inject_into_file "app/controllers/catalog_controller.rb", after: "#config.show.thumbnail_field = 'thumbnail_path_ss'" do
"\n
# Blacklight::Allmaps Viewer
config.show.partials.insert(1, :blacklight_allmaps)"
end
end

def add_bl_georeferenced_facet
return unless ENV["LIGHT"] == "blacklight"
inject_into_file "app/controllers/catalog_controller.rb", after: "config.add_facet_field 'subject_era_ssim', label: 'Era'" do
Expand Down
Loading