Replace home icon with tab names
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
3f8e6cf3d1
commit
ba7b4630a2
10 changed files with 10 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
|||
%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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%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)
|
||||
|
|
Loading…
Reference in a new issue