-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make show categories linkable to search, adds in more button on homepage
- Loading branch information
1 parent
ced46f6
commit 3d51019
Showing
9 changed files
with
36 additions
and
6 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<% display_facet.items.each do |item| %> | ||
<%= link_to item.value, catalog_index_path({f: {"#{facet_field.field}" => [item.value]}}), class: 'home-facet-link' %><%= "," unless item == display_facet.items.last %> | ||
<%= link_to item.value, catalog_index_path({f: {"#{facet_field.field}" => [item.value]}}), class: 'home-facet-link' %><%= "," %> | ||
<% end %> |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= yield %> | ||
<%= yield %> | ||
<%= link_to t('blacklight.search.facets.more'), catalog_facet_path(display_facet.name), class: 'more_facets_link' %> |
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
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,16 @@ | ||
require 'spec_helper' | ||
|
||
describe GeoblacklightHelper do | ||
include GeoblacklightHelper | ||
include ActionView::Helpers::UrlHelper | ||
describe '#render_facet_links' do | ||
it 'should contain unique links' do | ||
expect(self).to receive(:catalog_index_path).exactly(3).times.and_return("http://example.com/catalog?f[dc_subject_sm][]=category") | ||
html = Capybara.string(render_facet_links('dc_subject_sm', ['Test', 'Test', 'Earth', 'Science'])) | ||
expect(html).to have_css 'a', count: 3 | ||
expect(html).to have_css 'a', text: 'Test', count: 1 | ||
expect(html).to have_css 'a', text: 'Earth', count: 1 | ||
expect(html).to have_css 'a', text: 'Science', count: 1 | ||
end | ||
end | ||
end |