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 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 3 = link_to dashboard_issues_path, :class => "#{"current" if current_page?(dashboard_issues_path)}", :id => "issues_slide" do
4 4 Issues
5 5 %span.count= current_user.assigned_issues.opened.count
... ...
app/views/layouts/_const_menu_links.html.haml
... ... @@ -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 2 %meta{:charset => "utf-8"}
3 3 %title
4 4 GitLab
5   - = " - #{@project.name}" if @project && !@project.new_record?
  5 + = " > #{@project.name}" if @project && !@project.new_record?
6 6 = favicon_link_tag 'favicon.ico'
7 7 = stylesheet_link_tag "application"
8 8 = javascript_include_tag "application"
... ...
app/views/layouts/_project_menu.html.haml
1 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 3 - if @project.repo_exists?
7 4 - if can? current_user, :download_code, @project
8 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 6 = render "layouts/head_panel", :title => "Admin area"
7 7 .container
8 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 10 = link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil
12 11 = link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil
13 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 5 = render "layouts/flash"
6 6 = render "layouts/head_panel", :title => ""
7 7 .container
8   - %nav.main_menu
9   - = render "layouts/const_menu_links"
10 8 .content
  9 + %br
11 10 %h3= yield
... ...
app/views/layouts/profile.html.haml
... ... @@ -6,8 +6,7 @@
6 6 = render "layouts/head_panel", :title => "Profile"
7 7 .container
8 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 10 = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
12 11 = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil
13 12 = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
... ...