Sha256: 3c5810936d9483475e05a7ca94672d6569cf6f41ed66ccb5263d4aa2cd09b3e0
Contents?: true
Size: 887 Bytes
Versions: 8
Compression:
Stored size: 887 Bytes
Contents
module IiifPrint::IiifPrintHelperBehavior ## # print the ocr snippets. if more than one, separate with <br/> # # @param options [Hash] options hash provided by Blacklight # @return [String] snippets HTML to be rendered # rubocop:disable Rails/OutputSafety def render_ocr_snippets(options = {}) snippets = options[:value] return if snippets.blank? snippets_content = [content_tag('div', "... #{snippets.first} ...".html_safe, class: 'ocr_snippet first_snippet')] if snippets.length > 1 snippets_content << render(partial: 'catalog/snippets_more', locals: { snippets: snippets.drop(1), options: options }) end snippets_content.join("\n").html_safe end # rubocop:enable Rails/OutputSafety end
Version data entries
8 entries across 8 versions & 1 rubygems