-
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.
breakout ancestors/descendants into their own partials, updating desc…
…endants i18n key
- Loading branch information
1 parent
bb31179
commit 54f5f29
Showing
5 changed files
with
27 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<b><%= t('geoblacklight.relations.ancestor') %></b> | ||
<% @relations.ancestors['docs'].each do |ancestor| %> | ||
<li> | ||
<%= link_to solr_document_path(ancestor['layer_slug_s']) do %> | ||
<span class='geoblacklight geoblacklight-relations-ancestor'></span> <%= ancestor['dc_title_s'] %> | ||
<% end %> | ||
</li> | ||
<% 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<b><%= t('geoblacklight.relations.descendant', count: @relations.descendants['numFound']) %></b> | ||
<% @relations.descendants['docs'][0..2].each do |descendant| %> | ||
<li> | ||
<%= link_to solr_document_path(descendant['layer_slug_s']) do %> | ||
<span class='geoblacklight geoblacklight-relations-descendant'></span> <%= descendant['dc_title_s'] %> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
<% unless (@relations.descendants['numFound'].to_i <= 3) %> | ||
<li> | ||
<%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.search_id]}}) do %> | ||
<%= t('geoblacklight.relations.browse_all', count: @relations.descendants['numFound']) %> | ||
<% end %> | ||
</li> | ||
<% 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
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,2 +1,3 @@ | ||
json.ancestors@relations.ancestors | ||
json.descendants @relations.descendants | ||
json.current_doc @relations.search_id |
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