Commit ba7b4630 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Replace home icon with tab names

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 3f8e6cf3
%ul %ul
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
= link_to admin_root_path, title: "Stats" do = link_to admin_root_path, title: "Stats" do
%i.icon-home Dashboard
= nav_link(controller: :projects) do = nav_link(controller: :projects) do
= link_to "Projects", admin_projects_path = link_to "Projects", admin_projects_path
= nav_link(controller: :groups) do = nav_link(controller: :groups) do
......
%ul %ul
= nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
= link_to root_path, title: "Home" do = link_to root_path, title: "Home" do
%i.icon-home Activity
= nav_link(path: 'dashboard#projects') do = nav_link(path: 'dashboard#projects') do
= link_to projects_dashboard_path do = link_to projects_dashboard_path do
Projects Projects
......
%ul %ul
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do = nav_link(path: 'groups#show', html_options: {class: 'home'}) do
= link_to group_path(@group), title: "Home" do = link_to group_path(@group), title: "Home" do
%i.icon-home Activity
= nav_link(path: 'groups#issues') do = nav_link(path: 'groups#issues') do
= link_to issues_group_path(@group) do = link_to issues_group_path(@group) do
Issues Issues
......
%ul %ul
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
= link_to profile_path, title: "Profile" do = link_to profile_path, title: "Profile" do
%i.icon-home Profile
= nav_link(controller: :accounts) do = nav_link(controller: :accounts) do
= link_to "Account", profile_account_path = link_to "Account", profile_account_path
= nav_link(controller: :emails) do = nav_link(controller: :emails) do
......
%ul %ul
= nav_link(path: 'projects#show', html_options: {class: "home"}) do = nav_link(path: 'projects#show', html_options: {class: "home"}) do
= link_to project_path(@project), title: "Project" do = link_to project_path(@project), title: "Project" do
%i.icon-home Activity
- if project_nav_tab? :files - if project_nav_tab? :files
= nav_link(controller: %w(tree blob blame edit_tree new_tree)) do = nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
......
...@@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps ...@@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps
include SharedActiveTab include SharedActiveTab
Then 'the active main tab should be Home' do Then 'the active main tab should be Home' do
ensure_active_main_tab('Home') ensure_active_main_tab('Dashboard')
end end
Then 'the active main tab should be Projects' do Then 'the active main tab should be Projects' do
......
...@@ -4,7 +4,7 @@ class DashboardActiveTab < Spinach::FeatureSteps ...@@ -4,7 +4,7 @@ class DashboardActiveTab < Spinach::FeatureSteps
include SharedActiveTab include SharedActiveTab
Then 'the active main tab should be Home' do Then 'the active main tab should be Home' do
ensure_active_main_tab('Home') ensure_active_main_tab('Activity')
end end
Then 'the active main tab should be Issues' do Then 'the active main tab should be Issues' do
......
...@@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps ...@@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps
include SharedActiveTab include SharedActiveTab
Then 'the active main tab should be Home' do Then 'the active main tab should be Home' do
ensure_active_main_tab('Home') ensure_active_main_tab('Profile')
end end
Then 'the active main tab should be Account' do Then 'the active main tab should be Account' do
......
...@@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps ...@@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps
# Main Tabs # Main Tabs
Then 'the active main tab should be Home' do Then 'the active main tab should be Home' do
ensure_active_main_tab('Home') ensure_active_main_tab('Activity')
end end
Then 'the active main tab should be Settings' do Then 'the active main tab should be Settings' do
......
...@@ -2,11 +2,7 @@ module SharedActiveTab ...@@ -2,11 +2,7 @@ module SharedActiveTab
include Spinach::DSL include Spinach::DSL
def ensure_active_main_tab(content) def ensure_active_main_tab(content)
if content == "Home" page.find('.main-nav li.active').should have_content(content)
page.find('.main-nav li.active').should have_css('i.icon-home')
else
page.find('.main-nav li.active').should have_content(content)
end
end end
def ensure_active_sub_tab(content) def ensure_active_sub_tab(content)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment