params[:project_access]
)
- redirect_to team_project_path(@project)
+ redirect_to project_team_index_path(@project)
end
def update
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
@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
{ 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
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
= 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)) }" }
.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"
-= render "project_head"
+= render "projects/project_head"
%h3.page_title
Team Members
%small (#{@project.users_projects.count})
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}
%hr
.back_link
%br
- = link_to team_project_path(@project), class: "" do
+ = link_to project_team_index_path(@project), class: "" do
← To team list
%br
.row
#
resources :projects, constraints: { id: /[^\/]+/ }, except: [:new, :create, :index], path: "/" do
member do
- get "team"
get "wall"
get "graph"
get "files"
get :patch
end
end
+ resources :team, controller: 'team_members', only: [:index]
resources :team_members
resources :milestones
resources :labels, only: [:index]
end
Then 'I visit project "Shop" team page' do
- visit team_project_path(Project.find_by_name("Shop"))
+ visit project_team_index_path(Project.find_by_name("Shop"))
end
Then 'I visit project "Shop" wall page' do
# projects POST /projects(.:format) projects#create
# new_project GET /projects/new(.:format) projects#new
-# team_project GET /:id/team(.:format) projects#team
# wall_project GET /:id/wall(.:format) projects#wall
# graph_project GET /:id/graph(.:format) projects#graph
# files_project GET /:id/files(.:format) projects#files
get("/projects/new").should route_to('projects#new')
end
- it "to #team" do
- get("/gitlabhq/team").should route_to('projects#team', id: 'gitlabhq')
- end
-
it "to #wall" do
get("/gitlabhq/wall").should route_to('projects#wall', id: 'gitlabhq')
end