lib/stanford-mods/searchworks.rb in stanford-mods-1.5.0 vs lib/stanford-mods/searchworks.rb in stanford-mods-1.5.1

- old
+ new

@@ -349,9 +349,24 @@ if types && types.include?('text') val << 'Conference proceedings' val.delete 'Conference publication' end end + gov_pub = ['government publication', 'Government publication', 'Government Publication'] + if !(genres & gov_pub).empty? + types = self.term_values(:typeOfResource) + if types && types.include?('text') + val << 'Government document' + val.delete 'Government publication' + end + end + tech_rpt = ['technical report', 'Technical report', 'Technical Report'] + if !(genres & tech_rpt).empty? + types = self.term_values(:typeOfResource) + if types && types.include?('text') + val << 'Technical report' + end + end end val.uniq end # @return [String] value with the numeric catkey in it, or nil if none exists