Sha256: 4918bbabc38eb9a1b0e0cc990db48c78b1d0b20d4f4830c8824f2fbc2be6b6ad
Contents?: true
Size: 1.16 KB
Versions: 17
Compression:
Stored size: 1.16 KB
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 Style/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)) end # rubocop:enable Style/AccessorMethodName def header_with_count(*args) title, count = if args.length == 2 args else [t(:'.header'), args.first] end safe_join([title, content_tag(:span, count, class: 'label label-default')], ' ') end end end
Version data entries
17 entries across 17 versions & 1 rubygems