BigW Consortium Gitlab

_new_group_sidebar.html.haml 3.66 KB
Newer Older
1
.nav-sidebar{ class: ("sidebar-icons-only" if collapsed_sidebar?) }
2 3 4 5 6
  .nav-sidebar-inner-scroll
    .context-header
      = link_to group_path(@group), title: @group.name do
        .avatar-container.s40.group-avatar
          = image_tag group_icon(@group), class: "avatar s40 avatar-tile"
7
        .sidebar-context-title
8 9 10
          = @group.name
    %ul.sidebar-top-level-items
      = nav_link(path: ['groups#show', 'groups#activity', 'groups#subgroups'], html_options: { class: 'home' }) do
11
        = sidebar_link group_path(@group), title: _('Group overview') do
12 13 14 15
          .nav-icon-container
            = custom_icon('project')
          %span.nav-item-name
            Overview
16

17 18 19 20 21
        %ul.sidebar-sub-level-items
          = nav_link(path: ['groups#show', 'groups#subgroups'], html_options: { class: 'home' }) do
            = link_to group_path(@group), title: 'Group details' do
              %span
                Details
22

23 24 25 26
          = nav_link(path: 'groups#activity') do
            = link_to activity_group_path(@group), title: 'Activity' do
              %span
                Activity
27

28
      = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index']) do
29
        = sidebar_link issues_group_path(@group), title: _('Issues') do
30
          .nav-icon-container
31
            = custom_icon('issues')
32
          %span.nav-item-name
33 34 35 36
            - issues = IssuesFinder.new(current_user, group_id: @group.id, state: 'opened').execute
            Issues
          %span.badge.count= number_with_delimiter(issues.count)

37
        %ul.sidebar-sub-level-items
38 39
          = nav_link(path: 'groups#issues', html_options: { class: 'home' }) do
            = link_to issues_group_path(@group), title: 'List' do
40
              %span
41
                List
42

43 44
          = nav_link(path: 'labels#index') do
            = link_to group_labels_path(@group), title: 'Labels' do
45
              %span
46
                Labels
47

48 49
          = nav_link(path: 'milestones#index') do
            = link_to group_milestones_path(@group), title: 'Milestones' do
50
              %span
51 52 53
                Milestones

      = nav_link(path: 'groups#merge_requests') do
54
        = sidebar_link merge_requests_group_path(@group), title: _('Merge Requests') do
55 56 57 58 59 60 61
          .nav-icon-container
            = custom_icon('mr_bold')
          %span.nav-item-name
            - merge_requests = MergeRequestsFinder.new(current_user, group_id: @group.id, state: 'opened', non_archived: true).execute
            Merge Requests
          %span.badge.count= number_with_delimiter(merge_requests.count)
      = nav_link(path: 'group_members#index') do
62
        = sidebar_link group_group_members_path(@group), title: _('Members') do
63 64 65 66 67 68
          .nav-icon-container
            = custom_icon('members')
          %span.nav-item-name
            Members
      - if current_user && can?(current_user, :admin_group, @group)
        = nav_link(path: %w[groups#projects groups#edit ci_cd#show]) do
69
          = sidebar_link edit_group_path(@group), title: _('Settings') do
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
            .nav-icon-container
              = custom_icon('settings')
            %span.nav-item-name
              Settings
          %ul.sidebar-sub-level-items
            = 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
89

90
    = render 'shared/sidebar_toggle_button'