gitlab-org--gitlab-foss/app/views/layouts/nav/_project.html.haml

49 lines
2.2 KiB
Plaintext
Raw Normal View History

%ul.project-navigation.nav.nav-sidebar
2013-04-01 19:30:48 +00:00
= nav_link(path: 'projects#show', html_options: {class: "home"}) do
= link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
Project
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :files
= nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
2014-08-21 08:14:31 +00:00
= link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref), class: 'shortcuts-tree'
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :commits
= nav_link(controller: %w(commit commits compare repositories tags branches)) do
2014-08-21 08:14:31 +00:00
= link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref), class: 'shortcuts-commits'
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :network
= nav_link(controller: %w(network)) do
2014-08-21 08:14:31 +00:00
= link_to "Network", project_network_path(@project, @ref || @repository.root_ref), class: 'shortcuts-network'
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :graphs
= nav_link(controller: %w(graphs)) do
2014-08-21 08:14:31 +00:00
= link_to "Graphs", project_graph_path(@project, @ref || @repository.root_ref), class: 'shortcuts-graphs'
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :issues
2013-04-01 19:30:48 +00:00
= nav_link(controller: %w(issues milestones labels)) do
2014-08-21 08:14:31 +00:00
= link_to url_for_project_issues, class: 'shortcuts-issues' do
2013-04-01 19:30:48 +00:00
Issues
- if @project.used_default_issues_tracker?
%span.count.issue_counter= @project.issues.opened.count
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :merge_requests
2013-04-01 19:30:48 +00:00
= nav_link(controller: :merge_requests) do
2014-08-21 08:14:31 +00:00
= link_to project_merge_requests_path(@project), class: 'shortcuts-merge_requests' do
2013-04-01 19:30:48 +00:00
Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :wiki
2013-04-01 19:30:48 +00:00
= nav_link(controller: :wikis) do
2014-08-21 08:14:31 +00:00
= link_to 'Wiki', project_wiki_path(@project, :home), class: 'shortcuts-wiki'
2013-04-01 19:30:48 +00:00
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :snippets
2013-04-01 19:30:48 +00:00
= nav_link(controller: :snippets) do
2014-08-21 08:14:31 +00:00
= link_to 'Snippets', project_snippets_path(@project), class: 'shortcuts-snippets'
2013-04-01 19:30:48 +00:00
2013-06-13 19:58:27 +00:00
- if project_nav_tab? :settings
= nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do
2013-04-01 19:30:48 +00:00
= link_to edit_project_path(@project), class: "stat-tab tab " do
Settings
%i.fa.fa-angle-down
- if defined?(settings) && settings
= render 'projects/settings_nav'