Sha256: b0419dcb3ce728b9dd60700c4664b55e22115bfe9a0f4187ed67f5a8c63e9907
Contents?: true
Size: 693 Bytes
Versions: 58
Compression:
Stored size: 693 Bytes
Contents
module Hyrax::TitleHelper def application_name t('hyrax.product_name', default: super) end def construct_page_title(*elements) (elements.flatten.compact + [application_name]).join(' // ') end def curation_concern_page_title(curation_concern) if curation_concern.persisted? construct_page_title(curation_concern.to_s, "#{curation_concern.human_readable_type} [#{curation_concern.to_param}]") else construct_page_title("New #{curation_concern.human_readable_type}") end end def default_page_title text = controller_name.singularize.titleize text = "#{action_name.titleize} " + text if action_name construct_page_title(text) end end
Version data entries
58 entries across 58 versions & 2 rubygems