summaryrefslogtreecommitdiff
path: root/app/views/layouts/nav/sidebar/_group.html.haml
blob: 4158bb6945294e81213878b74b295310eb5cdc94 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
- issues_count = group_issues_count(state: 'opened')
- merge_requests_count = group_merge_requests_count(state: 'opened')
- issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index', 'boards#index', 'boards#show']

.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) }
  .nav-sidebar-inner-scroll
    .context-header
      = link_to group_path(@group), title: @group.name do
        .avatar-container.s40.group-avatar
          = group_icon(@group, class: "avatar s40 avatar-tile")
        .sidebar-context-title
          = @group.name
    %ul.sidebar-top-level-items
      - if group_sidebar_link?(:overview)
        = nav_link(path: ['groups#show', 'groups#activity', 'groups#subgroups', 'analytics#show'], html_options: { class: 'home' }) do
          = link_to group_path(@group) do
            .nav-icon-container
              = sprite_icon('home')
            %span.nav-item-name
              = _('Overview')

          %ul.sidebar-sub-level-items
            = nav_link(path: ['groups#show', 'groups#activity', 'groups#subgroups'], html_options: { class: "fly-out-top-item" } ) do
              = link_to group_path(@group) do
                %strong.fly-out-top-item-name
                  = _('Overview')
            %li.divider.fly-out-top-item
            = nav_link(path: ['groups#show', 'groups#subgroups'], html_options: { class: 'home' }) do
              = link_to group_path(@group), title: _('Group details') do
                %span
                  = _('Details')

            - if group_sidebar_link?(:activity)
              = nav_link(path: 'groups#activity') do
                = link_to activity_group_path(@group), title: _('Activity') do
                  %span
                    = _('Activity')

      - if group_sidebar_link?(:issues)
        = nav_link(path: issues_sub_menu_items) do
          = link_to issues_group_path(@group) do
            .nav-icon-container
              = sprite_icon('issues')
            %span.nav-item-name
              = _('Issues')
            %span.badge.badge-pill.count= number_with_delimiter(issues_count)

          %ul.sidebar-sub-level-items
            = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do
              = link_to issues_group_path(@group) do
                %strong.fly-out-top-item-name
                  = _('Issues')
                %span.badge.badge-pill.count.issue_counter.fly-out-badge= number_with_delimiter(issues_count)

            %li.divider.fly-out-top-item
            = nav_link(path: 'groups#issues', html_options: { class: 'home' }) do
              = link_to issues_group_path(@group), title: _('List') do
                %span
                  = _('List')

            - if group_sidebar_link?(:boards)
              = nav_link(path: ['boards#index', 'boards#show']) do
                = link_to group_boards_path(@group), title: boards_link_text do
                  %span
                    = boards_link_text

            - if group_sidebar_link?(:labels)
              = nav_link(path: 'labels#index') do
                = link_to group_labels_path(@group), title: _('Labels') do
                  %span
                    = _('Labels')

            - if group_sidebar_link?(:milestones)
              = nav_link(path: 'milestones#index') do
                = link_to group_milestones_path(@group), title: _('Milestones') do
                  %span
                    = _('Milestones')

      - if group_sidebar_link?(:merge_requests)
        = nav_link(path: 'groups#merge_requests') do
          = link_to merge_requests_group_path(@group) do
            .nav-icon-container
              = sprite_icon('git-merge')
            %span.nav-item-name
              = _('Merge Requests')
            %span.badge.badge-pill.count= number_with_delimiter(merge_requests_count)
          %ul.sidebar-sub-level-items.is-fly-out-only
            = nav_link(path: 'groups#merge_requests', html_options: { class: "fly-out-top-item" } ) do
              = link_to merge_requests_group_path(@group) do
                %strong.fly-out-top-item-name
                  = _('Merge Requests')
                %span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests_count)

      - if group_sidebar_link?(:group_members)
        = nav_link(path: 'group_members#index') do
          = link_to group_group_members_path(@group) do
            .nav-icon-container
              = sprite_icon('users')
            %span.nav-item-name
              = _('Members')
          %ul.sidebar-sub-level-items.is-fly-out-only
            = nav_link(path: 'group_members#index', html_options: { class: "fly-out-top-item" } ) do
              = link_to group_group_members_path(@group) do
                %strong.fly-out-top-item-name
                  = _('Members')

      - if group_sidebar_link?(:settings)
        = nav_link(path: group_nav_link_paths) do
          = link_to edit_group_path(@group) do
            .nav-icon-container
              = sprite_icon('settings')
            %span.nav-item-name
              = _('Settings')
          %ul.sidebar-sub-level-items
            = nav_link(path: %w[groups#projects groups#edit badges#index ci_cd#show], html_options: { class: "fly-out-top-item" } ) do
              = link_to edit_group_path(@group) do
                %strong.fly-out-top-item-name
                  = _('Settings')
            %li.divider.fly-out-top-item
            = nav_link(path: 'groups#edit') do
              = link_to edit_group_path(@group), title: _('General') do
                %span
                  = _('General')

            = nav_link(path: 'groups#projects') do
              = link_to projects_group_path(@group), title: _('Projects') do
                %span
                  = _('Projects')

            = nav_link(controller: :ci_cd) do
              = link_to group_settings_ci_cd_path(@group), title: _('CI / CD') do
                %span
                  = _('CI / CD')

    = render 'shared/sidebar_toggle_button'