Skip to content

Commit

Permalink
Merge branch 'release/5.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Dec 8, 2023
2 parents e46010b + e8e655b commit f448df0
Show file tree
Hide file tree
Showing 21 changed files with 212 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ gem 'bootstrap', '~> 4.0'
gem 'popper_js'
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
gem 'geoblacklight', '~> 4.1'
gem 'geoblacklight_admin', '~> 0.3'
gem 'geoblacklight_admin', "~> 0.4.0"
gem "rubyzip", ">= 1.3.0"
gem "awesome_print"

Expand Down
61 changes: 30 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ GEM
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_record_query_trace (1.8.2)
activerecord (>= 6.0.0)
active_storage_validations (1.0.4)
active_storage_validations (1.1.3)
activejob (>= 5.2.0)
activemodel (>= 5.2.0)
activestorage (>= 5.2.0)
Expand All @@ -96,7 +96,7 @@ GEM
activerecord (6.1.7.6)
activemodel (= 6.1.7.6)
activesupport (= 6.1.7.6)
activerecord-import (1.5.0)
activerecord-import (1.5.1)
activerecord (>= 4.2)
activestorage (6.1.7.6)
actionpack (= 6.1.7.6)
Expand All @@ -122,9 +122,9 @@ GEM
ansi (1.5.0)
appsignal (3.4.12)
rack
attr_json (2.2.0)
attr_json (2.3.0)
activerecord (>= 6.0.0, < 7.2)
autoprefixer-rails (10.4.15.0)
autoprefixer-rails (10.4.16.0)
execjs (~> 2)
awesome_print (1.9.2)
axe-core-api (4.7.0)
Expand All @@ -134,9 +134,9 @@ GEM
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
base64 (0.1.1)
base64 (0.2.0)
bcp47_spec (0.2.1)
bcrypt (3.1.19)
bcrypt (3.1.20)
bindex (0.8.1)
blacklight (7.33.1)
deprecation
Expand Down Expand Up @@ -216,7 +216,7 @@ GEM
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
date (3.3.3)
date (3.3.4)
deep_merge (1.2.2)
deprecation (1.1.0)
activesupport
Expand All @@ -231,12 +231,11 @@ GEM
devise-bootstrap-views (1.1.0)
devise-guests (0.8.1)
devise
devise_invitable (2.0.8)
devise_invitable (2.0.9)
actionmailer (>= 5.0)
devise (>= 4.6)
diff-lcs (1.5.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
domain_name (0.6.20231109)
dot-properties (0.1.4)
bundler (>= 2.2.33)
dotenv (2.8.1)
Expand Down Expand Up @@ -290,7 +289,7 @@ GEM
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faraday (2.7.11)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
Expand Down Expand Up @@ -328,7 +327,7 @@ GEM
mime-types
rails (>= 6.1, < 7.1)
rgeo-geojson
geoblacklight_admin (0.3.2)
geoblacklight_admin (0.4.0)
active_storage_validations (~> 1.0)
amazing_print
blacklight (~> 7.33)
Expand Down Expand Up @@ -415,14 +414,14 @@ GEM
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
kithe (2.11.0)
attr_json (< 3.0.0)
kithe (2.13.0)
attr_json (~> 2.0)
fastimage (~> 2.0)
fx (>= 0.6.0, < 1)
marcel
mini_mime
pdf-reader (~> 2.0)
rails (>= 5.2.1, < 7.1)
rails (>= 6.0, < 7.2)
rsolr (~> 2.2)
ruby-progressbar (~> 1.0)
shrine (~> 3.3)
Expand All @@ -446,7 +445,7 @@ GEM
llhttp-ffi (0.3.1)
ffi-compiler (~> 1.0)
rake (~> 13.0)
loofah (2.21.4)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
m (1.5.1)
Expand All @@ -469,7 +468,7 @@ GEM
method_source (1.0.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1003)
mime-types-data (3.2023.1205)
mimemagic (0.4.3)
nokogiri (~> 1)
rake
Expand All @@ -489,25 +488,25 @@ GEM
multi_xml (0.6.0)
net-http-persistent (4.0.2)
connection_pool (~> 2.2)
net-imap (0.4.2)
net-imap (0.4.7)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
net-protocol (0.2.2)
timeout
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.4)
nio4r (2.7.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
noticed (1.6.3)
http (>= 4.0.0)
rails (>= 5.2.0)
orm_adapter (0.5.0)
ostruct (0.5.5)
pagy (6.1.0)
ostruct (0.6.0)
pagy (6.2.0)
paper_trail (14.0.0)
activerecord (>= 6.0)
request_store (~> 1.4)
Expand All @@ -530,16 +529,16 @@ GEM
public_suffix (3.1.1)
puma (5.6.7)
nio4r (~> 2.0)
qa (5.10.0)
qa (5.11.0)
activerecord-import
deprecation
faraday (< 3.0, != 2.0.0)
geocoder
ldpath
nokogiri (~> 1.6)
rails (>= 5.0, < 7.1)
rails (>= 5.0, < 7.2)
rdf
racc (1.7.1)
racc (1.7.3)
rack (2.2.8)
rack-cors (2.0.1)
rack (>= 2.0.0)
Expand Down Expand Up @@ -577,7 +576,7 @@ GEM
method_source
rake (>= 12.2)
thor (~> 1.0)
rake (13.0.6)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand All @@ -596,7 +595,7 @@ GEM
railties (>= 5.2)
retriable (3.1.2)
rexml (3.2.6)
rgeo (3.0.0)
rgeo (3.0.1)
rgeo-geojson (2.1.1)
rgeo (>= 1.0.0)
rsolr (2.5.0)
Expand Down Expand Up @@ -692,7 +691,7 @@ GEM
thor (1.3.0)
thread_safe (0.3.6)
tilt (2.3.0)
timeout (0.4.0)
timeout (0.4.1)
traject (3.8.1)
concurrent-ruby (>= 0.8.0)
dot-properties (>= 0.1.1)
Expand Down Expand Up @@ -723,7 +722,7 @@ GEM
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unf_ext (0.0.9.1)
view_component (2.82.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -791,7 +790,7 @@ DEPENDENCIES
foreman
geoblacklight (~> 4.1)
geoblacklight-icons!
geoblacklight_admin (~> 0.3)
geoblacklight_admin (~> 0.4.0)
geoblacklight_sidecar_images!
haml
handlebars_assets (~> 0.23.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Visit the [project wiki](https://github.com/BTAA-Geospatial-Data-Project/geoport

#### Release Version

B1G Geoportal Version v5.2.0 / GeoBlacklight v4.1.0 / GeoBlacklight Admin v0.3.2
B1G Geoportal Version v5.3.0 / GeoBlacklight v4.1.0 / GeoBlacklight Admin v0.4.0
19 changes: 18 additions & 1 deletion app/controllers/admin/advanced_search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,21 @@ class AdvancedSearchController < ApplicationController
config.advanced_search[:url_key] ||= 'advanced'
config.advanced_search[:query_parser] ||= 'edismax'
config.advanced_search[:form_solr_parameters] ||= {}
config.advanced_search[:form_solr_parameters]['facet.field'] ||= [Settings.FIELDS.PROVIDER, Settings.FIELDS.B1G_CODE, Settings.FIELDS.MEMBER_OF, Settings.FIELDS.IS_PART_OF, Settings.FIELDS.RESOURCE_CLASS, Settings.FIELDS.RESOURCE_TYPE, Settings.FIELDS.SUBJECT, Settings.FIELDS.THEME, Settings.FIELDS.FORMAT, Settings.FIELDS.SUPPRESSED, Settings.FIELDS.B1G_CHILD_RECORD, Settings.FIELDS.GEOREFERENCED]
config.advanced_search[:form_solr_parameters]['facet.field'] ||= [
Settings.FIELDS.PROVIDER,
Settings.FIELDS.B1G_DATE_ACCESSIONED,
Settings.FIELDS.B1G_CODE,
Settings.FIELDS.MEMBER_OF,
Settings.FIELDS.IS_PART_OF,
Settings.FIELDS.RESOURCE_CLASS,
Settings.FIELDS.RESOURCE_TYPE,
Settings.FIELDS.SUBJECT,
Settings.FIELDS.THEME,
Settings.FIELDS.FORMAT,
Settings.FIELDS.SUPPRESSED,
Settings.FIELDS.B1G_CHILD_RECORD,
Settings.FIELDS.GEOREFERENCED
]
config.advanced_search[:form_solr_parameters]['facet.query'] ||= ''
config.advanced_search[:form_solr_parameters]['facet.limit'] ||= -1
config.advanced_search[:form_solr_parameters]['facet.sort'] ||= 'index'
Expand Down Expand Up @@ -128,6 +142,9 @@ class AdvancedSearchController < ApplicationController

# ADVANCED SEARCH
#
# B1G Date Accessioned
config.add_facet_field Settings.FIELDS.B1G_DATE_ACCESSIONED, label: 'Date Accessioned', limit: 1000

# Code
config.add_facet_field Settings.FIELDS.B1G_CODE, label: 'Code', limit: 1000

Expand Down
13 changes: 13 additions & 0 deletions app/controllers/admin/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ class ApiController < ApplicationController
# Publication State
config.add_facet_field Settings.FIELDS.B1G_PUBLICATION_STATE, :label => 'Publication State', :limit => 8, collapse: false

# Accession Date
config.add_facet_field Settings.FIELDS.B1G_DATE_ACCESSIONED, :label => 'Date Accessioned', :limit => 8, collapse: false

# Import ID
config.add_facet_field Settings.FIELDS.B1G_IMPORT_ID, label: "Import ID", show: false

# Resouce Class
config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', limit: 8

Expand All @@ -141,6 +147,7 @@ class ApiController < ApplicationController

# ADVANCED SEARCH
#

# Code
config.add_facet_field Settings.FIELDS.B1G_CODE, label: 'Code', show: false

Expand Down Expand Up @@ -376,5 +383,11 @@ def advanced_search_facets
end
end
end

# Tableau Export
def tableau_export
ExportTableauJob.perform_later(current_user)
head :no_content
end
end
end
8 changes: 7 additions & 1 deletion app/controllers/admin/ids_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ class IdsController < ApplicationController
}

# Publication State
config.add_facet_field Settings.FIELDS.B1G_PUBLICATION_STATE, show: false
config.add_facet_field Settings.FIELDS.B1G_PUBLICATION_STATE, :label => 'Publication State', :limit => 8, collapse: false

# Accession Date
config.add_facet_field Settings.FIELDS.B1G_DATE_ACCESSIONED, :label => 'Date Accessioned', :limit => 8, collapse: false

# Import ID
config.add_facet_field Settings.FIELDS.B1G_IMPORT_ID, label: "Import ID", show: false

# Resouce Class
config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, show: false
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# -*- encoding : utf-8 -*-
require 'blacklight/catalog'
require 'kithe/blacklight_tools/bulk_loading_search_service'

class CatalogController < ApplicationController
include BlacklightAdvancedSearch::Controller
include BlacklightRangeLimit::ControllerOverride
include Blacklight::Catalog
self.search_service_class = Kithe::BlacklightTools::BulkLoadingSearchService

configure_blacklight do |config|
# default advanced config values
Expand Down Expand Up @@ -58,8 +60,7 @@ class CatalogController < ApplicationController
:start => 0,
'q.alt' => '*:*',
'fl' => '*,score,[explain]',
'bf' => ["if(exists(#{Settings.FIELDS.B1G_CHILD_RECORD}),0,100)^0.5"],
'fq' => ["#{Settings.FIELDS.B1G_PUBLICATION_STATE}:published"]
'bf' => ["if(exists(#{Settings.FIELDS.B1G_CHILD_RECORD}),0,100)^0.5"]
}

config.default_per_page = 10 # Works!
Expand Down Expand Up @@ -157,6 +158,7 @@ class CatalogController < ApplicationController
# filter_class - Defines how to add/remove facet from query
# label - Defines the label used in contstraints container
config.add_facet_field 'solr_bboxtype', item_presenter: Geoblacklight::BboxItemPresenter, filter_class: Geoblacklight::BboxFilterField, filter_query_builder: Geoblacklight::BboxFilterQuery, within_boost: Settings.BBOX_WITHIN_BOOST, overlap_boost: Settings.OVERLAP_RATIO_BOOST, overlap_field: Settings.FIELDS.OVERLAP_FIELD, label: 'Bounding Box'
config.add_facet_field Settings.FIELDS.B1G_IMPORT_ID, label: "Import ID", show: false

# Item Relationship Facets
# * Not displayed to end user (show: false)
Expand Down
15 changes: 15 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,19 @@ def score_output(args)
def render_sidebar_map?(document)
Settings.SIDEBAR_STATIC_MAP&.any? { |vp| document.viewer_protocol == vp }
end

##
# Gets current layout for use in rendering partials
# @return [String] item, index, home, or default
def layout_type
if params[:controller] == "catalog"
if params[:action] == "show" || params[:action] == "downloads"
"item"
elsif params[:action] == "index"
"index"
end
else
"default"
end
end
end
Loading

0 comments on commit f448df0

Please sign in to comment.