.top-tabs.repository = link_to project_repository_path(@project), :class => "activities-tab tab #{'active' if current_page?(project_repository_path(@project)) }" do %span Activities = link_to branches_project_repository_path(@project), :class => "tab #{'active' if current_page?(branches_project_repository_path(@project)) }" do %span Branches = link_to tags_project_repository_path(@project), :class => "tab #{'active' if current_page?(tags_project_repository_path(@project)) }" do %span Tags = link_to project_hooks_path, :class => "tab #{'active' if controller.controller_name == "hooks" }" do %span Hooks - if can? current_user, :admin_project, @project = link_to project_deploy_keys_path(@project), :class => "tab #{'active' if controller.controller_name == "deploy_keys"}" do %span Deploy Keys - if current_page?(project_hooks_path(@project)) - if can? current_user, :admin_project, @project = link_to new_project_hook_path(@project), :class => "add_new", :title => "New Web Hook" do = image_tag "add_new.png", :width => 14 - if current_page?(project_deploy_keys_path(@project)) - if can? current_user, :admin_project, @project = link_to new_project_deploy_key_path(@project), :class => "add_new", :title => "New Deploy Key", :remote => true do = image_tag "add_new.png", :width => 14