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

Update 4.1 #4

Merged
merged 2 commits into from
Nov 29, 2023
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
12 changes: 6 additions & 6 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,18 @@ class CatalogController < ApplicationController
# Tools from Blacklight
config.add_results_collection_tool(:sort_widget)
config.add_results_collection_tool(:per_page_widget)
config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
# config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
config.add_show_tools_partial(:citation)
config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
# config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
# config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)

# Custom tools for GeoBlacklight
config.add_show_tools_partial :metadata, if: proc { |_context, _config, options|
options[:document] && (Settings.METADATA_SHOWN & options[:document].references.refs.map(&:type).map(&:to_s)).any?
}
config.add_show_tools_partial :carto, partial: 'carto', if: proc { |_context, _config, options|
options[:document] && options[:document].carto_reference.present?
}
# config.add_show_tools_partial :carto, partial: 'carto', if: proc { |_context, _config, options|
# options[:document] && options[:document].carto_reference.present?
# }
config.add_show_tools_partial :arcgis, partial: 'arcgis', if: proc { |_context, _config, options|
options[:document] && options[:document].arcgis_urls.present?
}
Expand Down
22 changes: 22 additions & 0 deletions app/views/catalog/_home_text.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div class='container'>
<div class='row text-center'>
<div class='col-sm'>
<%= content_tag :h3, t('geoblacklight.home.category_heading') %>
<div class='row'>
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'tags', label: 'geoblacklight.home.theme', facet_field: Settings.FIELDS.THEME, response: @response)) %>
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'arrow-circle-down', label: 'geoblacklight.home.resource_class', facet_field: Settings.FIELDS.RESOURCE_CLASS, response: @response)) %>
</div>
<div class='row'>
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'globe', label: 'geoblacklight.home.placename', facet_field: Settings.FIELDS.SPATIAL_COVERAGE, response: @response)) %>
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'home', label: 'geoblacklight.home.institution', facet_field: Settings.FIELDS.PROVIDER, response: @response)) %>
</div>
</div>
<div class='col-sm'>
<%= content_tag :h3, t('geoblacklight.home.map_heading') %>
<%= content_tag :div, '', id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-geom' => Settings.HOMEPAGE_MAP_GEOM, basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
</div>
</div>
<div id="geoblacklight-version" class="text-right">
<%= t('geoblacklight.home.version', version: Geoblacklight::VERSION ) %>
</div>
</div>
3 changes: 0 additions & 3 deletions config/locales/blacklight.en.yml

This file was deleted.

13 changes: 13 additions & 0 deletions config/locales/geoblacklight.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
en:
geoblacklight:
home:
headline: 'Explore and discover...'
search_heading: 'Find the maps and data you need'
category_heading: 'Find by...'
map_heading: 'Find by location'
institution: 'Institution'
placename: 'Placename'
resource_class: 'Resource Class'
subject: 'Subject'
theme: 'Theme'
version: 'GeoBlacklight version %{version}'