diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 449e4d199..fe438f96b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -20,7 +20,6 @@ class ApplicationController < ActionController::Base with_themed_layout '1_column' helper_method :current_account, :admin_host?, :home_page_theme, :show_page_theme, :search_results_theme - helper_method :current_account, :admin_host?, :home_page_theme, :show_page_theme, :search_results_theme, :render_ocr_snippets before_action :authenticate_if_needed before_action :set_raven_context before_action :require_active_account!, if: :multitenant? @@ -51,24 +50,6 @@ def guest_user protected - # remove this once we've backported to `IIIFPrintHelper` and update IIIF Print - def render_ocr_snippets(options = {}) - snippets = options[:value] - # rubocop:disable Rails/OutputSafety - snippets_content = [ActionController::Base.helpers.content_tag('div', - "... #{snippets.first} ...".html_safe, - class: 'ocr_snippet first_snippet')] - # rubocop:enable Rails/OutputSafety - if snippets.length > 1 - snippets_content << render(partial: 'catalog/snippets_more', - locals: { snippets: snippets.drop(1), - options: options }) - end - # rubocop:disable Rails/OutputSafety - snippets_content.join("\n").html_safe - # rubocop:enable Rails/OutputSafety - end - def is_hidden current_account.persisted? && !current_account.is_public? end diff --git a/app/helpers/iiif_print_helper.rb b/app/helpers/iiif_print_helper.rb new file mode 100644 index 000000000..0c1859cfa --- /dev/null +++ b/app/helpers/iiif_print_helper.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module IiifPrintHelper + include IiifPrint::IiifPrintHelperBehavior +end