Remove app_menu and project_menu partials
Now it's consistent across layouts where their main menus are.
This commit is contained in:
parent
8432c9c176
commit
d8f7748dea
4 changed files with 50 additions and 58 deletions
|
@ -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
|
|
@ -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)
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue