Sha256: 0c876231e5a7d18877e169df6086568373103cbe9a960c46ed925a4608db6417

Contents?: true

Size: 636 Bytes

Versions: 4

Compression:

Stored size: 636 Bytes

Contents

module IiifPrint
  module WorksControllerBehaviorDecorator
    # Extending the presenter to the base url which includes the protocol.
    # We need the base url to render the facet links.
    def iiif_manifest_presenter
      super.tap { |i| i.base_url = request.base_url }
    end
  end
end
Hyrax::WorksControllerBehavior.prepend(IiifPrint::WorksControllerBehaviorDecorator)
# Hyku::WorksControllerBehavior was introduced in Hyku v6.0.0+.  Yes we don't depend on Hyku,
# but this allows us to do minimal Hyku antics with IiifPrint.
'Hyku::WorksControllerBehavior'.safe_constantize&.prepend(IiifPrint::WorksControllerBehaviorDecorator)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iiif_print-3.0.3 lib/iiif_print/works_controller_behavior_decorator.rb
iiif_print-3.0.2 lib/iiif_print/works_controller_behavior_decorator.rb
iiif_print-3.0.1 lib/iiif_print/works_controller_behavior_decorator.rb
iiif_print-3.0.0 lib/iiif_print/works_controller_behavior_decorator.rb