lib/stanford-mods/searchworks.rb in stanford-mods-0.0.14 vs lib/stanford-mods/searchworks.rb in stanford-mods-0.0.15

- old
+ new

@@ -318,13 +318,19 @@ # http://searchworks-solr-lb.stanford.edu:8983/solr/select?facet.field=format&rows=0&facet.sort=index # based on the dor_content_type # @return [String] value in the SearchWorks controlled vocabulary def format val=[] - formats=self.term_values(:typeOfResource) + formats = self.term_values(:typeOfResource) + genres = self.term_values(:genre) + issuance = self.term_values([:origin_info,:issuance]) if formats formats.each do |form| case form + when 'text' + val << 'Thesis' if genres and genres.include? 'thesis' + val << 'Book' if issuance and issuance.include? 'monographic' + val << 'Journal / Periodical' if issuance and issuance.include? 'continuing' when 'still image' val << 'Image' when 'mixed material' val << 'Manuscript/Archive' when 'moving image'