Sha256: 414a72610acb592f7dd6dad2a6dba7da0296dd78dbfd14c55945d0b61d58a3d1

Contents?: true

Size: 926 Bytes

Versions: 23

Compression:

Stored size: 926 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  ##
  # Page title helpers
  module TitleHelper
    def curation_page_title(title = nil)
      page_title t(:'spotlight.curation.header'), title
    end

    def configuration_page_title(title = nil)
      page_title t(:'spotlight.configuration.header'), title
    end

    def page_title(section, title = nil)
      set_html_page_title(t(:'spotlight.html_admin_title', section: section, title: title || t(:'.title', default: :'.header')))
      content_tag(:h1, safe_join([section, content_tag(:small, title || t(:'.header'))], "\n"), class: 'page-header')
    end

    # rubocop:disable Naming/AccessorMethodName
    def set_html_page_title(title = nil)
      @page_title = strip_tags(t(:'spotlight.html_title', title: title || t(:'.title', default: :'.header'), application_name: application_name)).html_safe
    end
    # rubocop:enable Naming/AccessorMethodName
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.7 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-3.0.0.alpha.6 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-3.0.0.alpha.5 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-3.0.0.alpha.4 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-3.0.0.alpha.3 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-3.0.0.alpha.2 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-3.0.0.alpha.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.13.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.12.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.12.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.11.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.10.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.9.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.8.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.7.2 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.7.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.7.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.6.1.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.6.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.6.0 app/helpers/spotlight/title_helper.rb