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

150 lines
6.6 KiB
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
- issues_count = group_issues_count(state: 'opened')
- merge_requests_count = group_merge_requests_count(state: 'opened')
2018-03-27 19:54:05 +05:30
- issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index', 'boards#index', 'boards#show']
2018-03-17 18:26:18 +05:30
.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) }
2017-09-10 17:25:29 +05:30
.nav-sidebar-inner-scroll
.context-header
= link_to group_path(@group), title: @group.name do
.avatar-container.s40.group-avatar
2018-03-17 18:26:18 +05:30
= group_icon(@group, class: "avatar s40 avatar-tile")
2017-09-10 17:25:29 +05:30
.sidebar-context-title
= @group.name
2018-12-05 23:21:45 +05:30
%ul.sidebar-top-level-items.qa-group-sidebar
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:overview)
2018-12-13 13:39:08 +05:30
= nav_link(path: group_overview_nav_link_paths, html_options: { class: 'home' }) do
2018-03-27 19:54:05 +05:30
= link_to group_path(@group) do
.nav-icon-container
2018-11-18 11:00:15 +05:30
= sprite_icon('home')
2018-03-27 19:54:05 +05:30
%span.nav-item-name
2018-11-18 11:00:15 +05:30
= _('Overview')
2017-09-10 17:25:29 +05:30
2018-03-27 19:54:05 +05:30
%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
2018-11-18 11:00:15 +05:30
= _('Overview')
2018-03-27 19:54:05 +05:30
%li.divider.fly-out-top-item
= nav_link(path: ['groups#show', 'groups#subgroups'], html_options: { class: 'home' }) do
2018-11-18 11:00:15 +05:30
= link_to group_path(@group), title: _('Group details') do
2018-03-27 19:54:05 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('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
2018-12-13 13:39:08 +05:30
= render_if_exists 'groups/sidebar/security_dashboard'
- if group_sidebar_link?(:contribution_analytics)
= nav_link(path: 'analytics#show') do
= link_to group_analytics_path(@group), title: 'Contribution Analytics', data: {placement: 'right'} do
%span
Contribution Analytics
= render_if_exists "layouts/nav/ee/epic_link", group: @group
2018-03-27 19:54:05 +05:30
- 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
2018-11-18 11:00:15 +05:30
= _('Issues')
2018-11-08 19:23:39 +05:30
%span.badge.badge-pill.count= number_with_delimiter(issues_count)
2017-09-10 17:25:29 +05:30
2018-03-27 19:54:05 +05:30
%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
2018-11-18 11:00:15 +05:30
= _('Issues')
2018-11-08 19:23:39 +05:30
%span.badge.badge-pill.count.issue_counter.fly-out-badge= number_with_delimiter(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
= link_to group_boards_path(@group), title: boards_link_text do
%span
= boards_link_text
2017-09-10 17:25:29 +05:30
2018-12-13 13:39:08 +05:30
= render_if_exists 'layouts/nav/issues_analytics_link'
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:labels)
= 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
2018-11-18 11:00:15 +05:30
= link_to group_milestones_path(@group), title: _('Milestones') 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
- 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
2018-11-18 11:00:15 +05:30
= _('Merge Requests')
2018-11-08 19:23:39 +05:30
%span.badge.badge-pill.count= number_with_delimiter(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
2018-11-18 11:00:15 +05:30
= _('Merge Requests')
2018-11-08 19:23:39 +05:30
%span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests_count)
2018-03-27 19:54:05 +05:30
- 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')
2019-01-03 12:48:30 +05:30
%span.nav-item-name
2018-11-18 11:00:15 +05:30
= _('Members')
2018-03-27 19:54:05 +05:30
%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
2018-11-18 11:00:15 +05:30
= _('Members')
2018-03-27 19:54:05 +05:30
- if group_sidebar_link?(:settings)
2018-03-17 18:26:18 +05:30
= nav_link(path: group_nav_link_paths) do
= 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')
2018-12-05 23:21:45 +05:30
%span.nav-item-name.qa-group-settings-item
2018-11-18 11:00:15 +05:30
= _('Settings')
2018-12-05 23:21:45 +05:30
%ul.sidebar-sub-level-items.qa-group-sidebar-submenu
2018-05-09 12:01:36 +05:30
= nav_link(path: %w[groups#projects groups#edit badges#index ci_cd#show], 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
2018-11-18 11:00:15 +05:30
= link_to edit_group_path(@group), title: _('General') 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
= 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
= nav_link(controller: :ci_cd) do
2018-11-18 11:00:15 +05:30
= link_to group_settings_ci_cd_path(@group), title: _('CI / CD') do
2017-09-10 17:25:29 +05:30
%span
2018-11-18 11:00:15 +05:30
= _('CI / CD')
2017-09-10 17:25:29 +05:30
2018-12-13 13:39:08 +05:30
= render_if_exists "groups/ee/settings_nav"
2017-09-10 17:25:29 +05:30
= render 'shared/sidebar_toggle_button'