Module: CommonwealthVlrEngine::ControllerOverride
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/commonwealth-vlr-engine/controller_override.rb
Instance Method Summary collapse
-
#formats_facet ⇒ Object
displays values and pagination links for Format field.
-
#has_volumes?(document) ⇒ Boolean
TODO: refactor how views access files/volumes/etc.
Instance Method Details
#formats_facet ⇒ Object
displays values and pagination links for Format field
211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/commonwealth-vlr-engine/controller_override.rb', line 211 def formats_facet @nav_li_active = 'explore' @page_title = t('blacklight.formats.page_title', :application_name => t('blacklight.application_name')) @facet = blacklight_config.facet_fields['genre_basic_ssim'] @response = get_facet_field_response(@facet.key, params, {"f.genre_basic_ssim.facet.limit" => -1}) @display_facet = @response.aggregations[@facet.key] @pagination = facet_paginator(@facet, @display_facet) render :facet end |
#has_volumes?(document) ⇒ Boolean
TODO: refactor how views access files/volumes/etc. returns the child volumes for Book objects (if they exist) needs to be in this module because CommonwealthVlrEngine::Finder methods aren’t accessible in helpers/views
227 228 229 230 231 232 233 234 235 |
# File 'lib/commonwealth-vlr-engine/controller_override.rb', line 227 def has_volumes?(document) case document[blacklight_config.show.display_type_field.to_sym] when 'Book' volumes = get_volume_objects(document.id) else volumes = nil end volumes.presence end |