Remove Projects#team action

Uses TeamMembers#index instead, to be more RESTful
This commit is contained in:
Robert Speicher 2012-09-16 09:21:20 -04:00
parent 8cfb197dfc
commit 95bd93fe1a
11 changed files with 13 additions and 20 deletions

View file

@ -22,7 +22,7 @@ class TeamMembersController < ApplicationController
params[:project_access]
)
redirect_to team_project_path(@project)
redirect_to project_team_index_path(@project)
end
def update
@ -32,7 +32,7 @@ class TeamMembersController < ApplicationController
unless @team_member.valid?
flash[:alert] = "User should have at least one role"
end
redirect_to team_project_path(@project)
redirect_to project_team_index_path(@project)
end
def destroy
@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController
@team_member.destroy
respond_to do |format|
format.html { redirect_to team_project_path(@project) }
format.html { redirect_to project_team_index_path(@project) }
format.js { render nothing: true }
end
end

View file

@ -62,7 +62,7 @@ module ApplicationHelper
{ label: "#{@project.name} / Wall", url: wall_project_path(@project) },
{ label: "#{@project.name} / Tree", url: tree_project_ref_path(@project, @project.root_ref) },
{ label: "#{@project.name} / Commits", url: project_commits_path(@project) },
{ label: "#{@project.name} / Team", url: team_project_path(@project) }
{ label: "#{@project.name} / Team", url: project_team_index_path(@project) }
]
end

View file

@ -8,7 +8,7 @@ module TabHelper
end
def project_tab_class
[:show, :files, :team, :edit, :update].each do |action|
[:show, :files, :edit, :update].each do |action|
return "current" if current_page?(controller: "projects", action: action, id: @project)
end

View file

@ -3,8 +3,8 @@
= link_to project_path(@project), class: "activities-tab tab" do
%i.icon-home
Show
%li{ class: " #{'active' if (controller.controller_name == "team_members") || current_page?(team_project_path(@project)) }" }
= link_to team_project_path(@project), class: "team-tab tab" do
%li{ class: " #{'active' if (controller.controller_name == "team_members") || current_page?(project_team_index_path(@project)) }" }
= link_to project_team_index_path(@project), class: "team-tab tab" do
%i.icon-user
Team
%li{ class: "#{'active' if current_page?(files_project_path(@project)) }" }

View file

@ -20,4 +20,4 @@
.actions
= f.submit 'Save', class: "btn save-btn"
= link_to "Cancel", team_project_path(@project), class: "btn cancel-btn"
= link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"

View file

@ -1,4 +1,4 @@
= render "project_head"
= render "projects/project_head"
%h3.page_title
Team Members
%small (#{@project.users_projects.count})
@ -10,6 +10,4 @@
Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink"
= render partial: "team", locals: {project: @project}
= render partial: "team_members/team", locals: {project: @project}

View file

@ -14,7 +14,7 @@
%hr
.back_link
%br
= link_to team_project_path(@project), class: "" do
= link_to project_team_index_path(@project), class: "" do
&larr; To team list
%br
.row