geoblacklight 4.0.0.pre.alpha → 4.0.0.pre.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 040dd47045422f5690fcbf94d66341e1a6c7f23a17f51d08c619d5735d1e8da0
4
- data.tar.gz: 4433d184dca84709c3d448d1b37e518934f8f0504aa05008c2427754d85c37d8
3
+ metadata.gz: d502418a98a00cc58de5824dbc9f79ac002f4e301bd994714ab0603422317fff
4
+ data.tar.gz: 353d8af1637ab4e6143ef29b660b032ac26d8f76cb02f2a5fe0fdc043ad8c91d
5
5
  SHA512:
6
- metadata.gz: b3b8fc3bcf5d9796d7191d47c1d23e08426cf5d02227a4a3b8cd9325a4c404abf92c2f27935468b6c5673ca003672ab0955a95d7d1fadc8d19d8966bb9999d6b
7
- data.tar.gz: 229378574de83e5899e25f0947de49f37e6e61946a7e2a0abe40cca934e1f8c06447aa2f86405de31ad05fe325574eb1c5f8c1350709eafb006783a324fdb73a
6
+ metadata.gz: 2e06534fad43010d8999c9129be281de983978859fe1004c0913c77606c76add0c081e1d09d9b0fe57d5e3a08c97120108a95e17700c414a300983487d0e3358
7
+ data.tar.gz: ecc3612e861656a526ce2fe0312dcff12f15d2deccbb36aac048365e7a54f28bbb2e7fe984cd60d4ecdefd806e5fe3aa4392a882334f9d40e79ee79bb96d045d
@@ -26,21 +26,6 @@ module GeoblacklightHelper
26
26
  )
27
27
  end
28
28
 
29
- def download_link_direct(text, document)
30
- link_to(
31
- text,
32
- document.direct_download[:download],
33
- 'contentUrl' => document.direct_download[:download],
34
- class: ['btn', 'btn-default', 'download', 'download-original'],
35
- data: {
36
- download: 'trigger',
37
- download_type: 'direct',
38
- download_id: document.id
39
- }
40
- )
41
- end
42
- deprecation_deprecate download_link_direct: 'Use download_link_file instead'
43
-
44
29
  def download_link_hgl(text, document)
45
30
  link_to(
46
31
  text,
@@ -8,7 +8,7 @@
8
8
  <% end %>
9
9
  <% end %>
10
10
  <% if document.direct_download[:download].is_a? String %>
11
- <%= render partial: 'download_link', locals: { download_link: download_link_direct(download_text(document.file_format), document) } %>
11
+ <%= render partial: 'download_link', locals: { download_link: download_link_file(download_text(document.file_format), document.id, document.direct_download[:download]['url']) } %>
12
12
  <% end %>
13
13
  <% end %>
14
14
 
@@ -32,6 +32,10 @@ class CatalogController < ApplicationController
32
32
  :q => "{!raw f=#{Settings.FIELDS.ID} v=$id}"
33
33
  }
34
34
 
35
+ # GeoBlacklight Defaults
36
+ # * Adds the "map" split view for catalog#index
37
+ config.view.split(partials: ['index'])
38
+ config.view.delete_field('list')
35
39
 
36
40
  # solr field configuration for search results/index views
37
41
  # config.index.show_link = 'title_display'
@@ -92,7 +96,7 @@ class CatalogController < ApplicationController
92
96
  config.add_facet_field Settings.FIELDS.INDEX_YEAR, :label => 'Year', :limit => 10
93
97
  config.add_facet_field Settings.FIELDS.SPATIAL_COVERAGE, :label => 'Place', :limit => 8
94
98
  config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access', limit: 8, partial: "icon_facet"
95
- config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', :limit => 8
99
+ config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', :limit => 8
96
100
  config.add_facet_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', :limit => 8
97
101
  config.add_facet_field Settings.FIELDS.FORMAT, :label => 'Format', :limit => 8
98
102
  config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8
@@ -11,8 +11,6 @@ require 'handlebars_assets'
11
11
 
12
12
  module Geoblacklight
13
13
  class Engine < ::Rails::Engine
14
- Blacklight::Configuration.default_values[:view].split.partials = ['index']
15
- Blacklight::Configuration.default_values[:view].delete_field('list')
16
14
  # GeoblacklightHelper is needed by all helpers, so we inject it
17
15
  # into action view base here.
18
16
  initializer 'geoblacklight.helpers' do
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Geoblacklight
3
- VERSION = '4.0.0-alpha'
3
+ VERSION = '4.0.0-alpha.1'
4
4
  end
@@ -64,25 +64,6 @@ describe GeoblacklightHelper, type: :helper do
64
64
  end
65
65
  end
66
66
 
67
- describe '#download_link_direct' do
68
- let(:text) { 'Test Link Text' }
69
- let(:references_field) { Settings.FIELDS.REFERENCES }
70
- let(:document_attributes) do
71
- {
72
- references_field => {
73
- 'http://schema.org/downloadUrl' => 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip'
74
- }.to_json
75
- }
76
- end
77
- let(:document) { SolrDocument.new(document_attributes) }
78
- before do
79
- allow_any_instance_of(Geoblacklight::Reference).to receive(:to_hash).and_return(download: 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip')
80
- end
81
- it 'generates a link to download the original file' do
82
- expect(download_link_direct(text, document)).to eq '<a contentUrl="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip" class="btn btn-default download download-original" data-download="trigger" data-download-type="direct" href="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip">Test Link Text</a>'
83
- end
84
- end
85
-
86
67
  describe '#download_link_hgl' do
87
68
  let(:text) { 'Test Link Text' }
88
69
  let(:document) { instance_double(SolrDocument) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.pre.alpha
4
+ version: 4.0.0.pre.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-09-03 00:00:00.000000000 Z
14
+ date: 2021-10-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails