Sha256: fac142bdd0b4c75e06dc74296405a09f188b5580dcb4a0ede5e2f3d381905c7a

Contents?: true

Size: 490 Bytes

Versions: 7

Compression:

Stored size: 490 Bytes

Contents

# frozen_string_literal: true

module SolidusAdmin
  # Helpers for the admin layout
  module LayoutHelper
    # @return [Symbol]
    def current_locale(backend: I18n)
      backend.locale
    end

    # @param store_name [String]
    # @param controller_name [String]
    # @return [String] HTML title
    def solidus_admin_title(store_name: current_store.name, controller_name: self.controller_name)
      "#{store_name} - #{t("solidus_admin.#{controller_name}.title")}"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/helpers/solidus_admin/layout_helper.rb
solidus_admin-0.3.1 app/helpers/solidus_admin/layout_helper.rb
solidus_admin-0.3.0 app/helpers/solidus_admin/layout_helper.rb
solidus_admin-0.2.0 app/helpers/solidus_admin/layout_helper.rb
solidus_admin-0.1.0 app/helpers/solidus_admin/layout_helper.rb
solidus_admin-0.0.2 app/helpers/solidus_admin/layout_helper.rb
solidus_admin-0.0.1 app/helpers/solidus_admin/layout_helper.rb