geoblacklight 2.1.1 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +117 -99
  3. data/.gitignore +3 -1
  4. data/.rubocop.yml +4 -2
  5. data/.rubocop_todo.yml +11 -198
  6. data/Gemfile +3 -8
  7. data/README.md +5 -6
  8. data/app/assets/images/blacklight/arrow-circle-down.svg +3 -0
  9. data/app/assets/images/blacklight/baruch-cuny.svg +3 -0
  10. data/app/assets/images/blacklight/berkeley.svg +4 -0
  11. data/app/assets/images/blacklight/book.svg +3 -0
  12. data/app/assets/images/blacklight/bookmark.svg +3 -0
  13. data/app/assets/images/blacklight/cd-rom.svg +3 -0
  14. data/app/assets/images/blacklight/chicago.svg +4 -0
  15. data/app/assets/images/blacklight/citation.svg +3 -0
  16. data/app/assets/images/blacklight/collection.svg +3 -0
  17. data/app/assets/images/blacklight/columbia.svg +3 -0
  18. data/app/assets/images/blacklight/cornell.svg +5 -0
  19. data/app/assets/images/blacklight/dvd-rom.svg +3 -0
  20. data/app/assets/images/blacklight/email.svg +3 -0
  21. data/app/assets/images/blacklight/esri-globe.svg +31 -37
  22. data/app/assets/images/blacklight/geoblacklight-icons.json +2079 -0
  23. data/app/assets/images/blacklight/globe.svg +3 -0
  24. data/app/assets/images/blacklight/harvard.svg +3 -0
  25. data/app/assets/images/blacklight/home.svg +3 -0
  26. data/app/assets/images/blacklight/illinois.svg +4 -0
  27. data/app/assets/images/blacklight/image.svg +3 -0
  28. data/app/assets/images/blacklight/indiana.svg +3 -0
  29. data/app/assets/images/blacklight/iowa.svg +3 -0
  30. data/app/assets/images/blacklight/leaf.svg +3 -0
  31. data/app/assets/images/blacklight/lewis-clark.svg +5 -0
  32. data/app/assets/images/blacklight/line.svg +4 -0
  33. data/app/assets/images/blacklight/logo.svg +1 -0
  34. data/app/assets/images/blacklight/map-marker.svg +3 -0
  35. data/app/assets/images/blacklight/map.svg +3 -0
  36. data/app/assets/images/blacklight/maryland.svg +3 -0
  37. data/app/assets/images/blacklight/massgis.svg +3 -0
  38. data/app/assets/images/blacklight/metadata.svg +3 -0
  39. data/app/assets/images/blacklight/michigan-state.svg +4 -0
  40. data/app/assets/images/blacklight/michigan.svg +3 -0
  41. data/app/assets/images/blacklight/minnesota.svg +3 -0
  42. data/app/assets/images/blacklight/mit.svg +3 -0
  43. data/app/assets/images/blacklight/mixed.svg +5 -0
  44. data/app/assets/images/blacklight/multilinestring.svg +6 -0
  45. data/app/assets/images/blacklight/multipoint.svg +3 -0
  46. data/app/assets/images/blacklight/multipolygon.svg +6 -0
  47. data/app/assets/images/blacklight/nyu.svg +6 -0
  48. data/app/assets/images/blacklight/ohio-state.svg +5 -0
  49. data/app/assets/images/blacklight/pagelines-brands.svg +3 -0
  50. data/app/assets/images/blacklight/paper-map.svg +3 -0
  51. data/app/assets/images/blacklight/penn-state.svg +4 -0
  52. data/app/assets/images/blacklight/point.svg +3 -0
  53. data/app/assets/images/blacklight/polygon.svg +4 -0
  54. data/app/assets/images/blacklight/polyline.svg +6 -0
  55. data/app/assets/images/blacklight/princeton.svg +3 -0
  56. data/app/assets/images/blacklight/public.svg +3 -0
  57. data/app/assets/images/blacklight/purdue.svg +4 -0
  58. data/app/assets/images/blacklight/raster.svg +3 -0
  59. data/app/assets/images/blacklight/restricted.svg +3 -0
  60. data/app/assets/images/blacklight/sms.svg +3 -0
  61. data/app/assets/images/blacklight/stanford.svg +3 -0
  62. data/app/assets/images/blacklight/table.svg +3 -0
  63. data/app/assets/images/blacklight/tags.svg +3 -0
  64. data/app/assets/images/blacklight/texas.svg +3 -0
  65. data/app/assets/images/blacklight/tufts.svg +3 -0
  66. data/app/assets/images/blacklight/ucla.svg +3 -0
  67. data/app/assets/images/blacklight/uva.svg +3 -0
  68. data/app/assets/images/blacklight/web_services.svg +3 -0
  69. data/app/assets/images/blacklight/wisconsin.svg +3 -0
  70. data/app/assets/javascripts/geoblacklight/basemaps.js +18 -0
  71. data/app/assets/javascripts/geoblacklight/modules/geosearch.js +1 -1
  72. data/app/assets/javascripts/geoblacklight/modules/help_text.js +7 -0
  73. data/app/assets/javascripts/geoblacklight/modules/home.js +1 -1
  74. data/app/assets/javascripts/geoblacklight/modules/item.js +19 -2
  75. data/app/assets/javascripts/geoblacklight/modules/results.js +4 -2
  76. data/app/assets/javascripts/geoblacklight/viewers/oembed.js +13 -0
  77. data/app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss +8 -9
  78. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +49 -59
  79. data/app/assets/stylesheets/geoblacklight/modules/item.scss +16 -0
  80. data/app/assets/stylesheets/geoblacklight/modules/results.scss +59 -28
  81. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +4 -0
  82. data/app/helpers/geoblacklight_helper.rb +97 -7
  83. data/app/models/concerns/geoblacklight/solr_document.rb +12 -3
  84. data/app/models/concerns/geoblacklight/solr_document/citation.rb +28 -0
  85. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +5 -0
  86. data/app/views/catalog/_citation.html.erb +11 -0
  87. data/app/views/catalog/_data_dictionary.html.erb +3 -2
  88. data/app/views/catalog/_document_action.html.erb +1 -1
  89. data/app/views/catalog/_document_split.html.erb +1 -1
  90. data/app/views/catalog/_exports.html.erb +2 -10
  91. data/app/views/catalog/_home_text.html.erb +5 -5
  92. data/app/views/catalog/_index_split_default.html.erb +18 -10
  93. data/app/views/catalog/_show_default_viewer_container.html.erb +6 -1
  94. data/app/views/catalog/_show_header_default.html.erb +2 -4
  95. data/app/views/catalog/_web_services_wfs.html.erb +3 -3
  96. data/app/views/catalog/_web_services_wms.html.erb +3 -3
  97. data/app/views/catalog/metadata.html.erb +3 -1
  98. data/app/views/catalog/web_services.html.erb +9 -7
  99. data/app/views/relation/_ancestors.html.erb +2 -1
  100. data/app/views/relation/_descendants.html.erb +2 -1
  101. data/app/views/shared/_header_navbar.html.erb +3 -1
  102. data/config/locales/geoblacklight.en.yml +72 -0
  103. data/geoblacklight.gemspec +4 -4
  104. data/lib/generators/geoblacklight/install_generator.rb +5 -0
  105. data/lib/generators/geoblacklight/templates/catalog_controller.rb +3 -0
  106. data/lib/generators/geoblacklight/templates/geoblacklight.js +0 -1
  107. data/lib/generators/geoblacklight/templates/package.json +1 -1
  108. data/lib/generators/geoblacklight/templates/settings.yml +23 -0
  109. data/lib/generators/geoblacklight/webpacker_generator.rb +1 -1
  110. data/lib/geoblacklight/catalog_helper_override.rb +1 -1
  111. data/lib/geoblacklight/constants.rb +3 -2
  112. data/lib/geoblacklight/download.rb +4 -4
  113. data/lib/geoblacklight/item_viewer.rb +5 -1
  114. data/lib/geoblacklight/metadata/base.rb +15 -10
  115. data/lib/geoblacklight/reference.rb +2 -1
  116. data/lib/geoblacklight/relation/ancestors.rb +1 -1
  117. data/lib/geoblacklight/relation/descendants.rb +1 -1
  118. data/lib/geoblacklight/version.rb +1 -1
  119. data/lib/geoblacklight/view_helper_override.rb +1 -1
  120. data/lib/geoblacklight/wms_layer.rb +2 -2
  121. data/lib/tasks/geoblacklight.rake +1 -1
  122. data/package.json +4 -0
  123. data/schema/references.md +2 -1
  124. data/solr/conf/schema.xml +5 -5
  125. data/spec/controllers/download_controller_spec.rb +1 -1
  126. data/spec/controllers/wms_controller_spec.rb +1 -1
  127. data/spec/features/configurable_basemap_spec.rb +9 -0
  128. data/spec/features/esri_viewer_spec.rb +0 -1
  129. data/spec/features/exports_spec.rb +9 -0
  130. data/spec/features/help_text_spec.rb +8 -0
  131. data/spec/features/metadata_panel_spec.rb +51 -8
  132. data/spec/features/missing_metadata_spec.rb +12 -0
  133. data/spec/features/oembed_spec.rb +9 -0
  134. data/spec/features/relations_spec.rb +2 -1
  135. data/spec/features/search_results_map_spec.rb +1 -1
  136. data/spec/features/split_view.html.erb_spec.rb +3 -3
  137. data/spec/features/suppressed_records_spec.rb +14 -0
  138. data/spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml +1 -0
  139. data/spec/fixtures/iso19139/stanford-cg357zz0321.xml +581 -0
  140. data/spec/fixtures/mods/fb897vt9938.mods +111 -0
  141. data/spec/fixtures/mods/stanford-cg357zz0321.mods +113 -0
  142. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +1 -1
  143. data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +30 -0
  144. data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +17 -0
  145. data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +23 -0
  146. data/spec/fixtures/solr_documents/oembed.json +24 -0
  147. data/spec/helpers/geoblacklight_helper_spec.rb +43 -7
  148. data/spec/javascripts/metadata_download_button_spec.js +1 -1
  149. data/spec/lib/geoblacklight/download_spec.rb +2 -2
  150. data/spec/lib/geoblacklight/metadata/base_spec.rb +21 -7
  151. data/spec/lib/geoblacklight/reference_spec.rb +30 -0
  152. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -1
  153. data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -1
  154. data/spec/lib/geoblacklight/wms_layer_spec.rb +2 -2
  155. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +13 -0
  156. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +46 -0
  157. data/spec/spec_helper.rb +8 -5
  158. data/spec/support/fixtures.rb +7 -0
  159. data/spec/tasks/geoblacklight_spec.rb +18 -0
  160. data/spec/test_app_templates/Gemfile.extra +1 -0
  161. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  162. data/template.rb +1 -1
  163. data/vendor/assets/javascripts/readmore.js +0 -0
  164. data/vendor/assets/javascripts/readmore.min.js +0 -11
  165. data/vendor/assets/stylesheets/leaflet.css +0 -1
  166. metadata +126 -31
  167. data/app/assets/images/blacklight/logo.png +0 -0
  168. data/app/assets/javascripts/geoblacklight/modules/collapse.js +0 -7
