geoblacklight 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/Rakefile +19 -19
  4. data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +2 -0
  5. data/app/assets/stylesheets/geoblacklight/modules/coderay.scss +147 -0
  6. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +5 -1
  7. data/app/assets/stylesheets/geoblacklight/modules/metadata.scss +5 -0
  8. data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -0
  9. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +6 -0
  10. data/app/controllers/download_controller.rb +5 -5
  11. data/app/views/catalog/_downloads.html.erb +48 -0
  12. data/app/views/catalog/_home_text.html.erb +6 -6
  13. data/app/views/catalog/_index_split_default.html.erb +2 -2
  14. data/app/views/catalog/_metadata.html.erb +12 -0
  15. data/app/views/catalog/_search_form_no_navbar.html.erb +2 -2
  16. data/app/views/catalog/metadata.html.erb +1 -0
  17. data/app/views/catalog/metadata.js.erb +7 -0
  18. data/app/views/catalog/{web_services.html → web_services.html.erb} +0 -0
  19. data/config/locales/geoblacklight.en.yml +3 -0
  20. data/geoblacklight.gemspec +1 -0
  21. data/lib/generators/geoblacklight/templates/catalog_controller.rb +2 -0
  22. data/lib/generators/geoblacklight/templates/settings.yml +7 -1
  23. data/lib/geoblacklight.rb +1 -0
  24. data/lib/geoblacklight/controller_override.rb +4 -0
  25. data/lib/geoblacklight/download.rb +70 -58
  26. data/lib/geoblacklight/download/geojson_download.rb +19 -17
  27. data/lib/geoblacklight/download/geotiff_download.rb +17 -15
  28. data/lib/geoblacklight/download/hgl_download.rb +15 -13
  29. data/lib/geoblacklight/download/kmz_download.rb +14 -12
  30. data/lib/geoblacklight/download/shapefile_download.rb +14 -12
  31. data/lib/geoblacklight/engine.rb +1 -0
  32. data/lib/geoblacklight/metadata.rb +41 -0
  33. data/lib/geoblacklight/routes.rb +1 -0
  34. data/lib/geoblacklight/solr_document.rb +7 -1
  35. data/lib/geoblacklight/version.rb +1 -1
  36. data/lib/tasks/configure_solr.rake +36 -0
  37. data/lib/tasks/geoblacklight.rake +0 -6
  38. data/spec/controllers/download_controller_spec.rb +1 -1
  39. data/spec/features/download_layer_spec.rb +3 -3
  40. data/spec/features/metadata_panel_spec.rb +22 -0
  41. data/spec/fixtures/solr_documents/actual-papermap1.json +0 -1
  42. data/spec/fixtures/solr_documents/actual-point1.json +0 -1
  43. data/spec/fixtures/solr_documents/actual-polygon1.json +1 -2
  44. data/spec/fixtures/solr_documents/actual-raster1.json +1 -2
  45. data/spec/fixtures/solr_documents/harvard_raster.json +1 -2
  46. data/spec/fixtures/solr_documents/public_iiif_princeton.json +0 -1
  47. data/spec/fixtures/solr_documents/public_polygon_mit.json +1 -6
  48. data/spec/fixtures/solr_documents/restricted-line.json +1 -2
  49. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +9 -4
  50. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +9 -4
  51. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +8 -3
  52. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +9 -4
  53. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +9 -4
  54. data/spec/lib/geoblacklight/download_spec.rb +3 -3
  55. data/spec/lib/geoblacklight/metadata_spec.rb +25 -0
  56. metadata +29 -4
  57. data/app/views/catalog/_show_tools.html.erb +0 -63
@@ -1,63 +0,0 @@
1
- <% document ||= @document %>
2
- <div class="panel panel-default show-tools">
3
- <div class="panel-heading">
4
- <%= t('blacklight.tools.title') %>
5
- </div>
6
-
7
- <div class="panel-body">
8
- <ul class="nav">
9
- <%= render_show_doc_actions @document do |config, inner| %>
10
- <li class="<%= config.key %>">
11
- <%= inner %>
12
- </li>
13
- <% end %>
14
- </ul>
15
- </div>
16
- <% if document_downloadable? %>
17
- <div class='panel-body'>
18
- <div class='btn-group' itemprop='distribution' itemscope='itemscope' itemtype='http://schema.org/DataDownload'>
19
- <% if document.direct_download.present? %>
20
- <%= link_to(download_text(@document[:dc_format_s]), document.direct_download[:download], class: 'btn btn-default', 'contentUrl' => document.direct_download[:download], data: { download: 'trigger', download_type: 'direct', download_id: document[:layer_slug_s] }) %>
21
- <% elsif document.hgl_download.present? %>
22
- <%= link_to(download_text(document.download_types.first[0]),
23
- download_hgl_path(id: document), data: {ajax_modal: 'trigger', download: 'trigger', download_type: 'harvard-hgl', download_id: document[:layer_slug_s] },
24
- class: 'btn btn-default') %>
25
- <% else %>
26
- <%= link_to(download_text(document.download_types.first[0]), '', data: { download_path: "#{download_path(document[:layer_slug_s], type: document.download_types.first[0])}", download: 'trigger', download_type: document.download_types.first[0], download_id: document[:layer_slug_s] }, class: 'btn btn-default') %>
27
- <% end %>
28
- <button type='button' class='btn btn-default dropdown-toggle download-dropdown-toggle' data-toggle='dropdown' aria-expanded='false'>
29
- <span class='caret'></span>
30
- <span class='sr-only'>Toggle Download Dropdown</span>
31
- </button>
32
- <ul class='dropdown-menu' role='menu'>
33
- <% if document.hgl_download.present? %>
34
- <li role="presentation" class="dropdown-header">Original</li>
35
- <li>
36
- <%= link_to(download_text(document.download_types.first[0]),
37
- download_hgl_path(id: document), data: {ajax_modal: 'trigger', download: 'trigger', download_type: 'harvard-hgl', download_id: document[:layer_slug_s] }) %>
38
- </li>
39
- <% else %>
40
- <% if document.direct_download.present? %>
41
- <li role="presentation" class="dropdown-header">Original</li>
42
- <li>
43
- <%= link_to(download_text(@document[:dc_format_s]), document.direct_download[:download], 'contentUrl' => document.direct_download[:download], data: { download: 'trigger', download_type: 'direct', download_id: document[:layer_slug_s] }) %>
44
- </li>
45
- <% end %>
46
- <% if document.download_types.present? %>
47
- <li role="presentation" class="dropdown-header">Generated</li>
48
- <% document.download_types.each do |type| %>
49
- <%= content_tag(:li) do %>
50
- <% link_to(download_text(type[0]), '', data: { download_path: "#{download_path(document[:layer_slug_s], type: type[0])}", download: 'trigger', download_type: type[0], download_id: document[:layer_slug_s] }) %>
51
- <% end %>
52
- <% end %>
53
- <% end %>
54
- <% end %>
55
- </ul>
56
- </div>
57
- </div>
58
- <% elsif document.restricted? && document.same_institution? %>
59
- <div class='panel-body'>
60
- <%= link_to t('geoblacklight.tools.login_to_view'), new_user_session_path(referrer: request.original_url) %>
61
- </div>
62
- <% end %>
63
- </div>