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

compare.rb « menu_items « repository « menus « projects « sidebars « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4812636b63fabb3abbe6d8b70f3eac3f6f24ca6d (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 Compare < ::Sidebars::MenuItem
            override :link
            def link
              project_compare_index_path(context.project, from: context.project.repository.root_ref, to: context.current_ref)
            end

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

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