2017-03-07 16:59:06 -05:00
|
|
|
- can_edit = can?(current_user, :admin_project, @project)
|
2016-06-22 22:02:45 -04:00
|
|
|
.scrolling-tabs-container{ class: nav_control_class }
|
|
|
|
.fade-left
|
2016-06-27 10:06:36 -04:00
|
|
|
= icon('angle-left')
|
2016-06-22 22:02:45 -04:00
|
|
|
.fade-right
|
2016-06-27 10:06:36 -04:00
|
|
|
= icon('angle-right')
|
2016-05-25 12:42:43 -04:00
|
|
|
%ul.nav-links.scrolling-tabs
|
2017-03-02 12:57:01 -05:00
|
|
|
= nav_link(path: ['projects#show', 'projects#activity', 'cycle_analytics#show'], html_options: { class: 'home' }) do
|
2016-05-24 18:14:14 -04:00
|
|
|
= link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
|
2016-04-01 12:24:03 -04:00
|
|
|
%span
|
2016-05-24 18:14:14 -04:00
|
|
|
Project
|
2016-06-01 18:54:04 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :files
|
2017-04-18 16:49:52 -04:00
|
|
|
= nav_link(controller: %w(tree blob blame edit_tree new_tree find_file commit commits compare projects/repositories tags branches releases graphs network)) do
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_tree_path(@project), title: 'Repository', class: 'shortcuts-tree' do
|
2016-05-24 18:14:14 -04:00
|
|
|
%span
|
2016-06-21 10:54:02 -04:00
|
|
|
Repository
|
2016-04-12 10:16:39 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :container_registry
|
2017-04-18 16:49:52 -04:00
|
|
|
= nav_link(controller: %w[projects/registry/repositories]) do
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_container_registry_index_path(@project), title: 'Container Registry', class: 'shortcuts-container-registry' do
|
2016-05-24 18:14:14 -04:00
|
|
|
%span
|
2016-06-02 03:53:39 -04:00
|
|
|
Registry
|
2013-04-01 15:30:48 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :issues
|
2017-04-13 03:55:15 -04:00
|
|
|
= nav_link(controller: @project.default_issues_tracker? ? [:issues, :labels, :milestones, :boards] : :issues) do
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_issues_path(@project), title: 'Issues', class: 'shortcuts-issues' do
|
2016-05-24 18:14:14 -04:00
|
|
|
%span
|
|
|
|
Issues
|
|
|
|
- if @project.default_issues_tracker?
|
2017-06-22 15:58:20 -04:00
|
|
|
%span.badge.count.issue_counter= number_with_delimiter(issuables_count_for_state(:issues, :opened, finder: IssuesFinder.new(current_user, project_id: @project.id)))
|
2013-04-01 15:30:48 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :merge_requests
|
2017-06-13 18:12:31 -04:00
|
|
|
- controllers = [:merge_requests, 'projects/merge_requests/conflicts']
|
|
|
|
- controllers.push(:merge_requests, :labels, :milestones) unless @project.default_issues_tracker?
|
|
|
|
= nav_link(controller: controllers) do
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_merge_requests_path(@project), title: 'Merge Requests', class: 'shortcuts-merge_requests' do
|
2016-05-24 18:14:14 -04:00
|
|
|
%span
|
|
|
|
Merge Requests
|
2017-06-22 15:58:20 -04:00
|
|
|
%span.badge.count.merge_counter.js-merge-counter= number_with_delimiter(issuables_count_for_state(:merge_requests, :opened, finder: MergeRequestsFinder.new(current_user, project_id: @project.id)))
|
2014-12-20 18:11:08 -05:00
|
|
|
|
2017-03-02 12:57:01 -05:00
|
|
|
- if project_nav_tab? :pipelines
|
2017-05-02 18:47:28 -04:00
|
|
|
= nav_link(controller: [:pipelines, :builds, :environments, :artifacts]) do
|
2017-03-02 12:57:01 -05:00
|
|
|
= link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do
|
|
|
|
%span
|
|
|
|
Pipelines
|
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :wiki
|
|
|
|
= nav_link(controller: :wikis) do
|
|
|
|
= link_to get_project_wiki_path(@project), title: 'Wiki', class: 'shortcuts-wiki' do
|
|
|
|
%span
|
|
|
|
Wiki
|
|
|
|
|
|
|
|
- if project_nav_tab? :snippets
|
|
|
|
= nav_link(controller: :snippets) do
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_snippets_path(@project), title: 'Snippets', class: 'shortcuts-snippets' do
|
2016-05-24 18:14:14 -04:00
|
|
|
%span
|
|
|
|
Snippets
|
|
|
|
|
2017-03-07 16:59:06 -05:00
|
|
|
- if project_nav_tab? :settings
|
2017-04-25 12:02:39 -04:00
|
|
|
= nav_link(path: %w[projects#edit members#show integrations#show services#edit repository#show ci_cd#show pages#show]) do
|
2017-03-07 19:37:14 -05:00
|
|
|
= link_to edit_project_path(@project), title: 'Settings', class: 'shortcuts-tree' do
|
|
|
|
%span
|
|
|
|
Settings
|
|
|
|
- else
|
|
|
|
= nav_link(path: %w[members#show]) do
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_settings_members_path(@project), title: 'Settings', class: 'shortcuts-tree' do
|
2017-03-07 19:37:14 -05:00
|
|
|
%span
|
|
|
|
Settings
|
2017-03-07 16:59:06 -05:00
|
|
|
|
2017-03-06 18:52:57 -05:00
|
|
|
-# Shortcut to Project > Activity
|
|
|
|
%li.hidden
|
|
|
|
= link_to activity_project_path(@project), title: 'Activity', class: 'shortcuts-project-activity' do
|
|
|
|
%span
|
|
|
|
Activity
|
|
|
|
|
|
|
|
-# Shortcut to Repository > Graph (formerly, Network)
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :network
|
|
|
|
%li.hidden
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_network_path(@project, current_ref), title: 'Network', class: 'shortcuts-network' do
|
2017-03-06 18:52:57 -05:00
|
|
|
Graph
|
|
|
|
|
|
|
|
-# Shortcut to Repository > Charts (formerly, top-nav item "Graphs")
|
|
|
|
- unless @project.empty_repo?
|
|
|
|
%li.hidden
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to charts_project_graph_path(@project, current_ref), title: 'Charts', class: 'shortcuts-repository-charts' do
|
2017-03-06 18:52:57 -05:00
|
|
|
Charts
|
2015-02-06 16:40:45 -05:00
|
|
|
|
2017-03-06 18:52:57 -05:00
|
|
|
-# Shortcut to Issues > New Issue
|
2016-04-01 12:24:03 -04:00
|
|
|
%li.hidden
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to new_project_issue_path(@project), class: 'shortcuts-new-issue' do
|
2016-05-24 18:14:14 -04:00
|
|
|
Create a new issue
|
2016-04-12 17:16:40 -04:00
|
|
|
|
2017-03-06 18:52:57 -05:00
|
|
|
-# Shortcut to Pipelines > Jobs
|
2016-05-28 13:26:08 -04:00
|
|
|
- if project_nav_tab? :builds
|
|
|
|
%li.hidden
|
2017-05-16 07:41:15 -04:00
|
|
|
= link_to project_jobs_path(@project), title: 'Jobs', class: 'shortcuts-builds' do
|
2017-01-26 06:52:58 -05:00
|
|
|
Jobs
|
2016-05-28 13:26:08 -04:00
|
|
|
|
2016-06-02 04:15:45 -04:00
|
|
|
-# Shortcut to commits page
|
|
|
|
- if project_nav_tab? :commits
|
|
|
|
%li.hidden
|
|
|
|
= link_to project_commits_path(@project), title: 'Commits', class: 'shortcuts-commits' do
|
|
|
|
Commits
|
2016-09-07 11:13:38 -04:00
|
|
|
|
|
|
|
-# Shortcut to issue boards
|
|
|
|
%li.hidden
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to 'Issue Boards', project_boards_path(@project), title: 'Issue Boards', class: 'shortcuts-issue-boards'
|