Skip to content

Commit bf34b45

Browse files
author
John Scofield
committedJan 25, 2011
HYLIBRA-121: adjusting facets for libra oa
1 parent 6c31e1d commit bf34b45

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed
 

‎app/views/hydrangea_articles/_edit_description.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<li id="pbPeerReviewed">
8989
<fieldset id="peer_reviewed_fieldset">
9090
<legend>Peer Reviewed</legend>
91-
<%= fedora_checkbox(@document_fedora, "properties", [:peer_reviewed]) %>
91+
<%= fedora_checkbox(@document_fedora, "descMetadata", [:peer_reviewed], :default_values=>{:checked=>"peer reviewed",:unchecked=>""}) %>
9292
<label>This work has undergone a peer review process</label>
9393
</li>
9494

‎config/initializers/blacklight_config.rb

+19-6
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,30 @@
6767
# The ordering of the field names is the order of the display
6868
config[:facet] = {
6969
:field_names => [
70-
"person_full_name_cid_facet",
71-
"mods_journal_title_info_facet",
72-
"topic_tag_facet"
70+
"object_type_facet",
71+
"department_facet",
72+
"peer_reviewed_facet"
7373
],
7474
:labels => {
75-
"person_full_name_cid_facet"=>"Author",
76-
"mods_journal_title_info_facet"=>"Journal",
77-
"topic_tag_facet"=>"Tag"
75+
"object_type_facet"=>"Type of Work",
76+
"department_facet"=>"Department",
77+
"peer_reviewed_facet"=>"Peer Reviewed"
7878
},
7979
:limits=> {nil=>10}
8080
}
81+
# config[:facet] = {
82+
# :field_names => [
83+
# "person_full_name_cid_facet",
84+
# "mods_journal_title_info_facet",
85+
# "topic_tag_facet"
86+
# ],
87+
# :labels => {
88+
# "person_full_name_cid_facet"=>"Author",
89+
# "mods_journal_title_info_facet"=>"Journal",
90+
# "topic_tag_facet"=>"Tag"
91+
# },
92+
# :limits=> {nil=>10}
93+
# }
8194

8295
# solr fields to be displayed in the index (search results) view
8396
# The ordering of the field names is the order of the display

‎lib/hydra/mods_article.rb

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ModsArticle < ActiveFedora::NokogiriDatastream
3030
t.institution(:path=>"affiliation", :index_as=>[:facetable], :label=>"organization")
3131
t.displayForm
3232
t.role(:ref=>[:role])
33-
t.description
33+
t.description(:index_as=>[:facetable])
3434
t.date(:path=>"namePart", :attributes=>{:type=>"date"})
3535
t.last_name(:path=>"namePart", :attributes=>{:type=>"family"})
3636
t.first_name(:path=>"namePart", :attributes=>{:type=>"given"}, :label=>"first name")
@@ -39,6 +39,7 @@ class ModsArticle < ActiveFedora::NokogiriDatastream
3939
}
4040
# lookup :person, :first_name
4141
t.person(:ref=>:name, :attributes=>{:type=>"personal"}, :index_as=>[:facetable])
42+
t.department(:proxy=>[:person,:description],:index_as=>[:facetable])
4243
t.organization(:ref=>:name, :attributes=>{:type=>"corporate"}, :index_as=>[:facetable])
4344
t.conference(:ref=>:name, :attributes=>{:type=>"conference"}, :index_as=>[:facetable])
4445
t.role {
@@ -50,7 +51,7 @@ class ModsArticle < ActiveFedora::NokogiriDatastream
5051
t.origin_info(:path=>"originInfo") {
5152
t.publisher
5253
t.date_issued(:path=>"dateIssued")
53-
t.issuance
54+
t.issuance(:index_as=>[:facetable])
5455
}
5556
t.issn(:path=>"identifier", :attributes=>{:type=>"issn"})
5657
t.issue(:path=>"part") {
@@ -71,7 +72,7 @@ class ModsArticle < ActiveFedora::NokogiriDatastream
7172
t.url (:path=>"url")
7273
}
7374
t.publication_url(:proxy=>[:location,:url])
74-
t.peer_reviewed(:proxy=>[:journal,:origin_info,:issuance])
75+
t.peer_reviewed(:proxy=>[:journal,:origin_info,:issuance], :index_as=>[:facetable])
7576
end
7677

7778
# Generates an empty Mods Article (used when you call ModsArticle.new without passing in existing xml)

‎solr/conf/solrconfig.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,8 @@
397397
person_0_institution_t,person_1_institution_t,person_2_institution_t,person_3_institution_t,person_4_institution_t,person_5_institution_t,person_institution_role_t,
398398
person_7_institution_t,person_8_institution_t,person_9_institution_t,
399399
mods_gps_t, mods_region_t, mods_site_t, mods_ecosystem_t,
400-
mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_main_title_t, mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t
400+
mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_main_title_t, mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t,
401+
object_type_facet, department_facet, peer_reviewed_facet
401402
</str>
402403
<str name="mm">
403404
2&lt;-1 5&lt;-2 6&lt;90%
@@ -436,7 +437,8 @@ journal_title_info_t, journal_title_info_main_title_t, journal_issue_publication
436437
person_0_institution_t,person_1_institution_t,person_2_institution_t,person_3_institution_t,person_4_institution_t,person_5_institution_t,person_institution_role_t,
437438
person_7_institution_t,person_8_institution_t,person_9_institution_t,
438439
mods_gps_t, mods_region_t, mods_site_t, mods_ecosystem_t,
439-
mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_t,mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t
440+
mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_t,mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t,
441+
object_type_facet, department_facet, peer_reviewed_facet
440442
</str>
441443
<str name="mm">
442444
2&lt;-1 5&lt;-2 6&lt;90%

0 commit comments

Comments
 (0)
Please sign in to comment.