summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/layouts/_app_menu.html.haml19
-rw-r--r--app/views/layouts/_project_menu.html.haml33
-rw-r--r--app/views/layouts/application.html.haml20
-rw-r--r--app/views/layouts/project.html.haml36
4 files changed, 50 insertions, 58 deletions
diff --git a/app/views/layouts/_app_menu.html.haml b/app/views/layouts/_app_menu.html.haml
deleted file mode 100644
index 8fac1b39172..00000000000
--- a/app/views/layouts/_app_menu.html.haml
+++ /dev/null
@@ -1,19 +0,0 @@
-%ul.main_menu
- = nav_link(path: 'dashboard#index', html_options: {class: 'home'}) do
- = link_to "Home", root_path, title: "Home"
-
- = nav_link(path: 'dashboard#issues') do
- = link_to dashboard_issues_path do
- Issues
- %span.count= current_user.assigned_issues.opened.count
-
- = nav_link(path: 'dashboard#merge_requests') do
- = link_to dashboard_merge_requests_path do
- Merge Requests
- %span.count= current_user.cared_merge_requests.count
-
- = nav_link(path: 'search#show') do
- = link_to "Search", search_path
-
- = nav_link(path: 'help#index') do
- = link_to "Help", help_path
diff --git a/app/views/layouts/_project_menu.html.haml b/app/views/layouts/_project_menu.html.haml
deleted file mode 100644
index 72c39619c91..00000000000
--- a/app/views/layouts/_project_menu.html.haml
+++ /dev/null
@@ -1,33 +0,0 @@
-%ul.main_menu
- = nav_link(html_options: {class: "home #{project_tab_class}"}) do
- = link_to @project.code, project_path(@project), title: "Project"
-
- - if @project.repo_exists?
- - if can? current_user, :download_code, @project
- = nav_link(controller: %w(tree blob blame)) do
- = link_to 'Files', project_tree_path(@project, @ref || @project.root_ref)
- = nav_link(controller: %w(commit commits compare repositories protected_branches)) do
- = link_to "Commits", project_commits_path(@project, @ref || @project.root_ref)
- = nav_link(path: 'projects#graph') do
- = link_to "Network", graph_project_path(@project)
-
- - if @project.issues_enabled
- = nav_link(controller: %w(issues milestones labels)) do
- = link_to project_issues_filter_path(@project) do
- Issues
- %span.count.issue_counter= @project.issues.opened.count
-
- - if @project.repo_exists?
- - if @project.merge_requests_enabled
- = nav_link(controller: :merge_requests) do
- = link_to project_merge_requests_path(@project) do
- Merge Requests
- %span.count.merge_counter= @project.merge_requests.opened.count
-
- - if @project.wall_enabled
- = nav_link(path: 'projects#wall') do
- = link_to 'Wall', wall_project_path(@project)
-
- - if @project.wiki_enabled
- = nav_link(controller: :wikis) do
- = link_to 'Wiki', project_wiki_path(@project, :index)
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index dda10d5d137..40f4f88cbce 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -5,6 +5,20 @@
= render "layouts/flash"
= render "layouts/head_panel", title: "Dashboard"
.container
- = render partial: "layouts/app_menu"
- .content
- = yield
+ %ul.main_menu
+ = nav_link(path: 'dashboard#index', html_options: {class: 'home'}) do
+ = link_to "Home", root_path, title: "Home"
+ = nav_link(path: 'dashboard#issues') do
+ = link_to dashboard_issues_path do
+ Issues
+ %span.count= current_user.assigned_issues.opened.count
+ = nav_link(path: 'dashboard#merge_requests') do
+ = link_to dashboard_merge_requests_path do
+ Merge Requests
+ %span.count= current_user.cared_merge_requests.count
+ = nav_link(path: 'search#show') do
+ = link_to "Search", search_path
+ = nav_link(path: 'help#index') do
+ = link_to "Help", help_path
+
+ .content= yield
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index 56a947d2a9d..b1dbe41ce65 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -5,7 +5,37 @@
= render "layouts/flash"
= render "layouts/head_panel", title: @project.name
.container
- = render partial: "layouts/project_menu"
- .content
- = yield
+ %ul.main_menu
+ = nav_link(html_options: {class: "home #{project_tab_class}"}) do
+ = link_to @project.code, project_path(@project), title: "Project"
+ - if @project.repo_exists?
+ - if can? current_user, :download_code, @project
+ = nav_link(controller: %w(tree blob blame)) do
+ = link_to 'Files', project_tree_path(@project, @ref || @project.root_ref)
+ = nav_link(controller: %w(commit commits compare repositories protected_branches)) do
+ = link_to "Commits", project_commits_path(@project, @ref || @project.root_ref)
+ = nav_link(path: 'projects#graph') do
+ = link_to "Network", graph_project_path(@project)
+
+ - if @project.issues_enabled
+ = nav_link(controller: %w(issues milestones labels)) do
+ = link_to project_issues_filter_path(@project) do
+ Issues
+ %span.count.issue_counter= @project.issues.opened.count
+
+ - if @project.repo_exists? && @project.merge_requests_enabled
+ = nav_link(controller: :merge_requests) do
+ = link_to project_merge_requests_path(@project) do
+ Merge Requests
+ %span.count.merge_counter= @project.merge_requests.opened.count
+
+ - if @project.wall_enabled
+ = nav_link(path: 'projects#wall') do
+ = link_to 'Wall', wall_project_path(@project)
+
+ - if @project.wiki_enabled
+ = nav_link(controller: :wikis) do
+ = link_to 'Wiki', project_wiki_path(@project, :index)
+
+ .content= yield