Sha256: a9b9de489561e789ebd6057477f9deac13288348d3a274f680b7ec05545d595c

Contents?: true

Size: 554 Bytes

Versions: 12

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module IiifHelper
    def iiif_viewer_display(work_presenter, locals = {})
      render iiif_viewer_display_partial(work_presenter),
             **locals.merge(presenter: work_presenter)
    end

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

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

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.4 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.3 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.2 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.1 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.0 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.0.rc3 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.0.rc2 app/helpers/hyrax/iiif_helper.rb
hyrax-5.0.0.rc1 app/helpers/hyrax/iiif_helper.rb
hyrax-4.0.0 app/helpers/hyrax/iiif_helper.rb
hyrax-4.0.0.rc3 app/helpers/hyrax/iiif_helper.rb
hyrax-4.0.0.rc2 app/helpers/hyrax/iiif_helper.rb