Module: Hyrax::IiifHelper

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

Instance Method Summary collapse

Instance Method Details

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


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

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


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

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

#universal_viewer_base_urlObject


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

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

#universal_viewer_config_urlObject


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

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