Commit 5c3cb47c16cacd8e9056f2a68978d69bc153a0f8
Exists in
master
and in
4 other branches
Merge branch 'team-and-group-descriptions' of https://github.com/Undev/gitlabhq …
…into Undev-team-and-group-descriptions Conflicts: db/schema.rb
Showing
26 changed files
with
155 additions
and
45 deletions
Show diff stats
app/models/group.rb
| @@ -2,13 +2,14 @@ | @@ -2,13 +2,14 @@ | ||
| 2 | # | 2 | # |
| 3 | # Table name: namespaces | 3 | # Table name: namespaces |
| 4 | # | 4 | # |
| 5 | -# id :integer not null, primary key | ||
| 6 | -# name :string(255) not null | ||
| 7 | -# path :string(255) not null | ||
| 8 | -# owner_id :integer not null | ||
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | ||
| 11 | -# type :string(255) | 5 | +# id :integer not null, primary key |
| 6 | +# name :string(255) not null | ||
| 7 | +# description :string(255) not null | ||
| 8 | +# path :string(255) not null | ||
| 9 | +# owner_id :integer not null | ||
| 10 | +# created_at :datetime not null | ||
| 11 | +# updated_at :datetime not null | ||
| 12 | +# type :string(255) | ||
| 12 | # | 13 | # |
| 13 | 14 | ||
| 14 | class Group < Namespace | 15 | class Group < Namespace |
app/models/namespace.rb
| @@ -2,17 +2,18 @@ | @@ -2,17 +2,18 @@ | ||
| 2 | # | 2 | # |
| 3 | # Table name: namespaces | 3 | # Table name: namespaces |
| 4 | # | 4 | # |
| 5 | -# id :integer not null, primary key | ||
| 6 | -# name :string(255) not null | ||
| 7 | -# path :string(255) not null | ||
| 8 | -# owner_id :integer not null | ||
| 9 | -# created_at :datetime not null | ||
| 10 | -# updated_at :datetime not null | ||
| 11 | -# type :string(255) | 5 | +# id :integer not null, primary key |
| 6 | +# name :string(255) not null | ||
| 7 | +# description :string(255) not null | ||
| 8 | +# path :string(255) not null | ||
| 9 | +# owner_id :integer not null | ||
| 10 | +# created_at :datetime not null | ||
| 11 | +# updated_at :datetime not null | ||
| 12 | +# type :string(255) | ||
| 12 | # | 13 | # |
| 13 | 14 | ||
| 14 | class Namespace < ActiveRecord::Base | 15 | class Namespace < ActiveRecord::Base |
| 15 | - attr_accessible :name, :path | 16 | + attr_accessible :name, :description, :path |
| 16 | 17 | ||
| 17 | has_many :projects, dependent: :destroy | 18 | has_many :projects, dependent: :destroy |
| 18 | belongs_to :owner, class_name: "User" | 19 | belongs_to :owner, class_name: "User" |
| @@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base | @@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base | ||
| 22 | length: { within: 0..255 }, | 23 | length: { within: 0..255 }, |
| 23 | format: { with: Gitlab::Regex.name_regex, | 24 | format: { with: Gitlab::Regex.name_regex, |
| 24 | message: "only letters, digits, spaces & '_' '-' '.' allowed." } | 25 | message: "only letters, digits, spaces & '_' '-' '.' allowed." } |
| 25 | - | 26 | + validates :description, length: { within: 0..255 } |
| 26 | validates :path, uniqueness: true, presence: true, length: { within: 1..255 }, | 27 | validates :path, uniqueness: true, presence: true, length: { within: 1..255 }, |
| 27 | format: { with: Gitlab::Regex.path_regex, | 28 | format: { with: Gitlab::Regex.path_regex, |
| 28 | message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" } | 29 | message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" } |
app/models/user_team.rb
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | # | 11 | # |
| 12 | 12 | ||
| 13 | class UserTeam < ActiveRecord::Base | 13 | class UserTeam < ActiveRecord::Base |
| 14 | - attr_accessible :name, :owner_id, :path | 14 | + attr_accessible :name, :description, :owner_id, :path |
| 15 | 15 | ||
| 16 | belongs_to :owner, class_name: User | 16 | belongs_to :owner, class_name: User |
| 17 | 17 | ||
| @@ -26,6 +26,7 @@ class UserTeam < ActiveRecord::Base | @@ -26,6 +26,7 @@ class UserTeam < ActiveRecord::Base | ||
| 26 | length: { within: 0..255 }, | 26 | length: { within: 0..255 }, |
| 27 | format: { with: Gitlab::Regex.name_regex, | 27 | format: { with: Gitlab::Regex.name_regex, |
| 28 | message: "only letters, digits, spaces & '_' '-' '.' allowed." } | 28 | message: "only letters, digits, spaces & '_' '-' '.' allowed." } |
| 29 | + validates :description, length: { within: 0..255 } | ||
| 29 | validates :path, uniqueness: true, presence: true, length: { within: 1..255 }, | 30 | validates :path, uniqueness: true, presence: true, length: { within: 1..255 }, |
| 30 | format: { with: Gitlab::Regex.path_regex, | 31 | format: { with: Gitlab::Regex.path_regex, |
| 31 | message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" } | 32 | message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" } |
app/views/admin/groups/edit.html.haml
| 1 | -%h3.page_title Rename Group | 1 | +%h3.page_title Edit Group |
| 2 | %hr | 2 | %hr |
| 3 | = form_for [:admin, @group] do |f| | 3 | = form_for [:admin, @group] do |f| |
| 4 | - if @group.errors.any? | 4 | - if @group.errors.any? |
| @@ -10,7 +10,10 @@ | @@ -10,7 +10,10 @@ | ||
| 10 | .input | 10 | .input |
| 11 | = f.text_field :name, placeholder: "Example Group", class: "xxlarge" | 11 | = f.text_field :name, placeholder: "Example Group", class: "xxlarge" |
| 12 | 12 | ||
| 13 | - | 13 | + .clearfix.group-description-holder |
| 14 | + = f.label :description, "Details" | ||
| 15 | + .input | ||
| 16 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 14 | 17 | ||
| 15 | .clearfix.group_name_holder | 18 | .clearfix.group_name_holder |
| 16 | = f.label :path do | 19 | = f.label :path do |
| @@ -24,5 +27,5 @@ | @@ -24,5 +27,5 @@ | ||
| 24 | %li It will change the git path to repositories under this group. | 27 | %li It will change the git path to repositories under this group. |
| 25 | 28 | ||
| 26 | .form-actions | 29 | .form-actions |
| 27 | - = f.submit 'Rename group', class: "btn btn-remove" | 30 | + = f.submit 'Edit group', class: "btn btn-remove" |
| 28 | = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" | 31 | = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" |
app/views/admin/groups/index.html.haml
| @@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
| 17 | Name | 17 | Name |
| 18 | %i.icon-sort-down | 18 | %i.icon-sort-down |
| 19 | %th Path | 19 | %th Path |
| 20 | + %th Description | ||
| 20 | %th Projects | 21 | %th Projects |
| 21 | %th Owner | 22 | %th Owner |
| 22 | %th.cred Danger Zone! | 23 | %th.cred Danger Zone! |
| @@ -25,11 +26,12 @@ | @@ -25,11 +26,12 @@ | ||
| 25 | %tr | 26 | %tr |
| 26 | %td | 27 | %td |
| 27 | %strong= link_to group.name, [:admin, group] | 28 | %strong= link_to group.name, [:admin, group] |
| 29 | + %td= group.description | ||
| 28 | %td= group.path | 30 | %td= group.path |
| 29 | %td= group.projects.count | 31 | %td= group.projects.count |
| 30 | %td | 32 | %td |
| 31 | = link_to group.owner_name, admin_user_path(group.owner) | 33 | = link_to group.owner_name, admin_user_path(group.owner) |
| 32 | %td.bgred | 34 | %td.bgred |
| 33 | - = link_to 'Rename', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small" | 35 | + = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small" |
| 34 | = link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" | 36 | = link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" |
| 35 | = paginate @groups, theme: "admin" | 37 | = paginate @groups, theme: "admin" |
app/views/admin/groups/new.html.haml
| @@ -9,8 +9,14 @@ | @@ -9,8 +9,14 @@ | ||
| 9 | Group name is | 9 | Group name is |
| 10 | .input | 10 | .input |
| 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" | 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" |
| 12 | - | ||
| 13 | - = f.submit 'Create group', class: "btn btn-primary" | 12 | + .clearfix.group-description-holder |
| 13 | + = f.label :description, "Details" | ||
| 14 | + .input | ||
| 15 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 16 | + | ||
| 17 | + .form-actions | ||
| 18 | + = f.submit 'Create group', class: "btn btn-primary" | ||
| 19 | + | ||
| 14 | %hr | 20 | %hr |
| 15 | .padded | 21 | .padded |
| 16 | %ul | 22 | %ul |
app/views/admin/groups/show.html.haml
| @@ -16,7 +16,13 @@ | @@ -16,7 +16,13 @@ | ||
| 16 | | 16 | |
| 17 | = link_to edit_admin_group_path(@group), class: "btn btn-small pull-right" do | 17 | = link_to edit_admin_group_path(@group), class: "btn btn-small pull-right" do |
| 18 | %i.icon-edit | 18 | %i.icon-edit |
| 19 | - Rename | 19 | + Edit |
| 20 | + %tr | ||
| 21 | + %td | ||
| 22 | + %b | ||
| 23 | + Description: | ||
| 24 | + %td | ||
| 25 | + = @group.description | ||
| 20 | %tr | 26 | %tr |
| 21 | %td | 27 | %td |
| 22 | %b | 28 | %b |
app/views/admin/teams/edit.html.haml
| 1 | -%h3.page_title Rename Team | 1 | +%h3.page_title Edit Team |
| 2 | %hr | 2 | %hr |
| 3 | = form_for @team, url: admin_team_path(@team), method: :put do |f| | 3 | = form_for @team, url: admin_team_path(@team), method: :put do |f| |
| 4 | - if @team.errors.any? | 4 | - if @team.errors.any? |
| @@ -10,6 +10,11 @@ | @@ -10,6 +10,11 @@ | ||
| 10 | .input | 10 | .input |
| 11 | = f.text_field :name, placeholder: "Example Team", class: "xxlarge" | 11 | = f.text_field :name, placeholder: "Example Team", class: "xxlarge" |
| 12 | 12 | ||
| 13 | + .clearfix.team-description-holder | ||
| 14 | + = f.label :description, "Details" | ||
| 15 | + .input | ||
| 16 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 17 | + | ||
| 13 | .clearfix.team_name_holder | 18 | .clearfix.team_name_holder |
| 14 | = f.label :path do | 19 | = f.label :path do |
| 15 | %span.cred Team path is | 20 | %span.cred Team path is |
| @@ -19,5 +24,5 @@ | @@ -19,5 +24,5 @@ | ||
| 19 | %li It will change web url for access team and team projects. | 24 | %li It will change web url for access team and team projects. |
| 20 | 25 | ||
| 21 | .form-actions | 26 | .form-actions |
| 22 | - = f.submit 'Rename team', class: "btn btn-remove" | 27 | + = f.submit 'Edit team', class: "btn btn-remove" |
| 23 | = link_to 'Cancel', admin_teams_path, class: "btn btn-cancel" | 28 | = link_to 'Cancel', admin_teams_path, class: "btn btn-cancel" |
app/views/admin/teams/index.html.haml
| @@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
| 16 | %th | 16 | %th |
| 17 | Name | 17 | Name |
| 18 | %i.icon-sort-down | 18 | %i.icon-sort-down |
| 19 | + %th Description | ||
| 19 | %th Path | 20 | %th Path |
| 20 | %th Projects | 21 | %th Projects |
| 21 | %th Members | 22 | %th Members |
| @@ -26,13 +27,14 @@ | @@ -26,13 +27,14 @@ | ||
| 26 | %tr | 27 | %tr |
| 27 | %td | 28 | %td |
| 28 | %strong= link_to team.name, admin_team_path(team) | 29 | %strong= link_to team.name, admin_team_path(team) |
| 30 | + %td= team.description | ||
| 29 | %td= team.path | 31 | %td= team.path |
| 30 | %td= team.projects.count | 32 | %td= team.projects.count |
| 31 | %td= team.members.count | 33 | %td= team.members.count |
| 32 | %td | 34 | %td |
| 33 | = link_to team.owner.name, admin_user_path(team.owner) | 35 | = link_to team.owner.name, admin_user_path(team.owner) |
| 34 | %td.bgred | 36 | %td.bgred |
| 35 | - = link_to 'Rename', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small" | 37 | + = link_to 'Edit', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small" |
| 36 | = link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" | 38 | = link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" |
| 37 | 39 | ||
| 38 | = paginate @teams, theme: "admin" | 40 | = paginate @teams, theme: "admin" |
app/views/admin/teams/new.html.haml
| @@ -9,8 +9,15 @@ | @@ -9,8 +9,15 @@ | ||
| 9 | Team name is | 9 | Team name is |
| 10 | .input | 10 | .input |
| 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" | 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" |
| 12 | - | ||
| 13 | - = f.submit 'Create team', class: "btn btn-primary" | 12 | + |
| 13 | + .clearfix.team-description-holder | ||
| 14 | + = f.label :description, "Details" | ||
| 15 | + .input | ||
| 16 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 17 | + | ||
| 18 | + .form-actions | ||
| 19 | + = f.submit 'Create team', class: "btn btn-primary" | ||
| 20 | + | ||
| 14 | %hr | 21 | %hr |
| 15 | .padded | 22 | .padded |
| 16 | %ul | 23 | %ul |
app/views/admin/teams/show.html.haml
| @@ -16,7 +16,13 @@ | @@ -16,7 +16,13 @@ | ||
| 16 | | 16 | |
| 17 | = link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do | 17 | = link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do |
| 18 | %i.icon-edit | 18 | %i.icon-edit |
| 19 | - Rename | 19 | + Edit |
| 20 | + %tr | ||
| 21 | + %td | ||
| 22 | + %b | ||
| 23 | + Description: | ||
| 24 | + %td | ||
| 25 | + = @team.description | ||
| 20 | %tr | 26 | %tr |
| 21 | %td | 27 | %td |
| 22 | %b | 28 | %b |
app/views/groups/edit.html.haml
| @@ -9,8 +9,15 @@ | @@ -9,8 +9,15 @@ | ||
| 9 | Group name is | 9 | Group name is |
| 10 | .input | 10 | .input |
| 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" | 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" |
| 12 | - | ||
| 13 | - = f.submit 'Save group', class: "btn btn-save" | 12 | + |
| 13 | + .clearfix.group-description-holder | ||
| 14 | + = f.label :description, "Details" | ||
| 15 | + .input | ||
| 16 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 17 | + | ||
| 18 | + .form-actions | ||
| 19 | + = f.submit 'Save group', class: "btn btn-save" | ||
| 20 | + | ||
| 14 | %hr | 21 | %hr |
| 15 | 22 | ||
| 16 | 23 |
app/views/groups/new.html.haml
| @@ -9,8 +9,16 @@ | @@ -9,8 +9,16 @@ | ||
| 9 | Group name is | 9 | Group name is |
| 10 | .input | 10 | .input |
| 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" | 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" |
| 12 | - | ||
| 13 | - = f.submit 'Create group', class: "btn btn-create" | 12 | + |
| 13 | + .clearfix.group-description-holder | ||
| 14 | + = f.label :description, "Details" | ||
| 15 | + .input | ||
| 16 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 17 | + | ||
| 18 | + .form-actions | ||
| 19 | + = f.submit 'Create group', class: "btn btn-primary" | ||
| 20 | + | ||
| 21 | + | ||
| 14 | %hr | 22 | %hr |
| 15 | .padded | 23 | .padded |
| 16 | %ul | 24 | %ul |
app/views/groups/show.html.haml
app/views/teams/edit.html.haml
| @@ -12,13 +12,20 @@ | @@ -12,13 +12,20 @@ | ||
| 12 | .input | 12 | .input |
| 13 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xlarge left" | 13 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xlarge left" |
| 14 | 14 | ||
| 15 | + .clearfix.team-description-holder | ||
| 16 | + = f.label :description, "Details" | ||
| 17 | + .input | ||
| 18 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 19 | + | ||
| 15 | .clearfix | 20 | .clearfix |
| 16 | = f.label :path do | 21 | = f.label :path do |
| 17 | Team path is | 22 | Team path is |
| 18 | .input | 23 | .input |
| 19 | = f.text_field :path, placeholder: "opensource", class: "xlarge left" | 24 | = f.text_field :path, placeholder: "opensource", class: "xlarge left" |
| 25 | + | ||
| 20 | .form-actions | 26 | .form-actions |
| 21 | - = f.submit 'Save team changes', class: "btn btn-save" | 27 | + = f.submit 'Save team changes', class: "btn btn-primary" |
| 28 | + = link_to 'Delete team', team_path(@team), method: :delete, confirm: "You are shure?", class: "btn btn-remove pull-right" | ||
| 22 | .span5 | 29 | .span5 |
| 23 | .ui-box | 30 | .ui-box |
| 24 | %h5.title Remove team | 31 | %h5.title Remove team |
| @@ -26,4 +33,3 @@ | @@ -26,4 +33,3 @@ | ||
| 26 | %p | 33 | %p |
| 27 | Removed team can not be restored! | 34 | Removed team can not be restored! |
| 28 | = link_to 'Remove team', team_path(@team), method: :delete, confirm: "You are sure?", class: "btn btn-remove btn-small" | 35 | = link_to 'Remove team', team_path(@team), method: :delete, confirm: "You are sure?", class: "btn btn-remove btn-small" |
| 29 | - |
app/views/teams/new.html.haml
| @@ -9,8 +9,15 @@ | @@ -9,8 +9,15 @@ | ||
| 9 | Team name is | 9 | Team name is |
| 10 | .input | 10 | .input |
| 11 | = f.text_field :name, placeholder: "Ex. Ruby Developers", class: "xxlarge left" | 11 | = f.text_field :name, placeholder: "Ex. Ruby Developers", class: "xxlarge left" |
| 12 | - | ||
| 13 | - = f.submit 'Create team', class: "btn btn-create" | 12 | + |
| 13 | + .clearfix.team-description-holder | ||
| 14 | + = f.label :description, "Details" | ||
| 15 | + .input | ||
| 16 | + = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | ||
| 17 | + | ||
| 18 | + .form-actions | ||
| 19 | + = f.submit 'Create team', class: "btn btn-create" | ||
| 20 | + | ||
| 14 | %hr | 21 | %hr |
| 15 | .padded | 22 | .padded |
| 16 | %ul | 23 | %ul |
app/views/teams/show.html.haml
db/migrate/20130206084024_add_description_to_namsespace.rb
0 → 100644
db/schema.rb
| @@ -112,6 +112,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do | @@ -112,6 +112,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do | ||
| 112 | t.datetime "created_at", :null => false | 112 | t.datetime "created_at", :null => false |
| 113 | t.datetime "updated_at", :null => false | 113 | t.datetime "updated_at", :null => false |
| 114 | t.string "type" | 114 | t.string "type" |
| 115 | + t.string "description", :default => "", :null => false | ||
| 115 | end | 116 | end |
| 116 | 117 | ||
| 117 | add_index "namespaces", ["name"], :name => "index_namespaces_on_name" | 118 | add_index "namespaces", ["name"], :name => "index_namespaces_on_name" |
| @@ -142,14 +143,14 @@ ActiveRecord::Schema.define(:version => 20130220133245) do | @@ -142,14 +143,14 @@ ActiveRecord::Schema.define(:version => 20130220133245) do | ||
| 142 | t.string "name" | 143 | t.string "name" |
| 143 | t.string "path" | 144 | t.string "path" |
| 144 | t.text "description" | 145 | t.text "description" |
| 145 | - t.datetime "created_at", :null => false | ||
| 146 | - t.datetime "updated_at", :null => false | 146 | + t.datetime "created_at", :null => false |
| 147 | + t.datetime "updated_at", :null => false | ||
| 147 | t.integer "creator_id" | 148 | t.integer "creator_id" |
| 148 | t.string "default_branch" | 149 | t.string "default_branch" |
| 149 | - t.boolean "issues_enabled", :default => true, :null => false | ||
| 150 | - t.boolean "wall_enabled", :default => true, :null => false | ||
| 151 | - t.boolean "merge_requests_enabled", :default => true, :null => false | ||
| 152 | - t.boolean "wiki_enabled", :default => true, :null => false | 150 | + t.boolean "issues_enabled", :default => true, :null => false |
| 151 | + t.boolean "wall_enabled", :default => true, :null => false | ||
| 152 | + t.boolean "merge_requests_enabled", :default => true, :null => false | ||
| 153 | + t.boolean "wiki_enabled", :default => true, :null => false | ||
| 153 | t.integer "namespace_id" | 154 | t.integer "namespace_id" |
| 154 | t.boolean "public", :default => false, :null => false | 155 | t.boolean "public", :default => false, :null => false |
| 155 | t.string "issues_tracker", :default => "gitlab", :null => false | 156 | t.string "issues_tracker", :default => "gitlab", :null => false |
| @@ -232,8 +233,14 @@ ActiveRecord::Schema.define(:version => 20130220133245) do | @@ -232,8 +233,14 @@ ActiveRecord::Schema.define(:version => 20130220133245) do | ||
| 232 | t.string "name" | 233 | t.string "name" |
| 233 | t.string "path" | 234 | t.string "path" |
| 234 | t.integer "owner_id" | 235 | t.integer "owner_id" |
| 236 | +<<<<<<< HEAD | ||
| 235 | t.datetime "created_at", :null => false | 237 | t.datetime "created_at", :null => false |
| 236 | t.datetime "updated_at", :null => false | 238 | t.datetime "updated_at", :null => false |
| 239 | +======= | ||
| 240 | + t.datetime "created_at", :null => false | ||
| 241 | + t.datetime "updated_at", :null => false | ||
| 242 | + t.string "description", :default => "", :null => false | ||
| 243 | +>>>>>>> 2f1f05d431d1df062e46365930b98b358554a07d | ||
| 237 | end | 244 | end |
| 238 | 245 | ||
| 239 | create_table "users", :force => true do |t| | 246 | create_table "users", :force => true do |t| |
features/steps/admin/admin_groups.rb
| @@ -25,11 +25,13 @@ class AdminGroups < Spinach::FeatureSteps | @@ -25,11 +25,13 @@ class AdminGroups < Spinach::FeatureSteps | ||
| 25 | 25 | ||
| 26 | And 'submit form with new group info' do | 26 | And 'submit form with new group info' do |
| 27 | fill_in 'group_name', :with => 'gitlab' | 27 | fill_in 'group_name', :with => 'gitlab' |
| 28 | + fill_in 'group_description', :with => 'Group description' | ||
| 28 | click_button "Create group" | 29 | click_button "Create group" |
| 29 | end | 30 | end |
| 30 | 31 | ||
| 31 | Then 'I should see newly created group' do | 32 | Then 'I should see newly created group' do |
| 32 | page.should have_content "Group: gitlab" | 33 | page.should have_content "Group: gitlab" |
| 34 | + page.should have_content "Group description" | ||
| 33 | end | 35 | end |
| 34 | 36 | ||
| 35 | Then 'I should be redirected to group page' do | 37 | Then 'I should be redirected to group page' do |
features/steps/admin/admin_teams.rb
| @@ -18,6 +18,7 @@ class AdminTeams < Spinach::FeatureSteps | @@ -18,6 +18,7 @@ class AdminTeams < Spinach::FeatureSteps | ||
| 18 | 18 | ||
| 19 | And 'submit form with new team info' do | 19 | And 'submit form with new team info' do |
| 20 | fill_in 'user_team_name', with: 'gitlab' | 20 | fill_in 'user_team_name', with: 'gitlab' |
| 21 | + fill_in 'user_team_description', with: 'description' | ||
| 21 | click_button 'Create team' | 22 | click_button 'Create team' |
| 22 | end | 23 | end |
| 23 | 24 | ||
| @@ -27,6 +28,7 @@ class AdminTeams < Spinach::FeatureSteps | @@ -27,6 +28,7 @@ class AdminTeams < Spinach::FeatureSteps | ||
| 27 | 28 | ||
| 28 | And 'I should see newly created team' do | 29 | And 'I should see newly created team' do |
| 29 | page.should have_content "Team: gitlab" | 30 | page.should have_content "Team: gitlab" |
| 31 | + page.should have_content "description" | ||
| 30 | end | 32 | end |
| 31 | 33 | ||
| 32 | When 'I visit admin teams page' do | 34 | When 'I visit admin teams page' do |
features/steps/group/group.rb
| @@ -69,12 +69,14 @@ class Groups < Spinach::FeatureSteps | @@ -69,12 +69,14 @@ class Groups < Spinach::FeatureSteps | ||
| 69 | end | 69 | end |
| 70 | 70 | ||
| 71 | And 'submit form with new group info' do | 71 | And 'submit form with new group info' do |
| 72 | - fill_in 'group_name', :with => 'Samurai' | 72 | + fill_in 'group_name', with: 'Samurai' |
| 73 | + fill_in 'group_description', with: 'Tokugawa Shogunate' | ||
| 73 | click_button "Create group" | 74 | click_button "Create group" |
| 74 | end | 75 | end |
| 75 | 76 | ||
| 76 | Then 'I should see newly created group' do | 77 | Then 'I should see newly created group' do |
| 77 | page.should have_content "Samurai" | 78 | page.should have_content "Samurai" |
| 79 | + page.should have_content "Tokugawa Shogunate" | ||
| 78 | page.should have_content "You will only see events from projects in this group" | 80 | page.should have_content "You will only see events from projects in this group" |
| 79 | end | 81 | end |
| 80 | 82 |
features/steps/userteams/userteams.rb
| @@ -44,9 +44,16 @@ class Userteams < Spinach::FeatureSteps | @@ -44,9 +44,16 @@ class Userteams < Spinach::FeatureSteps | ||
| 44 | 44 | ||
| 45 | And 'I submit form with new team info' do | 45 | And 'I submit form with new team info' do |
| 46 | fill_in 'name', with: 'gitlab' | 46 | fill_in 'name', with: 'gitlab' |
| 47 | + | ||
| 48 | + fill_in 'user_team_description', with: 'team description' | ||
| 47 | click_button 'Create team' | 49 | click_button 'Create team' |
| 48 | end | 50 | end |
| 49 | 51 | ||
| 52 | + And 'I should see newly created team' do | ||
| 53 | + page.should have_content "gitlab" | ||
| 54 | + page.should have_content "team description" | ||
| 55 | + end | ||
| 56 | + | ||
| 50 | Then 'I should be redirected to new team page' do | 57 | Then 'I should be redirected to new team page' do |
| 51 | team = UserTeam.last | 58 | team = UserTeam.last |
| 52 | current_path.should == team_path(team) | 59 | current_path.should == team_path(team) |
features/teams/team.feature
| @@ -20,6 +20,7 @@ Feature: UserTeams | @@ -20,6 +20,7 @@ Feature: UserTeams | ||
| 20 | When I click to "New team" link | 20 | When I click to "New team" link |
| 21 | And I submit form with new team info | 21 | And I submit form with new team info |
| 22 | Then I should be redirected to new team page | 22 | Then I should be redirected to new team page |
| 23 | + Then I should see newly created team | ||
| 23 | 24 | ||
| 24 | Scenario: I should see team dashboard list | 25 | Scenario: I should see team dashboard list |
| 25 | When I have teams with projects and members | 26 | When I have teams with projects and members |
spec/factories/user_teams.rb
| @@ -15,6 +15,7 @@ | @@ -15,6 +15,7 @@ | ||
| 15 | FactoryGirl.define do | 15 | FactoryGirl.define do |
| 16 | factory :user_team do | 16 | factory :user_team do |
| 17 | sequence(:name) { |n| "team#{n}" } | 17 | sequence(:name) { |n| "team#{n}" } |
| 18 | + sequence(:description) { |n| "team_description#{n}" } | ||
| 18 | path { name.downcase.gsub(/\s/, '_') } | 19 | path { name.downcase.gsub(/\s/, '_') } |
| 19 | owner | 20 | owner |
| 20 | end | 21 | end |