Sha256: b76e5359a129b25a07314d0e8eb7322240e941cd01bc2af8a9f8400d982e4611

Contents?: true

Size: 895 Bytes

Versions: 19

Compression:

Stored size: 895 Bytes

Contents

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

19 entries across 19 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.4.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.3.3 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.3.2 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.3.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.3.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.2.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.2.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.1.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.2 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.0 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.0.rc6 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.0.rc5 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.0.rc4 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.0.rc3 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.0.rc2 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-2.0.0.rc1 app/helpers/spotlight/title_helper.rb
blacklight-spotlight-1.5.1 app/helpers/spotlight/title_helper.rb