Welcome to mirror list, hosted at ThFree Co, Russian Federation.

menu.rb « learn_gitlab « menus « projects « sidebars « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4b572846d1a24c524792b16bdf4470a5282a036c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# frozen_string_literal: true

module Sidebars
  module Projects
    module Menus
      module LearnGitlab
        class Menu < ::Sidebars::Menu
          override :link
          def link
            project_learn_gitlab_path(context.project)
          end

          override :active_routes
          def active_routes
            { controller: :learn_gitlab }
          end

          override :title
          def title
            _('Learn GitLab')
          end

          override :extra_container_html_options
          def nav_link_html_options
            { class: 'home' }
          end

          override :sprite_icon
          def sprite_icon
            'home'
          end

          override :render?
          def render?
            context.learn_gitlab_experiment_enabled
          end
        end
      end
    end
  end
end