debian-mirror-gitlab/app/views/layouts/nav/sidebar/_group.html.haml

205 lines
9.6 KiB
Text
Raw Normal View History

2021-04-29 21:17:54 +05:30
- issues_count = cached_issuables_count(@group, type: :issues)
- merge_requests_count = group_open_merge_requests_count(@group)
2021-03-11 19:13:27 +05:30
- aside_title = @group.subgroup? ? _('Subgroup navigation') : _('Group navigation')
2018-03-17 18:26:18 +05:30
2021-04-29 21:17:54 +05:30
%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **sidebar_tracking_attributes_by_object(@group), 'aria-label': aside_title }
2017-09-10 17:25:29 +05:30
.nav-sidebar-inner-scroll
.context-header
= link_to group_path(@group), title: @group.name do
2021-06-08 01:23:25 +05:30
%span.avatar-container.rect-avatar.s40.group-avatar
2018-03-17 18:26:18 +05:30
= group_icon(@group, class: "avatar s40 avatar-tile")
2021-06-08 01:23:25 +05:30
%span.sidebar-context-title
2017-09-10 17:25:29 +05:30
= @group.name
2018-12-05 23:21:45 +05:30
%ul.sidebar-top-level-items.qa-group-sidebar
2021-03-08 18:12:59 +05:30
= render_if_exists 'layouts/nav/sidebar/group_trial_status_widget', group: @group
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:overview)
2020-03-13 15:44:24 +05:30
- paths = group_overview_nav_link_paths
2020-04-08 14:13:33 +05:30
= nav_link(path: paths, unless: -> { current_path?('groups/contribution_analytics#show') }, html_options: { class: 'home' }) do
2018-03-27 19:54:05 +05:30
= link_to group_path(@group) do
.nav-icon-container
2021-06-08 01:23:25 +05:30
- sprite = Feature.enabled?(:sidebar_refactor, current_user) ? 'group' : 'home'
= sprite_icon(sprite)
2018-03-27 19:54:05 +05:30
%span.nav-item-name
2021-06-08 01:23:25 +05:30
= group_information_title(@group)
2017-09-10 17:25:29 +05:30
2018-03-27 19:54:05 +05:30
%ul.sidebar-sub-level-items
2021-06-08 01:23:25 +05:30
= nav_link(path: paths, html_options: { class: "fly-out-top-item" } ) do
2018-03-27 19:54:05 +05:30
= link_to group_path(@group) do
%strong.fly-out-top-item-name
2021-06-08 01:23:25 +05:30
= group_information_title(@group)
2018-03-27 19:54:05 +05:30
%li.divider.fly-out-top-item
2019-07-07 11:18:12 +05:30
2021-06-08 01:23:25 +05:30
- if Feature.disabled?(:sidebar_refactor, current_user)
= nav_link(path: ['groups#show', 'groups#details', 'groups#subgroups'], html_options: { class: 'home' }) do
= link_to details_group_path(@group), title: _('Group details') do
%span
= _('Details')
2017-09-10 17:25:29 +05:30
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:activity)
= nav_link(path: 'groups#activity') do
2018-11-18 11:00:15 +05:30
= link_to activity_group_path(@group), title: _('Activity') do
2018-03-27 19:54:05 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('Activity')
2017-09-10 17:25:29 +05:30
2021-06-08 01:23:25 +05:30
- if group_sidebar_link?(:labels) && Feature.enabled?(:sidebar_refactor, current_user, default_enabled: :yaml)
= nav_link(path: 'labels#index') do
= link_to group_labels_path(@group), title: _('Labels') do
%span
= _('Labels')
- if Feature.enabled?(:sidebar_refactor, current_user, default_enabled: :yaml)
- if group_sidebar_link?(:group_members)
= nav_link(path: 'group_members#index') do
= link_to group_group_members_path(@group), title: _('Members'), data: { qa_selector: 'group_members_item' } do
%span
= _('Members')
2018-12-13 13:39:08 +05:30
= render_if_exists "layouts/nav/ee/epic_link", group: @group
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:issues)
2020-04-08 14:13:33 +05:30
= nav_link(path: group_issues_sub_menu_items, unless: -> { current_path?('issues_analytics#show') }) do
2019-12-04 20:38:33 +05:30
= link_to issues_group_path(@group), data: { qa_selector: 'group_issues_item' } do
2018-03-27 19:54:05 +05:30
.nav-icon-container
= sprite_icon('issues')
%span.nav-item-name
2018-11-18 11:00:15 +05:30
= _('Issues')
2021-03-11 19:13:27 +05:30
%span.badge.badge-pill.count= issues_count
2017-09-10 17:25:29 +05:30
2019-12-04 20:38:33 +05:30
%ul.sidebar-sub-level-items{ data: { qa_selector: 'group_issues_sidebar_submenu'} }
2021-06-08 01:23:25 +05:30
= nav_link(path: group_issues_sub_menu_items, html_options: { class: "fly-out-top-item" } ) do
2018-03-27 19:54:05 +05:30
= link_to issues_group_path(@group) do
%strong.fly-out-top-item-name
2018-11-18 11:00:15 +05:30
= _('Issues')
2021-03-11 19:13:27 +05:30
%span.badge.badge-pill.count.issue_counter.fly-out-badge= issues_count
2017-09-10 17:25:29 +05:30
2018-03-27 19:54:05 +05:30
%li.divider.fly-out-top-item
= nav_link(path: 'groups#issues', html_options: { class: 'home' }) do
2018-11-18 11:00:15 +05:30
= link_to issues_group_path(@group), title: _('List') do
2018-03-27 19:54:05 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('List')
2017-09-10 17:25:29 +05:30
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:boards)
= nav_link(path: ['boards#index', 'boards#show']) do
2019-12-04 20:38:33 +05:30
= link_to group_boards_path(@group), title: boards_link_text, data: { qa_selector: 'group_issue_boards_link' } do
2018-03-27 19:54:05 +05:30
%span
= boards_link_text
2017-09-10 17:25:29 +05:30
2021-06-08 01:23:25 +05:30
- if group_sidebar_link?(:labels) && Feature.disabled?(:sidebar_refactor, current_user, default_enabled: :yaml)
2018-03-27 19:54:05 +05:30
= nav_link(path: 'labels#index') do
2018-11-18 11:00:15 +05:30
= link_to group_labels_path(@group), title: _('Labels') do
2018-03-27 19:54:05 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('Labels')
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:milestones)
= nav_link(path: 'milestones#index') do
2020-07-28 23:09:34 +05:30
= link_to group_milestones_path(@group), title: _('Milestones'), data: { qa_selector: 'group_milestones_link' } do
2018-03-27 19:54:05 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('Milestones')
2018-03-27 19:54:05 +05:30
2020-10-24 23:57:45 +05:30
= render_if_exists 'layouts/nav/sidebar/group_iterations_link'
2020-06-23 00:09:42 +05:30
2018-03-27 19:54:05 +05:30
- 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
2021-04-29 21:17:54 +05:30
= _('Merge requests')
%span.badge.badge-pill.count= merge_requests_count
2018-03-27 19:54:05 +05:30
%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
2021-04-29 21:17:54 +05:30
= _('Merge requests')
%span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= merge_requests_count
2018-03-27 19:54:05 +05:30
2019-10-12 21:52:04 +05:30
= render_if_exists "layouts/nav/ee/security_link" # EE-specific
2020-05-24 23:13:21 +05:30
= render_if_exists "layouts/nav/ee/push_rules_link" # EE-specific
2019-02-15 15:39:39 +05:30
- if group_sidebar_link?(:kubernetes)
= nav_link(controller: [:clusters]) do
= link_to group_clusters_path(@group) do
.nav-icon-container
= sprite_icon('cloud-gear')
%span.nav-item-name
= _('Kubernetes')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: [:clusters], html_options: { class: "fly-out-top-item" } ) do
= link_to group_clusters_path(@group), title: _('Kubernetes'), class: 'shortcuts-kubernetes' do
%strong.fly-out-top-item-name
= _('Kubernetes')
2021-03-11 19:13:27 +05:30
= render 'groups/sidebar/packages'
2019-09-30 21:07:59 +05:30
2020-03-13 15:44:24 +05:30
= render 'layouts/nav/sidebar/analytics_links', links: group_analytics_navbar_links(@group, current_user)
2020-07-28 23:09:34 +05:30
- if group_sidebar_link?(:wiki)
= render 'layouts/nav/sidebar/wiki_link', wiki_url: @group.wiki.web_url
2021-06-08 01:23:25 +05:30
- if Feature.disabled?(:sidebar_refactor, current_user, default_enabled: :yaml)
- 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.qa-group-members-item
= _('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')
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:settings)
2020-04-22 19:07:51 +05:30
= nav_link(path: group_settings_nav_link_paths) do
2018-03-17 18:26:18 +05:30
= link_to edit_group_path(@group) do
2017-09-10 17:25:29 +05:30
.nav-icon-container
2018-03-17 18:26:18 +05:30
= sprite_icon('settings')
2021-06-08 01:23:25 +05:30
%span.nav-item-name{ data: { qa_selector: 'group_settings' } }
2018-11-18 11:00:15 +05:30
= _('Settings')
2021-03-08 18:12:59 +05:30
%ul.sidebar-sub-level-items.qa-group-sidebar-submenu{ data: { testid: 'group-settings-menu' } }
2021-04-29 21:17:54 +05:30
= nav_link(path: %w[groups#projects groups#edit badges#index ci_cd#show groups/applications#index], html_options: { class: "fly-out-top-item" } ) do
2018-03-17 18:26:18 +05:30
= link_to edit_group_path(@group) do
%strong.fly-out-top-item-name
2018-11-18 11:00:15 +05:30
= _('Settings')
2018-03-17 18:26:18 +05:30
%li.divider.fly-out-top-item
2017-09-10 17:25:29 +05:30
= nav_link(path: 'groups#edit') do
2019-12-04 20:38:33 +05:30
= link_to edit_group_path(@group), title: _('General'), data: { qa_selector: 'general_settings_link' } do
2017-09-10 17:25:29 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('General')
2017-09-10 17:25:29 +05:30
2021-02-22 17:27:13 +05:30
= nav_link(controller: :integrations) do
= link_to group_settings_integrations_path(@group), title: _('Integrations') do
%span
= _('Integrations')
2020-11-24 15:15:51 +05:30
2017-09-10 17:25:29 +05:30
= nav_link(path: 'groups#projects') do
2018-11-18 11:00:15 +05:30
= link_to projects_group_path(@group), title: _('Projects') do
2017-09-10 17:25:29 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('Projects')
2017-09-10 17:25:29 +05:30
2020-04-25 10:58:03 +05:30
= nav_link(controller: :repository) do
= link_to group_settings_repository_path(@group), title: _('Repository') do
%span
= _('Repository')
2021-06-08 01:23:25 +05:30
= nav_link(controller: [:ci_cd, 'groups/runners']) do
2021-04-17 20:07:23 +05:30
= link_to group_settings_ci_cd_path(@group), title: _('CI/CD') do
2017-09-10 17:25:29 +05:30
%span
2021-04-17 20:07:23 +05:30
= _('CI/CD')
2017-09-10 17:25:29 +05:30
2021-04-29 21:17:54 +05:30
= nav_link(controller: :applications) do
= link_to group_settings_applications_path(@group), title: _('Applications') do
%span
= _('Applications')
2021-03-11 19:13:27 +05:30
= render 'groups/sidebar/packages_settings'
2021-03-08 18:12:59 +05:30
2018-12-13 13:39:08 +05:30
= render_if_exists "groups/ee/settings_nav"
2020-04-22 19:07:51 +05:30
= render_if_exists "groups/ee/administration_nav"
2017-09-10 17:25:29 +05:30
= render 'shared/sidebar_toggle_button'