Read about our upcoming Code of Conduct on this issue

_project.html.haml 4.35 KB
Newer Older
1
%ul.nav.nav-sidebar
2
3
  - if @project.group
    = nav_link do
4
      = link_to group_path(@project.group), title: 'Go to group', class: 'back-link' do
5
6
        = icon('caret-square-o-left fw')
        %span
7
          Go to group
8
9
  - else
    = nav_link do
10
      = link_to root_path, title: 'Go to dashboard', class: 'back-link' do
11
12
        = icon('caret-square-o-left fw')
        %span
13
          Go to dashboard
14
15
16

  %li.separate-item

Douwe Maan's avatar
Douwe Maan committed
17
  = nav_link(path: 'projects#show', html_options: {class: 'home'}) do
18
    = link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
19
      = icon('home fw')
Douwe Maan's avatar
Douwe Maan committed
20
21
      %span
        Project
22
  = nav_link(path: 'projects#activity') do
23
    = link_to activity_project_path(@project), title: 'Activity', class: 'shortcuts-project-activity' do
24
25
26
      = icon('dashboard fw')
      %span
        Activity
Douwe Maan's avatar
Douwe Maan committed
27
28
  - if project_nav_tab? :files
    = nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
29
      = link_to project_files_path(@project), title: 'Files',  class: 'shortcuts-tree' do
Douwe Maan's avatar
Douwe Maan committed
30
        = icon('files-o fw')
31
        %span
Douwe Maan's avatar
Douwe Maan committed
32
          Files
33

Douwe Maan's avatar
Douwe Maan committed
34
  - if project_nav_tab? :commits
35
    = nav_link(controller: %w(commit commits compare repositories tags branches releases network)) do
36
      = link_to project_commits_path(@project), title: 'Commits', class: 'shortcuts-commits' do
Douwe Maan's avatar
Douwe Maan committed
37
        = icon('history fw')
38
        %span
Douwe Maan's avatar
Douwe Maan committed
39
          Commits
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
40

Kamil Trzcinski's avatar
Kamil Trzcinski committed
41
42
  - if project_nav_tab? :builds
    = nav_link(controller: %w(builds)) do
43
      = link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
44
        = icon('cubes fw')
Kamil Trzcinski's avatar
Kamil Trzcinski committed
45
46
        %span
          Builds
47
          %span.count.builds_counter= @project.builds.running_or_pending.count(:all)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
48

Douwe Maan's avatar
Douwe Maan committed
49
50
  - if project_nav_tab? :graphs
    = nav_link(controller: %w(graphs)) do
51
      = link_to namespace_project_graph_path(@project.namespace, @project, current_ref), title: 'Graphs',  class: 'shortcuts-graphs' do
Douwe Maan's avatar
Douwe Maan committed
52
53
54
        = icon('area-chart fw')
        %span
          Graphs
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
55

Douwe Maan's avatar
Douwe Maan committed
56
57
  - if project_nav_tab? :milestones
    = nav_link(controller: :milestones) do
58
      = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
Douwe Maan's avatar
Douwe Maan committed
59
60
61
        = icon('clock-o fw')
        %span
          Milestones
62

Douwe Maan's avatar
Douwe Maan committed
63
64
  - if project_nav_tab? :issues
    = nav_link(controller: :issues) do
65
      = link_to url_for_project_issues(@project, only_path: true), title: 'Issues', class: 'shortcuts-issues' do
Douwe Maan's avatar
Douwe Maan committed
66
67
68
69
70
        = icon('exclamation-circle fw')
        %span
          Issues
          - if @project.default_issues_tracker?
            %span.count.issue_counter= @project.issues.opened.count
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
71

Douwe Maan's avatar
Douwe Maan committed
72
73
  - if project_nav_tab? :merge_requests
    = nav_link(controller: :merge_requests) do
74
      = link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests', class: 'shortcuts-merge_requests' do
Douwe Maan's avatar
Douwe Maan committed
75
76
77
78
        = icon('tasks fw')
        %span
          Merge Requests
          %span.count.merge_counter= @project.merge_requests.opened.count
79

80
81
  - if project_nav_tab? :settings
    = nav_link(controller: [:project_members, :teams]) do
82
      = link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab' do
83
84
85
86
        = icon('users fw')
        %span
          Members

Douwe Maan's avatar
Douwe Maan committed
87
88
  - if project_nav_tab? :labels
    = nav_link(controller: :labels) do
89
      = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
Douwe Maan's avatar
Douwe Maan committed
90
91
92
        = icon('tags fw')
        %span
          Labels
93

Douwe Maan's avatar
Douwe Maan committed
94
95
  - if project_nav_tab? :wiki
    = nav_link(controller: :wikis) do
96
      = link_to get_project_wiki_path(@project), title: 'Wiki', class: 'shortcuts-wiki' do
Douwe Maan's avatar
Douwe Maan committed
97
98
99
        = icon('book fw')
        %span
          Wiki
100

Douwe Maan's avatar
Douwe Maan committed
101
102
  - if project_nav_tab? :snippets
    = nav_link(controller: :snippets) do
103
      = link_to namespace_project_snippets_path(@project.namespace, @project), title: 'Snippets', class: 'shortcuts-snippets' do
104
        = icon('clipboard fw')
Douwe Maan's avatar
Douwe Maan committed
105
106
        %span
          Snippets
107

Douwe Maan's avatar
Douwe Maan committed
108
109
  - if project_nav_tab? :settings
    = nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do
110
      = link_to edit_project_path(@project), title: 'Settings' do
Douwe Maan's avatar
Douwe Maan committed
111
112
113
        = icon('cogs fw')
        %span
          Settings
114
115
116
117
118
119
120

  -# 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