Skip to content

Commit

Permalink
Merge fc76237 into de68dea
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jan 13, 2020
2 parents de68dea + fc76237 commit cbf8de6
Show file tree
Hide file tree
Showing 13 changed files with 34,109 additions and 34,576 deletions.
1 change: 1 addition & 0 deletions app/assets/images/blacklight/heatmaps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Blacklight.onLoad(function () {
initialize: function (el, options) {
var _this = this;
var $el = $(el);
var requestUrl = $el.data().searchUrl + '&format=json';
var requestUrl = $el.data().searchUrl + '&format=heatmaps';
var geometryField = $el.data().geometryField;
var template = $el.data().sidebarTemplate;
var colorRamp = $el.data().colorRamp;
Expand Down
6 changes: 6 additions & 0 deletions app/views/catalog/index.heatmaps.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
presenter = Blacklight::JsonPresenter.new(@response, blacklight_config)

json.response do
json.facet_heatmaps @response['facet_counts']['facet_heatmaps']
json.pages presenter.pagination_info
end
10 changes: 0 additions & 10 deletions app/views/catalog/index.json.jbuilder

This file was deleted.

2 changes: 1 addition & 1 deletion blacklight_heatmaps.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.test_files = Dir['spec/**/*']

s.add_dependency 'rails', '>= 4.2.6', '< 6'
s.add_dependency 'blacklight', '~> 6.0'
s.add_dependency 'blacklight', '~> 7.0'
s.add_dependency 'leaflet-rails', '~> 1.2.0'
s.add_dependency 'leaflet-sidebar-rails', '~> 0.2'

Expand Down
1 change: 1 addition & 0 deletions lib/blacklight_heatmaps/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Engine < ::Rails::Engine
isolate_namespace BlacklightHeatmaps
initializer 'blacklight-maps.helpers' do |app|
ActionView::Base.send :include, Blacklight::MapsHelper
Mime::Type.register 'application/vnd.heatmaps+json', :heatmaps
end
end
end
1 change: 1 addition & 0 deletions lib/generators/blacklight_heatmaps/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def configuration
"\n # Basemaps configured include: 'positron', 'darkMatter', 'OpenStreetMap.HOT'" \
"\n config.basemap_provider = 'positron'" \
"\n config.show.partials.insert(1, :show_leaflet_map)" \
"\n config.index.respond_to.heatmaps = true" \
"\n config.view.heatmaps.partials = []" \
"\n #Heatmap color ramp. For best results, use http://colorbrewer2.org or http://tristen.ca/hcl-picker/#/hlc/5/1" \
"\n config.view.heatmaps.color_ramp = ['#ffffcc', '#a1dab4', '#41b6c4', '#2c7fb8', '#253494']" \
Expand Down
902 changes: 326 additions & 576 deletions solr/conf/schema.xml

Large diffs are not rendered by default.

Loading

0 comments on commit cbf8de6

Please sign in to comment.