first pack of tests for milestones

This commit is contained in:
Dmitriy Zaporozhets 2012-04-09 01:01:42 +03:00
parent 23d950855d
commit d98b183361
8 changed files with 145 additions and 48 deletions

View file

@ -16,45 +16,7 @@ module ProjectsHelper
nil
end
def project_tab_class
[:show, :files, :team, :edit, :update].each do |action|
return "current" if current_page?(:controller => "projects", :action => action, :id => @project)
end
if controller.controller_name == "snippets" ||
controller.controller_name == "hooks" ||
controller.controller_name == "deploy_keys" ||
controller.controller_name == "team_members"
"current"
end
end
def tree_tab_class
controller.controller_name == "refs" ?
"current" : nil
end
def repository_tab_class
#if controller.controller_name == "repositories" ||
#controller.controller_name == "hooks" ||
#controller.controller_name == "deploy_keys"
#"current"
#end
end
def commit_tab_class
if controller.controller_name == "commits" ||
controller.controller_name == "repositories" ||
controller.controller_name == "protected_branches"
"current"
end
end
def branches_tab_class
if current_page?(branches_project_repository_path(@project)) ||
controller.controller_name == "protected_branches" ||
current_page?(project_repository_path(@project))
'active'
end
end
end