Commit ba7b4630 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Replace home icon with tab names

Signed-off-by: Dmitriy Zaporozhets's avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 3f8e6cf3
%ul
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do
= link_to admin_root_path, title: "Stats" do
%i.icon-home
Dashboard
= nav_link(controller: :projects) do
= link_to "Projects", admin_projects_path
= nav_link(controller: :groups) do
......
%ul
= nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
= link_to root_path, title: "Home" do
%i.icon-home
Activity
= nav_link(path: 'dashboard#projects') do
= link_to projects_dashboard_path do
Projects
......
%ul
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do
= link_to group_path(@group), title: "Home" do
%i.icon-home
Activity
= nav_link(path: 'groups#issues') do
= link_to issues_group_path(@group) do
Issues
......
%ul
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
= link_to profile_path, title: "Profile" do
%i.icon-home
Profile
= nav_link(controller: :accounts) do
= link_to "Account", profile_account_path
= nav_link(controller: :emails) do
......
%ul
= nav_link(path: 'projects#show', html_options: {class: "home"}) do
= link_to project_path(@project), title: "Project" do
%i.icon-home
Activity
- if project_nav_tab? :files
= nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
......
......@@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
ensure_active_main_tab('Home')
ensure_active_main_tab('Dashboard')
end
Then 'the active main tab should be Projects' do
......
......@@ -4,7 +4,7 @@ class DashboardActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
ensure_active_main_tab('Home')
ensure_active_main_tab('Activity')
end
Then 'the active main tab should be Issues' do
......
......@@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
ensure_active_main_tab('Home')
ensure_active_main_tab('Profile')
end
Then 'the active main tab should be Account' do
......
......@@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps
# Main Tabs
Then 'the active main tab should be Home' do
ensure_active_main_tab('Home')
ensure_active_main_tab('Activity')
end
Then 'the active main tab should be Settings' do
......
......@@ -2,11 +2,7 @@ module SharedActiveTab
include Spinach::DSL
def ensure_active_main_tab(content)
if content == "Home"
page.find('.main-nav li.active').should have_css('i.icon-home')
else
page.find('.main-nav li.active').should have_content(content)
end
page.find('.main-nav li.active').should have_content(content)
end
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