Skip to content

Commit

Permalink
Merge 5937aa8 into 7fb9e3f
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessie Keck committed Jan 10, 2019
2 parents 7fb9e3f + 5937aa8 commit f657d18
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.19.1
6.19.2
41 changes: 23 additions & 18 deletions app/views/catalog/_citation.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
<div class="modal-header">
<h1><%= t('blacklight.tools.citation') %></h1>
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<% @documents.each do |document| %>
<h1 class="modal-title"><%= document_heading(document) %></h1>

<% @documents.each do |document| %>
<% if document.respond_to?(:export_as_mla_citation_txt) %>
<h2><%= t('blacklight.citation.mla') %></h2>
<%= document.send(:export_as_mla_citation_txt).html_safe %><br/><br/>
<% end %>
<h3 class="modal-title"><%= document_heading(document) %></h3>
<% if document.respond_to?(:export_as_apa_citation_txt) %>
<h2><%= t('blacklight.citation.apa') %></h2>
<%= document.send(:export_as_apa_citation_txt).html_safe %><br/><br/>
<% end %>
<% if document.respond_to?(:export_as_mla_citation_txt) %>
<h4><%= t('blacklight.citation.mla') %></h4>
<%= document.send(:export_as_mla_citation_txt).html_safe %><br/><br/>
<% end %>
<% if document.respond_to?(:export_as_apa_citation_txt) %>
<h4><%= t('blacklight.citation.apa') %></h4>
<%= document.send(:export_as_apa_citation_txt).html_safe %><br/><br/>
<% end %>
<%- if document.respond_to?(:export_as_chicago_citation_txt) -%>
<h4><%= t('blacklight.citation.chicago') %></h4>
<%= document.send(:export_as_chicago_citation_txt).html_safe %>
<%- end -%>
<% end %>
<% if document.respond_to?(:export_as_chicago_citation_txt) %>
<h2><%= t('blacklight.citation.chicago') %></h2>
<%= document.send(:export_as_chicago_citation_txt).html_safe %>
<% end %>
<% end %>
</div>
2 changes: 1 addition & 1 deletion app/views/catalog/citation.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= render :partial => 'citation' -%>
<%= render partial: 'citation' %>
8 changes: 1 addition & 7 deletions app/views/catalog/citation.js.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3><%= t('blacklight.tools.citation') %></h3>
</div>
<div class="modal-body">
<%= render :partial => 'citation' -%>
</div>
<%= render partial: 'citation' %>
2 changes: 1 addition & 1 deletion blacklight.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "capybara", '>= 2', '< 4'
s.add_development_dependency 'chromedriver-helper', '< 2.0.0' # 2.1.0 is causing "Unable to find chromedriver" on Travis
s.add_development_dependency "selenium-webdriver", '>= 3.13.1'
s.add_development_dependency 'engine_cart', '~> 1.2'
s.add_development_dependency 'engine_cart', '~> 2.1'
s.add_development_dependency "equivalent-xml"
s.add_development_dependency "coveralls"
s.add_development_dependency "simplecov"
Expand Down
6 changes: 3 additions & 3 deletions spec/controllers/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
end

it "returns results (possibly 0) when the user asks for a valid value to a custom facet query", :integration => true do
get :index, params: { f: { example_query_facet_field: 'years_10' } } # valid custom facet value with some results
get :index, params: { f: { example_query_facet_field: 'years_25' } } # valid custom facet value with some results
expect(assigns(:response).docs).to_not be_empty
get :index, params: { f: {example_query_facet_field: 'years_5' } } # valid custom facet value with NO results
expect(assigns(:response).docs).to be_empty
Expand Down Expand Up @@ -149,8 +149,8 @@
let(:query_facet_items) { facets.last['items'] }
let(:regular_facet_items) { facets.first['items'] }
it "has items with labels and values" do
expect(query_facet_items.first['label']).to eq 'within 10 Years'
expect(query_facet_items.first['value']).to eq 'years_10'
expect(query_facet_items.first['label']).to eq 'within 25 Years'
expect(query_facet_items.first['value']).to eq 'years_25'
expect(regular_facet_items.first['label']).to eq "Book"
expect(regular_facet_items.first['value']).to eq "Book"
end
Expand Down
2 changes: 0 additions & 2 deletions tasks/blacklight.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ end
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop)

EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc

desc "Run test suite"
task ci: ['blacklight:generate'] do
SolrWrapper.wrap do |solr|
Expand Down

0 comments on commit f657d18

Please sign in to comment.