Commit 2a63f64f24d25865dec249021ea806da86d8bb9e
1 parent
439f399b
Exists in
master
and in
4 other branches
Remove team factories and few links
Showing
5 changed files
with
0 additions
and
70 deletions
Show diff stats
app/controllers/team_members_controller.rb
| @@ -6,7 +6,6 @@ class TeamMembersController < ProjectResourceController | @@ -6,7 +6,6 @@ class TeamMembersController < ProjectResourceController | ||
| 6 | def index | 6 | def index |
| 7 | @group = @project.group | 7 | @group = @project.group |
| 8 | @users_projects = @project.users_projects.order('project_access DESC') | 8 | @users_projects = @project.users_projects.order('project_access DESC') |
| 9 | - @assigned_teams = @project.user_team_project_relationships | ||
| 10 | end | 9 | end |
| 11 | 10 | ||
| 12 | def new | 11 | def new |
app/views/team_members/index.html.haml
| @@ -6,8 +6,6 @@ | @@ -6,8 +6,6 @@ | ||
| 6 | %span.pull-right | 6 | %span.pull-right |
| 7 | = link_to import_project_team_members_path(@project), class: "btn btn-small grouped", title: "Import team from another project" do | 7 | = link_to import_project_team_members_path(@project), class: "btn btn-small grouped", title: "Import team from another project" do |
| 8 | Import team from another project | 8 | Import team from another project |
| 9 | - = link_to available_project_teams_path(@project), class: "btn btn-small grouped", title: "Assign project to team of users" do | ||
| 10 | - Assign project to Team of users | ||
| 11 | = link_to new_project_team_member_path(@project), class: "btn btn-primary small grouped", title: "New Team Member" do | 9 | = link_to new_project_team_member_path(@project), class: "btn btn-primary small grouped", title: "New Team Member" do |
| 12 | New Team Member | 10 | New Team Member |
| 13 | 11 |
spec/factories/user_team_project_relationships.rb
| @@ -1,21 +0,0 @@ | @@ -1,21 +0,0 @@ | ||
| 1 | -# == Schema Information | ||
| 2 | -# | ||
| 3 | -# Table name: user_team_project_relationships | ||
| 4 | -# | ||
| 5 | -# id :integer not null, primary key | ||
| 6 | -# project_id :integer | ||
| 7 | -# user_team_id :integer | ||
| 8 | -# greatest_access :integer | ||
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | ||
| 11 | -# | ||
| 12 | - | ||
| 13 | -# Read about factories at https://github.com/thoughtbot/factory_girl | ||
| 14 | - | ||
| 15 | -FactoryGirl.define do | ||
| 16 | - factory :user_team_project_relationship do | ||
| 17 | - project | ||
| 18 | - user_team | ||
| 19 | - greatest_access { UsersProject::MASTER } | ||
| 20 | - end | ||
| 21 | -end |
spec/factories/user_team_user_relationships.rb
| @@ -1,23 +0,0 @@ | @@ -1,23 +0,0 @@ | ||
| 1 | -# == Schema Information | ||
| 2 | -# | ||
| 3 | -# Table name: user_team_user_relationships | ||
| 4 | -# | ||
| 5 | -# id :integer not null, primary key | ||
| 6 | -# user_id :integer | ||
| 7 | -# user_team_id :integer | ||
| 8 | -# group_admin :boolean | ||
| 9 | -# permission :integer | ||
| 10 | -# created_at :datetime not null | ||
| 11 | -# updated_at :datetime not null | ||
| 12 | -# | ||
| 13 | - | ||
| 14 | -# Read about factories at https://github.com/thoughtbot/factory_girl | ||
| 15 | - | ||
| 16 | -FactoryGirl.define do | ||
| 17 | - factory :user_team_user_relationship do | ||
| 18 | - user | ||
| 19 | - user_team | ||
| 20 | - group_admin false | ||
| 21 | - permission { UsersProject::MASTER } | ||
| 22 | - end | ||
| 23 | -end |
spec/factories/user_teams.rb
| @@ -1,23 +0,0 @@ | @@ -1,23 +0,0 @@ | ||
| 1 | -# == Schema Information | ||
| 2 | -# | ||
| 3 | -# Table name: user_teams | ||
| 4 | -# | ||
| 5 | -# id :integer not null, primary key | ||
| 6 | -# name :string(255) | ||
| 7 | -# path :string(255) | ||
| 8 | -# owner_id :integer | ||
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | ||
| 11 | -# description :string(255) default(""), not null | ||
| 12 | -# | ||
| 13 | - | ||
| 14 | -# Read about factories at https://github.com/thoughtbot/factory_girl | ||
| 15 | - | ||
| 16 | -FactoryGirl.define do | ||
| 17 | - factory :user_team do | ||
| 18 | - sequence(:name) { |n| "team#{n}" } | ||
| 19 | - sequence(:description) { |n| "team_description#{n}" } | ||
| 20 | - path { name.downcase.gsub(/\s/, '_') } | ||
| 21 | - owner | ||
| 22 | - end | ||
| 23 | -end |