Sha256: 2f90868cd48b796711481644dd834d4ea10a3775acc1e2679c0848153ed556c7

Contents?: true

Size: 747 Bytes

Versions: 31

Compression:

Stored size: 747 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This module includes helpers to manage menus in layout
  module MenuHelper
    # Public: Returns the main menu presenter object
    def main_menu
      @main_menu ||= ::Decidim::MenuPresenter.new(
        :menu,
        self,
        element_class: "main-nav__link",
        active_class: "main-nav__link--active",
        label: t("layouts.decidim.header.main_menu")
      )
    end

    # Public: Returns the user menu presenter object
    def user_menu
      @user_menu ||= ::Decidim::InlineMenuPresenter.new(
        :user_menu,
        self,
        element_class: "tabs-title",
        active_class: "is-active",
        label: t("layouts.decidim.user_menu.title")
      )
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-core-0.27.9 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.8 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.7 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.6 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.10 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.9 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.5 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.8 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.4 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.3 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.7 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.5 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.2 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.1 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.4 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.0 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.3 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.0.rc2 app/helpers/decidim/menu_helper.rb
decidim-core-0.27.0.rc1 app/helpers/decidim/menu_helper.rb
decidim-core-0.26.2 app/helpers/decidim/menu_helper.rb