Commit 2746be6ce3245f2ebc509227cd72f508bfd46830

Authored by Dmitriy Zaporozhets
1 parent b5fdacd1

Home button should targeted on root page of context

app/views/layouts/_app_menu.html.haml
1 %nav.main_menu 1 %nav.main_menu
2 - = render "layouts/const_menu_links" 2 + = link_to "Home", root_path, :class => "home #{"current" if current_page?(projects_path) || current_page?(root_path)}", :title => "Home"
3 = link_to dashboard_issues_path, :class => "#{"current" if current_page?(dashboard_issues_path)}", :id => "issues_slide" do 3 = link_to dashboard_issues_path, :class => "#{"current" if current_page?(dashboard_issues_path)}", :id => "issues_slide" do
4 Issues 4 Issues
5 %span.count= current_user.assigned_issues.opened.count 5 %span.count= current_user.assigned_issues.opened.count
app/views/layouts/_const_menu_links.html.haml
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -= link_to "Home", root_path, :class => "home #{"current" if current_page?(projects_path) || current_page?(root_path)}", :title => "Home"  
app/views/layouts/_head.html.haml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 %meta{:charset => "utf-8"} 2 %meta{:charset => "utf-8"}
3 %title 3 %title
4 GitLab 4 GitLab
5 - = " - #{@project.name}" if @project && !@project.new_record? 5 + = " > #{@project.name}" if @project && !@project.new_record?
6 = favicon_link_tag 'favicon.ico' 6 = favicon_link_tag 'favicon.ico'
7 = stylesheet_link_tag "application" 7 = stylesheet_link_tag "application"
8 = javascript_include_tag "application" 8 = javascript_include_tag "application"
app/views/layouts/_project_menu.html.haml
1 %nav.main_menu 1 %nav.main_menu
2 - = render "layouts/const_menu_links"  
3 - = link_to project_path(@project), :class => "#{project_tab_class}", :title => "Project" do  
4 - Project  
5 - 2 + = link_to @project.code, project_path(@project), :class => "home #{project_tab_class}", :title => "Project"
6 - if @project.repo_exists? 3 - if @project.repo_exists?
7 - if can? current_user, :download_code, @project 4 - if can? current_user, :download_code, @project
8 = link_to "Files", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class 5 = link_to "Files", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class
app/views/layouts/admin.html.haml
@@ -6,8 +6,7 @@ @@ -6,8 +6,7 @@
6 = render "layouts/head_panel", :title => "Admin area" 6 = render "layouts/head_panel", :title => "Admin area"
7 .container 7 .container
8 %nav.main_menu 8 %nav.main_menu
9 - = render "layouts/const_menu_links"  
10 - = link_to "Stats", admin_root_path, :class => controller.controller_name == "dashboard" ? "current" : nil 9 + = link_to "Stats", admin_root_path, :class => "home #{controller.controller_name == "dashboard" ? "current" : nil}"
11 = link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil 10 = link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil
12 = link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil 11 = link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil
13 = link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil 12 = link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil
app/views/layouts/error.html.haml
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
5 = render "layouts/flash" 5 = render "layouts/flash"
6 = render "layouts/head_panel", :title => "" 6 = render "layouts/head_panel", :title => ""
7 .container 7 .container
8 - %nav.main_menu  
9 - = render "layouts/const_menu_links"  
10 .content 8 .content
  9 + %br
11 %h3= yield 10 %h3= yield
app/views/layouts/profile.html.haml
@@ -6,8 +6,7 @@ @@ -6,8 +6,7 @@
6 = render "layouts/head_panel", :title => "Profile" 6 = render "layouts/head_panel", :title => "Profile"
7 .container 7 .container
8 %nav.main_menu 8 %nav.main_menu
9 - = render "layouts/const_menu_links"  
10 - = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil 9 + = link_to "Profile", profile_path, :class => "home #{current_page?(:controller => "profile", :action => :show) ? "current" : nil}"
11 = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil 10 = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
12 = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil 11 = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil
13 = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do 12 = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do