@@ -19,4 +19,20 @@
19
19
  }
20
20
  }
21
21
  }
22
+
23
+ .help-text {
24
+ cursor: pointer;
25
+ }
26
+
27
+ .truncate-abstract.collapse:not(.show),
28
+ .truncate-abstract.collapsing {
29
+ display: block;
30
+ display: -webkit-box;
31
+ height: auto;
32
+ min-height: #{8 * $line-height-base}rem;
33
+ max-height: #{8 * $line-height-base}rem;
34
+ overflow-y: hidden;
35
+ -webkit-box-orient: vertical;
36
+ -webkit-line-clamp: 8;
37
+ }
22
38
  }
@@ -3,44 +3,75 @@
3
3
  }
4
4
 
5
5
  .more-info-area {
6
- float: left;
7
- order:3;
8
6
  max-height: 100px;
9
7
  overflow:hidden;
10
8
  }
11
9
 
12
- .text-span{
13
- width:80%;
14
- float:left;
15
- }
16
-
17
- .hide-overflow {
18
- white-space: nowrap;
19
- overflow: hidden;
20
- text-overflow: ellipsis;
21
- display:block
22
- }
23
-
24
- .status-icons {
25
- order: 2;
26
- margin-left: 0.5rem;
27
- }
28
-
29
10
  .index_title {
30
- order: 1;
31
- @extend .text-span;
32
- @extend .hide-overflow;
33
11
  @extend h5;
12
+ display: flex;
13
+ justify-content: space-between;
34
14
  font-size:1rem;
35
15
  width:80%;
16
+
17
+ .title-wrapper {
18
+ @extend .d-flex;
19
+ @extend .justify-content-start;
20
+ flex: 1;
21
+ min-width: 0;
22
+ }
23
+
24
+ .document-counter {
25
+ @extend .pr-1;
26
+ }
27
+
28
+ a {
29
+ white-space: nowrap;
30
+ overflow-x: hidden;
31
+ min-width: 0;
32
+ text-overflow: ellipsis;
33
+ position: relative;
34
+ z-index: 2; // get the link above the toggle
35
+ }
36
+
37
+ .caret-toggle {
38
+ @extend .fa, .fa-caret-right;
39
+ flex-grow: 0;
40
+ width: 10px;
41
+
42
+ &[aria-expanded="true"] {
43
+ @extend .fa, .fa-caret-down;
44
+ }
45
+ }
46
+
47
+ .document-counter {
48
+ flex-grow: 0;
49
+ }
50
+
51
+ .status-icons {
52
+ margin-left: 0.5rem;
53
+ white-space: nowrap;
54
+ }
36
55
  }
