-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display as much metadata as possible.
Closes #47.
- Loading branch information
1 parent
c232e6c
commit 31a8dac
Showing
5 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<%# default partial to display solr document fields in catalog show view -%> | ||
<dl class="dl-horizontal dl-invert"> | ||
<% document.display_fields.each do |field_name, field| -%> | ||
<dt class="blacklight-<%= field_name.parameterize %>"><%= render_document_show_field_label document, field: field_name.gsub("_ssim","") %></dt> | ||
<dd class="blacklight-<%= field_name.parameterize %>"><%= field.join(", ") %></dd> | ||
<% end -%> | ||
</dl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe "catalog/_show_default.html.erb" do | ||
let(:document) do | ||
SolrDocument.new(id: "1", | ||
author_ssim: ["The Doctor"], | ||
publisher_ssim: ["The Byzantium", "The Silence"]) | ||
end | ||
before do | ||
allow(view).to receive(:blacklight_config).and_return(CatalogController.blacklight_config) | ||
render "catalog/show_default", document: document | ||
end | ||
it "renders all possible metadata fields" do | ||
expect(rendered).to have_content "The Doctor" | ||
expect(rendered).to have_content "The Byzantium, The Silence" | ||
end | ||
end |