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

shimo_menu.rb « menus « projects « sidebars « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c93c4f6a0a469b0c5b265996b3a74dbc059af270 (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
      class ShimoMenu < ::Sidebars::Menu
        override :link
        def link
          project_integrations_shimo_path(context.project)
        end

        override :title
        def title
          s_('Shimo|Shimo')
        end

        override :image_path
        def image_path
          'logos/shimo.svg'
        end

        override :image_html_options
        def image_html_options
          {
            size: 16
          }
        end

        override :render?
        def render?
          context.project.has_shimo?
        end

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