2016-05-16 13:21:12 -04:00
|
|
|
- if current_user
|
|
|
|
.controls
|
2016-05-19 11:11:54 -04:00
|
|
|
.dropdown.project-settings-dropdown
|
2016-05-16 13:21:12 -04:00
|
|
|
%a.dropdown-new.btn.btn-default#project-settings-button{href: '#', 'data-toggle' => 'dropdown'}
|
|
|
|
= icon('cog')
|
|
|
|
= icon('caret-down')
|
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
2016-06-02 12:05:06 -04:00
|
|
|
- can_edit = can?(current_user, :admin_project, @project)
|
2016-06-17 23:44:15 -04:00
|
|
|
-# We don't use @project.team.find_member because it searches for group members too...
|
2016-06-27 10:20:57 -04:00
|
|
|
- member = @project.members.find_by(user_id: current_user.id)
|
2016-06-17 23:44:15 -04:00
|
|
|
- can_leave = member && can?(current_user, :destroy_project_member, member)
|
2016-06-14 10:23:16 -04:00
|
|
|
|
2016-06-17 23:44:15 -04:00
|
|
|
= render 'layouts/nav/project_settings', can_edit: can_edit
|
2016-06-14 10:23:16 -04:00
|
|
|
|
2016-06-17 23:44:15 -04:00
|
|
|
- if can_edit || can_leave
|
2016-06-02 12:05:06 -04:00
|
|
|
%li.divider
|
|
|
|
- if can_edit
|
|
|
|
%li
|
|
|
|
= link_to edit_project_path(@project) do
|
|
|
|
Edit Project
|
2016-06-17 23:44:15 -04:00
|
|
|
- if can_leave
|
2016-06-02 12:05:06 -04:00
|
|
|
%li
|
|
|
|
= link_to polymorphic_path([:leave, @project, :members]),
|
2016-06-14 10:23:16 -04:00
|
|
|
data: { confirm: leave_confirmation_message(@project) }, method: :delete, title: 'Leave project' do
|
2016-06-02 12:05:06 -04:00
|
|
|
Leave Project
|
2016-05-16 13:21:12 -04:00
|
|
|
|
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
|
2016-05-24 18:14:14 -04:00
|
|
|
= nav_link(path: 'projects#show', html_options: {class: 'home'}) do
|
|
|
|
= 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
|
|
|
= nav_link(path: 'projects#activity') do
|
|
|
|
= link_to activity_project_path(@project), title: 'Activity', class: 'shortcuts-project-activity' do
|
2016-04-01 12:24:03 -04:00
|
|
|
%span
|
2016-05-24 18:14:14 -04:00
|
|
|
Activity
|
2016-06-10 09:17:28 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :files
|
2016-06-02 04:15:45 -04:00
|
|
|
= nav_link(controller: %w(tree blob blame edit_tree new_tree find_file commit commits compare repositories tags branches releases network)) do
|
2016-06-21 10:54:02 -04:00
|
|
|
= link_to project_files_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? :pipelines
|
2016-06-14 12:34:48 -04:00
|
|
|
= nav_link(controller: [:pipelines, :builds, :environments]) do
|
2016-05-24 18:14:14 -04:00
|
|
|
= link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do
|
|
|
|
%span
|
|
|
|
Pipelines
|
2016-04-18 08:14:40 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :container_registry
|
|
|
|
= nav_link(controller: %w(container_registry)) do
|
|
|
|
= link_to project_container_registry_path(@project), title: 'Container Registry', class: 'shortcuts-container-registry' do
|
|
|
|
%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? :graphs
|
|
|
|
= nav_link(controller: %w(graphs)) do
|
|
|
|
= link_to namespace_project_graph_path(@project.namespace, @project, current_ref), title: 'Graphs', class: 'shortcuts-graphs' do
|
|
|
|
%span
|
|
|
|
Graphs
|
2015-10-14 06:15:03 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :issues
|
2016-08-18 20:54:24 -04:00
|
|
|
= nav_link(controller: [:issues, :labels, :milestones, :boards]) do
|
2016-08-01 19:59:44 -04:00
|
|
|
= link_to namespace_project_issues_path(@project.namespace, @project), title: 'Issues', class: 'shortcuts-issues' do
|
2016-05-24 18:14:14 -04:00
|
|
|
%span
|
|
|
|
Issues
|
|
|
|
- if @project.default_issues_tracker?
|
|
|
|
%span.badge.count.issue_counter= number_with_delimiter(@project.issues.visible_to_user(current_user).opened.count)
|
2013-04-01 15:30:48 -04:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
- if project_nav_tab? :merge_requests
|
|
|
|
= nav_link(controller: :merge_requests) do
|
|
|
|
= link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests', class: 'shortcuts-merge_requests' do
|
|
|
|
%span
|
|
|
|
Merge Requests
|
|
|
|
%span.badge.count.merge_counter= number_with_delimiter(@project.merge_requests.opened.count)
|
2014-12-20 18:11:08 -05:00
|
|
|
|
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
|
|
|
|
= link_to namespace_project_snippets_path(@project.namespace, @project), title: 'Snippets', class: 'shortcuts-snippets' do
|
|
|
|
%span
|
|
|
|
Snippets
|
|
|
|
|
|
|
|
-# Global shortcut to network page for compatibility
|
|
|
|
- if project_nav_tab? :network
|
|
|
|
%li.hidden
|
|
|
|
= link_to namespace_project_network_path(@project.namespace, @project, current_ref), title: 'Network', class: 'shortcuts-network' do
|
|
|
|
Network
|
2015-02-06 16:40:45 -05:00
|
|
|
|
2016-05-24 18:14:14 -04:00
|
|
|
-# Shortcut to create a new issue
|
2016-04-01 12:24:03 -04:00
|
|
|
%li.hidden
|
2016-05-24 18:14:14 -04:00
|
|
|
= link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'shortcuts-new-issue' do
|
|
|
|
Create a new issue
|
2016-04-12 17:16:40 -04:00
|
|
|
|
2016-05-28 13:26:08 -04:00
|
|
|
-# Shortcut to builds page
|
|
|
|
- if project_nav_tab? :builds
|
|
|
|
%li.hidden
|
|
|
|
= link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do
|
|
|
|
Builds
|
|
|
|
|
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
|