Skip to content

Commit

Permalink
Add-more-hyperlinks (#848)
Browse files Browse the repository at this point in the history
Changes to be committed:
modified:   app/controllers/catalog_controller.rb
modified:   app/models/ucla_metadata.rb
  • Loading branch information
jendiamond authored Aug 27, 2020
1 parent 9323e1b commit 4740a4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def self.modified_field
config.index.display_type_field = solr_name('has_model', :symbol)
config.index.thumbnail_field = 'thumbnail_url_ss'

# FACETS
# solr fields that will be treated as facets by the blacklight application
# The ordering of the field names is the order of the display
config.add_facet_field solr_name('human_readable_resource_type', :facetable), label: 'Resource Type', limit: 5
Expand Down Expand Up @@ -72,15 +73,19 @@ def self.modified_field
# handler defaults, or have no facets.
config.add_facet_fields_to_solr_request!

# ------------------------------------------------------
# INDEX / SEARCH RESULTS
# solr fields to be displayed in the index (search results) view
# The ordering of the field names is the order of the display
# The ordering of the field names is the order of the display
config.add_index_field 'title_tesim', label: 'Title', itemprop: 'name', if: false
config.add_index_field 'description_tesim', itemprop: 'Description', helper_method: :iconify_auto_link
config.add_index_field 'normalized_date_tesim', label: 'Date', link_to_search: solr_name('normalized_date', :facetable)

# Currently disabled resource_type in index view bc the implementation makes it hard to tap into our custom presenter
config.add_index_field 'human_readable_resource_type_tesim', label: 'Resource Type', link_to_search: solr_name('human_readable_resource_type', :facetable)

# ------------------------------------------------------
# SHOW PAGE / ITEM PAGE / Individual Work (Universal Viewer Page)
# solr fields to be displayed in the show (single result) view
# The ordering of the field names is the order of the display
config.add_show_field 'title_tesim'
Expand All @@ -102,9 +107,11 @@ def self.modified_field
config.add_show_field 'identifier_tesim'
config.add_show_field 'ark_ssi', label: 'ARK'
config.add_show_field 'access_copy_ssi'

config.add_show_field 'alternative_title_tesim'
config.add_show_field 'architect_tesim'
config.add_show_field 'author_tesim'
config.add_show_field 'binding_note_ssi'
config.add_show_field 'calligrapher_tesim'
config.add_show_field 'caption_tesim'
config.add_show_field 'collation_ssi'
Expand All @@ -113,7 +120,6 @@ def self.modified_field
config.add_show_field 'commentator_tesim'
config.add_show_field 'condition_note_ssi'
config.add_show_field 'contents_note_tesim'
config.add_show_field 'binding_note_ssi'
config.add_show_field 'dimensions_tesim'
config.add_show_field 'editor_tesim'
config.add_show_field 'engraver_tesim'
Expand Down Expand Up @@ -147,7 +153,6 @@ def self.modified_field
config.add_show_field 'rights_country_tesim'
config.add_show_field 'rights_holder_tesim'
config.add_show_field 'rubricator_tesim'
# config.add_show_field 'local_rights_statement_ssim' # This invokes License renderer from hyrax gem
config.add_show_field 'scribe_tesim'
config.add_show_field 'subject_geographic_tesim'
config.add_show_field 'subject_temporal_tesim'
Expand All @@ -161,6 +166,7 @@ def self.modified_field
config.add_show_field 'representative_image_ssi'
config.add_show_field 'featured_image_ssi'
config.add_show_field 'tagline_ssi'
# config.add_show_field 'local_rights_statement_ssim' # This invokes License renderer from hyrax gem

# "fielded" search configuration. Used by pulldown among other places.
# For supported keys in hash, see rdoc for Blacklight::SearchFields
Expand Down
2 changes: 1 addition & 1 deletion app/models/ucla_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ module UclaMetadata
end

property :uniform_title, predicate: ::RDF::URI.intern('http://purl.org/dc/elements/1.1/title') do |index|
index.as :stored_searchable
index.as :stored_searchable, :facetable
end
end
end
Expand Down

0 comments on commit 4740a4a

Please sign in to comment.