37
56
 
38
- .caret-toggle {
39
- @extend .fa, .fa-caret-right;
40
- cursor: pointer;
41
- width: 10px;
57
+ #main-container {
58
+ .category-block {
59
+ min-height: 240px;
60
+
61
+ .category-icon {
62
+ font-size: 6em;
63
+ }
64
+ }
65
+
66
+ [data-map="index"] {
67
+ height: 400px;
42
68
 
43
- &.open {
44
- @extend .fa, .fa-caret-down;
69
+ .leaflet-control-container {
70
+ .search-control {
71
+ a {
72
+ color: $white;
73
+ }
74
+ }
75
+ }
45
76
  }
46
77
  }
@@ -3,6 +3,10 @@
3
3
 
4
4
  .list-group {
5
5
 
6
+ .list-group-item.exports {
7
+ margin-top:0px;
8
+ }
9
+
6
10
  .list-group-item {
7
11
 
8
12
  form {
@@ -1,4 +1,6 @@
1
1
  module GeoblacklightHelper
2
+ extend Deprecation
3
+
2
4
  def document_available?
3
5
  @document.public? || (@document.same_institution? && user_signed_in?)
4
6
  end
@@ -81,13 +83,54 @@ module GeoblacklightHelper
81
83
  layout: 'facet_tag_layout')
82
84
  end
83
85
 
84
- def geoblacklight_icon(name)
85
- icon_name = name ? name.parameterize : 'none'
86
- content_tag :span,
87
- '',
88
- class: "geoblacklight-icon geoblacklight-#{icon_name}",
89
- title: name
86
+ ##
87
+ # Returns an SVG icon or empty HTML span element
88
+ # @return [SVG or HTML tag]
89
+ def geoblacklight_icon(name, **args)
90
+ icon_name = name ? name.to_s.parameterize : 'none'
91
+ begin
92
+ blacklight_icon(icon_name, **args)
93
+ rescue Blacklight::Exceptions::IconNotFound
94
+ tag.span class: 'icon-missing geoblacklight-none'
95
+ end
96
+ end
97
+
98
+ ##
99
+ # Render an empty span
100
+ # @return [HTML tag]
101
+ def render_empty_span(classname)
102
+ tag.span class: classname
103
+ end
104
+
105
+ ##
106
+ # Capture SVG icon aria labels to describe
107
+ def queue_icon_aria_label(feature_name)
108
+ @aria_labels ||= Set.new
109
+ @aria_labels << feature_name
110
+ end
111
+ deprecation_deprecate :queue_icon_aria_label
112
+
113
+ ##
114
+ # Render a div of divs describing aria-labelledby values
115
+ # @return [HTML tag]
116
+ def render_aria_labels(aria_labels)
117
+ return unless aria_labels.present?
118
+ content_tag :div, id: 'aria-labels', class: 'sr-only sr-only-focusable' do
119
+ aria_labels.each do |label|
120
+ concat(render_aria_label(label))
121
+ end
122
+ end
123
+ end
124
+ deprecation_deprecate :render_aria_labels
125
+
126
+ # Render a div describing a aria-labelledby value
127
+ # @return [HTML tag]
128
+ def render_aria_label(label)
129
+ content_tag :div, id: "aria-label-#{label}" do
130
+ I18n.t("geoblacklight.aria-labels.#{label}")
131
+ end
90
132
  end
133
+ deprecation_deprecate :render_aria_label
91
134
 
92
135
  ##
93
136
  # Renders an unique array of search links based off of terms
@@ -139,6 +182,29 @@ module GeoblacklightHelper
139
182
  value.html_safe
140
183
  end
141
184
 
185
+ ##
186
+ # Deteremines if a feature should include help text popover
187
+ # @return [Boolean]
188
+ def show_help_text?(feature, key)
189
+ Settings&.HELP_TEXT&.send(feature)&.include?(key)
190
+ end
191
+
192
+ ##
193
+ # Render help text popover for a given feature and translation key
194
+ # @return [HTML tag]
195
+ def render_help_text_entry(feature, key)
196
+ if I18n.exists?("geoblacklight.help_text.#{feature}.#{key}", locale)
197
+ help_text = I18n.t("geoblacklight.help_text.#{feature}.#{key}")
198
+ content_tag :h3, class: 'help-text viewer_protocol h6' do
199
+ content_tag :a, 'data': { toggle: 'popover', title: help_text[:title], content: help_text[:content] } do
200
+ help_text[:title]
201
+ end
202
+ end
203
+ else
204
+ tag.span class: 'help-text translation-missing'
205
+ end
206
+ end
207
+
142
208
  ##
143
209
  # Deteremines if item view should include attribute table
144
210
  # @return [Boolean]
@@ -164,6 +230,23 @@ module GeoblacklightHelper
164
230
  blacklight_config.basemap_provider || 'positron'
165
231
  end
166
232
 
233
+ def display_carto
234
+ return link_to(
235
+ content_tag(:span, '', class: 'geoblacklight geoblacklight-carto') +
236
+ t('geoblacklight.tools.open_carto'),
237
+ carto_link(@document.carto_reference),
238
+ target: '_blank'
239
+ ) if @document.carto_reference.present? && !Settings.CARTO_HIDE
240
+ end
241
+
242
+ def display_arcgis
243
+ return link_to(
244
+ blacklight_icon('esri-globe') + ' ' +
245
+ t('geoblacklight.tools.open_arcgis'),
246
+ arcgis_link(@document.arcgis_urls)
247
+ ) if @document.arcgis_urls.present? && !Settings.ARCGIS_HIDE
248
+ end
249
+
167
250
  ##
168
251
  # Creates a Carto OneClick link link, using the configuration link
169
252
  # @param [String] file_link
@@ -202,7 +285,7 @@ module GeoblacklightHelper
202
285
  def render_facet_item_with_icon(field_name, item)
203
286
  doc = Nokogiri::HTML.fragment(render_facet_item(field_name, item))
204
287
  doc.at_css('.facet-label').children.first
205
- .add_previous_sibling(geoblacklight_icon(item.value))
288
+ .add_previous_sibling(geoblacklight_icon(item.value, aria_hidden: true))
206
289
  doc.to_html.html_safe
207
290
  end
208
291
 
@@ -239,4 +322,11 @@ module GeoblacklightHelper
239
322
  args[:document].references.url.endpoint
240
323
  ) if args[:document]&.references&.url
241
324
  end
325
+
326
+ ## Returns the icon used based off a Settings strategy
327
+ def relations_icon(document, icon)
328
+ icon_name = document[Settings.FIELDS.GEOM_TYPE] if Settings.USE_GEOM_FOR_RELATIONS_ICON
329
+ icon_name = icon if icon_name.blank?
330
+ geoblacklight_icon(icon_name)
331
+ end
242
332
  end
@@ -7,6 +7,7 @@ module Geoblacklight
7
7
  include Geoblacklight::SolrDocument::Carto
8
8
  include Geoblacklight::SolrDocument::Inspection
9
9
  include Geoblacklight::SolrDocument::Arcgis
10
+ include Geoblacklight::SolrDocument::Citation
10
11
 
11
12
  delegate :download_types, to: :references
12
13
  delegate :viewer_protocol, to: :item_viewer
@@ -17,11 +18,11 @@ module Geoblacklight
17
18
  end
18
19
 
19
20
  def public?
20
- fetch(Settings.FIELDS.RIGHTS).casecmp('public').zero?
21
+ rights_field_data.present? && rights_field_data.casecmp('public').zero?
21
22
  end
22
23
 
23
24
  def restricted?
24
- fetch(Settings.FIELDS.RIGHTS).casecmp('restricted').zero?
25
+ rights_field_data.blank? || rights_field_data.casecmp('restricted').zero?
25
26
  end
26
27
 
27
28
  def downloadable?
@@ -40,8 +41,12 @@ module Geoblacklight
40
41
  references.hgl.to_hash unless references.hgl.blank?
41
42
  end
42
43
 
44
+ def oembed
45
+ references.oembed.endpoint unless references.oembed.blank?
46
+ end
47
+
43
48
  def same_institution?
44
- fetch(Settings.FIELDS.PROVENANCE).casecmp(Settings.INSTITUTION.downcase).zero?
49
+ fetch(Settings.FIELDS.PROVENANCE, '').casecmp(Settings.INSTITUTION.downcase).zero?
45
50
  end
46
51
 
47
52
  def iiif_download
@@ -98,6 +103,10 @@ module Geoblacklight
98
103
 
99
104
  private
100
105
 
106
+ def rights_field_data
107
+ fetch(Settings.FIELDS.RIGHTS, '')
108
+ end
109
+
101
110
  def method_missing(method, *args, &block)
102
111
  if /.*_url$/ =~ method.to_s
103
112
  checked_endpoint(method.to_s.gsub('_url', ''))
@@ -0,0 +1,28 @@
1
+ module Geoblacklight
2
+ module SolrDocument
3
+ module Citation
4
+ include ActionView::Helpers::OutputSafetyHelper
5
+
6
+ def geoblacklight_citation(solr_document_url)
7
+ [
8
+ fetch(Settings.FIELDS.CREATOR, nil),
9
+ ("(#{issued})" if issued),
10
+ fetch(Settings.FIELDS.TITLE, nil),
11
+ ("[#{format}]" if format),
12
+ fetch(Settings.FIELDS.PUBLISHER, nil),
13
+ I18n.t('geoblacklight.citation.retrieved_from', document_url: solr_document_url)
14
+ ].flatten.compact.join('. ')
15
+ end
16
+
17
+ private
18
+
19
+ def issued
20
+ fetch(Settings.FIELDS.ISSUED, nil)
21
+ end
22
+
23
+ def format
24
+ fetch(Settings.FIELDS.FILE_FORMAT, nil)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -57,6 +57,11 @@ module Geoblacklight
57
57
  def hide_suppressed_records(solr_params)
58
58
  # Show child records if searching for a specific source parent
59
59
  return unless blacklight_params.fetch(:f, {})[Settings.FIELDS.SOURCE.to_sym].nil?
60
+
61
+ # Do not suppress action_documents method calls for individual documents
62
+ # ex. CatalogController#web_services (exportable views)
63
+ return if solr_params[:q]&.include?('{!lucene}layer_slug_s:')
64
+
60
65
  solr_params[:fq] ||= []
61
66
  solr_params[:fq] << '-suppressed_b: true'
62
67
  end
@@ -0,0 +1,11 @@
1
+ <div class="modal-header">
2
+ <h1><%= t('blacklight.tools.citation') %></h1>
3
+ <button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
4
+ <span aria-hidden="true">&times;</span>
5
+ </button>
6
+ </div>
7
+ <div class="modal-body">
8
+ <% @documents&.each do |document| %>
9
+ <%= document.geoblacklight_citation(solr_document_url(document)) %>
10
+ <% end %>
11
+ </div>
@@ -1,5 +1,6 @@
1
1
  <% if document.data_dictionary_download.present? %>
2
2
  <%= link_to document.data_dictionary_download[:data_dictionary] do %>
3
- <span class='geoblacklight geoblacklight-data-dictionary'></span><%= t('geoblacklight.references.data_dictionary') %>
3
+ <%= geoblacklight_icon('book', aria_hidden: true) %>
4
+ <%= t('geoblacklight.references.data_dictionary') %>
4
5
  <% end %>
5
- <% end %>
6
+ <% end %>
@@ -1,6 +1,6 @@
1
1
  <%= link_to document_action_path(document_action_config, (local_assigns.has_key?(:url_opts) ? url_opts : {}).merge(({id: document} if document) || {})),
2
2
  id: document_action_config.fetch(:id, "#{document_action_config.key}Link"),
3
3
  data: {}.merge(({blacklight_modal: "trigger"} if document_action_config.modal != false) || {}) do %>
4
- <%= content_tag :span, '', class: "geoblacklight geoblacklight-#{document_action_config.key}" %>
4
+ <%= geoblacklight_icon(document_action_config.key, aria_hidden: true) %>
5
5
  <%= document_action_label(document_action_config.key, document_action_config) %>
6
6
  <% end %>
@@ -2,5 +2,5 @@
2
2
  <div id="documents" class="documents-list col-md-6">
3
3
  <%= render documents, :as => :document %>
4
4
  </div>
5
- <%= content_tag :div, '', id: 'map', class: 'col-md-6', data: { map: 'index', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
5
+ <%= content_tag :div, '', id: 'map', class: 'col-md-6', aria: { label: t('geoblacklight.map.label') }, data: { map: 'index', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
6
6
  </div>
@@ -1,11 +1,3 @@
1
1
  <% document ||= @document %>
2
- <% if document.carto_reference.present? %>
3
- <%= link_to(carto_link(document.carto_reference), target: '_blank') do %>
4
- <span class='geoblacklight geoblacklight-carto'></span><%= t('geoblacklight.tools.open_carto') %>
5
- <% end %>
6
- <% end %>
7
- <% if document.arcgis_urls.present? %>
8
- <%= link_to(arcgis_link(document.arcgis_urls)) do %>
9
- <%= blacklight_icon('esri-globe') %> <%= t('geoblacklight.tools.open_arcgis') %>
10
- <% end %>
11
- <% end %>
2
+ <%= display_carto %>
3
+ <%= display_arcgis %>
@@ -5,14 +5,14 @@
5
5
  <div class='row'>
6
6
  <div class='category-block col-sm'>
7
7
  <div class='category-icon'>
8
- <span class='fa fa-home'></span>
8
+ <%= geoblacklight_icon('home') %>
9
9
  </div>
10
10
  <%= content_tag :h4, t('geoblacklight.home.institution') %>
11
11
  <%= render_facet_tags [Settings.FIELDS.PROVENANCE] %>
12
12
  </div>
13
13
  <div class='category-block col-sm'>
14
14
  <div class='category-icon'>
15
- <span class='fa fa-arrow-circle-down'></span>
15
+ <%= geoblacklight_icon('arrow-circle-down') %>
16
16
  </div>
17
17
  <%= content_tag :h4, t('geoblacklight.home.data_type') %>
18
18
  <%= render_facet_tags [Settings.FIELDS.GEOM_TYPE] %>
@@ -21,14 +21,14 @@
21
21
  <div class='row'>
22
22
  <div class='category-block col-sm'>
23
23
  <div class='category-icon'>
24
- <span class='fa fa-globe'></span>
24
+ <%= geoblacklight_icon('globe') %>
25
25
  </div>
26
26
  <%= content_tag :h4, t('geoblacklight.home.placename') %>
27
27
  <%= render_facet_tags [Settings.FIELDS.SPATIAL_COVERAGE] %>
28
28
  </div>
29
29
  <div class='category-block col-sm'>
30
30
  <div class='category-icon'>
31
- <span class='fa fa-tags'></span>
31
+ <%= geoblacklight_icon('tags') %>
32
32
  </div>
33
33
  <%= content_tag :h4, t('geoblacklight.home.subject') %>
34
34
  <%= render_facet_tags [Settings.FIELDS.SUBJECT] %>
@@ -37,7 +37,7 @@
37
37
  </div>
38
38
  <div class='col-sm'>
39
39
  <%= content_tag :h3, t('geoblacklight.home.map_heading') %>
40
- <%= content_tag :div, '', id: 'map', data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
40
+ <%= content_tag :div, '', id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
41
41
  </div>
42
42
  </div>
43
43
  </div>