geoblacklight 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +19 -19
- data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +2 -0
- data/app/assets/stylesheets/geoblacklight/modules/coderay.scss +147 -0
- data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +5 -1
- data/app/assets/stylesheets/geoblacklight/modules/metadata.scss +5 -0
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -0
- data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +6 -0
- data/app/controllers/download_controller.rb +5 -5
- data/app/views/catalog/_downloads.html.erb +48 -0
- data/app/views/catalog/_home_text.html.erb +6 -6
- data/app/views/catalog/_index_split_default.html.erb +2 -2
- data/app/views/catalog/_metadata.html.erb +12 -0
- data/app/views/catalog/_search_form_no_navbar.html.erb +2 -2
- data/app/views/catalog/metadata.html.erb +1 -0
- data/app/views/catalog/metadata.js.erb +7 -0
- data/app/views/catalog/{web_services.html → web_services.html.erb} +0 -0
- data/config/locales/geoblacklight.en.yml +3 -0
- data/geoblacklight.gemspec +1 -0
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +2 -0
- data/lib/generators/geoblacklight/templates/settings.yml +7 -1
- data/lib/geoblacklight.rb +1 -0
- data/lib/geoblacklight/controller_override.rb +4 -0
- data/lib/geoblacklight/download.rb +70 -58
- data/lib/geoblacklight/download/geojson_download.rb +19 -17
- data/lib/geoblacklight/download/geotiff_download.rb +17 -15
- data/lib/geoblacklight/download/hgl_download.rb +15 -13
- data/lib/geoblacklight/download/kmz_download.rb +14 -12
- data/lib/geoblacklight/download/shapefile_download.rb +14 -12
- data/lib/geoblacklight/engine.rb +1 -0
- data/lib/geoblacklight/metadata.rb +41 -0
- data/lib/geoblacklight/routes.rb +1 -0
- data/lib/geoblacklight/solr_document.rb +7 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/tasks/configure_solr.rake +36 -0
- data/lib/tasks/geoblacklight.rake +0 -6
- data/spec/controllers/download_controller_spec.rb +1 -1
- data/spec/features/download_layer_spec.rb +3 -3
- data/spec/features/metadata_panel_spec.rb +22 -0
- data/spec/fixtures/solr_documents/actual-papermap1.json +0 -1
- data/spec/fixtures/solr_documents/actual-point1.json +0 -1
- data/spec/fixtures/solr_documents/actual-polygon1.json +1 -2
- data/spec/fixtures/solr_documents/actual-raster1.json +1 -2
- data/spec/fixtures/solr_documents/harvard_raster.json +1 -2
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +0 -1
- data/spec/fixtures/solr_documents/public_polygon_mit.json +1 -6
- data/spec/fixtures/solr_documents/restricted-line.json +1 -2
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +9 -4
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +9 -4
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +8 -3
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +9 -4
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +9 -4
- data/spec/lib/geoblacklight/download_spec.rb +3 -3
- data/spec/lib/geoblacklight/metadata_spec.rb +25 -0
- metadata +29 -4
- 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>
|