_project.html.haml 2.2 KB
Newer Older
1
%ul.project-navigation.nav.nav-sidebar.navbar-collapse.collapse
D
Dmitriy Zaporozhets 已提交
2
  = nav_link(path: 'projects#show', html_options: {class: "home"}) do
3
    = link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
4
      Project
5
  - if project_nav_tab? :files
6
    = nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
R
Robert Schilling 已提交
7
      = link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref), class: 'shortcuts-tree'
8 9

  - if project_nav_tab? :commits
10
    = nav_link(controller: %w(commit commits compare repositories tags branches)) do
R
Robert Schilling 已提交
11
      = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref), class: 'shortcuts-commits'
12 13 14

  - if project_nav_tab? :network
    = nav_link(controller: %w(network)) do
R
Robert Schilling 已提交
15
      = link_to "Network", project_network_path(@project, @ref || @repository.root_ref), class: 'shortcuts-network'
16 17 18

  - if project_nav_tab? :graphs
    = nav_link(controller: %w(graphs)) do
R
Robert Schilling 已提交
19
      = link_to "Graphs", project_graph_path(@project, @ref || @repository.root_ref), class: 'shortcuts-graphs'
20 21

  - if project_nav_tab? :issues
D
Dmitriy Zaporozhets 已提交
22
    = nav_link(controller: %w(issues milestones labels)) do
R
Robert Schilling 已提交
23
      = link_to url_for_project_issues, class: 'shortcuts-issues' do
D
Dmitriy Zaporozhets 已提交
24 25 26 27
        Issues
        - if @project.used_default_issues_tracker?
          %span.count.issue_counter= @project.issues.opened.count

28
  - if project_nav_tab? :merge_requests
D
Dmitriy Zaporozhets 已提交
29
    = nav_link(controller: :merge_requests) do
R
Robert Schilling 已提交
30
      = link_to project_merge_requests_path(@project), class: 'shortcuts-merge_requests'  do
D
Dmitriy Zaporozhets 已提交
31 32 33
        Merge Requests
        %span.count.merge_counter= @project.merge_requests.opened.count

34
  - if project_nav_tab? :wiki
D
Dmitriy Zaporozhets 已提交
35
    = nav_link(controller: :wikis) do
R
Robert Schilling 已提交
36
      = link_to 'Wiki', project_wiki_path(@project, :home), class: 'shortcuts-wiki'
D
Dmitriy Zaporozhets 已提交
37

38
  - if project_nav_tab? :snippets
D
Dmitriy Zaporozhets 已提交
39
    = nav_link(controller: :snippets) do
R
Robert Schilling 已提交
40
      = link_to 'Snippets', project_snippets_path(@project), class: 'shortcuts-snippets'
D
Dmitriy Zaporozhets 已提交
41

42
  - if project_nav_tab? :settings
43
    = nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do
44
      = link_to edit_project_path(@project), class: "stat-tab tab no-highlight" do
D
Dmitriy Zaporozhets 已提交
45
        Settings
46 47 48
        %i.fa.fa-angle-down
  - if defined?(settings) && settings
    = render 'projects/settings_nav'