Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Commit adbe41d

Browse files
committed
Merge pull request #1158 from ualbertalib/1025_link_contributors
use facet link for contributor and give it a label fixes #1025
2 parents 1cd5b76 + b12f571 commit adbe41d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/controllers/catalog_controller.rb

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def set_solr_search_fields
102102
config.add_facet_field solr_name("year_created", :facetable), label: "Year", limit: 3
103103
# publisher: has "show: false", but is needed to provide field label in "You searched for" box
104104
config.add_facet_field solr_name("publisher", :facetable), label: "Publisher", show: false
105+
config.add_facet_field solr_name("contributor", :facetable), label: "Contributor", show: false
105106

106107
# Have BL send all facet field names to Solr, which has been the default
107108
# previously. Simply remove these lines if you'd rather use Solr request
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<% record.contributor.each do |contributor| %>
2+
<span itemprop="contributor" itemscope itemtype="http://schema.org/Person">
3+
<span itemprop="name"><%= link_to_facet(contributor, Solrizer.solr_name("contributor", :facetable)) %></span>
4+
</span>
5+
<br />
6+
<% end %>
7+

0 commit comments

Comments
 (0)