summaryrefslogtreecommitdiff
path: root/app/models/sidebars/projects/menus/repository/menu_items/contributors.rb
blob: d60fd05bb64ebda996e637df46b7fddbedb945d1 (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
# frozen_string_literal: true

module Sidebars
  module Projects
    module Menus
      module Repository
        module MenuItems
          class Contributors < ::Sidebars::MenuItem
            override :link
            def link
              project_graph_path(context.project, context.current_ref)
            end

            override :active_routes
            def active_routes
              { path: 'graphs#show' }
            end

            override :title
            def title
              _('Contributors')
            end
          end
        end
      end
    end
  end
end