Module: Hyrax::IiifHelper

Defined in:
app/helpers/hyrax/iiif_helper.rb

Instance Method Summary collapse

Instance Method Details

#iiif_viewer_display(work_presenter, locals = {}) ⇒ Object



5
6
7
8
# File 'app/helpers/hyrax/iiif_helper.rb', line 5

def iiif_viewer_display(work_presenter, locals = {})
  render iiif_viewer_display_partial(work_presenter),
         locals.merge(presenter: work_presenter)
end

#iiif_viewer_display_partial(work_presenter) ⇒ Object



10
11
12
# File 'app/helpers/hyrax/iiif_helper.rb', line 10

def iiif_viewer_display_partial(work_presenter)
  'hyrax/base/iiif_viewers/' + work_presenter.iiif_viewer.to_s
end

#universal_viewer_base_urlObject



14
15
16
# File 'app/helpers/hyrax/iiif_helper.rb', line 14

def universal_viewer_base_url
  "#{request&.base_url}/uv/uv.html"
end

#universal_viewer_config_urlObject



18
19
20
# File 'app/helpers/hyrax/iiif_helper.rb', line 18

def universal_viewer_config_url
  "#{request&.base_url}/uv/uv-config.json"
end