geoblacklight 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +19 -0
- data/.gitmodules +5 -0
- data/Gemfile +11 -0
- data/LICENSE.txt +13 -0
- data/README.md +103 -0
- data/Rakefile +44 -0
- data/app/assets/images/blacklight/logo.png +0 -0
- data/app/assets/images/geoblacklight/src_berkeley.png +0 -0
- data/app/assets/images/geoblacklight/src_cambridge.png +0 -0
- data/app/assets/images/geoblacklight/src_harvard.png +0 -0
- data/app/assets/images/geoblacklight/src_maryland.png +0 -0
- data/app/assets/images/geoblacklight/src_massgis.png +0 -0
- data/app/assets/images/geoblacklight/src_mit.png +0 -0
- data/app/assets/images/geoblacklight/src_princeton.png +0 -0
- data/app/assets/images/geoblacklight/src_stanford.png +0 -0
- data/app/assets/images/geoblacklight/src_tufts.png +0 -0
- data/app/assets/images/geoblacklight/src_un.png +0 -0
- data/app/assets/images/geoblacklight/type_arc.png +0 -0
- data/app/assets/images/geoblacklight/type_dot.png +0 -0
- data/app/assets/images/geoblacklight/type_library.png +0 -0
- data/app/assets/images/geoblacklight/type_map.png +0 -0
- data/app/assets/images/geoblacklight/type_polygon.png +0 -0
- data/app/assets/images/geoblacklight/type_raster.png +0 -0
- data/app/assets/javascripts/geoblacklight/application.js +2 -0
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +4 -0
- data/app/assets/javascripts/geoblacklight/modules/map-home.js +25 -0
- data/app/assets/javascripts/geoblacklight/modules/map-results.js +72 -0
- data/app/assets/javascripts/geoblacklight/modules/map-view.js +211 -0
- data/app/controllers/download_controller.rb +107 -0
- data/app/controllers/wms_controller.rb +81 -0
- data/app/helpers/geoblacklight_helper.rb +91 -0
- data/app/views/catalog/_document_list.html.erb +12 -0
- data/app/views/catalog/_home_text.html.erb +40 -0
- data/app/views/catalog/_index_header_default.html.erb +59 -0
- data/app/views/catalog/_show_default.html.erb +68 -0
- data/app/views/catalog/_show_sidebar.html.erb +76 -0
- data/geoblacklight.gemspec +36 -0
- data/lib/generators/geoblacklight/install_generator.rb +46 -0
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +217 -0
- data/lib/generators/geoblacklight/templates/geoblacklight.css.scss +79 -0
- data/lib/generators/geoblacklight/templates/geoblacklight.js +1 -0
- data/lib/geoblacklight.rb +5 -0
- data/lib/geoblacklight/config.rb +0 -0
- data/lib/geoblacklight/engine.rb +15 -0
- data/lib/geoblacklight/fixtures_indexer.rb +34 -0
- data/lib/geoblacklight/version.rb +3 -0
- data/lib/tasks/geoblacklight.rake +13 -0
- data/spec/fixtures/geoblacklight_schema/transformed.json +53 -0
- data/spec/spec_helper.rb +37 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +23 -0
- metadata +299 -0
@@ -0,0 +1,76 @@
|
|
1
|
+
<%-
|
2
|
+
# Compare with render_document_functions_partial helper, and
|
3
|
+
# _document_functions partial. BL actually has two groups
|
4
|
+
# of document-related tools. "document functions" by default
|
5
|
+
# contains Bookmark functionality shown on both results and
|
6
|
+
# item view. While "document tools" contains external export type
|
7
|
+
# functions by default only on detail.
|
8
|
+
|
9
|
+
-%>
|
10
|
+
<div id='geoblacklight-tools'>
|
11
|
+
<div class="panel panel-default show-tools">
|
12
|
+
<div class="panel-heading">
|
13
|
+
Tools
|
14
|
+
</div>
|
15
|
+
<div class="panel-body">
|
16
|
+
<ul class="list-group">
|
17
|
+
<%= render_show_doc_actions @document %>
|
18
|
+
<!-- <a href="#" data-no-turbolink class="list-group-item disabled">
|
19
|
+
<i class="fa fa-li fa-star-o"></i> Bookmark
|
20
|
+
</a> -->
|
21
|
+
<% if @document.respond_to?( :to_email_text ) %>
|
22
|
+
<%= link_to email_helper, email_catalog_path(:id => @document), {:id => 'emailLink', :data => {:ajax_modal => "trigger"}, :class => 'list-group-item'} %>
|
23
|
+
<%- end -%>
|
24
|
+
<%- if @document.respond_to?( :to_sms_text ) -%>
|
25
|
+
<%= link_to sms_helper, sms_catalog_path(:id => @document), {:id => 'smsLink', :data => {:ajax_modal => "trigger"}, :class => 'list-group-item'} %>
|
26
|
+
<%- end -%>
|
27
|
+
<a href="#" data-no-turbolink class="list-group-item">
|
28
|
+
<i class="fa fa-li fa-bookmark"></i>Cite This
|
29
|
+
</a>
|
30
|
+
</ul>
|
31
|
+
<ul class="list-group">
|
32
|
+
<a id="download-metadata" data-no-turbolink class="list-group-item"
|
33
|
+
<% if @document['dct_provenance_s'] == 'Stanford' %>
|
34
|
+
href="<%= @document['dc_identifier_s'] %>.mods"
|
35
|
+
<% else %>
|
36
|
+
href="#"
|
37
|
+
<% end %>
|
38
|
+
>
|
39
|
+
<i class="fa fa-li fa-download" id="icon-metadata"></i>Metadata
|
40
|
+
</a>
|
41
|
+
<% if @document['dc_rights_s'] == 'Restricted' and @document['dct_provenance_s'] != 'Stanford' %>
|
42
|
+
<a href="#" data-no-turbolink class="list-group-item">
|
43
|
+
<i class="fa fa-li fa-download" id="icon-request"></i>Request This
|
44
|
+
</a><br/>
|
45
|
+
<% else %>
|
46
|
+
<a href="#" id="download-kml" data-no-turbolink class="list-group-item">
|
47
|
+
<i class="fa fa-li fa-download" id="icon-kml"></i>KML
|
48
|
+
</a>
|
49
|
+
<% if @document['dc_format_s'] == 'Shapefile' %>
|
50
|
+
<a href="#" id="download-shapefile" data-no-turbolink class="list-group-item">
|
51
|
+
<i class="fa fa-li fa-download" id="icon-shapefile"></i>Shapefile
|
52
|
+
</a>
|
53
|
+
<% end %>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
</ul>
|
57
|
+
<% unless @document['dc_rights_s'] == 'Restricted' and @document['dct_provenance_s'] != 'Stanford' %>
|
58
|
+
|
59
|
+
<ul class="list-group">
|
60
|
+
<a href="<%= @document['solr_wms_url'] %>?request=GetCapabilities" data-no-turbolink class="list-group-item">
|
61
|
+
<i class="fa fa-li fa-link"></i>WMS Link
|
62
|
+
</a>
|
63
|
+
<% if @document['layer_geom_type_s'] == 'Raster' %>
|
64
|
+
<a href="<%= @document['solr_wcs_url'] %>?request=GetCapabilities" data-no-turbolink class="list-group-item">
|
65
|
+
<i class="fa fa-li fa-link"></i>WCS Link
|
66
|
+
</a>
|
67
|
+
<% else %>
|
68
|
+
<a href="<%= @document['solr_wfs_url'] %>?request=GetCapabilities" data-no-turbolink class="list-group-item">
|
69
|
+
<i class="fa fa-li fa-link"></i>WFS Link
|
70
|
+
</a>
|
71
|
+
<% end %>
|
72
|
+
</ul>
|
73
|
+
<% end %>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'geoblacklight/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'geoblacklight'
|
8
|
+
spec.version = Geoblacklight::VERSION
|
9
|
+
spec.authors = ['Darren Hardy', 'Jack Reed']
|
10
|
+
spec.email = ['drh@stanford.edu', 'pjreed@stanford.edu']
|
11
|
+
spec.summary = 'A discovery platform for geospatial holdings'
|
12
|
+
spec.description = 'GeoBlacklight started at Stanford and its goal is to provide a world-class discovery platform for geospatial (GIS) holdings. It is an open collaborative project aiming to build off of the successes of the Blacklight Solr-powered discovery interface and the multi-institutional OpenGeoportal federated metadata sharing communities.'
|
13
|
+
spec.homepage = 'http://github.com/sul-dlss/geoblacklight'
|
14
|
+
spec.license = 'Apache 2.0'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split(%Q{\x0})
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'rails', '~> 4.0.0' # Rails 4.1.x has Spring on by default
|
22
|
+
spec.add_dependency 'blacklight', '~> 5.4.0'
|
23
|
+
spec.add_dependency 'bootstrap-sass', '~> 3.0'
|
24
|
+
spec.add_dependency 'leaflet-rails', '~> 0.7.3'
|
25
|
+
spec.add_dependency 'blacklight_range_limit', '~> 5.0.1'
|
26
|
+
spec.add_dependency 'font-awesome-rails', '~> 4.1.0.0'
|
27
|
+
spec.add_dependency 'httparty', '~> 0.13.1'
|
28
|
+
|
29
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
30
|
+
spec.add_development_dependency 'rake', '~> 10.3.2'
|
31
|
+
spec.add_development_dependency 'rspec-rails', '~> 3.0.1'
|
32
|
+
spec.add_development_dependency 'jettywrapper', '~> 1.7.0'
|
33
|
+
spec.add_development_dependency 'engine_cart', '~> 0.3.4'
|
34
|
+
spec.add_development_dependency 'capybara', '~> 2.3.0'
|
35
|
+
spec.add_development_dependency 'poltergeist', '~> 1.5.0'
|
36
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Geoblacklight
|
4
|
+
class Install < Rails::Generators::Base
|
5
|
+
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
|
8
|
+
desc "Install Geoblacklight"
|
9
|
+
|
10
|
+
def assets
|
11
|
+
copy_file "geoblacklight.css.scss", "app/assets/stylesheets/geoblacklight.css.scss"
|
12
|
+
copy_file "geoblacklight.js", "app/assets/javascripts/geoblacklight.js"
|
13
|
+
end
|
14
|
+
|
15
|
+
def create_blacklight_catalog
|
16
|
+
remove_file "app/controllers/catalog_controller.rb"
|
17
|
+
copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
|
18
|
+
end
|
19
|
+
|
20
|
+
def fixtures
|
21
|
+
FileUtils.mkdir_p "spec/fixtures/geoblacklight_schema"
|
22
|
+
copy_file "../../../../schema/examples/selected.json", "spec/fixtures/geoblacklight_schema/selected.json"
|
23
|
+
end
|
24
|
+
|
25
|
+
def add_unique_key
|
26
|
+
inject_into_file 'app/models/solr_document.rb', after: "# self.unique_key = 'id'" do
|
27
|
+
"\n self.unique_key = 'layer_slug_s'"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def inject_routes
|
32
|
+
# route 'devise_for :users'
|
33
|
+
# route 'constraints(:id => /[0-9A-Za-z\-\.\:\_\/]+/) do
|
34
|
+
# blacklight_for :catalog
|
35
|
+
# resources :bookmarks
|
36
|
+
# end'
|
37
|
+
# route 'get \'/catalog/facet/:id\' => \'catalog#facet\''
|
38
|
+
# route 'root :to => "catalog#index"'
|
39
|
+
route 'post "wms/handle"'
|
40
|
+
route 'post "download/kml"'
|
41
|
+
route 'post "download/shapefile"'
|
42
|
+
route 'get "download/file"'
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,217 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'blacklight/catalog'
|
3
|
+
|
4
|
+
class CatalogController < ApplicationController
|
5
|
+
|
6
|
+
include Blacklight::Catalog
|
7
|
+
|
8
|
+
configure_blacklight do |config|
|
9
|
+
## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
|
10
|
+
config.default_solr_params = {
|
11
|
+
:start => 0,
|
12
|
+
:rows => 10,
|
13
|
+
'q.alt' => '*:*'
|
14
|
+
}
|
15
|
+
|
16
|
+
## Default parameters to send on single-document requests to Solr. These settings are the Blackligt defaults (see SolrHelper#solr_doc_params) or
|
17
|
+
## parameters included in the Blacklight-jetty document requestHandler.
|
18
|
+
#
|
19
|
+
config.default_document_solr_params = {
|
20
|
+
:qt => 'document',
|
21
|
+
:q => '{!raw f=layer_slug_s v=$id}'
|
22
|
+
}
|
23
|
+
|
24
|
+
# solr field configuration for search results/index views
|
25
|
+
# config.index.show_link = 'title_display'
|
26
|
+
# config.index.record_display_type = 'format'
|
27
|
+
|
28
|
+
config.index.title_field = 'dc_title_s'
|
29
|
+
|
30
|
+
# solr field configuration for document/show views
|
31
|
+
|
32
|
+
config.show.display_type_field = 'format'
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
# solr fields that will be treated as facets by the blacklight application
|
37
|
+
# The ordering of the field names is the order of the display
|
38
|
+
#
|
39
|
+
# Setting a limit will trigger Blacklight's 'more' facet values link.
|
40
|
+
# * If left unset, then all facet values returned by solr will be displayed.
|
41
|
+
# * If set to an integer, then "f.somefield.facet.limit" will be added to
|
42
|
+
# solr request, with actual solr request being +1 your configured limit --
|
43
|
+
# you configure the number of items you actually want _displayed_ in a page.
|
44
|
+
# * If set to 'true', then no additional parameters will be sent to solr,
|
45
|
+
# but any 'sniffed' request limit parameters will be used for paging, with
|
46
|
+
# paging at requested limit -1. Can sniff from facet.limit or
|
47
|
+
# f.specific_field.facet.limit solr request params. This 'true' config
|
48
|
+
# can be used if you set limits in :default_solr_params, or as defaults
|
49
|
+
# on the solr side in the request handler itself. Request handler defaults
|
50
|
+
# sniffing requires solr requests to be made with "echoParams=all", for
|
51
|
+
# app code to actually have it echo'd back to see it.
|
52
|
+
#
|
53
|
+
# :show may be set to false if you don't want the facet to be drawn in the
|
54
|
+
# facet bar
|
55
|
+
# config.add_facet_field 'format', :label => 'Format'
|
56
|
+
# config.add_facet_field 'pub_date', :label => 'Publication Year', :single => true
|
57
|
+
# config.add_facet_field 'subject_topic_facet', :label => 'Topic', :limit => 20
|
58
|
+
# config.add_facet_field 'language_facet', :label => 'Language', :limit => true
|
59
|
+
# config.add_facet_field 'lc_1letter_facet', :label => 'Call Number'
|
60
|
+
# config.add_facet_field 'subject_geo_facet', :label => 'Region'
|
61
|
+
# config.add_facet_field 'solr_bbox', :fq => "solr_bbox:IsWithin(-88,26,-79,36)", :label => 'Spatial'
|
62
|
+
|
63
|
+
# config.add_facet_field 'example_pivot_field', :label => 'Pivot Field', :pivot => ['format', 'language_facet']
|
64
|
+
|
65
|
+
# config.add_facet_field 'example_query_facet_field', :label => 'Publish Date', :query => {
|
66
|
+
# :years_5 => { :label => 'within 5 Years', :fq => "pub_date:[#{Time.now.year - 5 } TO *]" },
|
67
|
+
# :years_10 => { :label => 'within 10 Years', :fq => "pub_date:[#{Time.now.year - 10 } TO *]" },
|
68
|
+
# :years_25 => { :label => 'within 25 Years', :fq => "pub_date:[#{Time.now.year - 25 } TO *]" }
|
69
|
+
# }
|
70
|
+
|
71
|
+
config.add_facet_field 'dct_provenance_s', :label => 'Institution', :limit => 7
|
72
|
+
config.add_facet_field 'dc_creator_sm', :label => 'Author', :limit => 6
|
73
|
+
config.add_facet_field 'dc_publisher_s', :label => 'Publisher', :limit => 6
|
74
|
+
config.add_facet_field 'dc_subject_sm', :label => 'Subject', :limit => 6
|
75
|
+
config.add_facet_field 'dct_spatial_sm', :label => 'Place', :limit => 6
|
76
|
+
config.add_facet_field 'dct_isPartOf_sm', :label => 'Collection', :limit => 6
|
77
|
+
|
78
|
+
config.add_facet_field 'solr_year_i', :label => 'Year', :limit => 10, :range => {
|
79
|
+
# :num_segments => 6,
|
80
|
+
:assumed_boundaries => [1100, 2015]
|
81
|
+
# :segments => true
|
82
|
+
}
|
83
|
+
|
84
|
+
config.add_facet_field 'dc_rights_s', :label => 'Access', :limit => 3
|
85
|
+
config.add_facet_field 'layer_geom_type_s', :label => 'Data type', :limit => 5
|
86
|
+
config.add_facet_field 'dc_format_s', :label => 'Format', :limit => 3
|
87
|
+
config.add_facet_field 'dc_language_s', :label => 'Language', :limit => 3
|
88
|
+
|
89
|
+
|
90
|
+
# Have BL send all facet field names to Solr, which has been the default
|
91
|
+
# previously. Simply remove these lines if you'd rather use Solr request
|
92
|
+
# handler defaults, or have no facets.
|
93
|
+
config.add_facet_fields_to_solr_request!
|
94
|
+
|
95
|
+
# solr fields to be displayed in the index (search results) view
|
96
|
+
# The ordering of the field names is the order of the display
|
97
|
+
# config.add_index_field 'title_display', :label => 'Title:'
|
98
|
+
# config.add_index_field 'title_vern_display', :label => 'Title:'
|
99
|
+
# config.add_index_field 'author_display', :label => 'Author:'
|
100
|
+
# config.add_index_field 'author_vern_display', :label => 'Author:'
|
101
|
+
# config.add_index_field 'format', :label => 'Format:'
|
102
|
+
# config.add_index_field 'language_facet', :label => 'Language:'
|
103
|
+
# config.add_index_field 'published_display', :label => 'Published:'
|
104
|
+
# config.add_index_field 'published_vern_display', :label => 'Published:'
|
105
|
+
# config.add_index_field 'lc_callnum_display', :label => 'Call number:'
|
106
|
+
|
107
|
+
# config.add_index_field 'dc_title_t', :label => 'Display Name:'
|
108
|
+
# config.add_index_field 'dct_provenance_s', :label => 'Institution:'
|
109
|
+
# config.add_index_field 'dc_rights_s', :label => 'Access:'
|
110
|
+
# # config.add_index_field 'Area', :label => 'Area:'
|
111
|
+
# config.add_index_field 'dc_subject_sm', :label => 'Keywords:'
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
# solr fields to be displayed in the show (single result) view
|
116
|
+
# The ordering of the field names is the order of the display
|
117
|
+
# config.add_show_field 'dc_title_t', :label => 'Title:'
|
118
|
+
# config.add_show_field 'title_display', :label => 'Title:'
|
119
|
+
# config.add_show_field 'title_vern_display', :label => 'Title:'
|
120
|
+
# config.add_show_field 'subtitle_display', :label => 'Subtitle:'
|
121
|
+
# config.add_show_field 'subtitle_vern_display', :label => 'Subtitle:'
|
122
|
+
# config.add_show_field 'author_display', :label => 'Author:'
|
123
|
+
# config.add_show_field 'author_vern_display', :label => 'Author:'
|
124
|
+
# config.add_show_field 'format', :label => 'Format:'
|
125
|
+
# config.add_show_field 'url_fulltext_display', :label => 'URL:'
|
126
|
+
# config.add_show_field 'url_suppl_display', :label => 'More Information:'
|
127
|
+
# config.add_show_field 'language_facet', :label => 'Language:'
|
128
|
+
# config.add_show_field 'published_display', :label => 'Published:'
|
129
|
+
# config.add_show_field 'published_vern_display', :label => 'Published:'
|
130
|
+
# config.add_show_field 'lc_callnum_display', :label => 'Call number:'
|
131
|
+
# config.add_show_field 'isbn_t', :label => 'ISBN:'
|
132
|
+
|
133
|
+
# "fielded" search configuration. Used by pulldown among other places.
|
134
|
+
# For supported keys in hash, see rdoc for Blacklight::SearchFields
|
135
|
+
#
|
136
|
+
# Search fields will inherit the :qt solr request handler from
|
137
|
+
# config[:default_solr_parameters], OR can specify a different one
|
138
|
+
# with a :qt key/value. Below examples inherit, except for subject
|
139
|
+
# that specifies the same :qt as default for our own internal
|
140
|
+
# testing purposes.
|
141
|
+
#
|
142
|
+
# The :key is what will be used to identify this BL search field internally,
|
143
|
+
# as well as in URLs -- so changing it after deployment may break bookmarked
|
144
|
+
# urls. A display label will be automatically calculated from the :key,
|
145
|
+
# or can be specified manually to be different.
|
146
|
+
|
147
|
+
# This one uses all the defaults set by the solr request handler. Which
|
148
|
+
# solr request handler? The one set in config[:default_solr_parameters][:qt],
|
149
|
+
# since we aren't specifying it otherwise.
|
150
|
+
|
151
|
+
# config.add_search_field 'text', :label => 'All Fields'
|
152
|
+
# config.add_search_field 'dc_title_ti', :label => 'Title'
|
153
|
+
# config.add_search_field 'dc_description_ti', :label => 'Description'
|
154
|
+
|
155
|
+
# Now we see how to over-ride Solr request handler defaults, in this
|
156
|
+
# case for a BL "search field", which is really a dismax aggregate
|
157
|
+
# of Solr search fields.
|
158
|
+
|
159
|
+
# config.add_search_field('title') do |field|
|
160
|
+
# # solr_parameters hash are sent to Solr as ordinary url query params.
|
161
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'title' }
|
162
|
+
|
163
|
+
# # :solr_local_parameters will be sent using Solr LocalParams
|
164
|
+
# # syntax, as eg {! qf=$title_qf }. This is neccesary to use
|
165
|
+
# # Solr parameter de-referencing like $title_qf.
|
166
|
+
# # See: http://wiki.apache.org/solr/LocalParams
|
167
|
+
# field.solr_local_parameters = {
|
168
|
+
# :qf => '$title_qf',
|
169
|
+
# :pf => '$title_pf'
|
170
|
+
# }
|
171
|
+
# end
|
172
|
+
|
173
|
+
# config.add_search_field('author') do |field|
|
174
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'author' }
|
175
|
+
# field.solr_local_parameters = {
|
176
|
+
# :qf => '$author_qf',
|
177
|
+
# :pf => '$author_pf'
|
178
|
+
# }
|
179
|
+
# end
|
180
|
+
|
181
|
+
# # Specifying a :qt only to show it's possible, and so our internal automated
|
182
|
+
# # tests can test it. In this case it's the same as
|
183
|
+
# # config[:default_solr_parameters][:qt], so isn't actually neccesary.
|
184
|
+
# config.add_search_field('subject') do |field|
|
185
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'subject' }
|
186
|
+
# field.qt = 'search'
|
187
|
+
# field.solr_local_parameters = {
|
188
|
+
# :qf => '$subject_qf',
|
189
|
+
# :pf => '$subject_pf'
|
190
|
+
# }
|
191
|
+
# end
|
192
|
+
|
193
|
+
# config.add_search_field('Institution') do |field|
|
194
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'Institution' }
|
195
|
+
# field.solr_local_parameters = {
|
196
|
+
# :qf => '$Institution_qf',
|
197
|
+
# :pf => '$Institution_pf'
|
198
|
+
# }
|
199
|
+
# end
|
200
|
+
|
201
|
+
# "sort results by" select (pulldown)
|
202
|
+
# label in pulldown is followed by the name of the SOLR field to sort by and
|
203
|
+
# whether the sort is ascending or descending (it must be asc or desc
|
204
|
+
# except in the relevancy case).
|
205
|
+
config.add_sort_field 'score desc, dc_title_sort asc', :label => 'relevance'
|
206
|
+
config.add_sort_field 'solr_year_i desc, dc_title_sort asc', :label => 'year'
|
207
|
+
config.add_sort_field 'dc_publisher_sort asc, dc_title_sort asc', :label => 'publisher'
|
208
|
+
config.add_sort_field 'dc_title_sort asc', :label => 'title'
|
209
|
+
|
210
|
+
# If there are more than this many search results, no spelling ("did you
|
211
|
+
# mean") suggestion is offered.
|
212
|
+
config.spell_max = 5
|
213
|
+
end
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require leaflet
|
13
|
+
*= require font-awesome
|
14
|
+
*/
|
15
|
+
|
16
|
+
.docView{
|
17
|
+
|
18
|
+
}
|
19
|
+
|
20
|
+
.text-span{
|
21
|
+
width:100%;
|
22
|
+
}
|
23
|
+
|
24
|
+
.hide-overflow {
|
25
|
+
white-space: nowrap;
|
26
|
+
overflow: hidden;
|
27
|
+
text-overflow: ellipsis;
|
28
|
+
display:block
|
29
|
+
}
|
30
|
+
|
31
|
+
#map.mapview-map {
|
32
|
+
height: 440px;
|
33
|
+
cursor: crosshair;
|
34
|
+
}
|
35
|
+
|
36
|
+
#map.listview-map {
|
37
|
+
height: 485px;
|
38
|
+
}
|
39
|
+
|
40
|
+
#table-container{
|
41
|
+
overflow:scroll;
|
42
|
+
max-height: 450px;
|
43
|
+
}
|
44
|
+
|
45
|
+
#control {
|
46
|
+
text-align: center;
|
47
|
+
background: #FFF;
|
48
|
+
position: absolute;
|
49
|
+
left: 24px;
|
50
|
+
top: 120px;
|
51
|
+
height: 200px;
|
52
|
+
width: 28px;
|
53
|
+
border: 1px solid #BBB;
|
54
|
+
-webkit-border-radius: 3px;
|
55
|
+
border-radius: 3px;
|
56
|
+
z-index: 999;
|
57
|
+
}
|
58
|
+
|
59
|
+
#handle {
|
60
|
+
background: #000;
|
61
|
+
position: absolute;
|
62
|
+
left: -1px;
|
63
|
+
top: 20px;
|
64
|
+
width: 28px;
|
65
|
+
height: 10px;
|
66
|
+
}
|
67
|
+
|
68
|
+
#bottom {
|
69
|
+
position: absolute;
|
70
|
+
bottom:0px;
|
71
|
+
left: 8px;
|
72
|
+
text-align: center;
|
73
|
+
}
|
74
|
+
|
75
|
+
#handle:hover {
|
76
|
+
cursor: pointer;
|
77
|
+
background: #444;
|
78
|
+
cursor: ns-resize;
|
79
|
+
}
|